repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/CharSetTest.java | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
| import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith; | package com.github.jknack.antlr4ide.parser;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class CharSetTest {
@Inject
@Extension | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/CharSetTest.java
import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
package com.github.jknack.antlr4ide.parser;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class CharSetTest {
@Inject
@Extension | private Antlr4ParseHelper<Grammar> parser; |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/issues/Issue57.java | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
| import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith; | package com.github.jknack.antlr4ide.issues;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class Issue57 {
@Inject
@Extension | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/issues/Issue57.java
import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
package com.github.jknack.antlr4ide.issues;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class Issue57 {
@Inject
@Extension | private Antlr4ParseHelper<Grammar> parser; |
antlr4ide/antlr4ide | antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeModule.java | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/ConsoleImpl.java
// public final class ConsoleImpl implements Console {
//
// public static final String QUALIFIER = "com.github.jknack.antlr4ide";
// public static final String KEY = "loglevel";
//
// /** default log level for console and loggers.*/
// public static final Level DEFAULT_LOGLEVEL = Level.INFO;
//
// /** default log level for console and loggers as a java.lang.String.*/
// public static final String DEFAULT_LOGLEVEL_AS_STRING = DEFAULT_LOGLEVEL.toString();
//
// @Override
// public void error(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.error(msg);
// }
//
// @Override
// public void warning(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.warn(msg);
// }
//
// @Override
// public void info(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.info(msg);
// }
//
// @Override
// public void debug(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.debug(msg);
// }
//
// @Override
// public void trace(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.trace(msg);
// }
//
// public static Logger getLogger() {
// final Logger logger = LogManager.getRootLogger();
// logger.setAdditivity(true);
// // set log-level of logger
// Level level = getLogLevel();
// logger.setLevel(level);
// return logger;
// }
//
// private String format(final String message, final Object...args) {
// final String result = String.format(message, args);
// return result;
// }
//
// public static Level getLogLevel() {
// final IPreferencesService service = Platform.getPreferencesService();
// final String string = service.getString(QUALIFIER, KEY,
// DEFAULT_LOGLEVEL_AS_STRING, null);
// final Level result = Level.toLevel(string);
// return result;
// }
//
// }
| import static com.google.common.base.Preconditions.checkNotNull;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.xtext.generator.IOutputConfigurationProvider;
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider;
import org.eclipse.xtext.naming.IQualifiedNameProvider;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.console.ConsoleImpl;
import com.github.jknack.antlr4ide.generator.Antlr4OutputConfigurationProvider;
import com.github.jknack.antlr4ide.lang.LangFactory;
import com.github.jknack.antlr4ide.scoping.Antlr4NameProvider;
import com.github.jknack.antlr4ide.validation.Antlr4MissingReferenceMessageProvider;
import com.google.inject.Binder; | package com.github.jknack.antlr4ide;
/**
* The runtime module useful for create or customize Xtext.
*/
public class Antlr4RuntimeModule extends com.github.jknack.antlr4ide.AbstractAntlr4RuntimeModule {
@Override
public void configure(final Binder binder) {
checkNotNull(binder);
super.configure(binder);
binder.bind(LangFactory.class).toInstance(LangFactory.eINSTANCE);
binder.bind(ILinkingDiagnosticMessageProvider.Extended.class)
.to(Antlr4MissingReferenceMessageProvider.class);
binder.bind(ILaunchManager.class).toInstance(getLaunchManager());
| // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/ConsoleImpl.java
// public final class ConsoleImpl implements Console {
//
// public static final String QUALIFIER = "com.github.jknack.antlr4ide";
// public static final String KEY = "loglevel";
//
// /** default log level for console and loggers.*/
// public static final Level DEFAULT_LOGLEVEL = Level.INFO;
//
// /** default log level for console and loggers as a java.lang.String.*/
// public static final String DEFAULT_LOGLEVEL_AS_STRING = DEFAULT_LOGLEVEL.toString();
//
// @Override
// public void error(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.error(msg);
// }
//
// @Override
// public void warning(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.warn(msg);
// }
//
// @Override
// public void info(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.info(msg);
// }
//
// @Override
// public void debug(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.debug(msg);
// }
//
// @Override
// public void trace(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.trace(msg);
// }
//
// public static Logger getLogger() {
// final Logger logger = LogManager.getRootLogger();
// logger.setAdditivity(true);
// // set log-level of logger
// Level level = getLogLevel();
// logger.setLevel(level);
// return logger;
// }
//
// private String format(final String message, final Object...args) {
// final String result = String.format(message, args);
// return result;
// }
//
// public static Level getLogLevel() {
// final IPreferencesService service = Platform.getPreferencesService();
// final String string = service.getString(QUALIFIER, KEY,
// DEFAULT_LOGLEVEL_AS_STRING, null);
// final Level result = Level.toLevel(string);
// return result;
// }
//
// }
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeModule.java
import static com.google.common.base.Preconditions.checkNotNull;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.xtext.generator.IOutputConfigurationProvider;
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider;
import org.eclipse.xtext.naming.IQualifiedNameProvider;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.console.ConsoleImpl;
import com.github.jknack.antlr4ide.generator.Antlr4OutputConfigurationProvider;
import com.github.jknack.antlr4ide.lang.LangFactory;
import com.github.jknack.antlr4ide.scoping.Antlr4NameProvider;
import com.github.jknack.antlr4ide.validation.Antlr4MissingReferenceMessageProvider;
import com.google.inject.Binder;
package com.github.jknack.antlr4ide;
/**
* The runtime module useful for create or customize Xtext.
*/
public class Antlr4RuntimeModule extends com.github.jknack.antlr4ide.AbstractAntlr4RuntimeModule {
@Override
public void configure(final Binder binder) {
checkNotNull(binder);
super.configure(binder);
binder.bind(LangFactory.class).toInstance(LangFactory.eINSTANCE);
binder.bind(ILinkingDiagnosticMessageProvider.Extended.class)
.to(Antlr4MissingReferenceMessageProvider.class);
binder.bind(ILaunchManager.class).toInstance(getLaunchManager());
| binder.bind(Console.class).toInstance(getConsole()); |
antlr4ide/antlr4ide | antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeModule.java | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/ConsoleImpl.java
// public final class ConsoleImpl implements Console {
//
// public static final String QUALIFIER = "com.github.jknack.antlr4ide";
// public static final String KEY = "loglevel";
//
// /** default log level for console and loggers.*/
// public static final Level DEFAULT_LOGLEVEL = Level.INFO;
//
// /** default log level for console and loggers as a java.lang.String.*/
// public static final String DEFAULT_LOGLEVEL_AS_STRING = DEFAULT_LOGLEVEL.toString();
//
// @Override
// public void error(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.error(msg);
// }
//
// @Override
// public void warning(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.warn(msg);
// }
//
// @Override
// public void info(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.info(msg);
// }
//
// @Override
// public void debug(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.debug(msg);
// }
//
// @Override
// public void trace(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.trace(msg);
// }
//
// public static Logger getLogger() {
// final Logger logger = LogManager.getRootLogger();
// logger.setAdditivity(true);
// // set log-level of logger
// Level level = getLogLevel();
// logger.setLevel(level);
// return logger;
// }
//
// private String format(final String message, final Object...args) {
// final String result = String.format(message, args);
// return result;
// }
//
// public static Level getLogLevel() {
// final IPreferencesService service = Platform.getPreferencesService();
// final String string = service.getString(QUALIFIER, KEY,
// DEFAULT_LOGLEVEL_AS_STRING, null);
// final Level result = Level.toLevel(string);
// return result;
// }
//
// }
| import static com.google.common.base.Preconditions.checkNotNull;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.xtext.generator.IOutputConfigurationProvider;
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider;
import org.eclipse.xtext.naming.IQualifiedNameProvider;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.console.ConsoleImpl;
import com.github.jknack.antlr4ide.generator.Antlr4OutputConfigurationProvider;
import com.github.jknack.antlr4ide.lang.LangFactory;
import com.github.jknack.antlr4ide.scoping.Antlr4NameProvider;
import com.github.jknack.antlr4ide.validation.Antlr4MissingReferenceMessageProvider;
import com.google.inject.Binder; | package com.github.jknack.antlr4ide;
/**
* The runtime module useful for create or customize Xtext.
*/
public class Antlr4RuntimeModule extends com.github.jknack.antlr4ide.AbstractAntlr4RuntimeModule {
@Override
public void configure(final Binder binder) {
checkNotNull(binder);
super.configure(binder);
binder.bind(LangFactory.class).toInstance(LangFactory.eINSTANCE);
binder.bind(ILinkingDiagnosticMessageProvider.Extended.class)
.to(Antlr4MissingReferenceMessageProvider.class);
binder.bind(ILaunchManager.class).toInstance(getLaunchManager());
binder.bind(Console.class).toInstance(getConsole());
}
@Override
public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
return Antlr4NameProvider.class;
}
public Class<? extends IOutputConfigurationProvider> bindIOutputConfigurationProvider() {
return Antlr4OutputConfigurationProvider.class;
}
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
protected Console getConsole() { | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/ConsoleImpl.java
// public final class ConsoleImpl implements Console {
//
// public static final String QUALIFIER = "com.github.jknack.antlr4ide";
// public static final String KEY = "loglevel";
//
// /** default log level for console and loggers.*/
// public static final Level DEFAULT_LOGLEVEL = Level.INFO;
//
// /** default log level for console and loggers as a java.lang.String.*/
// public static final String DEFAULT_LOGLEVEL_AS_STRING = DEFAULT_LOGLEVEL.toString();
//
// @Override
// public void error(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.error(msg);
// }
//
// @Override
// public void warning(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.warn(msg);
// }
//
// @Override
// public void info(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.info(msg);
// }
//
// @Override
// public void debug(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.debug(msg);
// }
//
// @Override
// public void trace(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.trace(msg);
// }
//
// public static Logger getLogger() {
// final Logger logger = LogManager.getRootLogger();
// logger.setAdditivity(true);
// // set log-level of logger
// Level level = getLogLevel();
// logger.setLevel(level);
// return logger;
// }
//
// private String format(final String message, final Object...args) {
// final String result = String.format(message, args);
// return result;
// }
//
// public static Level getLogLevel() {
// final IPreferencesService service = Platform.getPreferencesService();
// final String string = service.getString(QUALIFIER, KEY,
// DEFAULT_LOGLEVEL_AS_STRING, null);
// final Level result = Level.toLevel(string);
// return result;
// }
//
// }
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeModule.java
import static com.google.common.base.Preconditions.checkNotNull;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.xtext.generator.IOutputConfigurationProvider;
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider;
import org.eclipse.xtext.naming.IQualifiedNameProvider;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.console.ConsoleImpl;
import com.github.jknack.antlr4ide.generator.Antlr4OutputConfigurationProvider;
import com.github.jknack.antlr4ide.lang.LangFactory;
import com.github.jknack.antlr4ide.scoping.Antlr4NameProvider;
import com.github.jknack.antlr4ide.validation.Antlr4MissingReferenceMessageProvider;
import com.google.inject.Binder;
package com.github.jknack.antlr4ide;
/**
* The runtime module useful for create or customize Xtext.
*/
public class Antlr4RuntimeModule extends com.github.jknack.antlr4ide.AbstractAntlr4RuntimeModule {
@Override
public void configure(final Binder binder) {
checkNotNull(binder);
super.configure(binder);
binder.bind(LangFactory.class).toInstance(LangFactory.eINSTANCE);
binder.bind(ILinkingDiagnosticMessageProvider.Extended.class)
.to(Antlr4MissingReferenceMessageProvider.class);
binder.bind(ILaunchManager.class).toInstance(getLaunchManager());
binder.bind(Console.class).toInstance(getConsole());
}
@Override
public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
return Antlr4NameProvider.class;
}
public Class<? extends IOutputConfigurationProvider> bindIOutputConfigurationProvider() {
return Antlr4OutputConfigurationProvider.class;
}
protected ILaunchManager getLaunchManager() {
return DebugPlugin.getDefault().getLaunchManager();
}
protected Console getConsole() { | return new ConsoleImpl(); |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/generator/ToolRunnerTest.java | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
| import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.isA;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import java.io.File;
import java.io.InputStream;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.xtext.util.StringInputStream;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.easymock.PowerMock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import com.github.jknack.antlr4ide.console.Console;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists; | IPath parserPath = fileFullPath.removeLastSegments(1).append("HelloParser.java");
List<String> command = Lists.newArrayList("-o", ".", "-listener", "-no-visitor");
List<String> toolCommand = Lists.newArrayList(
"java",
"-cp",
toolPath.toFile().getAbsolutePath() + File.pathSeparator
+ toolPath.removeLastSegments(1).toFile().getAbsolutePath(),
ToolOptionsProvider.TOOL,
fileName);
toolCommand.addAll(command);
List<String> dependCommand = Lists.newArrayList(
"java",
"-cp",
toolPath.toFile().getAbsolutePath() + File.pathSeparator
+ toolPath.removeLastSegments(1).toFile().getAbsolutePath(),
ToolOptionsProvider.TOOL,
fileName);
dependCommand.add("-depend");
dependCommand.addAll(command);
IFile file = createMock(IFile.class);
IContainer fileParent = createMock(IContainer.class);
ToolOptions options = createMock(ToolOptions.class);
ProcessBuilder toolPb = PowerMock.createMock(ProcessBuilder.class);
Process toolProcess = createMock(Process.class);
ProcessBuilder dependPb = PowerMock.createMock(ProcessBuilder.class);
Process dependProcess = createMock(Process.class);
| // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/generator/ToolRunnerTest.java
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.isA;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import java.io.File;
import java.io.InputStream;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.xtext.util.StringInputStream;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.easymock.PowerMock;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import com.github.jknack.antlr4ide.console.Console;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
IPath parserPath = fileFullPath.removeLastSegments(1).append("HelloParser.java");
List<String> command = Lists.newArrayList("-o", ".", "-listener", "-no-visitor");
List<String> toolCommand = Lists.newArrayList(
"java",
"-cp",
toolPath.toFile().getAbsolutePath() + File.pathSeparator
+ toolPath.removeLastSegments(1).toFile().getAbsolutePath(),
ToolOptionsProvider.TOOL,
fileName);
toolCommand.addAll(command);
List<String> dependCommand = Lists.newArrayList(
"java",
"-cp",
toolPath.toFile().getAbsolutePath() + File.pathSeparator
+ toolPath.removeLastSegments(1).toFile().getAbsolutePath(),
ToolOptionsProvider.TOOL,
fileName);
dependCommand.add("-depend");
dependCommand.addAll(command);
IFile file = createMock(IFile.class);
IContainer fileParent = createMock(IContainer.class);
ToolOptions options = createMock(ToolOptions.class);
ProcessBuilder toolPb = PowerMock.createMock(ProcessBuilder.class);
Process toolProcess = createMock(Process.class);
ProcessBuilder dependPb = PowerMock.createMock(ProcessBuilder.class);
Process dependProcess = createMock(Process.class);
| Console console = createMock(Console.class); |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeModuleTest.java | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
| import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createNiceMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertEquals;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider;
import org.junit.Test;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.generator.Antlr4OutputConfigurationProvider;
import com.github.jknack.antlr4ide.lang.LangFactory;
import com.github.jknack.antlr4ide.scoping.Antlr4NameProvider;
import com.github.jknack.antlr4ide.validation.Antlr4MissingReferenceMessageProvider;
import com.google.inject.Binder;
import com.google.inject.binder.AnnotatedBindingBuilder; | package com.github.jknack.antlr4ide;
public class Antlr4RuntimeModuleTest {
@SuppressWarnings("unchecked")
@Test
public void configure() {
Binder binder = createNiceMock(Binder.class);
AnnotatedBindingBuilder<LangFactory> bindLangFactory = createMock(AnnotatedBindingBuilder.class);
AnnotatedBindingBuilder<ILinkingDiagnosticMessageProvider.Extended> bindLinkingDMP = createMock(AnnotatedBindingBuilder.class);
AnnotatedBindingBuilder<ILaunchManager> bindLaunchManager = createMock(AnnotatedBindingBuilder.class);
final ILaunchManager launchManager = createMock(ILaunchManager.class); | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeModuleTest.java
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createNiceMock;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertEquals;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.xtext.linking.ILinkingDiagnosticMessageProvider;
import org.junit.Test;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.generator.Antlr4OutputConfigurationProvider;
import com.github.jknack.antlr4ide.lang.LangFactory;
import com.github.jknack.antlr4ide.scoping.Antlr4NameProvider;
import com.github.jknack.antlr4ide.validation.Antlr4MissingReferenceMessageProvider;
import com.google.inject.Binder;
import com.google.inject.binder.AnnotatedBindingBuilder;
package com.github.jknack.antlr4ide;
public class Antlr4RuntimeModuleTest {
@SuppressWarnings("unchecked")
@Test
public void configure() {
Binder binder = createNiceMock(Binder.class);
AnnotatedBindingBuilder<LangFactory> bindLangFactory = createMock(AnnotatedBindingBuilder.class);
AnnotatedBindingBuilder<ILinkingDiagnosticMessageProvider.Extended> bindLinkingDMP = createMock(AnnotatedBindingBuilder.class);
AnnotatedBindingBuilder<ILaunchManager> bindLaunchManager = createMock(AnnotatedBindingBuilder.class);
final ILaunchManager launchManager = createMock(ILaunchManager.class); | final AnnotatedBindingBuilder<Console> bindConsole = createMock(AnnotatedBindingBuilder.class); |
antlr4ide/antlr4ide | antlr4ide.ui/src/main/java/com/github/jknack/antlr4ide/ui/preferences/GeneralPreferencePage.java | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/ConsoleImpl.java
// public final class ConsoleImpl implements Console {
//
// public static final String QUALIFIER = "com.github.jknack.antlr4ide";
// public static final String KEY = "loglevel";
//
// /** default log level for console and loggers.*/
// public static final Level DEFAULT_LOGLEVEL = Level.INFO;
//
// /** default log level for console and loggers as a java.lang.String.*/
// public static final String DEFAULT_LOGLEVEL_AS_STRING = DEFAULT_LOGLEVEL.toString();
//
// @Override
// public void error(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.error(msg);
// }
//
// @Override
// public void warning(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.warn(msg);
// }
//
// @Override
// public void info(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.info(msg);
// }
//
// @Override
// public void debug(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.debug(msg);
// }
//
// @Override
// public void trace(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.trace(msg);
// }
//
// public static Logger getLogger() {
// final Logger logger = LogManager.getRootLogger();
// logger.setAdditivity(true);
// // set log-level of logger
// Level level = getLogLevel();
// logger.setLevel(level);
// return logger;
// }
//
// private String format(final String message, final Object...args) {
// final String result = String.format(message, args);
// return result;
// }
//
// public static Level getLogLevel() {
// final IPreferencesService service = Platform.getPreferencesService();
// final String string = service.getString(QUALIFIER, KEY,
// DEFAULT_LOGLEVEL_AS_STRING, null);
// final Level result = Level.toLevel(string);
// return result;
// }
//
// }
| import com.github.jknack.antlr4ide.console.ConsoleImpl;
import org.apache.log4j.Level;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.ComboFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.preferences.ScopedPreferenceStore; | package com.github.jknack.antlr4ide.ui.preferences;
/**
* GeneralPreferencePage
*
* @see <a href="http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-72.htm"
* >Eclipse preferences</a>
*
* @see <a href="http://xtextcasts.org/episodes/21-preference-page">Xtext
* preferences</a>
* @see <a
* href="http://stackoverflow.com/questions/7964212/correctly-initializing-and-retrieving-preferences-in-a-xtext-based-eclipse-plugi">Xtext
* preferences on stack-overflow</a>
*/
public class GeneralPreferencePage extends FieldEditorPreferencePage implements
IWorkbenchPreferencePage {
public GeneralPreferencePage() {
super(FieldEditorPreferencePage.GRID);
}
@Override
public void createFieldEditors() {
final Level[] logLevels = new Level[] { Level.OFF, Level.ERROR,
Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE };
final String[][] values = new String[logLevels.length][2];
for (int i = 0; i < logLevels.length; i++) {
// constructor of ComboFieldEditor expects a two-dimensional
// array with label-value pairs.
values[i][0] = logLevels[i].toString();
values[i][1] = logLevels[i].toString();
}
final ComboFieldEditor editor = new ComboFieldEditor( | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/ConsoleImpl.java
// public final class ConsoleImpl implements Console {
//
// public static final String QUALIFIER = "com.github.jknack.antlr4ide";
// public static final String KEY = "loglevel";
//
// /** default log level for console and loggers.*/
// public static final Level DEFAULT_LOGLEVEL = Level.INFO;
//
// /** default log level for console and loggers as a java.lang.String.*/
// public static final String DEFAULT_LOGLEVEL_AS_STRING = DEFAULT_LOGLEVEL.toString();
//
// @Override
// public void error(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.error(msg);
// }
//
// @Override
// public void warning(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.warn(msg);
// }
//
// @Override
// public void info(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.info(msg);
// }
//
// @Override
// public void debug(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.debug(msg);
// }
//
// @Override
// public void trace(String message, Object...args) {
// final Logger logger = getLogger();
// final String msg = format(message, args);
// logger.trace(msg);
// }
//
// public static Logger getLogger() {
// final Logger logger = LogManager.getRootLogger();
// logger.setAdditivity(true);
// // set log-level of logger
// Level level = getLogLevel();
// logger.setLevel(level);
// return logger;
// }
//
// private String format(final String message, final Object...args) {
// final String result = String.format(message, args);
// return result;
// }
//
// public static Level getLogLevel() {
// final IPreferencesService service = Platform.getPreferencesService();
// final String string = service.getString(QUALIFIER, KEY,
// DEFAULT_LOGLEVEL_AS_STRING, null);
// final Level result = Level.toLevel(string);
// return result;
// }
//
// }
// Path: antlr4ide.ui/src/main/java/com/github/jknack/antlr4ide/ui/preferences/GeneralPreferencePage.java
import com.github.jknack.antlr4ide.console.ConsoleImpl;
import org.apache.log4j.Level;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.ComboFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.preferences.ScopedPreferenceStore;
package com.github.jknack.antlr4ide.ui.preferences;
/**
* GeneralPreferencePage
*
* @see <a href="http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-72.htm"
* >Eclipse preferences</a>
*
* @see <a href="http://xtextcasts.org/episodes/21-preference-page">Xtext
* preferences</a>
* @see <a
* href="http://stackoverflow.com/questions/7964212/correctly-initializing-and-retrieving-preferences-in-a-xtext-based-eclipse-plugi">Xtext
* preferences on stack-overflow</a>
*/
public class GeneralPreferencePage extends FieldEditorPreferencePage implements
IWorkbenchPreferencePage {
public GeneralPreferencePage() {
super(FieldEditorPreferencePage.GRID);
}
@Override
public void createFieldEditors() {
final Level[] logLevels = new Level[] { Level.OFF, Level.ERROR,
Level.WARN, Level.INFO, Level.DEBUG, Level.TRACE };
final String[][] values = new String[logLevels.length][2];
for (int i = 0; i < logLevels.length; i++) {
// constructor of ComboFieldEditor expects a two-dimensional
// array with label-value pairs.
values[i][0] = logLevels[i].toString();
values[i][1] = logLevels[i].toString();
}
final ComboFieldEditor editor = new ComboFieldEditor( | ConsoleImpl.KEY, "Log level:", values, |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/GrammarSyntaxTest.java | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
| import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.lang.GrammarType;
import com.github.jknack.antlr4ide.lang.Option;
import com.github.jknack.antlr4ide.lang.OptionValue;
import com.github.jknack.antlr4ide.lang.Options;
import com.github.jknack.antlr4ide.lang.PrequelConstruct;
import com.github.jknack.antlr4ide.lang.QualifiedId;
import com.github.jknack.antlr4ide.lang.QualifiedOption;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import java.io.File;
import org.eclipse.emf.common.util.EList;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.junit4.util.ParseHelper;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith; | package com.github.jknack.antlr4ide.parser;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class GrammarSyntaxTest {
@Inject
@Extension | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/GrammarSyntaxTest.java
import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.lang.GrammarType;
import com.github.jknack.antlr4ide.lang.Option;
import com.github.jknack.antlr4ide.lang.OptionValue;
import com.github.jknack.antlr4ide.lang.Options;
import com.github.jknack.antlr4ide.lang.PrequelConstruct;
import com.github.jknack.antlr4ide.lang.QualifiedId;
import com.github.jknack.antlr4ide.lang.QualifiedOption;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import java.io.File;
import org.eclipse.emf.common.util.EList;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.junit4.util.ParseHelper;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
package com.github.jknack.antlr4ide.parser;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class GrammarSyntaxTest {
@Inject
@Extension | private Antlr4ParseHelper<Grammar> helper; |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestStandaloneSetup.java
// public class Antlr4TestStandaloneSetup extends Antlr4StandaloneSetupGenerated {
// @Override
// public Injector createInjector() {
// Antlr4RuntimeTestModule antlr4RuntimeTestModule = new Antlr4RuntimeTestModule();
// return Guice.createInjector(antlr4RuntimeTestModule);
// }
//
// }
| import com.google.inject.Injector;
import com.github.jknack.antlr4ide.Antlr4InjectorProvider;
import com.github.jknack.antlr4ide.Antlr4TestStandaloneSetup; | package com.github.jknack.antlr4ide;
public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
@Override
protected Injector internalCreateInjector() { | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestStandaloneSetup.java
// public class Antlr4TestStandaloneSetup extends Antlr4StandaloneSetupGenerated {
// @Override
// public Injector createInjector() {
// Antlr4RuntimeTestModule antlr4RuntimeTestModule = new Antlr4RuntimeTestModule();
// return Guice.createInjector(antlr4RuntimeTestModule);
// }
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
import com.google.inject.Injector;
import com.github.jknack.antlr4ide.Antlr4InjectorProvider;
import com.github.jknack.antlr4ide.Antlr4TestStandaloneSetup;
package com.github.jknack.antlr4ide;
public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
@Override
protected Injector internalCreateInjector() { | Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup(); |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/issues/Issue42.java | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
| import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith; | package com.github.jknack.antlr4ide.issues;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class Issue42 {
@Inject
@Extension | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/issues/Issue42.java
import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
package com.github.jknack.antlr4ide.issues;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class Issue42 {
@Inject
@Extension | private Antlr4ParseHelper<Grammar> parser; |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeTestModule.java | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/services/GrammarResource.java
// public interface GrammarResource {
//
// Grammar grammarFrom(IFile file);
//
// Resource resourceFrom(IFile file);
//
// IFile fileFrom(Resource resource);
//
// IFile fileFrom(Grammar grammar);
//
// }
| import java.util.Set;
import org.easymock.EasyMock;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.debug.core.ILaunchManager;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.generator.CodeGeneratorListener;
import com.github.jknack.antlr4ide.generator.ToolOptionsProvider;
import com.github.jknack.antlr4ide.services.GrammarResource;
import com.google.common.collect.Sets;
import com.google.inject.Binder;
import com.google.inject.Provides; | package com.github.jknack.antlr4ide;
public class Antlr4RuntimeTestModule extends Antlr4RuntimeModule {
public static IWorkspaceRoot workspaceRoot = EasyMock.createMock(IWorkspaceRoot.class);
public static ToolOptionsProvider optionsProvider = EasyMock.createMock(ToolOptionsProvider.class);
| // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/services/GrammarResource.java
// public interface GrammarResource {
//
// Grammar grammarFrom(IFile file);
//
// Resource resourceFrom(IFile file);
//
// IFile fileFrom(Resource resource);
//
// IFile fileFrom(Grammar grammar);
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeTestModule.java
import java.util.Set;
import org.easymock.EasyMock;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.debug.core.ILaunchManager;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.generator.CodeGeneratorListener;
import com.github.jknack.antlr4ide.generator.ToolOptionsProvider;
import com.github.jknack.antlr4ide.services.GrammarResource;
import com.google.common.collect.Sets;
import com.google.inject.Binder;
import com.google.inject.Provides;
package com.github.jknack.antlr4ide;
public class Antlr4RuntimeTestModule extends Antlr4RuntimeModule {
public static IWorkspaceRoot workspaceRoot = EasyMock.createMock(IWorkspaceRoot.class);
public static ToolOptionsProvider optionsProvider = EasyMock.createMock(ToolOptionsProvider.class);
| public static Console console = EasyMock.createMock(Console.class); |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeTestModule.java | // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/services/GrammarResource.java
// public interface GrammarResource {
//
// Grammar grammarFrom(IFile file);
//
// Resource resourceFrom(IFile file);
//
// IFile fileFrom(Resource resource);
//
// IFile fileFrom(Grammar grammar);
//
// }
| import java.util.Set;
import org.easymock.EasyMock;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.debug.core.ILaunchManager;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.generator.CodeGeneratorListener;
import com.github.jknack.antlr4ide.generator.ToolOptionsProvider;
import com.github.jknack.antlr4ide.services.GrammarResource;
import com.google.common.collect.Sets;
import com.google.inject.Binder;
import com.google.inject.Provides; | package com.github.jknack.antlr4ide;
public class Antlr4RuntimeTestModule extends Antlr4RuntimeModule {
public static IWorkspaceRoot workspaceRoot = EasyMock.createMock(IWorkspaceRoot.class);
public static ToolOptionsProvider optionsProvider = EasyMock.createMock(ToolOptionsProvider.class);
public static Console console = EasyMock.createMock(Console.class);
| // Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/console/Console.java
// public interface Console {
//
// /**
// * Write an ERROR message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void error(String message, Object...args);
//
// /**
// * Write a WARNING message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void warning(String message, Object...args);
//
// /**
// * Write an INFO message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void info(String message, Object...args);
//
// /**
// * Write a DEBUG message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void debug(String message, Object...args);
//
// /**
// * Write a TRACE message into the console.
// *
// * @param message The message. Might includes place holder. See String#format
// * @param args Message arguments.
// */
// public void trace(String message, Object...args);
//
// }
//
// Path: antlr4ide.core/src/main/java/com/github/jknack/antlr4ide/services/GrammarResource.java
// public interface GrammarResource {
//
// Grammar grammarFrom(IFile file);
//
// Resource resourceFrom(IFile file);
//
// IFile fileFrom(Resource resource);
//
// IFile fileFrom(Grammar grammar);
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeTestModule.java
import java.util.Set;
import org.easymock.EasyMock;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.debug.core.ILaunchManager;
import com.github.jknack.antlr4ide.console.Console;
import com.github.jknack.antlr4ide.generator.CodeGeneratorListener;
import com.github.jknack.antlr4ide.generator.ToolOptionsProvider;
import com.github.jknack.antlr4ide.services.GrammarResource;
import com.google.common.collect.Sets;
import com.google.inject.Binder;
import com.google.inject.Provides;
package com.github.jknack.antlr4ide;
public class Antlr4RuntimeTestModule extends Antlr4RuntimeModule {
public static IWorkspaceRoot workspaceRoot = EasyMock.createMock(IWorkspaceRoot.class);
public static ToolOptionsProvider optionsProvider = EasyMock.createMock(ToolOptionsProvider.class);
public static Console console = EasyMock.createMock(Console.class);
| public static GrammarResource grammarResource = EasyMock.createMock(GrammarResource.class); |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/LangActionTest.java | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
| import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.lang.GrammarAction;
import com.github.jknack.antlr4ide.lang.PrequelConstruct;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.emf.common.util.EList;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.junit4.util.ParseHelper;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith; | package com.github.jknack.antlr4ide.parser;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class LangActionTest {
@Inject
@Extension | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
//
// @Override
// protected Injector internalCreateInjector() {
// Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// }
//
// }
//
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
//
// @Inject
// private IParser parser;
//
// public IParseResult parse(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// return this.parser.parse(stringReader);
// }
//
// @SuppressWarnings({ "hiding", "unchecked" })
// public <T extends Object> T build(final CharSequence input) {
// final String content = input.toString();
// final StringReader stringReader = new StringReader(content);
// final IParseResult parseResult = this.parser.parse(stringReader);
// final EObject rootAstElement = parseResult.getRootASTElement();
// return ((T) rootAstElement);
// }
//
// public String getTextFromFile(final Class<?> clazz)
// throws Exception {
// return getTextFromFile(clazz, "");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix)
// throws Exception {
// return getTextFromFile(clazz, suffix, ".g4");
// }
//
// public String getTextFromFile(final Class<?> clazz, final String suffix,
// final String fileExtension) throws Exception {
// final String dir = "src/main/resources/";
// final String dir2 = dir.replace("/", File.separator);
// //final Package pkg = clazz.getPackage();
// //final String pkgName = pkg.getName();
// //final String pkgName2 = pkgName.replace(".", File.separator);
// //final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// final String pathAsString = dir2 + fileName;
// final File file = new File(pathAsString);
// final String content = FileUtils.readFileToString(file, "UTF-8");
// return content;
// }
//
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/LangActionTest.java
import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.lang.GrammarAction;
import com.github.jknack.antlr4ide.lang.PrequelConstruct;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.emf.common.util.EList;
import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.junit4.util.ParseHelper;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
package com.github.jknack.antlr4ide.parser;
@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class LangActionTest {
@Inject
@Extension | private Antlr4ParseHelper<Grammar> parser; |
antlr4ide/antlr4ide | antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestStandaloneSetup.java | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeTestModule.java
// public class Antlr4RuntimeTestModule extends Antlr4RuntimeModule {
//
// public static IWorkspaceRoot workspaceRoot = EasyMock.createMock(IWorkspaceRoot.class);
//
// public static ToolOptionsProvider optionsProvider = EasyMock.createMock(ToolOptionsProvider.class);
//
// public static Console console = EasyMock.createMock(Console.class);
//
// public static GrammarResource grammarResource = EasyMock.createMock(GrammarResource.class);
//
// public static ILaunchManager launchManager = EasyMock.createMock(ILaunchManager.class);
//
// @Override
// public void configure(final Binder binder) {
// super.configure(binder);
// binder.bind(IWorkspaceRoot.class).toInstance(workspaceRoot);
//
// binder.bind(ToolOptionsProvider.class).toInstance(optionsProvider);
//
// binder.bind(GrammarResource.class).toInstance(grammarResource);
// }
//
// @Provides
// public Set<CodeGeneratorListener> codeGeneratorListeners() {
// return Sets.<CodeGeneratorListener> newHashSet();
// }
//
// @Override
// protected ILaunchManager getLaunchManager() {
// return launchManager;
// }
// }
| import com.github.jknack.antlr4ide.Antlr4RuntimeTestModule;
import com.github.jknack.antlr4ide.Antlr4StandaloneSetupGenerated;
import com.google.inject.Guice;
import com.google.inject.Injector; | package com.github.jknack.antlr4ide;
public class Antlr4TestStandaloneSetup extends Antlr4StandaloneSetupGenerated {
@Override
public Injector createInjector() { | // Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4RuntimeTestModule.java
// public class Antlr4RuntimeTestModule extends Antlr4RuntimeModule {
//
// public static IWorkspaceRoot workspaceRoot = EasyMock.createMock(IWorkspaceRoot.class);
//
// public static ToolOptionsProvider optionsProvider = EasyMock.createMock(ToolOptionsProvider.class);
//
// public static Console console = EasyMock.createMock(Console.class);
//
// public static GrammarResource grammarResource = EasyMock.createMock(GrammarResource.class);
//
// public static ILaunchManager launchManager = EasyMock.createMock(ILaunchManager.class);
//
// @Override
// public void configure(final Binder binder) {
// super.configure(binder);
// binder.bind(IWorkspaceRoot.class).toInstance(workspaceRoot);
//
// binder.bind(ToolOptionsProvider.class).toInstance(optionsProvider);
//
// binder.bind(GrammarResource.class).toInstance(grammarResource);
// }
//
// @Provides
// public Set<CodeGeneratorListener> codeGeneratorListeners() {
// return Sets.<CodeGeneratorListener> newHashSet();
// }
//
// @Override
// protected ILaunchManager getLaunchManager() {
// return launchManager;
// }
// }
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestStandaloneSetup.java
import com.github.jknack.antlr4ide.Antlr4RuntimeTestModule;
import com.github.jknack.antlr4ide.Antlr4StandaloneSetupGenerated;
import com.google.inject.Guice;
import com.google.inject.Injector;
package com.github.jknack.antlr4ide;
public class Antlr4TestStandaloneSetup extends Antlr4StandaloneSetupGenerated {
@Override
public Injector createInjector() { | Antlr4RuntimeTestModule antlr4RuntimeTestModule = new Antlr4RuntimeTestModule(); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/converter/Converter.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/export/types/Exporter.java
// public interface Exporter {
//
// /**
// * Writes the passed string into a specific target.
// *
// * @param text The generated text.
// */
// void write(String text) throws Exception;
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.export.types.Exporter; | /*
* Converter.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.converter;
/**
*
*/
public interface Converter {
String getLoadingInfoString();
void setOntologyHasMissingImports(boolean val);
boolean ontologyHasMissingImports();
void addLoadingInfo(String msg);
boolean getCurrentlyLoadingFlag();
void setCurrentlyLoadingFlag(boolean val);
void setCurrentlyLoadingFlag(String parentLine,boolean val);
void addLoadingInfoToParentLine(String msg);
void clearLoadingMsg();
void convert();
void releaseMemory();
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/export/types/Exporter.java
// public interface Exporter {
//
// /**
// * Writes the passed string into a specific target.
// *
// * @param text The generated text.
// */
// void write(String text) throws Exception;
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/converter/Converter.java
import de.uni_stuttgart.vis.vowl.owl2vowl.export.types.Exporter;
/*
* Converter.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.converter;
/**
*
*/
public interface Converter {
String getLoadingInfoString();
void setOntologyHasMissingImports(boolean val);
boolean ontologyHasMissingImports();
void addLoadingInfo(String msg);
boolean getCurrentlyLoadingFlag();
void setCurrentlyLoadingFlag(boolean val);
void setCurrentlyLoadingFlag(String parentLine,boolean val);
void addLoadingInfoToParentLine(String msg);
void clearLoadingMsg();
void convert();
void releaseMemory();
| void export(Exporter exporter) throws Exception; |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/DatatypeValueReference.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class DatatypeValueReference extends VowlDatatypeProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public DatatypeValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/DatatypeValueReference.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class DatatypeValueReference extends VowlDatatypeProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public DatatypeValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) { | addAttribute(VowlAttribute.ALL_VALUES); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/DatatypeValueReference.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class DatatypeValueReference extends VowlDatatypeProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public DatatypeValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) {
addAttribute(VowlAttribute.ALL_VALUES); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/DatatypeValueReference.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class DatatypeValueReference extends VowlDatatypeProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public DatatypeValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) {
addAttribute(VowlAttribute.ALL_VALUES); | setType(PropertyType.ALL_VALUES); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/ObjectValueReference.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class ObjectValueReference extends VowlObjectProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public ObjectValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/ObjectValueReference.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class ObjectValueReference extends VowlObjectProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public ObjectValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) { | addAttribute(VowlAttribute.ALL_VALUES); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/ObjectValueReference.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class ObjectValueReference extends VowlObjectProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public ObjectValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) {
addAttribute(VowlAttribute.ALL_VALUES); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyAllSomeValue.java
// public enum PropertyAllSomeValue {
// ALL, SOME;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/HasReference.java
// public interface HasReference {
//
// IRI getReferenceIri();
//
// void setReferenceIri(IRI referenceIri);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/ObjectValueReference.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyAllSomeValue;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.HasReference;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
public class ObjectValueReference extends VowlObjectProperty implements HasReference {
private PropertyAllSomeValue value;
private IRI referenceIri;
public ObjectValueReference(IRI iri, IRI referencedIri) {
super(iri);
this.referenceIri = referencedIri;
}
public PropertyAllSomeValue getValue() {
return value;
}
public void setValue(PropertyAllSomeValue value) {
this.value = value;
if (value == PropertyAllSomeValue.ALL) {
addAttribute(VowlAttribute.ALL_VALUES); | setType(PropertyType.ALL_VALUES); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/NullClass.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes;
/**
* NullClass which has no functionality and should be just used for VisitorEx returns.
*
* @author Eduard
*/
public class NullClass extends AbstractClass {
public NullClass() {
super(null, null);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/NullClass.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes;
/**
* NullClass which has no functionality and should be just used for VisitorEx returns.
*
* @author Eduard
*/
public class NullClass extends AbstractClass {
public NullClass() {
super(null, null);
}
@Override | public void accept(VowlElementVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) { | super(iri, PropertyType.OBJECT); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) {
super(iri, PropertyType.OBJECT); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) {
super(iri, PropertyType.OBJECT); | addAttribute(VowlAttribute.OBJECT); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) {
super(iri, PropertyType.OBJECT);
addAttribute(VowlAttribute.OBJECT);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) {
super(iri, PropertyType.OBJECT);
addAttribute(VowlAttribute.OBJECT);
}
@Override | public void accept(VowlElementVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) {
super(iri, PropertyType.OBJECT);
addAttribute(VowlAttribute.OBJECT);
}
@Override
public void accept(VowlElementVisitor visitor) {
visitor.visit(this);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlObjectProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlObjectProperty extends AbstractProperty {
public VowlObjectProperty(IRI iri) {
super(iri, PropertyType.OBJECT);
addAttribute(VowlAttribute.OBJECT);
}
@Override
public void accept(VowlElementVisitor visitor) {
visitor.visit(this);
}
@Override | public void accept(VowlPropertyVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
// public class TypeOfProperty extends AbstractProperty {
// public TypeOfProperty(IRI iri) {
// super(iri, PropertyType.TYPEOF);
// getAnnotations().addLabel(new Annotation("label", "is a"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
// public class VowlDatatypeProperty extends AbstractProperty {
// public VowlDatatypeProperty(IRI iri) {
// super(iri, PropertyType.DATATYPE);
// addAttribute(VowlAttribute.DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
// public class VowlObjectProperty extends AbstractProperty {
// public VowlObjectProperty(IRI iri) {
// super(iri, PropertyType.OBJECT);
// addAttribute(VowlAttribute.OBJECT);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlDatatypeProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlObjectProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.TypeOfProperty; | /*
* VowlPropertyVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlPropertyVisitor {
void visit(VowlObjectProperty vowlObjectProperty);
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
// public class TypeOfProperty extends AbstractProperty {
// public TypeOfProperty(IRI iri) {
// super(iri, PropertyType.TYPEOF);
// getAnnotations().addLabel(new Annotation("label", "is a"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
// public class VowlDatatypeProperty extends AbstractProperty {
// public VowlDatatypeProperty(IRI iri) {
// super(iri, PropertyType.DATATYPE);
// addAttribute(VowlAttribute.DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
// public class VowlObjectProperty extends AbstractProperty {
// public VowlObjectProperty(IRI iri) {
// super(iri, PropertyType.OBJECT);
// addAttribute(VowlAttribute.OBJECT);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlDatatypeProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlObjectProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.TypeOfProperty;
/*
* VowlPropertyVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlPropertyVisitor {
void visit(VowlObjectProperty vowlObjectProperty);
| void visit(VowlDatatypeProperty vowlDatatypeProperty); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
// public class TypeOfProperty extends AbstractProperty {
// public TypeOfProperty(IRI iri) {
// super(iri, PropertyType.TYPEOF);
// getAnnotations().addLabel(new Annotation("label", "is a"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
// public class VowlDatatypeProperty extends AbstractProperty {
// public VowlDatatypeProperty(IRI iri) {
// super(iri, PropertyType.DATATYPE);
// addAttribute(VowlAttribute.DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
// public class VowlObjectProperty extends AbstractProperty {
// public VowlObjectProperty(IRI iri) {
// super(iri, PropertyType.OBJECT);
// addAttribute(VowlAttribute.OBJECT);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlDatatypeProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlObjectProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.TypeOfProperty; | /*
* VowlPropertyVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlPropertyVisitor {
void visit(VowlObjectProperty vowlObjectProperty);
void visit(VowlDatatypeProperty vowlDatatypeProperty);
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
// public class TypeOfProperty extends AbstractProperty {
// public TypeOfProperty(IRI iri) {
// super(iri, PropertyType.TYPEOF);
// getAnnotations().addLabel(new Annotation("label", "is a"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
// public class VowlDatatypeProperty extends AbstractProperty {
// public VowlDatatypeProperty(IRI iri) {
// super(iri, PropertyType.DATATYPE);
// addAttribute(VowlAttribute.DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlObjectProperty.java
// public class VowlObjectProperty extends AbstractProperty {
// public VowlObjectProperty(IRI iri) {
// super(iri, PropertyType.OBJECT);
// addAttribute(VowlAttribute.OBJECT);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// @Override
// public void accept(VowlPropertyVisitor visitor) {
// visitor.visit(this);
// }
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlDatatypeProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.VowlObjectProperty;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties.TypeOfProperty;
/*
* VowlPropertyVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlPropertyVisitor {
void visit(VowlObjectProperty vowlObjectProperty);
void visit(VowlDatatypeProperty vowlDatatypeProperty);
| void visit(TypeOfProperty typeOfProperty); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType; | /*
* VowlLiteral.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlLiteral extends AbstractDatatype {
public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
public VowlLiteral(IRI iri) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType;
/*
* VowlLiteral.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlLiteral extends AbstractDatatype {
public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
public VowlLiteral(IRI iri) { | super(iri, NodeType.TYPE_LITERAL); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType; | /*
* VowlLiteral.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlLiteral extends AbstractDatatype {
public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
public VowlLiteral(IRI iri) {
super(iri, NodeType.TYPE_LITERAL); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType;
/*
* VowlLiteral.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlLiteral extends AbstractDatatype {
public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
public VowlLiteral(IRI iri) {
super(iri, NodeType.TYPE_LITERAL); | getAnnotations().addLabel(new Annotation("label", "Literal")); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType; | /*
* VowlLiteral.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlLiteral extends AbstractDatatype {
public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
public VowlLiteral(IRI iri) {
super(iri, NodeType.TYPE_LITERAL);
getAnnotations().addLabel(new Annotation("label", "Literal"));
}
public String getGenericIri() {
return LITERAL_IRI;
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType;
/*
* VowlLiteral.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlLiteral extends AbstractDatatype {
public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
public VowlLiteral(IRI iri) {
super(iri, NodeType.TYPE_LITERAL);
getAnnotations().addLabel(new Annotation("label", "Literal"));
}
public String getGenericIri() {
return LITERAL_IRI;
}
@Override | public void accept(VowlElementVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlClassVisitor.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
// public class VowlClass extends AbstractClass {
//
// public VowlClass(IRI iri) {
// super(iri, NodeType.TYPE_CLASS);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlThing.java
// public class VowlThing extends AbstractClass {
// public static final String THING_IRI = Standard_Iris.OWL_THING_CLASS_URI;
// public static final IRI GENERIC_THING_IRI = IRI.create(THING_IRI);
//
// protected VowlThing(IRI iri, String type) {
// super(iri, type);
// }
//
// public VowlThing(IRI iri) {
// super(iri, NodeType.TYPE_THING);
// getAnnotations().addLabel(new Annotation("label", "Thing"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
// public class VowlDatatype extends AbstractDatatype {
// public VowlDatatype(IRI iri) {
// super(iri, NodeType.TYPE_DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
// public class VowlLiteral extends AbstractDatatype {
// public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
//
// public VowlLiteral(IRI iri) {
// super(iri, NodeType.TYPE_LITERAL);
// getAnnotations().addLabel(new Annotation("label", "Literal"));
// }
//
// public String getGenericIri() {
// return LITERAL_IRI;
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlThing;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlDatatype;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlLiteral;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlClass; | /*
* VowlClassVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlClassVisitor {
void visit(VowlThing vowlThing);
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
// public class VowlClass extends AbstractClass {
//
// public VowlClass(IRI iri) {
// super(iri, NodeType.TYPE_CLASS);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlThing.java
// public class VowlThing extends AbstractClass {
// public static final String THING_IRI = Standard_Iris.OWL_THING_CLASS_URI;
// public static final IRI GENERIC_THING_IRI = IRI.create(THING_IRI);
//
// protected VowlThing(IRI iri, String type) {
// super(iri, type);
// }
//
// public VowlThing(IRI iri) {
// super(iri, NodeType.TYPE_THING);
// getAnnotations().addLabel(new Annotation("label", "Thing"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
// public class VowlDatatype extends AbstractDatatype {
// public VowlDatatype(IRI iri) {
// super(iri, NodeType.TYPE_DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
// public class VowlLiteral extends AbstractDatatype {
// public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
//
// public VowlLiteral(IRI iri) {
// super(iri, NodeType.TYPE_LITERAL);
// getAnnotations().addLabel(new Annotation("label", "Literal"));
// }
//
// public String getGenericIri() {
// return LITERAL_IRI;
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlClassVisitor.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlThing;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlDatatype;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlLiteral;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlClass;
/*
* VowlClassVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlClassVisitor {
void visit(VowlThing vowlThing);
| void visit(VowlClass vowlClass); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlClassVisitor.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
// public class VowlClass extends AbstractClass {
//
// public VowlClass(IRI iri) {
// super(iri, NodeType.TYPE_CLASS);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlThing.java
// public class VowlThing extends AbstractClass {
// public static final String THING_IRI = Standard_Iris.OWL_THING_CLASS_URI;
// public static final IRI GENERIC_THING_IRI = IRI.create(THING_IRI);
//
// protected VowlThing(IRI iri, String type) {
// super(iri, type);
// }
//
// public VowlThing(IRI iri) {
// super(iri, NodeType.TYPE_THING);
// getAnnotations().addLabel(new Annotation("label", "Thing"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
// public class VowlDatatype extends AbstractDatatype {
// public VowlDatatype(IRI iri) {
// super(iri, NodeType.TYPE_DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
// public class VowlLiteral extends AbstractDatatype {
// public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
//
// public VowlLiteral(IRI iri) {
// super(iri, NodeType.TYPE_LITERAL);
// getAnnotations().addLabel(new Annotation("label", "Literal"));
// }
//
// public String getGenericIri() {
// return LITERAL_IRI;
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlThing;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlDatatype;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlLiteral;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlClass; | /*
* VowlClassVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlClassVisitor {
void visit(VowlThing vowlThing);
void visit(VowlClass vowlClass);
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
// public class VowlClass extends AbstractClass {
//
// public VowlClass(IRI iri) {
// super(iri, NodeType.TYPE_CLASS);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlThing.java
// public class VowlThing extends AbstractClass {
// public static final String THING_IRI = Standard_Iris.OWL_THING_CLASS_URI;
// public static final IRI GENERIC_THING_IRI = IRI.create(THING_IRI);
//
// protected VowlThing(IRI iri, String type) {
// super(iri, type);
// }
//
// public VowlThing(IRI iri) {
// super(iri, NodeType.TYPE_THING);
// getAnnotations().addLabel(new Annotation("label", "Thing"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
// public class VowlDatatype extends AbstractDatatype {
// public VowlDatatype(IRI iri) {
// super(iri, NodeType.TYPE_DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
// public class VowlLiteral extends AbstractDatatype {
// public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
//
// public VowlLiteral(IRI iri) {
// super(iri, NodeType.TYPE_LITERAL);
// getAnnotations().addLabel(new Annotation("label", "Literal"));
// }
//
// public String getGenericIri() {
// return LITERAL_IRI;
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlClassVisitor.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlThing;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlDatatype;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlLiteral;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlClass;
/*
* VowlClassVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlClassVisitor {
void visit(VowlThing vowlThing);
void visit(VowlClass vowlClass);
| void visit(VowlLiteral vowlLiteral); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlClassVisitor.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
// public class VowlClass extends AbstractClass {
//
// public VowlClass(IRI iri) {
// super(iri, NodeType.TYPE_CLASS);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlThing.java
// public class VowlThing extends AbstractClass {
// public static final String THING_IRI = Standard_Iris.OWL_THING_CLASS_URI;
// public static final IRI GENERIC_THING_IRI = IRI.create(THING_IRI);
//
// protected VowlThing(IRI iri, String type) {
// super(iri, type);
// }
//
// public VowlThing(IRI iri) {
// super(iri, NodeType.TYPE_THING);
// getAnnotations().addLabel(new Annotation("label", "Thing"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
// public class VowlDatatype extends AbstractDatatype {
// public VowlDatatype(IRI iri) {
// super(iri, NodeType.TYPE_DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
// public class VowlLiteral extends AbstractDatatype {
// public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
//
// public VowlLiteral(IRI iri) {
// super(iri, NodeType.TYPE_LITERAL);
// getAnnotations().addLabel(new Annotation("label", "Literal"));
// }
//
// public String getGenericIri() {
// return LITERAL_IRI;
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlThing;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlDatatype;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlLiteral;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlClass; | /*
* VowlClassVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlClassVisitor {
void visit(VowlThing vowlThing);
void visit(VowlClass vowlClass);
void visit(VowlLiteral vowlLiteral);
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
// public class VowlClass extends AbstractClass {
//
// public VowlClass(IRI iri) {
// super(iri, NodeType.TYPE_CLASS);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlThing.java
// public class VowlThing extends AbstractClass {
// public static final String THING_IRI = Standard_Iris.OWL_THING_CLASS_URI;
// public static final IRI GENERIC_THING_IRI = IRI.create(THING_IRI);
//
// protected VowlThing(IRI iri, String type) {
// super(iri, type);
// }
//
// public VowlThing(IRI iri) {
// super(iri, NodeType.TYPE_THING);
// getAnnotations().addLabel(new Annotation("label", "Thing"));
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
// public class VowlDatatype extends AbstractDatatype {
// public VowlDatatype(IRI iri) {
// super(iri, NodeType.TYPE_DATATYPE);
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlLiteral.java
// public class VowlLiteral extends AbstractDatatype {
// public static final String LITERAL_IRI = "http://www.w3.org/2000/01/rdf-schema#Literal";
//
// public VowlLiteral(IRI iri) {
// super(iri, NodeType.TYPE_LITERAL);
// getAnnotations().addLabel(new Annotation("label", "Literal"));
// }
//
// public String getGenericIri() {
// return LITERAL_IRI;
// }
//
// @Override
// public void accept(VowlElementVisitor visitor) {
// visitor.visit(this);
// }
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlClassVisitor.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlThing;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlDatatype;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes.VowlLiteral;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.VowlClass;
/*
* VowlClassVisitor.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor;
/**
*
*/
public interface VowlClassVisitor {
void visit(VowlThing vowlThing);
void visit(VowlClass vowlClass);
void visit(VowlLiteral vowlLiteral);
| void visit(VowlDatatype vowlDatatype); |
VisualDataWeb/OWL2VOWL | src/test/java/de/uni_stuttgart/vis/vowl/owl2vowl/CompleteTestSuite.java | // Path: src/test/java/de/uni_stuttgart/vis/vowl/owl2vowl/parser/helper/ComparisonHelperTest.java
// public class ComparisonHelperTest {
//
// @Test
// public void testExtractBaseIRI() throws Exception {
// String resultIri = "http://test.de/working";
//
// String testIri1 = "http://test.de/working#worker";
// assertThat(ComparisonHelper.extractBaseIRI(testIri1), is(resultIri));
//
// String testIri2 = "http://test.de/working/worker/";
// assertThat(ComparisonHelper.extractBaseIRI(testIri2), is(resultIri));
//
// String testIri3 = "http://test.de/working/worker";
// assertThat(ComparisonHelper.extractBaseIRI(testIri3), is(resultIri));
//
// String testIri4 = "http://test.de/working#";
// assertThat(ComparisonHelper.extractBaseIRI(testIri4), is(resultIri));
// }
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.parser.helper.ComparisonHelperTest;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite; | package de.uni_stuttgart.vis.vowl.owl2vowl;
@RunWith(Suite.class)
@Suite.SuiteClasses({ | // Path: src/test/java/de/uni_stuttgart/vis/vowl/owl2vowl/parser/helper/ComparisonHelperTest.java
// public class ComparisonHelperTest {
//
// @Test
// public void testExtractBaseIRI() throws Exception {
// String resultIri = "http://test.de/working";
//
// String testIri1 = "http://test.de/working#worker";
// assertThat(ComparisonHelper.extractBaseIRI(testIri1), is(resultIri));
//
// String testIri2 = "http://test.de/working/worker/";
// assertThat(ComparisonHelper.extractBaseIRI(testIri2), is(resultIri));
//
// String testIri3 = "http://test.de/working/worker";
// assertThat(ComparisonHelper.extractBaseIRI(testIri3), is(resultIri));
//
// String testIri4 = "http://test.de/working#";
// assertThat(ComparisonHelper.extractBaseIRI(testIri4), is(resultIri));
// }
// }
// Path: src/test/java/de/uni_stuttgart/vis/vowl/owl2vowl/CompleteTestSuite.java
import de.uni_stuttgart.vis.vowl.owl2vowl.parser.helper.ComparisonHelperTest;
import junit.framework.TestSuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
package de.uni_stuttgart.vis.vowl.owl2vowl;
@RunWith(Suite.class)
@Suite.SuiteClasses({ | ComparisonHelperTest.class, |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/individuals/VowlIndividual.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject; | /*
* VowlIndividual.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.individuals;
/**
*
*/
public class VowlIndividual extends AbstractVowlObject {
public VowlIndividual(IRI iri) {
super(iri);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/individuals/VowlIndividual.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject;
/*
* VowlIndividual.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.individuals;
/**
*
*/
public class VowlIndividual extends AbstractVowlObject {
public VowlIndividual(IRI iri) {
super(iri);
}
@Override | public void accept(VowlElementVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/AbstractProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java
// public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
// private String type;
// private Set<VowlAttribute> attributes = new HashSet<>();
// private Set<IRI> equivalents = new SetWithoutNull<>();
// private List<IRI> sortedEquivalents = new ArrayList<>();
// private Set<IRI> subEntities = new SetWithoutNull<>();
// private Set<IRI> superEntities = new SetWithoutNull<>();
// private VowlGenerationEnum generated = VowlGenerationEnum.AUTOMATIC;
// private boolean exportToJson = true;
//
// protected AbstractEntity(IRI iri, String type) {
// super(iri);
// this.type = type;
// }
//
// public List<IRI> getSortedEquivalents() {
// return Collections.unmodifiableList(sortedEquivalents);
// }
//
// public void setSortedEquivalents(List<IRI> sortedEquivalents) {
// this.sortedEquivalents = sortedEquivalents;
// }
//
// public VowlGenerationEnum getGenerated() {
// return generated;
// }
//
// public void setGenerated(VowlGenerationEnum generated) {
// this.generated = generated;
// }
//
// public Set<VowlAttribute> getAttributes() {
// return Collections.unmodifiableSet(attributes);
// }
//
// public void addAttribute(VowlAttribute attribute) {
// attributes.add(attribute);
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// @Override
// public Set<IRI> getEquivalentElements() {
// return Collections.unmodifiableSet(equivalents);
// }
//
// @Override
// public void addEquivalentElement(IRI iri) {
// equivalents.add(iri);
// }
//
// @Override
// public boolean equals(Object o) {
// if (this == o)
// return true;
// if (o == null || getClass() != o.getClass())
// return false;
//
// AbstractEntity that = (AbstractEntity) o;
//
// return !(iri != null ? !iri.equals(that.iri) : that.iri != null);
//
// }
//
// @Override
// public int hashCode() {
// return iri != null ? iri.hashCode() : 0;
// }
//
// @Override
// public String toString() {
// return iri.toString();
// }
//
// @Override
// public Set<IRI> getSuperEntities() {
// return Collections.unmodifiableSet(superEntities);
// }
//
// @Override
// public void addSuperEntity(IRI iri) {
// superEntities.add(iri);
// }
//
// @Override
// public Set<IRI> getSubEntities() {
// return Collections.unmodifiableSet(subEntities);
// }
//
// @Override
// public void addSubEntity(IRI iri) {
// subEntities.add(iri);
// }
//
// public boolean isExportToJson() {
// return exportToJson;
// }
//
// public void setExportToJson(boolean exportToJson) {
// this.exportToJson = exportToJson;
// }
//
// // Memory Handler required?
//
// public void releaseMemory() {
// attributes.clear();
// equivalents.clear();
// sortedEquivalents.clear();
// subEntities.clear();
// superEntities.clear();
//
// attributes = null;
// equivalents = null;
// sortedEquivalents = null;
// subEntities = null;
// superEntities = null;
//
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.AbstractEntity;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
import java.util.Set; |
@Override
public void setMaxCardinality(Integer value) {
maxCardinality = value;
}
@Override
public Integer getMinCardinality() {
return minCardinality;
}
@Override
public void setMinCardinality(Integer value) {
minCardinality = value;
}
@Override
public void releaseMemory() {
if (domains!=null) domains.clear();
if (ranges!=null) ranges.clear();
if (referencedIris!=null) referencedIris.clear();
domains = null;
ranges = null;
referencedIris = null;
}
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java
// public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
// private String type;
// private Set<VowlAttribute> attributes = new HashSet<>();
// private Set<IRI> equivalents = new SetWithoutNull<>();
// private List<IRI> sortedEquivalents = new ArrayList<>();
// private Set<IRI> subEntities = new SetWithoutNull<>();
// private Set<IRI> superEntities = new SetWithoutNull<>();
// private VowlGenerationEnum generated = VowlGenerationEnum.AUTOMATIC;
// private boolean exportToJson = true;
//
// protected AbstractEntity(IRI iri, String type) {
// super(iri);
// this.type = type;
// }
//
// public List<IRI> getSortedEquivalents() {
// return Collections.unmodifiableList(sortedEquivalents);
// }
//
// public void setSortedEquivalents(List<IRI> sortedEquivalents) {
// this.sortedEquivalents = sortedEquivalents;
// }
//
// public VowlGenerationEnum getGenerated() {
// return generated;
// }
//
// public void setGenerated(VowlGenerationEnum generated) {
// this.generated = generated;
// }
//
// public Set<VowlAttribute> getAttributes() {
// return Collections.unmodifiableSet(attributes);
// }
//
// public void addAttribute(VowlAttribute attribute) {
// attributes.add(attribute);
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// @Override
// public Set<IRI> getEquivalentElements() {
// return Collections.unmodifiableSet(equivalents);
// }
//
// @Override
// public void addEquivalentElement(IRI iri) {
// equivalents.add(iri);
// }
//
// @Override
// public boolean equals(Object o) {
// if (this == o)
// return true;
// if (o == null || getClass() != o.getClass())
// return false;
//
// AbstractEntity that = (AbstractEntity) o;
//
// return !(iri != null ? !iri.equals(that.iri) : that.iri != null);
//
// }
//
// @Override
// public int hashCode() {
// return iri != null ? iri.hashCode() : 0;
// }
//
// @Override
// public String toString() {
// return iri.toString();
// }
//
// @Override
// public Set<IRI> getSuperEntities() {
// return Collections.unmodifiableSet(superEntities);
// }
//
// @Override
// public void addSuperEntity(IRI iri) {
// superEntities.add(iri);
// }
//
// @Override
// public Set<IRI> getSubEntities() {
// return Collections.unmodifiableSet(subEntities);
// }
//
// @Override
// public void addSubEntity(IRI iri) {
// subEntities.add(iri);
// }
//
// public boolean isExportToJson() {
// return exportToJson;
// }
//
// public void setExportToJson(boolean exportToJson) {
// this.exportToJson = exportToJson;
// }
//
// // Memory Handler required?
//
// public void releaseMemory() {
// attributes.clear();
// equivalents.clear();
// sortedEquivalents.clear();
// subEntities.clear();
// superEntities.clear();
//
// attributes = null;
// equivalents = null;
// sortedEquivalents = null;
// subEntities = null;
// superEntities = null;
//
// }
//
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/AbstractProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.AbstractEntity;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
import java.util.Set;
@Override
public void setMaxCardinality(Integer value) {
maxCardinality = value;
}
@Override
public Integer getMinCardinality() {
return minCardinality;
}
@Override
public void setMinCardinality(Integer value) {
minCardinality = value;
}
@Override
public void releaseMemory() {
if (domains!=null) domains.clear();
if (ranges!=null) ranges.clear();
if (referencedIris!=null) referencedIris.clear();
domains = null;
ranges = null;
referencedIris = null;
}
| public abstract void accept(VowlPropertyVisitor visitor); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType; | /*
* VowlClass.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes;
public class VowlClass extends AbstractClass {
public VowlClass(IRI iri) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType;
/*
* VowlClass.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes;
public class VowlClass extends AbstractClass {
public VowlClass(IRI iri) { | super(iri, NodeType.TYPE_CLASS); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType; | /*
* VowlClass.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes;
public class VowlClass extends AbstractClass {
public VowlClass(IRI iri) {
super(iri, NodeType.TYPE_CLASS);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/classes/VowlClass.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType;
/*
* VowlClass.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes;
public class VowlClass extends AbstractClass {
public VowlClass(IRI iri) {
super(iri, NodeType.TYPE_CLASS);
}
@Override | public void accept(VowlElementVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/server/Owl2VowlController.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/Owl2Vowl.java
// public class Owl2Vowl {
// protected Converter converter;
//
// public Owl2Vowl(OWLOntology ontology) {
// converter = new OntologyConverter(ontology);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(OWLOntology ontology, String ontologyIri) {
// converter = new OntologyConverter(ontology, ontologyIri);
// }
//
// public Owl2Vowl(IRI ontologyIri) {
// converter = new IRIConverter(ontologyIri);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(IRI ontologyIri, Collection<IRI> dependencies) {
// converter = new IRIConverter(ontologyIri, dependencies);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology) {
// converter = new InputStreamConverter(ontology);
// converter.clearLoadingMsg();
// }
// public Owl2Vowl(String ontologyAsString) {
// InputStream ontologyStream = new ByteArrayInputStream(ontologyAsString.getBytes());
// converter = new InputStreamConverter(ontologyStream);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology, Collection<InputStream> dependencies) {
// converter = new InputStreamConverter(ontology, dependencies);
// converter.clearLoadingMsg();
// }
//
// public String getLoadingMsg() {
// return converter.getLoadingInfoString();
// }
// public void appendLoadingIndicatorPoint() {
// if (converter.getCurrentlyLoadingFlag()) {
// converter.addLoadingInfoToParentLine(".");
// }
// }
//
//
// /**
// * Converts the ontology to the webvowl compatible format and returns the usable json as string.
// *
// * @return The webvowl compatible json format.
// */
// public String getJsonAsString() {
// BackupExporter exporter = new BackupExporter();
//
// try {
// converter.export(exporter);
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// return exporter.getConvertedJson();
// }
//
// public void writeToFile(File file) {
// try {
// converter.export(new FileExporter(file));
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/LoggingConstants.java
// public class LoggingConstants {
// public static final String CONVERSION_LOGGER = "conversion-logger";
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.Owl2Vowl;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.LoggingConstants;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.commons.io.IOUtils;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import java.net.URL;
import java.text.NumberFormat; | package de.uni_stuttgart.vis.vowl.owl2vowl.server;
@RestController
public class Owl2VowlController {
private static final Logger logger = LogManager.getLogger(Owl2VowlController.class);
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/Owl2Vowl.java
// public class Owl2Vowl {
// protected Converter converter;
//
// public Owl2Vowl(OWLOntology ontology) {
// converter = new OntologyConverter(ontology);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(OWLOntology ontology, String ontologyIri) {
// converter = new OntologyConverter(ontology, ontologyIri);
// }
//
// public Owl2Vowl(IRI ontologyIri) {
// converter = new IRIConverter(ontologyIri);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(IRI ontologyIri, Collection<IRI> dependencies) {
// converter = new IRIConverter(ontologyIri, dependencies);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology) {
// converter = new InputStreamConverter(ontology);
// converter.clearLoadingMsg();
// }
// public Owl2Vowl(String ontologyAsString) {
// InputStream ontologyStream = new ByteArrayInputStream(ontologyAsString.getBytes());
// converter = new InputStreamConverter(ontologyStream);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology, Collection<InputStream> dependencies) {
// converter = new InputStreamConverter(ontology, dependencies);
// converter.clearLoadingMsg();
// }
//
// public String getLoadingMsg() {
// return converter.getLoadingInfoString();
// }
// public void appendLoadingIndicatorPoint() {
// if (converter.getCurrentlyLoadingFlag()) {
// converter.addLoadingInfoToParentLine(".");
// }
// }
//
//
// /**
// * Converts the ontology to the webvowl compatible format and returns the usable json as string.
// *
// * @return The webvowl compatible json format.
// */
// public String getJsonAsString() {
// BackupExporter exporter = new BackupExporter();
//
// try {
// converter.export(exporter);
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// return exporter.getConvertedJson();
// }
//
// public void writeToFile(File file) {
// try {
// converter.export(new FileExporter(file));
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/LoggingConstants.java
// public class LoggingConstants {
// public static final String CONVERSION_LOGGER = "conversion-logger";
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/server/Owl2VowlController.java
import de.uni_stuttgart.vis.vowl.owl2vowl.Owl2Vowl;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.LoggingConstants;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.commons.io.IOUtils;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import java.net.URL;
import java.text.NumberFormat;
package de.uni_stuttgart.vis.vowl.owl2vowl.server;
@RestController
public class Owl2VowlController {
private static final Logger logger = LogManager.getLogger(Owl2VowlController.class);
| private static final Logger conversionLogger = LogManager.getLogger(LoggingConstants.CONVERSION_LOGGER); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/server/Owl2VowlController.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/Owl2Vowl.java
// public class Owl2Vowl {
// protected Converter converter;
//
// public Owl2Vowl(OWLOntology ontology) {
// converter = new OntologyConverter(ontology);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(OWLOntology ontology, String ontologyIri) {
// converter = new OntologyConverter(ontology, ontologyIri);
// }
//
// public Owl2Vowl(IRI ontologyIri) {
// converter = new IRIConverter(ontologyIri);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(IRI ontologyIri, Collection<IRI> dependencies) {
// converter = new IRIConverter(ontologyIri, dependencies);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology) {
// converter = new InputStreamConverter(ontology);
// converter.clearLoadingMsg();
// }
// public Owl2Vowl(String ontologyAsString) {
// InputStream ontologyStream = new ByteArrayInputStream(ontologyAsString.getBytes());
// converter = new InputStreamConverter(ontologyStream);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology, Collection<InputStream> dependencies) {
// converter = new InputStreamConverter(ontology, dependencies);
// converter.clearLoadingMsg();
// }
//
// public String getLoadingMsg() {
// return converter.getLoadingInfoString();
// }
// public void appendLoadingIndicatorPoint() {
// if (converter.getCurrentlyLoadingFlag()) {
// converter.addLoadingInfoToParentLine(".");
// }
// }
//
//
// /**
// * Converts the ontology to the webvowl compatible format and returns the usable json as string.
// *
// * @return The webvowl compatible json format.
// */
// public String getJsonAsString() {
// BackupExporter exporter = new BackupExporter();
//
// try {
// converter.export(exporter);
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// return exporter.getConvertedJson();
// }
//
// public void writeToFile(File file) {
// try {
// converter.export(new FileExporter(file));
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/LoggingConstants.java
// public class LoggingConstants {
// public static final String CONVERSION_LOGGER = "conversion-logger";
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.Owl2Vowl;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.LoggingConstants;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.commons.io.IOUtils;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import java.net.URL;
import java.text.NumberFormat; | package de.uni_stuttgart.vis.vowl.owl2vowl.server;
@RestController
public class Owl2VowlController {
private static final Logger logger = LogManager.getLogger(Owl2VowlController.class);
private static final Logger conversionLogger = LogManager.getLogger(LoggingConstants.CONVERSION_LOGGER);
private static final String СONVERT_MAPPING = "/convert";
private static final String READ_JSON = "/read";
private static final String LOADING_STATUS = "/loadingStatus";
private static final String SERVER_TIMESTAMP = "/serverTimeStamp";
private static final String CONVERSION_DONE = "/conversionDone";
private static final String DIRECT_INPUT = "/directInput";
private static final String GIZMO_INPUT = "/gizMOInput";
public static String loadingStatusMsg="";
private static Boolean needConversionID=true;
| // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/Owl2Vowl.java
// public class Owl2Vowl {
// protected Converter converter;
//
// public Owl2Vowl(OWLOntology ontology) {
// converter = new OntologyConverter(ontology);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(OWLOntology ontology, String ontologyIri) {
// converter = new OntologyConverter(ontology, ontologyIri);
// }
//
// public Owl2Vowl(IRI ontologyIri) {
// converter = new IRIConverter(ontologyIri);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(IRI ontologyIri, Collection<IRI> dependencies) {
// converter = new IRIConverter(ontologyIri, dependencies);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology) {
// converter = new InputStreamConverter(ontology);
// converter.clearLoadingMsg();
// }
// public Owl2Vowl(String ontologyAsString) {
// InputStream ontologyStream = new ByteArrayInputStream(ontologyAsString.getBytes());
// converter = new InputStreamConverter(ontologyStream);
// converter.clearLoadingMsg();
// }
//
// public Owl2Vowl(InputStream ontology, Collection<InputStream> dependencies) {
// converter = new InputStreamConverter(ontology, dependencies);
// converter.clearLoadingMsg();
// }
//
// public String getLoadingMsg() {
// return converter.getLoadingInfoString();
// }
// public void appendLoadingIndicatorPoint() {
// if (converter.getCurrentlyLoadingFlag()) {
// converter.addLoadingInfoToParentLine(".");
// }
// }
//
//
// /**
// * Converts the ontology to the webvowl compatible format and returns the usable json as string.
// *
// * @return The webvowl compatible json format.
// */
// public String getJsonAsString() {
// BackupExporter exporter = new BackupExporter();
//
// try {
// converter.export(exporter);
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// return exporter.getConvertedJson();
// }
//
// public void writeToFile(File file) {
// try {
// converter.export(new FileExporter(file));
// } catch (Exception e) {
// throw new IllegalStateException(e);
// }
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/LoggingConstants.java
// public class LoggingConstants {
// public static final String CONVERSION_LOGGER = "conversion-logger";
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/server/Owl2VowlController.java
import de.uni_stuttgart.vis.vowl.owl2vowl.Owl2Vowl;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.LoggingConstants;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.commons.io.IOUtils;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import java.net.URL;
import java.text.NumberFormat;
package de.uni_stuttgart.vis.vowl.owl2vowl.server;
@RestController
public class Owl2VowlController {
private static final Logger logger = LogManager.getLogger(Owl2VowlController.class);
private static final Logger conversionLogger = LogManager.getLogger(LoggingConstants.CONVERSION_LOGGER);
private static final String СONVERT_MAPPING = "/convert";
private static final String READ_JSON = "/read";
private static final String LOADING_STATUS = "/loadingStatus";
private static final String SERVER_TIMESTAMP = "/serverTimeStamp";
private static final String CONVERSION_DONE = "/conversionDone";
private static final String DIRECT_INPUT = "/directInput";
private static final String GIZMO_INPUT = "/gizMOInput";
public static String loadingStatusMsg="";
private static Boolean needConversionID=true;
| Map<String, Owl2Vowl> conversionSessionMap=new HashMap<String, Owl2Vowl>(); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) { | super(iri, PropertyType.TYPEOF); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) {
super(iri, PropertyType.TYPEOF); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) {
super(iri, PropertyType.TYPEOF); | getAnnotations().addLabel(new Annotation("label", "is a")); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) {
super(iri, PropertyType.TYPEOF);
getAnnotations().addLabel(new Annotation("label", "is a"));
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) {
super(iri, PropertyType.TYPEOF);
getAnnotations().addLabel(new Annotation("label", "is a"));
}
@Override | public void accept(VowlElementVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) {
super(iri, PropertyType.TYPEOF);
getAnnotations().addLabel(new Annotation("label", "is a"));
}
@Override
public void accept(VowlElementVisitor visitor) {
visitor.visit(this);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
// public class Annotation {
// public static final String TYPE_IRI = "iri";
// public static final String TYPE_LABEL = "label";
// private String identifier;
// private String language = Vowl_Lang.LANG_UNSET;
// private String value;
// private String type;
//
// public Annotation(String identifier, String value) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = "unset";
// }
//
// public Annotation(String identifier, String value, String type) {
// this.identifier = extractIdentifier(identifier);
// this.value = value;
// this.type = type;
// }
//
// public String getType() {
// return type;
// }
//
// public void setType(String type) {
// this.type = type;
// }
//
// public String getIdentifier() {
// return identifier;
// }
//
// public void setIdentifier(String identifier) {
// this.identifier = identifier;
// }
//
// private String extractIdentifier(String identifier) {
// int slash = identifier.lastIndexOf("/");
// int arrow = identifier.lastIndexOf(">");
// int doubleDot = identifier.lastIndexOf(":");
// int hash = identifier.lastIndexOf("#");
//
// int lastCut = -1;
// int firstCut = -1;
//
// if (arrow != -1) {
// lastCut = arrow;
// }
//
// if (slash != -1 && firstCut < slash) {
// firstCut = slash;
// }
//
// if (doubleDot != -1 && firstCut < doubleDot) {
// firstCut = doubleDot;
// }
//
// if (hash != -1 && firstCut < hash) {
// firstCut = hash;
// }
//
// String result;
//
// if (firstCut != -1 && lastCut != -1) {
// result = identifier.substring(firstCut + 1, lastCut);
// } else if (firstCut != -1) {
// result = identifier.substring(firstCut + 1);
// } else if (lastCut != -1){
// result = identifier.substring(0, lastCut);
// } else {
// result = identifier;
// }
//
// return result;
// }
//
// public String getLanguage() {
// return language;
// }
//
// public void setLanguage(String language) {
// this.language = language;
// }
//
// public String getValue() {
// return value;
// }
//
// public void setValue(String value) {
// this.value = value;
// }
//
// @Override
// public String toString() {
// return "Annotation{" +
// "type='" + type + "\'" +
// ", identifier='" + identifier + '\'' +
// ", language='" + language + '\'' +
// ", value='" + value + '\'' +
// '}';
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/TypeOfProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation.Annotation;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
* Special property in VOWL which is colored in purple color.
*/
public class TypeOfProperty extends AbstractProperty {
public TypeOfProperty(IRI iri) {
super(iri, PropertyType.TYPEOF);
getAnnotations().addLabel(new Annotation("label", "is a"));
}
@Override
public void accept(VowlElementVisitor visitor) {
visitor.visit(this);
}
@Override | public void accept(VowlPropertyVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/data/VowlGenerationEnum.java
// public enum VowlGenerationEnum {
// MANUALLY,
// AUTOMATIC
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.data.VowlGenerationEnum;
import org.semanticweb.owlapi.model.IRI;
import java.util.*; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities;
public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
private String type; | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/data/VowlGenerationEnum.java
// public enum VowlGenerationEnum {
// MANUALLY,
// AUTOMATIC
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.data.VowlGenerationEnum;
import org.semanticweb.owlapi.model.IRI;
import java.util.*;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities;
public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
private String type; | private Set<VowlAttribute> attributes = new HashSet<>(); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/data/VowlGenerationEnum.java
// public enum VowlGenerationEnum {
// MANUALLY,
// AUTOMATIC
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.data.VowlGenerationEnum;
import org.semanticweb.owlapi.model.IRI;
import java.util.*; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities;
public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
private String type;
private Set<VowlAttribute> attributes = new HashSet<>(); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/data/VowlGenerationEnum.java
// public enum VowlGenerationEnum {
// MANUALLY,
// AUTOMATIC
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.data.VowlGenerationEnum;
import org.semanticweb.owlapi.model.IRI;
import java.util.*;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities;
public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
private String type;
private Set<VowlAttribute> attributes = new HashSet<>(); | private Set<IRI> equivalents = new SetWithoutNull<>(); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/data/VowlGenerationEnum.java
// public enum VowlGenerationEnum {
// MANUALLY,
// AUTOMATIC
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.data.VowlGenerationEnum;
import org.semanticweb.owlapi.model.IRI;
import java.util.*; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities;
public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
private String type;
private Set<VowlAttribute> attributes = new HashSet<>();
private Set<IRI> equivalents = new SetWithoutNull<>();
private List<IRI> sortedEquivalents = new ArrayList<>();
private Set<IRI> subEntities = new SetWithoutNull<>();
private Set<IRI> superEntities = new SetWithoutNull<>(); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/AbstractVowlObject.java
// public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
// protected IRI iri;
// protected IRI baseIri;
// private Annotations annotations = new Annotations();
//
// public AbstractVowlObject(IRI iri) {
// this.iri = iri;
//
// if (iri != null) {
// baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
// }
// }
//
// public IRI getBaseIri() {
// return baseIri;
// }
//
// @Override
// public Annotations getAnnotations() {
// return annotations;
// }
//
// @Override
// public IRI getIri() {
// return iri;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/SetWithoutNull.java
// @SuppressWarnings("serial")
// public class SetWithoutNull<E> extends HashSet<E> {
// @Override
// public boolean add(E e) {
// return e != null && super.add(e);
//
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/data/VowlGenerationEnum.java
// public enum VowlGenerationEnum {
// MANUALLY,
// AUTOMATIC
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/AbstractEntity.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.AbstractVowlObject;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.SetWithoutNull;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.data.VowlGenerationEnum;
import org.semanticweb.owlapi.model.IRI;
import java.util.*;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities;
public abstract class AbstractEntity extends AbstractVowlObject implements HasEquivalents, HasSubEntities {
private String type;
private Set<VowlAttribute> attributes = new HashSet<>();
private Set<IRI> equivalents = new SetWithoutNull<>();
private List<IRI> sortedEquivalents = new ArrayList<>();
private Set<IRI> subEntities = new SetWithoutNull<>();
private Set<IRI> superEntities = new SetWithoutNull<>(); | private VowlGenerationEnum generated = VowlGenerationEnum.AUTOMATIC; |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/Vowl_Lang.java
// public class Vowl_Lang {/* Languages */
// public static final String LANG_UNSET = "undefined";
// public static final String LANG_DEFAULT = "IRI-based";
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.Vowl_Lang; | package de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation;
/**
* @author Eduard
*/
public class Annotation {
public static final String TYPE_IRI = "iri";
public static final String TYPE_LABEL = "label";
private String identifier; | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/Vowl_Lang.java
// public class Vowl_Lang {/* Languages */
// public static final String LANG_UNSET = "undefined";
// public static final String LANG_DEFAULT = "IRI-based";
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/annotation/Annotation.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.Vowl_Lang;
package de.uni_stuttgart.vis.vowl.owl2vowl.model.annotation;
/**
* @author Eduard
*/
public class Annotation {
public static final String TYPE_IRI = "iri";
public static final String TYPE_LABEL = "label";
private String identifier; | private String language = Vowl_Lang.LANG_UNSET; |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) { | super(iri, PropertyType.DATATYPE); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) {
super(iri, PropertyType.DATATYPE); | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) {
super(iri, PropertyType.DATATYPE); | addAttribute(VowlAttribute.DATATYPE); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) {
super(iri, PropertyType.DATATYPE);
addAttribute(VowlAttribute.DATATYPE);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) {
super(iri, PropertyType.DATATYPE);
addAttribute(VowlAttribute.DATATYPE);
}
@Override | public void accept(VowlElementVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI; | /*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) {
super(iri, PropertyType.DATATYPE);
addAttribute(VowlAttribute.DATATYPE);
}
@Override
public void accept(VowlElementVisitor visitor) {
visitor.visit(this);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/PropertyType.java
// public class PropertyType {
// public static final String OBJECT = "owl:objectProperty";
// public static final String DATATYPE = "owl:datatypeProperty";
// public static final String SUBCLASS = "rdfs:SubClassOf";
// public static final String DISJOINT = "owl:disjointWith";
// public static final String RDF = "rdf:Property";
// public static final String ALL_VALUES = "owl:allValuesFrom";
// public static final String SOME_VALUES = "owl:someValuesFrom";
// public static final String TYPEOF = RDF;
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/VowlAttribute.java
// public enum VowlAttribute {
// INTERSECTION("intersection"),
// OBJECT("object"),
// DEPRECATED("deprecated"),
// EXTERNAL("external"),
// RDF("rdf"),
// UNION("union"),
// COMPLEMENT("complement"),
// DATATYPE("datatype"),
// TRANSITIVE("transitive"),
// FUNCTIONAL("functional"),
// INVERSE_FUNCTIONAL("inverse functional"),
// SYMMETRIC("symmetric"),
// EQUIVALENT("equivalent"),
// IRREFLEXIVE("irreflexive"),
// ASYMMETRIC("asymmetric"),
// REFLEXIVE("reflexive"),
// IMPORTED("external"),
// ANONYMOUS("anonymous"),
// DISJOINTUNION("disjointUnion"),
// KEY("key"),
// ALL_VALUES("allValues"),
// SOME_VALUES("someValues");
//
// private final String value;
//
// VowlAttribute(String value) {
//
// this.value = value;
// }
//
// @JsonValue
// public String getValue() {
// return value;
// }
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlPropertyVisitor.java
// public interface VowlPropertyVisitor {
// void visit(VowlObjectProperty vowlObjectProperty);
//
// void visit(VowlDatatypeProperty vowlDatatypeProperty);
//
// void visit(TypeOfProperty typeOfProperty);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/properties/VowlDatatypeProperty.java
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.PropertyType;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlPropertyVisitor;
import org.semanticweb.owlapi.model.IRI;
/*
* VowlDatatypeProperty.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.properties;
/**
*
*/
public class VowlDatatypeProperty extends AbstractProperty {
public VowlDatatypeProperty(IRI iri) {
super(iri, PropertyType.DATATYPE);
addAttribute(VowlAttribute.DATATYPE);
}
@Override
public void accept(VowlElementVisitor visitor) {
visitor.visit(this);
}
@Override | public void accept(VowlPropertyVisitor visitor) { |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType; | /*
* VowlDatatype.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlDatatype extends AbstractDatatype {
public VowlDatatype(IRI iri) { | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType;
/*
* VowlDatatype.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlDatatype extends AbstractDatatype {
public VowlDatatype(IRI iri) { | super(iri, NodeType.TYPE_DATATYPE); |
VisualDataWeb/OWL2VOWL | src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
| import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType; | /*
* VowlDatatype.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlDatatype extends AbstractDatatype {
public VowlDatatype(IRI iri) {
super(iri, NodeType.TYPE_DATATYPE);
}
@Override | // Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/constants/NodeType.java
// public class NodeType {
// public static final String TYPE_CLASS = "owl:Class";
// public static final String TYPE_RDFSCLASS = "rdfs:Class";
// public static final String TYPE_EQUIVALENT = "owl:equivalentClass";
// public static final String TYPE_EXTERNALCLASS = "externalclass";
// public static final String TYPE_DEPRECTAEDCLASS = "owl:DeprecatedClass";
// public static final String TYPE_THING = "owl:Thing";
// public static final String TYPE_NOTHING = "owl:Nothing";
// public static final String TYPE_RDFSRESOURCE = "rdfs:Resource";
// public static final String TYPE_UNION = "owl:unionOf";
// public static final String TYPE_INTERSECTION = "owl:intersectionOf";
// public static final String TYPE_DISJOINTUNION = "owl:disjointUnionOf";
// public static final String TYPE_COMPLEMENT = "owl:complementOf";
// public static final String TYPE_DATATYPE = "rdfs:Datatype";
// public static final String TYPE_LITERAL = "rdfs:Literal";
// public static final String KEY_TYPE_DATA_ONE_OF = "DATA_ONE_OF";
// }
//
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/visitor/VowlElementVisitor.java
// public interface VowlElementVisitor extends VowlClassVisitor, VowlPropertyVisitor {
// void visit(VowlIndividual vowlIndividual);
// }
// Path: src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/model/entities/nodes/datatypes/VowlDatatype.java
import de.uni_stuttgart.vis.vowl.owl2vowl.model.visitor.VowlElementVisitor;
import org.semanticweb.owlapi.model.IRI;
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.NodeType;
/*
* VowlDatatype.java
*
*/
package de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.datatypes;
/**
*
*/
public class VowlDatatype extends AbstractDatatype {
public VowlDatatype(IRI iri) {
super(iri, NodeType.TYPE_DATATYPE);
}
@Override | public void accept(VowlElementVisitor visitor) { |
rainu/telegram-bot-api | src/main/java/de/raysha/lib/telegram/bot/api/UnirestRequestExecutor.java | // Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotApiException.java
// public class BotApiException extends BotException {
//
// /**
// * Similar to HTTP status. Contains information on the type of error that occurred: for example,
// * a data input error, privacy error, or server error.
// */
// private int errorCode;
//
// /**
// * A string literal in the form of /[A-Z_0-9]+/, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED.
// *
// * Optional, could be null
// */
// private String errorType;
//
// /**
// * May contain more detailed information on the error and how to resolve it, for example: authorization required,
// * use auth.* methods. Please note that the description text is subject to change, one should avoid tying
// * application logic to these messages.
// *
// * Optional, could be null
// */
// private String description;
//
// public BotApiException(int errorCode, String errorType, String description, Throwable cause) {
// super(cause);
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public BotApiException(int errorCode, String errorType, String description) {
// super();
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public int getErrorCode() {
// return errorCode;
// }
//
// public String getErrorType() {
// return errorType;
// }
//
// public String getDescription() {
// return description;
// }
//
// @Override
// public String getMessage() {
// StringBuilder buf = new StringBuilder();
// buf.append(errorCode);
// if (errorType != null) {
// buf.append(' ').append(errorType);
// }
// if (description != null) {
// buf.append(" '").append(description).append('\'');
// }
// return buf.toString();
// }
// }
//
// Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotException.java
// public class BotException extends Exception {
//
// public BotException() {
// }
//
// public BotException(String message) {
// super(message);
// }
//
// public BotException(String message, Throwable cause) {
// super(message, cause);
// }
//
// public BotException(Throwable cause) {
// super(cause);
// }
//
// public BotException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
// super(message, cause, enableSuppression, writableStackTrace);
// }
// }
| import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import com.mashape.unirest.request.BaseRequest;
import de.raysha.lib.telegram.bot.api.exception.BotApiException;
import de.raysha.lib.telegram.bot.api.exception.BotException;
import org.json.JSONObject;
import java.io.File;
import java.util.Map; | package de.raysha.lib.telegram.bot.api;
/**
* Uses Unirest lib for making http requests
*/
public class UnirestRequestExecutor implements RequestExecutor {
private final String baseUrl;
public UnirestRequestExecutor(String baseUrl) {
this.baseUrl = baseUrl;
}
@Override | // Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotApiException.java
// public class BotApiException extends BotException {
//
// /**
// * Similar to HTTP status. Contains information on the type of error that occurred: for example,
// * a data input error, privacy error, or server error.
// */
// private int errorCode;
//
// /**
// * A string literal in the form of /[A-Z_0-9]+/, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED.
// *
// * Optional, could be null
// */
// private String errorType;
//
// /**
// * May contain more detailed information on the error and how to resolve it, for example: authorization required,
// * use auth.* methods. Please note that the description text is subject to change, one should avoid tying
// * application logic to these messages.
// *
// * Optional, could be null
// */
// private String description;
//
// public BotApiException(int errorCode, String errorType, String description, Throwable cause) {
// super(cause);
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public BotApiException(int errorCode, String errorType, String description) {
// super();
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public int getErrorCode() {
// return errorCode;
// }
//
// public String getErrorType() {
// return errorType;
// }
//
// public String getDescription() {
// return description;
// }
//
// @Override
// public String getMessage() {
// StringBuilder buf = new StringBuilder();
// buf.append(errorCode);
// if (errorType != null) {
// buf.append(' ').append(errorType);
// }
// if (description != null) {
// buf.append(" '").append(description).append('\'');
// }
// return buf.toString();
// }
// }
//
// Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotException.java
// public class BotException extends Exception {
//
// public BotException() {
// }
//
// public BotException(String message) {
// super(message);
// }
//
// public BotException(String message, Throwable cause) {
// super(message, cause);
// }
//
// public BotException(Throwable cause) {
// super(cause);
// }
//
// public BotException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
// super(message, cause, enableSuppression, writableStackTrace);
// }
// }
// Path: src/main/java/de/raysha/lib/telegram/bot/api/UnirestRequestExecutor.java
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import com.mashape.unirest.request.BaseRequest;
import de.raysha.lib.telegram.bot.api.exception.BotApiException;
import de.raysha.lib.telegram.bot.api.exception.BotException;
import org.json.JSONObject;
import java.io.File;
import java.util.Map;
package de.raysha.lib.telegram.bot.api;
/**
* Uses Unirest lib for making http requests
*/
public class UnirestRequestExecutor implements RequestExecutor {
private final String baseUrl;
public UnirestRequestExecutor(String baseUrl) {
this.baseUrl = baseUrl;
}
@Override | public String get(String action, Map<String, Object> parameters) throws BotException { |
rainu/telegram-bot-api | src/main/java/de/raysha/lib/telegram/bot/api/UnirestRequestExecutor.java | // Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotApiException.java
// public class BotApiException extends BotException {
//
// /**
// * Similar to HTTP status. Contains information on the type of error that occurred: for example,
// * a data input error, privacy error, or server error.
// */
// private int errorCode;
//
// /**
// * A string literal in the form of /[A-Z_0-9]+/, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED.
// *
// * Optional, could be null
// */
// private String errorType;
//
// /**
// * May contain more detailed information on the error and how to resolve it, for example: authorization required,
// * use auth.* methods. Please note that the description text is subject to change, one should avoid tying
// * application logic to these messages.
// *
// * Optional, could be null
// */
// private String description;
//
// public BotApiException(int errorCode, String errorType, String description, Throwable cause) {
// super(cause);
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public BotApiException(int errorCode, String errorType, String description) {
// super();
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public int getErrorCode() {
// return errorCode;
// }
//
// public String getErrorType() {
// return errorType;
// }
//
// public String getDescription() {
// return description;
// }
//
// @Override
// public String getMessage() {
// StringBuilder buf = new StringBuilder();
// buf.append(errorCode);
// if (errorType != null) {
// buf.append(' ').append(errorType);
// }
// if (description != null) {
// buf.append(" '").append(description).append('\'');
// }
// return buf.toString();
// }
// }
//
// Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotException.java
// public class BotException extends Exception {
//
// public BotException() {
// }
//
// public BotException(String message) {
// super(message);
// }
//
// public BotException(String message, Throwable cause) {
// super(message, cause);
// }
//
// public BotException(Throwable cause) {
// super(cause);
// }
//
// public BotException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
// super(message, cause, enableSuppression, writableStackTrace);
// }
// }
| import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import com.mashape.unirest.request.BaseRequest;
import de.raysha.lib.telegram.bot.api.exception.BotApiException;
import de.raysha.lib.telegram.bot.api.exception.BotException;
import org.json.JSONObject;
import java.io.File;
import java.util.Map; | return sendAndHandleRequest(
Unirest.get(baseUrl + action)
.queryString(parameters));
}
@Override
public String post(String action, Map<String, Object> parameters) throws BotException {
return sendAndHandleRequest(
Unirest.post(baseUrl + action)
.fields(parameters));
}
@Override
public String post(String action, Map<String, Object> parameters, String fileName, File file) throws BotException {
return sendAndHandleRequest(
Unirest.post(baseUrl + action)
.queryString(parameters)
.field(fileName, file));
}
private String sendAndHandleRequest(BaseRequest request) throws BotException {
JSONObject jsonResult;
try {
jsonResult = request
.asJson().getBody().getObject();
} catch (UnirestException e) {
throw new BotException("Could not get a response.", e);
}
if(jsonResult.get("ok").equals(false)){ | // Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotApiException.java
// public class BotApiException extends BotException {
//
// /**
// * Similar to HTTP status. Contains information on the type of error that occurred: for example,
// * a data input error, privacy error, or server error.
// */
// private int errorCode;
//
// /**
// * A string literal in the form of /[A-Z_0-9]+/, which summarizes the problem. For example, AUTH_KEY_UNREGISTERED.
// *
// * Optional, could be null
// */
// private String errorType;
//
// /**
// * May contain more detailed information on the error and how to resolve it, for example: authorization required,
// * use auth.* methods. Please note that the description text is subject to change, one should avoid tying
// * application logic to these messages.
// *
// * Optional, could be null
// */
// private String description;
//
// public BotApiException(int errorCode, String errorType, String description, Throwable cause) {
// super(cause);
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public BotApiException(int errorCode, String errorType, String description) {
// super();
// this.errorCode = errorCode;
// this.errorType = errorType;
// this.description = description;
// }
//
// public int getErrorCode() {
// return errorCode;
// }
//
// public String getErrorType() {
// return errorType;
// }
//
// public String getDescription() {
// return description;
// }
//
// @Override
// public String getMessage() {
// StringBuilder buf = new StringBuilder();
// buf.append(errorCode);
// if (errorType != null) {
// buf.append(' ').append(errorType);
// }
// if (description != null) {
// buf.append(" '").append(description).append('\'');
// }
// return buf.toString();
// }
// }
//
// Path: src/main/java/de/raysha/lib/telegram/bot/api/exception/BotException.java
// public class BotException extends Exception {
//
// public BotException() {
// }
//
// public BotException(String message) {
// super(message);
// }
//
// public BotException(String message, Throwable cause) {
// super(message, cause);
// }
//
// public BotException(Throwable cause) {
// super(cause);
// }
//
// public BotException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
// super(message, cause, enableSuppression, writableStackTrace);
// }
// }
// Path: src/main/java/de/raysha/lib/telegram/bot/api/UnirestRequestExecutor.java
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import com.mashape.unirest.request.BaseRequest;
import de.raysha.lib.telegram.bot.api.exception.BotApiException;
import de.raysha.lib.telegram.bot.api.exception.BotException;
import org.json.JSONObject;
import java.io.File;
import java.util.Map;
return sendAndHandleRequest(
Unirest.get(baseUrl + action)
.queryString(parameters));
}
@Override
public String post(String action, Map<String, Object> parameters) throws BotException {
return sendAndHandleRequest(
Unirest.post(baseUrl + action)
.fields(parameters));
}
@Override
public String post(String action, Map<String, Object> parameters, String fileName, File file) throws BotException {
return sendAndHandleRequest(
Unirest.post(baseUrl + action)
.queryString(parameters)
.field(fileName, file));
}
private String sendAndHandleRequest(BaseRequest request) throws BotException {
JSONObject jsonResult;
try {
jsonResult = request
.asJson().getBody().getObject();
} catch (UnirestException e) {
throw new BotException("Could not get a response.", e);
}
if(jsonResult.get("ok").equals(false)){ | throw new BotApiException( |
govu/govu | src/com/govu/engine/db/db4o/DB4OProvider.java | // Path: src/com/govu/Govu.java
// public class Govu {
//
// public static String VERSION = "0.0.4";
// public static String root;
// public static String dbRoot;
// public static String webRoot;
// public static Logger logger;
// public static int PORT;
// public static Set<WebApplication> apps = new HashSet<>();
// public static Config config;
// private DB db;
//
// /**
// * @param args the command line arguments
// */
// public static void main(String[] args) {
// if (args.length > 0) {
// String command = args[0].toLowerCase();
// if (command.equals("deploy")) {
// new DeployCommand().process(args);
// } else if (command.equals("delete")) {
// new DeleteCommand().process(args);
// } else {
// System.out.println("Unknown govu command: " + args[0]);
// }
// } else {
// //Start govu web server
// Govu govu = new Govu();
// }
// }
//
// public Govu() {
// logger = Logger.getLogger("govu");
// root = System.getProperty("user.dir");
// dbRoot = root + "/db";
// webRoot = root + "/web";
// logger.debug("Staring Govu Server " + VERSION + "...");
//
// try {
// config = new Config();
// config.readProperties();
// } catch (IOException | InterruptedException ex) {
// logger.error("Error reading config file", ex);
// }
//
//
// File webDir = new File(webRoot);
// if (!webDir.exists()) {
// logger.debug("Creating web base directory");
// webDir.mkdir();
// }
//
// File dbDir = new File(dbRoot);
// if (!dbDir.exists()) {
// logger.debug("Creating database base directory");
// dbDir.mkdir();
// }
//
// //Init Database Provider
// db = new DB(new DB4OProvider());
//
// //Init http server
// ServerBootstrap httpBootStrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
// httpBootStrap.setOption("child.tcpNoDelay", true);
// httpBootStrap.setPipelineFactory(new HttpServerPipelineFactory());
// httpBootStrap.bind(new InetSocketAddress(PORT));
//
// logger.debug("Govu started successfully. Happy coding!");
// }
//
// public static WebApplication getWebApp(String host, String path) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if ((app.getDomain() != null && app.getDomain().equals(host))
// || (app.getDomain() == null && path.startsWith(app.getRootPath()))) {
// return app;
// }
// }
// return null;
// }
//
// public static WebApplication getWebApp(String name) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if (app.getName().equals(name)){
// return app;
// }
// }
// return null;
// }
// }
//
// Path: src/com/govu/engine/db/DatabaseProvider.java
// public interface DatabaseProvider {
//
// public void deleteObj(ScriptableObject obj, String type);
//
// public void saveObj(ScriptableObject obj, String type);
//
// public void delete(ScriptableObject obj, String type);
//
// public Scriptable[] getAll(Function function, String type);
//
// public Scriptable[] search(ScriptableObject obj, Function function, String type);
//
// public Scriptable get(ScriptableObject obj, String type);
//
// }
| import com.govu.Govu;
import com.db4o.Db4o;
import com.db4o.ObjectContainer;
import com.db4o.ObjectSet;
import com.db4o.query.Predicate;
import com.govu.engine.db.DatabaseProvider;
import java.util.HashMap;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Function;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject; | ObjectSet<HashMap<Object, Object>> maps = con.query(new Predicate<HashMap<Object, Object>>() {
@Override
public boolean match(HashMap<Object, Object> et) {
for (Object key : map.keySet()) {
if (!(et.containsKey(key) && et.get(key).equals(map.get(key)))) {
return false;
}
}
return true;
}
});
if (maps.hasNext()) {
HashMap<Object, Object> map2 = maps.next();
for (Object obj2 : map2.keySet()) {
String key = obj2.toString();
Object value = map2.get(obj2);
obj.put(key, obj, value);
obj.put("_id_", obj, con.ext().getID(map2));
}
return obj;
} else {
return null;
}
}
private ObjectContainer getDB(String type) {
if (dbs.containsKey(type)) {
return dbs.get(type);
} else { | // Path: src/com/govu/Govu.java
// public class Govu {
//
// public static String VERSION = "0.0.4";
// public static String root;
// public static String dbRoot;
// public static String webRoot;
// public static Logger logger;
// public static int PORT;
// public static Set<WebApplication> apps = new HashSet<>();
// public static Config config;
// private DB db;
//
// /**
// * @param args the command line arguments
// */
// public static void main(String[] args) {
// if (args.length > 0) {
// String command = args[0].toLowerCase();
// if (command.equals("deploy")) {
// new DeployCommand().process(args);
// } else if (command.equals("delete")) {
// new DeleteCommand().process(args);
// } else {
// System.out.println("Unknown govu command: " + args[0]);
// }
// } else {
// //Start govu web server
// Govu govu = new Govu();
// }
// }
//
// public Govu() {
// logger = Logger.getLogger("govu");
// root = System.getProperty("user.dir");
// dbRoot = root + "/db";
// webRoot = root + "/web";
// logger.debug("Staring Govu Server " + VERSION + "...");
//
// try {
// config = new Config();
// config.readProperties();
// } catch (IOException | InterruptedException ex) {
// logger.error("Error reading config file", ex);
// }
//
//
// File webDir = new File(webRoot);
// if (!webDir.exists()) {
// logger.debug("Creating web base directory");
// webDir.mkdir();
// }
//
// File dbDir = new File(dbRoot);
// if (!dbDir.exists()) {
// logger.debug("Creating database base directory");
// dbDir.mkdir();
// }
//
// //Init Database Provider
// db = new DB(new DB4OProvider());
//
// //Init http server
// ServerBootstrap httpBootStrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
// httpBootStrap.setOption("child.tcpNoDelay", true);
// httpBootStrap.setPipelineFactory(new HttpServerPipelineFactory());
// httpBootStrap.bind(new InetSocketAddress(PORT));
//
// logger.debug("Govu started successfully. Happy coding!");
// }
//
// public static WebApplication getWebApp(String host, String path) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if ((app.getDomain() != null && app.getDomain().equals(host))
// || (app.getDomain() == null && path.startsWith(app.getRootPath()))) {
// return app;
// }
// }
// return null;
// }
//
// public static WebApplication getWebApp(String name) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if (app.getName().equals(name)){
// return app;
// }
// }
// return null;
// }
// }
//
// Path: src/com/govu/engine/db/DatabaseProvider.java
// public interface DatabaseProvider {
//
// public void deleteObj(ScriptableObject obj, String type);
//
// public void saveObj(ScriptableObject obj, String type);
//
// public void delete(ScriptableObject obj, String type);
//
// public Scriptable[] getAll(Function function, String type);
//
// public Scriptable[] search(ScriptableObject obj, Function function, String type);
//
// public Scriptable get(ScriptableObject obj, String type);
//
// }
// Path: src/com/govu/engine/db/db4o/DB4OProvider.java
import com.govu.Govu;
import com.db4o.Db4o;
import com.db4o.ObjectContainer;
import com.db4o.ObjectSet;
import com.db4o.query.Predicate;
import com.govu.engine.db.DatabaseProvider;
import java.util.HashMap;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Function;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
ObjectSet<HashMap<Object, Object>> maps = con.query(new Predicate<HashMap<Object, Object>>() {
@Override
public boolean match(HashMap<Object, Object> et) {
for (Object key : map.keySet()) {
if (!(et.containsKey(key) && et.get(key).equals(map.get(key)))) {
return false;
}
}
return true;
}
});
if (maps.hasNext()) {
HashMap<Object, Object> map2 = maps.next();
for (Object obj2 : map2.keySet()) {
String key = obj2.toString();
Object value = map2.get(obj2);
obj.put(key, obj, value);
obj.put("_id_", obj, con.ext().getID(map2));
}
return obj;
} else {
return null;
}
}
private ObjectContainer getDB(String type) {
if (dbs.containsKey(type)) {
return dbs.get(type);
} else { | ObjectContainer obj = Db4o.openFile(Govu.dbRoot + "/" + type + ".data"); |
govu/govu | src/com/govu/application/WebApplication.java | // Path: src/com/govu/Govu.java
// public class Govu {
//
// public static String VERSION = "0.0.4";
// public static String root;
// public static String dbRoot;
// public static String webRoot;
// public static Logger logger;
// public static int PORT;
// public static Set<WebApplication> apps = new HashSet<>();
// public static Config config;
// private DB db;
//
// /**
// * @param args the command line arguments
// */
// public static void main(String[] args) {
// if (args.length > 0) {
// String command = args[0].toLowerCase();
// if (command.equals("deploy")) {
// new DeployCommand().process(args);
// } else if (command.equals("delete")) {
// new DeleteCommand().process(args);
// } else {
// System.out.println("Unknown govu command: " + args[0]);
// }
// } else {
// //Start govu web server
// Govu govu = new Govu();
// }
// }
//
// public Govu() {
// logger = Logger.getLogger("govu");
// root = System.getProperty("user.dir");
// dbRoot = root + "/db";
// webRoot = root + "/web";
// logger.debug("Staring Govu Server " + VERSION + "...");
//
// try {
// config = new Config();
// config.readProperties();
// } catch (IOException | InterruptedException ex) {
// logger.error("Error reading config file", ex);
// }
//
//
// File webDir = new File(webRoot);
// if (!webDir.exists()) {
// logger.debug("Creating web base directory");
// webDir.mkdir();
// }
//
// File dbDir = new File(dbRoot);
// if (!dbDir.exists()) {
// logger.debug("Creating database base directory");
// dbDir.mkdir();
// }
//
// //Init Database Provider
// db = new DB(new DB4OProvider());
//
// //Init http server
// ServerBootstrap httpBootStrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
// httpBootStrap.setOption("child.tcpNoDelay", true);
// httpBootStrap.setPipelineFactory(new HttpServerPipelineFactory());
// httpBootStrap.bind(new InetSocketAddress(PORT));
//
// logger.debug("Govu started successfully. Happy coding!");
// }
//
// public static WebApplication getWebApp(String host, String path) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if ((app.getDomain() != null && app.getDomain().equals(host))
// || (app.getDomain() == null && path.startsWith(app.getRootPath()))) {
// return app;
// }
// }
// return null;
// }
//
// public static WebApplication getWebApp(String name) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if (app.getName().equals(name)){
// return app;
// }
// }
// return null;
// }
// }
| import com.db4o.collections.ActivatableHashMap;
import com.govu.Govu;
import java.net.HttpCookie;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import org.jboss.netty.handler.codec.http.Cookie; | return null;
}
public void setSession(String key, Object value) {
if (!sessionContainer.containsKey(getSessionID())) {
sessionContainer.put(getSessionID(), new ActivatableHashMap<String, Object>());
}
sessionContainer.get(getSessionID()).put(key, value);
}
public Object getSession(String key) {
if (sessionContainer.containsKey(getSessionID())) {
return sessionContainer.get(getSessionID()).get(key);
}
return null;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRootPath() {
return rootPath;
}
public String getAbsolutePath() { | // Path: src/com/govu/Govu.java
// public class Govu {
//
// public static String VERSION = "0.0.4";
// public static String root;
// public static String dbRoot;
// public static String webRoot;
// public static Logger logger;
// public static int PORT;
// public static Set<WebApplication> apps = new HashSet<>();
// public static Config config;
// private DB db;
//
// /**
// * @param args the command line arguments
// */
// public static void main(String[] args) {
// if (args.length > 0) {
// String command = args[0].toLowerCase();
// if (command.equals("deploy")) {
// new DeployCommand().process(args);
// } else if (command.equals("delete")) {
// new DeleteCommand().process(args);
// } else {
// System.out.println("Unknown govu command: " + args[0]);
// }
// } else {
// //Start govu web server
// Govu govu = new Govu();
// }
// }
//
// public Govu() {
// logger = Logger.getLogger("govu");
// root = System.getProperty("user.dir");
// dbRoot = root + "/db";
// webRoot = root + "/web";
// logger.debug("Staring Govu Server " + VERSION + "...");
//
// try {
// config = new Config();
// config.readProperties();
// } catch (IOException | InterruptedException ex) {
// logger.error("Error reading config file", ex);
// }
//
//
// File webDir = new File(webRoot);
// if (!webDir.exists()) {
// logger.debug("Creating web base directory");
// webDir.mkdir();
// }
//
// File dbDir = new File(dbRoot);
// if (!dbDir.exists()) {
// logger.debug("Creating database base directory");
// dbDir.mkdir();
// }
//
// //Init Database Provider
// db = new DB(new DB4OProvider());
//
// //Init http server
// ServerBootstrap httpBootStrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool()));
// httpBootStrap.setOption("child.tcpNoDelay", true);
// httpBootStrap.setPipelineFactory(new HttpServerPipelineFactory());
// httpBootStrap.bind(new InetSocketAddress(PORT));
//
// logger.debug("Govu started successfully. Happy coding!");
// }
//
// public static WebApplication getWebApp(String host, String path) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if ((app.getDomain() != null && app.getDomain().equals(host))
// || (app.getDomain() == null && path.startsWith(app.getRootPath()))) {
// return app;
// }
// }
// return null;
// }
//
// public static WebApplication getWebApp(String name) {
// for (Iterator<WebApplication> it = apps.iterator(); it.hasNext();) {
// WebApplication app = it.next();
// if (app.getName().equals(name)){
// return app;
// }
// }
// return null;
// }
// }
// Path: src/com/govu/application/WebApplication.java
import com.db4o.collections.ActivatableHashMap;
import com.govu.Govu;
import java.net.HttpCookie;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
import org.jboss.netty.handler.codec.http.Cookie;
return null;
}
public void setSession(String key, Object value) {
if (!sessionContainer.containsKey(getSessionID())) {
sessionContainer.put(getSessionID(), new ActivatableHashMap<String, Object>());
}
sessionContainer.get(getSessionID()).put(key, value);
}
public Object getSession(String key) {
if (sessionContainer.containsKey(getSessionID())) {
return sessionContainer.get(getSessionID()).get(key);
}
return null;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getRootPath() {
return rootPath;
}
public String getAbsolutePath() { | return Govu.webRoot + getRootPath(); |
govu/govu | src/com/govu/command/DeployCommand.java | // Path: src/com/govu/util/Util.java
// public class Util {
//
// public static boolean isDomainValid(String domain) {
// return DOMAIN_NAME_PATTERN.matcher(domain).matches();
// }
//
// public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }
//
// Path: src/com/govu/util/ZipHelper.java
// public class ZipHelper {
//
// public ZipHelper() {
// }
//
// public ByteArrayOutputStream zipDir(String dir) throws IOException {
// ByteArrayOutputStream out = new ByteArrayOutputStream();
//
// ZipOutputStream zip = new ZipOutputStream(out);
// addDirectory("", zip, new File(dir));
// zip.close();
//
// return out;
// }
//
// private static void addDirectory(String root, ZipOutputStream zout, File fileSource) throws IOException {
// File[] files = fileSource.listFiles();
// for (int i = 0; i < files.length; i++) {
// if (files[i].isDirectory()) {
// zout.putNextEntry(new ZipEntry(root + files[i].getName() + "/"));
// addDirectory(root + files[i].getName() + "/", zout, files[i]);
// continue;
// }
// byte[] buffer = new byte[1024];
// FileInputStream fin = new FileInputStream(files[i]);
//
// zout.putNextEntry(new ZipEntry(root + files[i].getName()));
// int length;
//
// while ((length = fin.read(buffer)) > 0) {
// zout.write(buffer, 0, length);
// }
// zout.closeEntry();
// fin.close();
// }
//
// }
// }
| import com.govu.util.Util;
import com.govu.util.ZipHelper;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import org.apache.commons.codec.binary.Base64; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.govu.command;
/**
*
* @author Mehmet Ecevit
*/
public class DeployCommand extends Command {
public DeployCommand() {
super();
}
@Override
public void process(String[] args) {
if (args.length < 3) {
System.out.println("Invalid arguments for deploy");
}
try {
String path = args[1] + "/";
String domain = args[2];
String password = args.length > 3 ? args[3] : null;
System.out.println("Path: " + path);
System.out.println("Domain: " + domain);
| // Path: src/com/govu/util/Util.java
// public class Util {
//
// public static boolean isDomainValid(String domain) {
// return DOMAIN_NAME_PATTERN.matcher(domain).matches();
// }
//
// public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }
//
// Path: src/com/govu/util/ZipHelper.java
// public class ZipHelper {
//
// public ZipHelper() {
// }
//
// public ByteArrayOutputStream zipDir(String dir) throws IOException {
// ByteArrayOutputStream out = new ByteArrayOutputStream();
//
// ZipOutputStream zip = new ZipOutputStream(out);
// addDirectory("", zip, new File(dir));
// zip.close();
//
// return out;
// }
//
// private static void addDirectory(String root, ZipOutputStream zout, File fileSource) throws IOException {
// File[] files = fileSource.listFiles();
// for (int i = 0; i < files.length; i++) {
// if (files[i].isDirectory()) {
// zout.putNextEntry(new ZipEntry(root + files[i].getName() + "/"));
// addDirectory(root + files[i].getName() + "/", zout, files[i]);
// continue;
// }
// byte[] buffer = new byte[1024];
// FileInputStream fin = new FileInputStream(files[i]);
//
// zout.putNextEntry(new ZipEntry(root + files[i].getName()));
// int length;
//
// while ((length = fin.read(buffer)) > 0) {
// zout.write(buffer, 0, length);
// }
// zout.closeEntry();
// fin.close();
// }
//
// }
// }
// Path: src/com/govu/command/DeployCommand.java
import com.govu.util.Util;
import com.govu.util.ZipHelper;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import org.apache.commons.codec.binary.Base64;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.govu.command;
/**
*
* @author Mehmet Ecevit
*/
public class DeployCommand extends Command {
public DeployCommand() {
super();
}
@Override
public void process(String[] args) {
if (args.length < 3) {
System.out.println("Invalid arguments for deploy");
}
try {
String path = args[1] + "/";
String domain = args[2];
String password = args.length > 3 ? args[3] : null;
System.out.println("Path: " + path);
System.out.println("Domain: " + domain);
| if (domain.toLowerCase().equals("codegovu.com") || !Util.isDomainValid(domain )) { |
govu/govu | src/com/govu/command/DeployCommand.java | // Path: src/com/govu/util/Util.java
// public class Util {
//
// public static boolean isDomainValid(String domain) {
// return DOMAIN_NAME_PATTERN.matcher(domain).matches();
// }
//
// public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }
//
// Path: src/com/govu/util/ZipHelper.java
// public class ZipHelper {
//
// public ZipHelper() {
// }
//
// public ByteArrayOutputStream zipDir(String dir) throws IOException {
// ByteArrayOutputStream out = new ByteArrayOutputStream();
//
// ZipOutputStream zip = new ZipOutputStream(out);
// addDirectory("", zip, new File(dir));
// zip.close();
//
// return out;
// }
//
// private static void addDirectory(String root, ZipOutputStream zout, File fileSource) throws IOException {
// File[] files = fileSource.listFiles();
// for (int i = 0; i < files.length; i++) {
// if (files[i].isDirectory()) {
// zout.putNextEntry(new ZipEntry(root + files[i].getName() + "/"));
// addDirectory(root + files[i].getName() + "/", zout, files[i]);
// continue;
// }
// byte[] buffer = new byte[1024];
// FileInputStream fin = new FileInputStream(files[i]);
//
// zout.putNextEntry(new ZipEntry(root + files[i].getName()));
// int length;
//
// while ((length = fin.read(buffer)) > 0) {
// zout.write(buffer, 0, length);
// }
// zout.closeEntry();
// fin.close();
// }
//
// }
// }
| import com.govu.util.Util;
import com.govu.util.ZipHelper;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import org.apache.commons.codec.binary.Base64; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.govu.command;
/**
*
* @author Mehmet Ecevit
*/
public class DeployCommand extends Command {
public DeployCommand() {
super();
}
@Override
public void process(String[] args) {
if (args.length < 3) {
System.out.println("Invalid arguments for deploy");
}
try {
String path = args[1] + "/";
String domain = args[2];
String password = args.length > 3 ? args[3] : null;
System.out.println("Path: " + path);
System.out.println("Domain: " + domain);
if (domain.toLowerCase().equals("codegovu.com") || !Util.isDomainValid(domain )) {
System.out.println("Invalid domain");
return;
}
if (password != null) {
System.out.println("Password: " + password);
}
File zipDir = new File(path);
if (!zipDir.exists()) {
System.out.println("Path does not exist!");
return;
}
| // Path: src/com/govu/util/Util.java
// public class Util {
//
// public static boolean isDomainValid(String domain) {
// return DOMAIN_NAME_PATTERN.matcher(domain).matches();
// }
//
// public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }
//
// Path: src/com/govu/util/ZipHelper.java
// public class ZipHelper {
//
// public ZipHelper() {
// }
//
// public ByteArrayOutputStream zipDir(String dir) throws IOException {
// ByteArrayOutputStream out = new ByteArrayOutputStream();
//
// ZipOutputStream zip = new ZipOutputStream(out);
// addDirectory("", zip, new File(dir));
// zip.close();
//
// return out;
// }
//
// private static void addDirectory(String root, ZipOutputStream zout, File fileSource) throws IOException {
// File[] files = fileSource.listFiles();
// for (int i = 0; i < files.length; i++) {
// if (files[i].isDirectory()) {
// zout.putNextEntry(new ZipEntry(root + files[i].getName() + "/"));
// addDirectory(root + files[i].getName() + "/", zout, files[i]);
// continue;
// }
// byte[] buffer = new byte[1024];
// FileInputStream fin = new FileInputStream(files[i]);
//
// zout.putNextEntry(new ZipEntry(root + files[i].getName()));
// int length;
//
// while ((length = fin.read(buffer)) > 0) {
// zout.write(buffer, 0, length);
// }
// zout.closeEntry();
// fin.close();
// }
//
// }
// }
// Path: src/com/govu/command/DeployCommand.java
import com.govu.util.Util;
import com.govu.util.ZipHelper;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import org.apache.commons.codec.binary.Base64;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.govu.command;
/**
*
* @author Mehmet Ecevit
*/
public class DeployCommand extends Command {
public DeployCommand() {
super();
}
@Override
public void process(String[] args) {
if (args.length < 3) {
System.out.println("Invalid arguments for deploy");
}
try {
String path = args[1] + "/";
String domain = args[2];
String password = args.length > 3 ? args[3] : null;
System.out.println("Path: " + path);
System.out.println("Domain: " + domain);
if (domain.toLowerCase().equals("codegovu.com") || !Util.isDomainValid(domain )) {
System.out.println("Invalid domain");
return;
}
if (password != null) {
System.out.println("Password: " + password);
}
File zipDir = new File(path);
if (!zipDir.exists()) {
System.out.println("Path does not exist!");
return;
}
| ZipHelper zipHelper = new ZipHelper(); |
govu/govu | src/com/govu/command/DeleteCommand.java | // Path: src/com/govu/util/Util.java
// public class Util {
//
// public static boolean isDomainValid(String domain) {
// return DOMAIN_NAME_PATTERN.matcher(domain).matches();
// }
//
// public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }
| import com.govu.util.Util;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger; | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.govu.command;
/**
*
* @author Mehmet Ecevit
*/
public class DeleteCommand extends Command {
public DeleteCommand() {
super();
}
@Override
public void process(String[] args) {
if (args.length < 2) {
System.out.println("Invalid arguments for deploy");
}
try {
String domain = args[1];
String password = args.length > 2 ? args[2] : null;
System.out.println("Domain: " + domain);
| // Path: src/com/govu/util/Util.java
// public class Util {
//
// public static boolean isDomainValid(String domain) {
// return DOMAIN_NAME_PATTERN.matcher(domain).matches();
// }
//
// public static final Pattern DOMAIN_NAME_PATTERN = Pattern.compile("^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$");
// }
// Path: src/com/govu/command/DeleteCommand.java
import com.govu.util.Util;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.govu.command;
/**
*
* @author Mehmet Ecevit
*/
public class DeleteCommand extends Command {
public DeleteCommand() {
super();
}
@Override
public void process(String[] args) {
if (args.length < 2) {
System.out.println("Invalid arguments for deploy");
}
try {
String domain = args[1];
String password = args.length > 2 ? args[2] : null;
System.out.println("Domain: " + domain);
| if (domain.toLowerCase().equals("codegovu.com") || !Util.isDomainValid(domain )) { |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/GetMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Get.java
// public class Get
// extends AbstractAsAdminCmd
// {
//
// private String property;
//
// public Get( String propertyName )
// {
// property = propertyName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "get";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Get;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal get
* @description AsAdmin set property
*/
public class GetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String[] properties;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Get.java
// public class Get
// extends AbstractAsAdminCmd
// {
//
// private String property;
//
// public Get( String propertyName )
// {
// property = propertyName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "get";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/GetMojo.java
import org.n0pe.asadmin.commands.Get;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal get
* @description AsAdmin set property
*/
public class GetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String[] properties;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/GetMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Get.java
// public class Get
// extends AbstractAsAdminCmd
// {
//
// private String property;
//
// public Get( String propertyName )
// {
// property = propertyName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "get";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Get;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal get
* @description AsAdmin set property
*/
public class GetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String[] properties;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Getting property : " + properties );
final AsAdminCmdList list = new AsAdminCmdList();
for( int i = 0; i < properties.length; i++ )
{ | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Get.java
// public class Get
// extends AbstractAsAdminCmd
// {
//
// private String property;
//
// public Get( String propertyName )
// {
// property = propertyName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "get";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/GetMojo.java
import org.n0pe.asadmin.commands.Get;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal get
* @description AsAdmin set property
*/
public class GetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String[] properties;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Getting property : " + properties );
final AsAdminCmdList list = new AsAdminCmdList();
for( int i = 0; i < properties.length; i++ )
{ | list.add( new Get( properties[i] ) ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDatabaseMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Database.java
// public class Database
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-database";
// public static final String STOP = "stop-database";
// public static final String DB_HOST = "--dbhost";
// public static final String DB_PORT = "--dbport";
// private Boolean start = null;
// private String dbHost;
// private String dbPort;
//
// /**
// * Database CTOR.
// */
// public Database()
// {
// }
//
// public Database( String dbHost, String dbPort )
// {
// this.dbHost = dbHost;
// this.dbPort = dbPort;
// }
//
// public Database setDbHost( String dbHost )
// {
// this.dbHost = dbHost;
// return this;
// }
//
// public Database setDbPort( String dbPort )
// {
// this.dbPort = dbPort;
// return this;
// }
//
// public Database start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Database stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// final List<String> params = new ArrayList<String>();
// if( isSet( dbHost ) )
// {
// params.add( DB_HOST );
// params.add( dbHost );
// }
// if( isSet( dbPort ) )
// {
// params.add( DB_PORT );
// params.add( dbPort );
// }
// return params.toArray( new String[ 0 ] );
// }
//
// private final boolean isSet( String str )
// {
// return str != null && str.trim().length() > 0;
// }
//
// }
| import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Database;
| /*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, Marenz.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-database
* @description AsAdmin start-database mojo
*/
public class StartDatabaseMojo
extends AbstractAsadminMojo
{
@Override
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Database.java
// public class Database
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-database";
// public static final String STOP = "stop-database";
// public static final String DB_HOST = "--dbhost";
// public static final String DB_PORT = "--dbport";
// private Boolean start = null;
// private String dbHost;
// private String dbPort;
//
// /**
// * Database CTOR.
// */
// public Database()
// {
// }
//
// public Database( String dbHost, String dbPort )
// {
// this.dbHost = dbHost;
// this.dbPort = dbPort;
// }
//
// public Database setDbHost( String dbHost )
// {
// this.dbHost = dbHost;
// return this;
// }
//
// public Database setDbPort( String dbPort )
// {
// this.dbPort = dbPort;
// return this;
// }
//
// public Database start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Database stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// final List<String> params = new ArrayList<String>();
// if( isSet( dbHost ) )
// {
// params.add( DB_HOST );
// params.add( dbHost );
// }
// if( isSet( dbPort ) )
// {
// params.add( DB_PORT );
// params.add( dbPort );
// }
// return params.toArray( new String[ 0 ] );
// }
//
// private final boolean isSet( String str )
// {
// return str != null && str.trim().length() > 0;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDatabaseMojo.java
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Database;
/*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, Marenz.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-database
* @description AsAdmin start-database mojo
*/
public class StartDatabaseMojo
extends AbstractAsadminMojo
{
@Override
| protected AsAdminCmdList getAsCommandList()
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDatabaseMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Database.java
// public class Database
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-database";
// public static final String STOP = "stop-database";
// public static final String DB_HOST = "--dbhost";
// public static final String DB_PORT = "--dbport";
// private Boolean start = null;
// private String dbHost;
// private String dbPort;
//
// /**
// * Database CTOR.
// */
// public Database()
// {
// }
//
// public Database( String dbHost, String dbPort )
// {
// this.dbHost = dbHost;
// this.dbPort = dbPort;
// }
//
// public Database setDbHost( String dbHost )
// {
// this.dbHost = dbHost;
// return this;
// }
//
// public Database setDbPort( String dbPort )
// {
// this.dbPort = dbPort;
// return this;
// }
//
// public Database start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Database stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// final List<String> params = new ArrayList<String>();
// if( isSet( dbHost ) )
// {
// params.add( DB_HOST );
// params.add( dbHost );
// }
// if( isSet( dbPort ) )
// {
// params.add( DB_PORT );
// params.add( dbPort );
// }
// return params.toArray( new String[ 0 ] );
// }
//
// private final boolean isSet( String str )
// {
// return str != null && str.trim().length() > 0;
// }
//
// }
| import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Database;
| /*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, Marenz.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-database
* @description AsAdmin start-database mojo
*/
public class StartDatabaseMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Starting database" );
final AsAdminCmdList list = new AsAdminCmdList();
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Database.java
// public class Database
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-database";
// public static final String STOP = "stop-database";
// public static final String DB_HOST = "--dbhost";
// public static final String DB_PORT = "--dbport";
// private Boolean start = null;
// private String dbHost;
// private String dbPort;
//
// /**
// * Database CTOR.
// */
// public Database()
// {
// }
//
// public Database( String dbHost, String dbPort )
// {
// this.dbHost = dbHost;
// this.dbPort = dbPort;
// }
//
// public Database setDbHost( String dbHost )
// {
// this.dbHost = dbHost;
// return this;
// }
//
// public Database setDbPort( String dbPort )
// {
// this.dbPort = dbPort;
// return this;
// }
//
// public Database start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Database stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// final List<String> params = new ArrayList<String>();
// if( isSet( dbHost ) )
// {
// params.add( DB_HOST );
// params.add( dbHost );
// }
// if( isSet( dbPort ) )
// {
// params.add( DB_PORT );
// params.add( dbPort );
// }
// return params.toArray( new String[ 0 ] );
// }
//
// private final boolean isSet( String str )
// {
// return str != null && str.trim().length() > 0;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDatabaseMojo.java
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Database;
/*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, Marenz.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-database
* @description AsAdmin start-database mojo
*/
public class StartDatabaseMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Starting database" );
final AsAdminCmdList list = new AsAdminCmdList();
| list.add( new Database( dbHost, dbPort ).start() );
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/AddResourcesMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/AddResources.java
// public class AddResources
// extends AbstractAsAdminCmd
// {
//
// private Boolean upload = null;
// private String target = null;
// private String fileLocation = null;
//
// public Boolean isUpload()
// {
// return upload;
// }
//
// public AddResources setUpload( Boolean upload )
// {
// this.upload = upload;
// return this;
// }
//
// public String getTarget()
// {
// return target;
// }
//
// public AddResources setTarget( String target )
// {
// this.target = target;
// return this;
// }
//
// public String getFileLocation()
// {
// return fileLocation;
// }
//
// public AddResources setFileLocation( String fileLocation )
// {
// this.fileLocation = fileLocation;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "add-resources";
// }
//
// @Override
// public String[] getParameters()
// {
// List<String> params = new ArrayList<String>( 6 );
// if( target != null )
// {
// params.add( "--target" );
// params.add( target );
// }
// if( upload != null )
// {
// params.add( "--upload" );
// params.add( upload.toString() );
// }
// if( fileLocation == null )
// {
// throw new IllegalStateException( "asadmin add-resources requires a file parameter" );
// }
// params.add( fileLocation );
// return params.toArray( new String[ params.size() ] );
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.AddResources;
import org.apache.maven.plugin.MojoExecutionException;
| /*
* Copyright (c) 2011, J.Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal add-resources
* @description AsAdmin add-resources mojo
*/
public class AddResourcesMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String resourcesFileLocation;
/**
* @parameter
*/
private String target = null;
/**
* @parameter
*/
private Boolean upload = null;
@Override
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/AddResources.java
// public class AddResources
// extends AbstractAsAdminCmd
// {
//
// private Boolean upload = null;
// private String target = null;
// private String fileLocation = null;
//
// public Boolean isUpload()
// {
// return upload;
// }
//
// public AddResources setUpload( Boolean upload )
// {
// this.upload = upload;
// return this;
// }
//
// public String getTarget()
// {
// return target;
// }
//
// public AddResources setTarget( String target )
// {
// this.target = target;
// return this;
// }
//
// public String getFileLocation()
// {
// return fileLocation;
// }
//
// public AddResources setFileLocation( String fileLocation )
// {
// this.fileLocation = fileLocation;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "add-resources";
// }
//
// @Override
// public String[] getParameters()
// {
// List<String> params = new ArrayList<String>( 6 );
// if( target != null )
// {
// params.add( "--target" );
// params.add( target );
// }
// if( upload != null )
// {
// params.add( "--upload" );
// params.add( upload.toString() );
// }
// if( fileLocation == null )
// {
// throw new IllegalStateException( "asadmin add-resources requires a file parameter" );
// }
// params.add( fileLocation );
// return params.toArray( new String[ params.size() ] );
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/AddResourcesMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.AddResources;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2011, J.Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal add-resources
* @description AsAdmin add-resources mojo
*/
public class AddResourcesMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String resourcesFileLocation;
/**
* @parameter
*/
private String target = null;
/**
* @parameter
*/
private Boolean upload = null;
@Override
| protected AsAdminCmdList getAsCommandList()
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/AddResourcesMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/AddResources.java
// public class AddResources
// extends AbstractAsAdminCmd
// {
//
// private Boolean upload = null;
// private String target = null;
// private String fileLocation = null;
//
// public Boolean isUpload()
// {
// return upload;
// }
//
// public AddResources setUpload( Boolean upload )
// {
// this.upload = upload;
// return this;
// }
//
// public String getTarget()
// {
// return target;
// }
//
// public AddResources setTarget( String target )
// {
// this.target = target;
// return this;
// }
//
// public String getFileLocation()
// {
// return fileLocation;
// }
//
// public AddResources setFileLocation( String fileLocation )
// {
// this.fileLocation = fileLocation;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "add-resources";
// }
//
// @Override
// public String[] getParameters()
// {
// List<String> params = new ArrayList<String>( 6 );
// if( target != null )
// {
// params.add( "--target" );
// params.add( target );
// }
// if( upload != null )
// {
// params.add( "--upload" );
// params.add( upload.toString() );
// }
// if( fileLocation == null )
// {
// throw new IllegalStateException( "asadmin add-resources requires a file parameter" );
// }
// params.add( fileLocation );
// return params.toArray( new String[ params.size() ] );
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.AddResources;
import org.apache.maven.plugin.MojoExecutionException;
| /*
* Copyright (c) 2011, J.Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal add-resources
* @description AsAdmin add-resources mojo
*/
public class AddResourcesMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String resourcesFileLocation;
/**
* @parameter
*/
private String target = null;
/**
* @parameter
*/
private Boolean upload = null;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException,
MojoFailureException
{
getLog().info( "adding resources: " + resourcesFileLocation );
final AsAdminCmdList list = new AsAdminCmdList();
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/AddResources.java
// public class AddResources
// extends AbstractAsAdminCmd
// {
//
// private Boolean upload = null;
// private String target = null;
// private String fileLocation = null;
//
// public Boolean isUpload()
// {
// return upload;
// }
//
// public AddResources setUpload( Boolean upload )
// {
// this.upload = upload;
// return this;
// }
//
// public String getTarget()
// {
// return target;
// }
//
// public AddResources setTarget( String target )
// {
// this.target = target;
// return this;
// }
//
// public String getFileLocation()
// {
// return fileLocation;
// }
//
// public AddResources setFileLocation( String fileLocation )
// {
// this.fileLocation = fileLocation;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "add-resources";
// }
//
// @Override
// public String[] getParameters()
// {
// List<String> params = new ArrayList<String>( 6 );
// if( target != null )
// {
// params.add( "--target" );
// params.add( target );
// }
// if( upload != null )
// {
// params.add( "--upload" );
// params.add( upload.toString() );
// }
// if( fileLocation == null )
// {
// throw new IllegalStateException( "asadmin add-resources requires a file parameter" );
// }
// params.add( fileLocation );
// return params.toArray( new String[ params.size() ] );
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/AddResourcesMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.AddResources;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2011, J.Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal add-resources
* @description AsAdmin add-resources mojo
*/
public class AddResourcesMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String resourcesFileLocation;
/**
* @parameter
*/
private String target = null;
/**
* @parameter
*/
private Boolean upload = null;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException,
MojoFailureException
{
getLog().info( "adding resources: " + resourcesFileLocation );
final AsAdminCmdList list = new AsAdminCmdList();
| AddResources addResCmd = new AddResources()
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateAuthRealmMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateAuthRealm.java
// public class CreateAuthRealm
// extends AbstractAsAdminCmd
// {
//
// private static final String CLASSNAME_OPT = "--classname";
// private static final String PROPERTY_OPT = "--property";
// private String realmName;
// private String className;
// private Map properties;
//
// private CreateAuthRealm()
// {
// }
//
// public CreateAuthRealm( String realmName )
// {
// this.realmName = realmName;
// }
//
// public CreateAuthRealm withClassName( String className )
// {
// this.className = className;
// return this;
// }
//
// public CreateAuthRealm addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// return "create-auth-realm";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( className ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringWriter sw = new StringWriter();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// CLASSNAME_OPT, className, PROPERTY_OPT, sw.toString(), realmName
// };
//
// }
// else
// {
// params = new String[]
// {
// CLASSNAME_OPT, className, realmName
// };
// }
// return params;
// }
//
// }
| import java.util.Map;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateAuthRealm;
import java.util.Iterator; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-auth-realm
* @description AsAdmin create-auth-realm mojo
*/
public class CreateAuthRealmMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm"
* @required
*/
private String realmClassName;
/**
* @parameter
* @required
*/
private String realmName;
/**
* @parameter
*/
private Map realmProperties;
/**
* Usage : create-auth-realm --classname realm_class [--terse=false] [--echo=false]
* [--interactive=true] [--host localhost] [--port 4848|4849] [--secure | -s]
* [--user admin_user] [--passwordfile file_name]
* [--property (name=value)[:name=value]*]
* [--target target(Default server)] auth_realm_name
*
* @return asadmin commands
*/
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateAuthRealm.java
// public class CreateAuthRealm
// extends AbstractAsAdminCmd
// {
//
// private static final String CLASSNAME_OPT = "--classname";
// private static final String PROPERTY_OPT = "--property";
// private String realmName;
// private String className;
// private Map properties;
//
// private CreateAuthRealm()
// {
// }
//
// public CreateAuthRealm( String realmName )
// {
// this.realmName = realmName;
// }
//
// public CreateAuthRealm withClassName( String className )
// {
// this.className = className;
// return this;
// }
//
// public CreateAuthRealm addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// return "create-auth-realm";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( className ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringWriter sw = new StringWriter();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// CLASSNAME_OPT, className, PROPERTY_OPT, sw.toString(), realmName
// };
//
// }
// else
// {
// params = new String[]
// {
// CLASSNAME_OPT, className, realmName
// };
// }
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateAuthRealmMojo.java
import java.util.Map;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateAuthRealm;
import java.util.Iterator;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-auth-realm
* @description AsAdmin create-auth-realm mojo
*/
public class CreateAuthRealmMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm"
* @required
*/
private String realmClassName;
/**
* @parameter
* @required
*/
private String realmName;
/**
* @parameter
*/
private Map realmProperties;
/**
* Usage : create-auth-realm --classname realm_class [--terse=false] [--echo=false]
* [--interactive=true] [--host localhost] [--port 4848|4849] [--secure | -s]
* [--user admin_user] [--passwordfile file_name]
* [--property (name=value)[:name=value]*]
* [--target target(Default server)] auth_realm_name
*
* @return asadmin commands
*/
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateAuthRealmMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateAuthRealm.java
// public class CreateAuthRealm
// extends AbstractAsAdminCmd
// {
//
// private static final String CLASSNAME_OPT = "--classname";
// private static final String PROPERTY_OPT = "--property";
// private String realmName;
// private String className;
// private Map properties;
//
// private CreateAuthRealm()
// {
// }
//
// public CreateAuthRealm( String realmName )
// {
// this.realmName = realmName;
// }
//
// public CreateAuthRealm withClassName( String className )
// {
// this.className = className;
// return this;
// }
//
// public CreateAuthRealm addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// return "create-auth-realm";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( className ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringWriter sw = new StringWriter();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// CLASSNAME_OPT, className, PROPERTY_OPT, sw.toString(), realmName
// };
//
// }
// else
// {
// params = new String[]
// {
// CLASSNAME_OPT, className, realmName
// };
// }
// return params;
// }
//
// }
| import java.util.Map;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateAuthRealm;
import java.util.Iterator; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-auth-realm
* @description AsAdmin create-auth-realm mojo
*/
public class CreateAuthRealmMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm"
* @required
*/
private String realmClassName;
/**
* @parameter
* @required
*/
private String realmName;
/**
* @parameter
*/
private Map realmProperties;
/**
* Usage : create-auth-realm --classname realm_class [--terse=false] [--echo=false]
* [--interactive=true] [--host localhost] [--port 4848|4849] [--secure | -s]
* [--user admin_user] [--passwordfile file_name]
* [--property (name=value)[:name=value]*]
* [--target target(Default server)] auth_realm_name
*
* @return asadmin commands
*/
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Creating auth realm: " + realmName );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateAuthRealm.java
// public class CreateAuthRealm
// extends AbstractAsAdminCmd
// {
//
// private static final String CLASSNAME_OPT = "--classname";
// private static final String PROPERTY_OPT = "--property";
// private String realmName;
// private String className;
// private Map properties;
//
// private CreateAuthRealm()
// {
// }
//
// public CreateAuthRealm( String realmName )
// {
// this.realmName = realmName;
// }
//
// public CreateAuthRealm withClassName( String className )
// {
// this.className = className;
// return this;
// }
//
// public CreateAuthRealm addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// return "create-auth-realm";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( className ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringWriter sw = new StringWriter();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// CLASSNAME_OPT, className, PROPERTY_OPT, sw.toString(), realmName
// };
//
// }
// else
// {
// params = new String[]
// {
// CLASSNAME_OPT, className, realmName
// };
// }
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateAuthRealmMojo.java
import java.util.Map;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateAuthRealm;
import java.util.Iterator;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-auth-realm
* @description AsAdmin create-auth-realm mojo
*/
public class CreateAuthRealmMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm"
* @required
*/
private String realmClassName;
/**
* @parameter
* @required
*/
private String realmName;
/**
* @parameter
*/
private Map realmProperties;
/**
* Usage : create-auth-realm --classname realm_class [--terse=false] [--echo=false]
* [--interactive=true] [--host localhost] [--port 4848|4849] [--secure | -s]
* [--user admin_user] [--passwordfile file_name]
* [--property (name=value)[:name=value]*]
* [--target target(Default server)] auth_realm_name
*
* @return asadmin commands
*/
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Creating auth realm: " + realmName );
final AsAdminCmdList list = new AsAdminCmdList(); | final CreateAuthRealm cmd = new CreateAuthRealm( realmName ).withClassName( realmClassName ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDomainMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
| import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
| /*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-domain
* @description AsAdmin start-domain mojo
*/
public class StartDomainMojo
extends AbstractAsadminMojo
{
@Override
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDomainMojo.java
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
/*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-domain
* @description AsAdmin start-domain mojo
*/
public class StartDomainMojo
extends AbstractAsadminMojo
{
@Override
| protected AsAdminCmdList getAsCommandList()
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDomainMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
| import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
| /*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-domain
* @description AsAdmin start-domain mojo
*/
public class StartDomainMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Starting AS domain: " + domain );
final AsAdminCmdList list = new AsAdminCmdList();
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartDomainMojo.java
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
/*
* Copyright (c) 2010, Paul Merlin.
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-domain
* @description AsAdmin start-domain mojo
*/
public class StartDomainMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Starting AS domain: " + domain );
final AsAdminCmdList list = new AsAdminCmdList();
| Domain domainCmd = new Domain( domain ).start();
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/RestartDomainMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
import org.apache.maven.plugin.MojoExecutionException; | /*
* Copyright (c) 2012, Charles Brown.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal restart-domain
* @description AsAdmin restart-domain mojo
*/
public class RestartDomainMojo
extends AbstractAsadminMojo
{
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/RestartDomainMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2012, Charles Brown.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal restart-domain
* @description AsAdmin restart-domain mojo
*/
public class RestartDomainMojo
extends AbstractAsadminMojo
{
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/RestartDomainMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
import org.apache.maven.plugin.MojoExecutionException; | /*
* Copyright (c) 2012, Charles Brown.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal restart-domain
* @description AsAdmin restart-domain mojo
*/
public class RestartDomainMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Restarting AS Domain" );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/RestartDomainMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.Domain;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2012, Charles Brown.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal restart-domain
* @description AsAdmin restart-domain mojo
*/
public class RestartDomainMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Restarting AS Domain" );
final AsAdminCmdList list = new AsAdminCmdList(); | Domain domainCmd = new Domain().restart(); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopDomainMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Domain;
import org.n0pe.asadmin.AsAdminCmdList;
| /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-domain
* @description AsAdmin stop-domain mojo
*/
public class StopDomainMojo
extends AbstractAsadminMojo
{
@Override
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopDomainMojo.java
import org.n0pe.asadmin.commands.Domain;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-domain
* @description AsAdmin stop-domain mojo
*/
public class StopDomainMojo
extends AbstractAsadminMojo
{
@Override
| protected AsAdminCmdList getAsCommandList()
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopDomainMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Domain;
import org.n0pe.asadmin.AsAdminCmdList;
| /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-domain
* @description AsAdmin stop-domain mojo
*/
public class StopDomainMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Stopping Glassfish domain: " + domain );
final AsAdminCmdList list = new AsAdminCmdList();
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Domain.java
// public class Domain
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-domain";
// public static final String STOP = "stop-domain";
// public static final String RESTART = "restart-domain";
// public static final int START_MODE = 1;
// public static final int STOP_MODE = 2;
// public static final int RESTART_MODE = 3;
// private int ACTION = -1;
// private String domain;
//
// public Domain()
// {
// //restart-domain does not require a domain name to be
// //provided.
// }
//
// public Domain( String domain )
// {
// this.domain = domain;
// }
//
// public Domain start()
// {
// ACTION = START_MODE;
// return this;
// }
//
// public Domain stop()
// {
// ACTION = STOP_MODE;
// return this;
// }
//
// public Domain restart()
// {
// ACTION = RESTART_MODE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return ( ACTION == RESTART_MODE );
// }
//
// public String getActionCommand()
// {
// if( ACTION == START_MODE )
// {
// return START;
// }
// else if( ACTION == STOP_MODE )
// {
// return STOP;
// }
// else if( ACTION == RESTART_MODE )
// {
// return RESTART;
// }
// else
// {
// throw new IllegalStateException();
// }
// }
//
// public String[] getParameters()
// {
// if( ACTION == -1 )
// {
// throw new IllegalStateException();
// }
// return ( ACTION == RESTART_MODE )
// ? new String[]
// {
// }
// : new String[]
// {
// domain
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopDomainMojo.java
import org.n0pe.asadmin.commands.Domain;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-domain
* @description AsAdmin stop-domain mojo
*/
public class StopDomainMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Stopping Glassfish domain: " + domain );
final AsAdminCmdList list = new AsAdminCmdList();
| list.add( new Domain( domain ).stop() );
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/ListFileUsersMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/ListFileUsers.java
// public class ListFileUsers
// extends AbstractAsAdminCmd
// {
//
// public static final String LIST_FILE_USER = "list-file-users";
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return LIST_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// return new String[]
// {
// };
// }
//
// public List<String> getUsers()
// throws AsAdminException
// {
// try
// {
// String strReader;
// List<String> asadminResultList = new ArrayList<String>();
// BufferedReader reader = new BufferedReader( getStandardOutput() );
// while( ( strReader = reader.readLine() ) != null )
// {
// if( strReader.length() > 0 )
// {
// asadminResultList.add( strReader );
// }
// }
// return asadminResultList;
// }
// catch( IOException ex )
// {
// throw new AsAdminException( ex.getCause().getMessage(), ex );
// }
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.ListFileUsers;
import org.apache.maven.plugin.MojoExecutionException; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal list-file-users
*/
public class ListFileUsersMojo
extends AbstractAsadminMojo
{
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/ListFileUsers.java
// public class ListFileUsers
// extends AbstractAsAdminCmd
// {
//
// public static final String LIST_FILE_USER = "list-file-users";
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return LIST_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// return new String[]
// {
// };
// }
//
// public List<String> getUsers()
// throws AsAdminException
// {
// try
// {
// String strReader;
// List<String> asadminResultList = new ArrayList<String>();
// BufferedReader reader = new BufferedReader( getStandardOutput() );
// while( ( strReader = reader.readLine() ) != null )
// {
// if( strReader.length() > 0 )
// {
// asadminResultList.add( strReader );
// }
// }
// return asadminResultList;
// }
// catch( IOException ex )
// {
// throw new AsAdminException( ex.getCause().getMessage(), ex );
// }
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/ListFileUsersMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.ListFileUsers;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal list-file-users
*/
public class ListFileUsersMojo
extends AbstractAsadminMojo
{
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/ListFileUsersMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/ListFileUsers.java
// public class ListFileUsers
// extends AbstractAsAdminCmd
// {
//
// public static final String LIST_FILE_USER = "list-file-users";
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return LIST_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// return new String[]
// {
// };
// }
//
// public List<String> getUsers()
// throws AsAdminException
// {
// try
// {
// String strReader;
// List<String> asadminResultList = new ArrayList<String>();
// BufferedReader reader = new BufferedReader( getStandardOutput() );
// while( ( strReader = reader.readLine() ) != null )
// {
// if( strReader.length() > 0 )
// {
// asadminResultList.add( strReader );
// }
// }
// return asadminResultList;
// }
// catch( IOException ex )
// {
// throw new AsAdminException( ex.getCause().getMessage(), ex );
// }
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.ListFileUsers;
import org.apache.maven.plugin.MojoExecutionException; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal list-file-users
*/
public class ListFileUsersMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "List file users" );
AsAdminCmdList cmdList = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/ListFileUsers.java
// public class ListFileUsers
// extends AbstractAsAdminCmd
// {
//
// public static final String LIST_FILE_USER = "list-file-users";
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return LIST_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// return new String[]
// {
// };
// }
//
// public List<String> getUsers()
// throws AsAdminException
// {
// try
// {
// String strReader;
// List<String> asadminResultList = new ArrayList<String>();
// BufferedReader reader = new BufferedReader( getStandardOutput() );
// while( ( strReader = reader.readLine() ) != null )
// {
// if( strReader.length() > 0 )
// {
// asadminResultList.add( strReader );
// }
// }
// return asadminResultList;
// }
// catch( IOException ex )
// {
// throw new AsAdminException( ex.getCause().getMessage(), ex );
// }
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/ListFileUsersMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.ListFileUsers;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal list-file-users
*/
public class ListFileUsersMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "List file users" );
AsAdminCmdList cmdList = new AsAdminCmdList(); | cmdList.add( new ListFileUsers() ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopClusterMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Cluster.java
// public class Cluster
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-cluster";
// public static final String STOP = "stop-cluster";
// private Boolean start = null;
// private String cluster;
//
// public Cluster( String cluster )
// {
// this.cluster = cluster;
// }
//
// public Cluster start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Cluster stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// cluster
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Cluster;
import org.n0pe.asadmin.AsAdminCmdList;
| /*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-cluster
* @description AsAdmin stop-cluster mojo
*/
public class StopClusterMojo
extends AbstractAsadminMojo
{
@Override
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Cluster.java
// public class Cluster
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-cluster";
// public static final String STOP = "stop-cluster";
// private Boolean start = null;
// private String cluster;
//
// public Cluster( String cluster )
// {
// this.cluster = cluster;
// }
//
// public Cluster start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Cluster stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// cluster
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopClusterMojo.java
import org.n0pe.asadmin.commands.Cluster;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-cluster
* @description AsAdmin stop-cluster mojo
*/
public class StopClusterMojo
extends AbstractAsadminMojo
{
@Override
| protected AsAdminCmdList getAsCommandList()
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopClusterMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Cluster.java
// public class Cluster
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-cluster";
// public static final String STOP = "stop-cluster";
// private Boolean start = null;
// private String cluster;
//
// public Cluster( String cluster )
// {
// this.cluster = cluster;
// }
//
// public Cluster start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Cluster stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// cluster
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Cluster;
import org.n0pe.asadmin.AsAdminCmdList;
| /*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-cluster
* @description AsAdmin stop-cluster mojo
*/
public class StopClusterMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Stopping cluster: " + cluster );
final AsAdminCmdList list = new AsAdminCmdList();
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Cluster.java
// public class Cluster
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-cluster";
// public static final String STOP = "stop-cluster";
// private Boolean start = null;
// private String cluster;
//
// public Cluster( String cluster )
// {
// this.cluster = cluster;
// }
//
// public Cluster start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Cluster stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// cluster
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StopClusterMojo.java
import org.n0pe.asadmin.commands.Cluster;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal stop-cluster
* @description AsAdmin stop-cluster mojo
*/
public class StopClusterMojo
extends AbstractAsadminMojo
{
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Stopping cluster: " + cluster );
final AsAdminCmdList list = new AsAdminCmdList();
| Cluster clusterCmd = new Cluster( cluster ).stop();
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateJdbcConnectionResourceMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateJdbcResource.java
// public class CreateJdbcResource
// extends AbstractAsAdminCmd
// {
//
// public static final String RESOURCE = "create-jdbc-resource";
// public static final String CONNECTION_POOL_OPT = "--connectionpoolid";
// private String resourceName;
// private String connectionPoolId;
//
// /**
// * CreateJdbcResource default constructor.
// */
// private CreateJdbcResource()
// {
// }
//
// public CreateJdbcResource( String resourceName )
// {
// this.resourceName = resourceName;
// }
//
// public CreateJdbcResource withConnectionPool( String connectionPoolId )
// {
// this.connectionPoolId = connectionPoolId;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( resourceName == null )
// {
// throw new IllegalStateException();
// }
// return RESOURCE;
// }
//
// public String[] getParameters()
// {
// if( connectionPoolId == null )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// params = new String[]
// {
// CONNECTION_POOL_OPT, connectionPoolId, resourceName
// };
// return params;
// }
//
// }
| import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateJdbcResource; | /*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-jdbc-resource
*/
public class CreateJdbcConnectionResourceMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
/**
* @parameter
* @required
*/
private String resourceName;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateJdbcResource.java
// public class CreateJdbcResource
// extends AbstractAsAdminCmd
// {
//
// public static final String RESOURCE = "create-jdbc-resource";
// public static final String CONNECTION_POOL_OPT = "--connectionpoolid";
// private String resourceName;
// private String connectionPoolId;
//
// /**
// * CreateJdbcResource default constructor.
// */
// private CreateJdbcResource()
// {
// }
//
// public CreateJdbcResource( String resourceName )
// {
// this.resourceName = resourceName;
// }
//
// public CreateJdbcResource withConnectionPool( String connectionPoolId )
// {
// this.connectionPoolId = connectionPoolId;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( resourceName == null )
// {
// throw new IllegalStateException();
// }
// return RESOURCE;
// }
//
// public String[] getParameters()
// {
// if( connectionPoolId == null )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// params = new String[]
// {
// CONNECTION_POOL_OPT, connectionPoolId, resourceName
// };
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateJdbcConnectionResourceMojo.java
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateJdbcResource;
/*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-jdbc-resource
*/
public class CreateJdbcConnectionResourceMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
/**
* @parameter
* @required
*/
private String resourceName;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateJdbcConnectionResourceMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateJdbcResource.java
// public class CreateJdbcResource
// extends AbstractAsAdminCmd
// {
//
// public static final String RESOURCE = "create-jdbc-resource";
// public static final String CONNECTION_POOL_OPT = "--connectionpoolid";
// private String resourceName;
// private String connectionPoolId;
//
// /**
// * CreateJdbcResource default constructor.
// */
// private CreateJdbcResource()
// {
// }
//
// public CreateJdbcResource( String resourceName )
// {
// this.resourceName = resourceName;
// }
//
// public CreateJdbcResource withConnectionPool( String connectionPoolId )
// {
// this.connectionPoolId = connectionPoolId;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( resourceName == null )
// {
// throw new IllegalStateException();
// }
// return RESOURCE;
// }
//
// public String[] getParameters()
// {
// if( connectionPoolId == null )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// params = new String[]
// {
// CONNECTION_POOL_OPT, connectionPoolId, resourceName
// };
// return params;
// }
//
// }
| import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateJdbcResource; | /*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-jdbc-resource
*/
public class CreateJdbcConnectionResourceMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
/**
* @parameter
* @required
*/
private String resourceName;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Creating jdbc connection resource: " + resourceName );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateJdbcResource.java
// public class CreateJdbcResource
// extends AbstractAsAdminCmd
// {
//
// public static final String RESOURCE = "create-jdbc-resource";
// public static final String CONNECTION_POOL_OPT = "--connectionpoolid";
// private String resourceName;
// private String connectionPoolId;
//
// /**
// * CreateJdbcResource default constructor.
// */
// private CreateJdbcResource()
// {
// }
//
// public CreateJdbcResource( String resourceName )
// {
// this.resourceName = resourceName;
// }
//
// public CreateJdbcResource withConnectionPool( String connectionPoolId )
// {
// this.connectionPoolId = connectionPoolId;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( resourceName == null )
// {
// throw new IllegalStateException();
// }
// return RESOURCE;
// }
//
// public String[] getParameters()
// {
// if( connectionPoolId == null )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// params = new String[]
// {
// CONNECTION_POOL_OPT, connectionPoolId, resourceName
// };
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateJdbcConnectionResourceMojo.java
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateJdbcResource;
/*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-jdbc-resource
*/
public class CreateJdbcConnectionResourceMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
/**
* @parameter
* @required
*/
private String resourceName;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Creating jdbc connection resource: " + resourceName );
final AsAdminCmdList list = new AsAdminCmdList(); | final CreateJdbcResource cmd = new CreateJdbcResource( resourceName ).withConnectionPool( poolName ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetPortsMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set-ports
* @description AsAdmin set-ports mojo
*/
public class SetPortsMojo
extends AbstractAsadminMojo
{
private static final String HTTP_LISTENER = "server.http-service.http-listener.http-listener-1.port";
private static final String HTTPS_LISTENER = "server.http-service.http-listener.http-listener-2.port";
/**
* @parameter default-value="8081"
* @required
*/
private String httpListenerPort;
/**
* @parameter default-value="8181"
* @required
*/
private String httpsListenerPort;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetPortsMojo.java
import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set-ports
* @description AsAdmin set-ports mojo
*/
public class SetPortsMojo
extends AbstractAsadminMojo
{
private static final String HTTP_LISTENER = "server.http-service.http-listener.http-listener-1.port";
private static final String HTTPS_LISTENER = "server.http-service.http-listener.http-listener-2.port";
/**
* @parameter default-value="8081"
* @required
*/
private String httpListenerPort;
/**
* @parameter default-value="8181"
* @required
*/
private String httpsListenerPort;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetPortsMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set-ports
* @description AsAdmin set-ports mojo
*/
public class SetPortsMojo
extends AbstractAsadminMojo
{
private static final String HTTP_LISTENER = "server.http-service.http-listener.http-listener-1.port";
private static final String HTTPS_LISTENER = "server.http-service.http-listener.http-listener-2.port";
/**
* @parameter default-value="8081"
* @required
*/
private String httpListenerPort;
/**
* @parameter default-value="8181"
* @required
*/
private String httpsListenerPort;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Setting listeners ports : HTTP(" + httpListenerPort
+ ") HTTPS(" + httpsListenerPort + ")" );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetPortsMojo.java
import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set-ports
* @description AsAdmin set-ports mojo
*/
public class SetPortsMojo
extends AbstractAsadminMojo
{
private static final String HTTP_LISTENER = "server.http-service.http-listener.http-listener-1.port";
private static final String HTTPS_LISTENER = "server.http-service.http-listener.http-listener-2.port";
/**
* @parameter default-value="8081"
* @required
*/
private String httpListenerPort;
/**
* @parameter default-value="8181"
* @required
*/
private String httpsListenerPort;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Setting listeners ports : HTTP(" + httpListenerPort
+ ") HTTPS(" + httpsListenerPort + ")" );
final AsAdminCmdList list = new AsAdminCmdList(); | list.add( new Set( HTTP_LISTENER, httpListenerPort ) ); |
eskatos/asadmin | asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateFileUser.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminException.java
// public class AsAdminException
// extends NestableException
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminException()
// {
// }
//
// public AsAdminException( final String message )
// {
// super( message );
// }
//
// public AsAdminException( final String message, Throwable cause )
// {
// super( message, cause );
// }
//
// }
| import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.AsAdminException; |
@Override
public boolean needCredentials()
{
return true;
}
@Override
public String getActionCommand()
{
if( userName == null )
{
throw new IllegalStateException();
}
return CREATE_FILE_USER;
}
@Override
public String[] getParameters()
{
final String[] params;
params = new String[]
{
GROUPS, group, userName
};
return params;
}
@Override
public String handlePasswordFile( String configuredPasswordFile ) | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminException.java
// public class AsAdminException
// extends NestableException
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminException()
// {
// }
//
// public AsAdminException( final String message )
// {
// super( message );
// }
//
// public AsAdminException( final String message, Throwable cause )
// {
// super( message, cause );
// }
//
// }
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateFileUser.java
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.AsAdminException;
@Override
public boolean needCredentials()
{
return true;
}
@Override
public String getActionCommand()
{
if( userName == null )
{
throw new IllegalStateException();
}
return CREATE_FILE_USER;
}
@Override
public String[] getParameters()
{
final String[] params;
params = new String[]
{
GROUPS, group, userName
};
return params;
}
@Override
public String handlePasswordFile( String configuredPasswordFile ) | throws AsAdminException |
eskatos/asadmin | asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateJdbcConnectionPool.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/Util.java
// public final class Util
// {
//
// public static String quoteCommandArgument( String s )
// {
// return new StringBuilder( s.length() + 2 ).append( "\"" ).append( s ).append( "\"" ).toString();
// }
//
// private Util()
// {
// }
//
// }
| import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.Util; | }
public boolean needCredentials()
{
return true;
}
public String getActionCommand()
{
if( poolName == null )
{
throw new IllegalStateException();
}
return JDBC;
}
public String[] getParameters()
{
if( ( dataSource == null ) || ( restype == null ) )
{
throw new IllegalStateException();
}
final String[] params;
if( properties != null && !properties.isEmpty() )
{
final StringBuffer sw = new StringBuffer();
String key;
for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
{
key = (String) it.next(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/Util.java
// public final class Util
// {
//
// public static String quoteCommandArgument( String s )
// {
// return new StringBuilder( s.length() + 2 ).append( "\"" ).append( s ).append( "\"" ).toString();
// }
//
// private Util()
// {
// }
//
// }
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateJdbcConnectionPool.java
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.Util;
}
public boolean needCredentials()
{
return true;
}
public String getActionCommand()
{
if( poolName == null )
{
throw new IllegalStateException();
}
return JDBC;
}
public String[] getParameters()
{
if( ( dataSource == null ) || ( restype == null ) )
{
throw new IllegalStateException();
}
final String[] params;
if( properties != null && !properties.isEmpty() )
{
final StringBuffer sw = new StringBuffer();
String key;
for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
{
key = (String) it.next(); | sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) ); |
eskatos/asadmin | asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/Util.java
// public final class Util
// {
//
// public static String quoteCommandArgument( String s )
// {
// return new StringBuilder( s.length() + 2 ).append( "\"" ).append( s ).append( "\"" ).toString();
// }
//
// private Util()
// {
// }
//
// }
| import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.Util;
import org.apache.commons.lang.StringUtils; | /*
* Copyright (c) 2010, Paul Merlin. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.asadmin.commands;
public class Set
extends AbstractAsAdminCmd
{
private String property;
private String value;
public Set( String propertyName, String propertyValue )
{
property = propertyName;
value = propertyValue;
}
public boolean needCredentials()
{
return false;
}
public String getActionCommand()
{
return "set";
}
public String[] getParameters()
{
if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
{
throw new IllegalStateException();
}
return new String[]
{ | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/Util.java
// public final class Util
// {
//
// public static String quoteCommandArgument( String s )
// {
// return new StringBuilder( s.length() + 2 ).append( "\"" ).append( s ).append( "\"" ).toString();
// }
//
// private Util()
// {
// }
//
// }
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.Util;
import org.apache.commons.lang.StringUtils;
/*
* Copyright (c) 2010, Paul Merlin. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.asadmin.commands;
public class Set
extends AbstractAsAdminCmd
{
private String property;
private String value;
public Set( String propertyName, String propertyValue )
{
property = propertyName;
value = propertyValue;
}
public boolean needCredentials()
{
return false;
}
public String getActionCommand()
{
return "set";
}
public String[] getParameters()
{
if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
{
throw new IllegalStateException();
}
return new String[]
{ | property + "=" + Util.quoteCommandArgument( value ) |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UpdateFileUserMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/UpdateFileUser.java
// public class UpdateFileUser
// extends AbstractAsAdminCmd
// {
//
// public static final String UPDATE_FILE_USER = "update-file-user";
// public static final String USER_PASSWORD_FILE = "--passwordfile";
// private String passwordFile;
// private String userName;
//
// /**
// * UpdateFileUser default constructor.
// */
// private UpdateFileUser()
// {
// }
//
// public UpdateFileUser( String userName )
// {
// this.userName = userName;
// }
//
// public UpdateFileUser withPasswordFile( String passwordFile )
// {
// this.passwordFile = passwordFile;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// if( userName == null )
// {
// throw new IllegalStateException();
// }
// return UPDATE_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// final String[] params;
// params = new String[]
// {
// USER_PASSWORD_FILE, passwordFile, userName
// };
// return params;
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.UpdateFileUser;
import org.apache.maven.plugin.MojoExecutionException; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal update-file-user
*/
public class UpdateFileUserMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String userPasswordFile;
/**
* @parameter
* @required
*/
private String userName;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/UpdateFileUser.java
// public class UpdateFileUser
// extends AbstractAsAdminCmd
// {
//
// public static final String UPDATE_FILE_USER = "update-file-user";
// public static final String USER_PASSWORD_FILE = "--passwordfile";
// private String passwordFile;
// private String userName;
//
// /**
// * UpdateFileUser default constructor.
// */
// private UpdateFileUser()
// {
// }
//
// public UpdateFileUser( String userName )
// {
// this.userName = userName;
// }
//
// public UpdateFileUser withPasswordFile( String passwordFile )
// {
// this.passwordFile = passwordFile;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// if( userName == null )
// {
// throw new IllegalStateException();
// }
// return UPDATE_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// final String[] params;
// params = new String[]
// {
// USER_PASSWORD_FILE, passwordFile, userName
// };
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UpdateFileUserMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.UpdateFileUser;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal update-file-user
*/
public class UpdateFileUserMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String userPasswordFile;
/**
* @parameter
* @required
*/
private String userName;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UpdateFileUserMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/UpdateFileUser.java
// public class UpdateFileUser
// extends AbstractAsAdminCmd
// {
//
// public static final String UPDATE_FILE_USER = "update-file-user";
// public static final String USER_PASSWORD_FILE = "--passwordfile";
// private String passwordFile;
// private String userName;
//
// /**
// * UpdateFileUser default constructor.
// */
// private UpdateFileUser()
// {
// }
//
// public UpdateFileUser( String userName )
// {
// this.userName = userName;
// }
//
// public UpdateFileUser withPasswordFile( String passwordFile )
// {
// this.passwordFile = passwordFile;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// if( userName == null )
// {
// throw new IllegalStateException();
// }
// return UPDATE_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// final String[] params;
// params = new String[]
// {
// USER_PASSWORD_FILE, passwordFile, userName
// };
// return params;
// }
//
// }
| import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.UpdateFileUser;
import org.apache.maven.plugin.MojoExecutionException; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal update-file-user
*/
public class UpdateFileUserMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String userPasswordFile;
/**
* @parameter
* @required
*/
private String userName;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Update file user: " + userName );
AsAdminCmdList cmdList = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/UpdateFileUser.java
// public class UpdateFileUser
// extends AbstractAsAdminCmd
// {
//
// public static final String UPDATE_FILE_USER = "update-file-user";
// public static final String USER_PASSWORD_FILE = "--passwordfile";
// private String passwordFile;
// private String userName;
//
// /**
// * UpdateFileUser default constructor.
// */
// private UpdateFileUser()
// {
// }
//
// public UpdateFileUser( String userName )
// {
// this.userName = userName;
// }
//
// public UpdateFileUser withPasswordFile( String passwordFile )
// {
// this.passwordFile = passwordFile;
// return this;
// }
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// if( userName == null )
// {
// throw new IllegalStateException();
// }
// return UPDATE_FILE_USER;
// }
//
// @Override
// public String[] getParameters()
// {
// final String[] params;
// params = new String[]
// {
// USER_PASSWORD_FILE, passwordFile, userName
// };
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UpdateFileUserMojo.java
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.UpdateFileUser;
import org.apache.maven.plugin.MojoExecutionException;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal update-file-user
*/
public class UpdateFileUserMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String userPasswordFile;
/**
* @parameter
* @required
*/
private String userName;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Update file user: " + userName );
AsAdminCmdList cmdList = new AsAdminCmdList(); | cmdList.add( new UpdateFileUser( userName ).withPasswordFile( userPasswordFile ) ); |
eskatos/asadmin | asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateMessageSecurityProvider.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/Util.java
// public final class Util
// {
//
// public static String quoteCommandArgument( String s )
// {
// return new StringBuilder( s.length() + 2 ).append( "\"" ).append( s ).append( "\"" ).toString();
// }
//
// private Util()
// {
// }
//
// }
| import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.Util; | }
public boolean needCredentials()
{
return true;
}
public String getActionCommand()
{
if( providerName == null )
{
throw new IllegalStateException();
}
return SECURITY_PROVIDER;
}
public String[] getParameters()
{
if( ( providerType == null ) || ( layer == null ) || ( classname == null ) )
{
throw new IllegalStateException();
}
final String[] params;
if( properties != null && !properties.isEmpty() )
{
final StringBuffer sw = new StringBuffer();
String key;
for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
{
key = (String) it.next(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AbstractAsAdminCmd.java
// public abstract class AbstractAsAdminCmd
// implements IAsAdminCmd
// {
//
// public static final String[] EMPTY_ARRAY = new String[ 0 ];
// private final StringBuilder stdoutBuilder = new StringBuilder();
// private final StringBuilder stderrBuilder = new StringBuilder();
// private Pattern okayErrorPattern = null;
// private Pattern okayStdOutPattern = null;
//
// @Override
// public final Reader getStandardOutput()
// {
// return new CharSequenceReader( stdoutBuilder );
// }
//
// @Override
// public final Reader getErrorOutput()
// {
// return new CharSequenceReader( stderrBuilder );
// }
//
// @Override
// public boolean failOnNonZeroExit()
// {
// if( okayErrorPattern == null )
// {
// if( okayStdOutPattern == null )
// {
// return true;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
// }
// else
// {
// boolean stderrorNotOK = !okayErrorPattern.matcher( stderrBuilder.toString() ).matches();
// if( okayStdOutPattern == null )
// {
// return stderrorNotOK;
// }
// else
// {
// return !okayStdOutPattern.matcher( stdoutBuilder.toString() ).matches();
// }
//
// }
// }
//
// @Override
// public void setOkayErrorPattern( Pattern pattern )
// {
// this.okayErrorPattern = pattern;
// }
//
// @Override
// public void setOkayStdOutPattern( Pattern pattern )
// {
// this.okayStdOutPattern = pattern;
// }
//
// public String handlePasswordFile( String configuredPasswordFile )
// throws AsAdminException
// {
// return configuredPasswordFile;
// }
//
// final void appendStandardOutputLine( String line )
// {
// //System.out.println("Out: " + line);
// stdoutBuilder.append( line ).append( "\n" );
// }
//
// final void appendErrorOutputLine( String line )
// {
// //System.err.println("Err: " + line);
// stderrBuilder.append( line ).append( "\n" );
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/Util.java
// public final class Util
// {
//
// public static String quoteCommandArgument( String s )
// {
// return new StringBuilder( s.length() + 2 ).append( "\"" ).append( s ).append( "\"" ).toString();
// }
//
// private Util()
// {
// }
//
// }
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateMessageSecurityProvider.java
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.n0pe.asadmin.AbstractAsAdminCmd;
import org.n0pe.asadmin.Util;
}
public boolean needCredentials()
{
return true;
}
public String getActionCommand()
{
if( providerName == null )
{
throw new IllegalStateException();
}
return SECURITY_PROVIDER;
}
public String[] getParameters()
{
if( ( providerType == null ) || ( layer == null ) || ( classname == null ) )
{
throw new IllegalStateException();
}
final String[] params;
if( properties != null && !properties.isEmpty() )
{
final StringBuffer sw = new StringBuffer();
String key;
for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
{
key = (String) it.next(); | sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/PingConnectionPoolMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/PingConnectionPool.java
// public class PingConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String PING = "ping-connection-pool";
// private String poolName;
//
// private PingConnectionPool()
// {
// }
//
// public PingConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return PING;
// }
//
// public String[] getParameters()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// poolName
// };
// }
//
// }
| import org.n0pe.asadmin.commands.PingConnectionPool;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal ping-connection-pool
* @description AsAdmin ping connection pool mojo
*/
public class PingConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="DerbyPool"
* @required
*/
private String connectionPoolName;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/PingConnectionPool.java
// public class PingConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String PING = "ping-connection-pool";
// private String poolName;
//
// private PingConnectionPool()
// {
// }
//
// public PingConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return PING;
// }
//
// public String[] getParameters()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// poolName
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/PingConnectionPoolMojo.java
import org.n0pe.asadmin.commands.PingConnectionPool;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal ping-connection-pool
* @description AsAdmin ping connection pool mojo
*/
public class PingConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="DerbyPool"
* @required
*/
private String connectionPoolName;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/PingConnectionPoolMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/PingConnectionPool.java
// public class PingConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String PING = "ping-connection-pool";
// private String poolName;
//
// private PingConnectionPool()
// {
// }
//
// public PingConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return PING;
// }
//
// public String[] getParameters()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// poolName
// };
// }
//
// }
| import org.n0pe.asadmin.commands.PingConnectionPool;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal ping-connection-pool
* @description AsAdmin ping connection pool mojo
*/
public class PingConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="DerbyPool"
* @required
*/
private String connectionPoolName;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Pinging connection pool: " + connectionPoolName );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/PingConnectionPool.java
// public class PingConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String PING = "ping-connection-pool";
// private String poolName;
//
// private PingConnectionPool()
// {
// }
//
// public PingConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return PING;
// }
//
// public String[] getParameters()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// poolName
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/PingConnectionPoolMojo.java
import org.n0pe.asadmin.commands.PingConnectionPool;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal ping-connection-pool
* @description AsAdmin ping connection pool mojo
*/
public class PingConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter default-value="DerbyPool"
* @required
*/
private String connectionPoolName;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Pinging connection pool: " + connectionPoolName );
final AsAdminCmdList list = new AsAdminCmdList(); | list.add( new PingConnectionPool( connectionPoolName ) ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set
* @description AsAdmin set property
*/
public class SetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String property;
/**
* @parameter
* @required
*/
private String value;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetMojo.java
import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set
* @description AsAdmin set property
*/
public class SetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String property;
/**
* @parameter
* @required
*/
private String value;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList; | /*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set
* @description AsAdmin set property
*/
public class SetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String property;
/**
* @parameter
* @required
*/
private String value;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Setting property : " + property
+ "=" + value + ")" );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Set.java
// public class Set
// extends AbstractAsAdminCmd
// {
//
// private String property;
// private String value;
//
// public Set( String propertyName, String propertyValue )
// {
// property = propertyName;
// value = propertyValue;
// }
//
// public boolean needCredentials()
// {
// return false;
// }
//
// public String getActionCommand()
// {
// return "set";
// }
//
// public String[] getParameters()
// {
// if( StringUtils.isEmpty( property ) || StringUtils.isEmpty( value ) )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// property + "=" + Util.quoteCommandArgument( value )
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/SetMojo.java
import org.n0pe.asadmin.commands.Set;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal set
* @description AsAdmin set property
*/
public class SetMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String property;
/**
* @parameter
* @required
*/
private String value;
@Override
protected AsAdminCmdList getAsCommandList()
{
getLog().info( "Setting property : " + property
+ "=" + value + ")" );
final AsAdminCmdList list = new AsAdminCmdList(); | list.add( new Set( property, value ) ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UptimeMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/IAsAdminConfig.java
// public interface IAsAdminConfig
// {
//
// /**
// * @return A map of environment to use when forking the asadmin process.
// */
// Map<String, String> getEnvironmentVariables();
//
// /**
// * @return The glassfish home path.
// */
// String getGlassfishHome();
//
// /**
// * @return The username to use with asadmin.
// */
// String getUser();
//
// /**
// * @return The file where credentials are stored.
// */
// String getPasswordFile();
//
// /**
// * @return The glassfish host.
// */
// String getHost();
//
// /**
// * @return The glassfish port.
// */
// String getPort();
//
// /**
// * @return True if gf admin connection is secure.
// */
// boolean isSecure();
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Uptime.java
// public class Uptime
// extends AbstractAsAdminCmd
// {
//
// boolean requiresCredentials = false;
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "uptime";
// }
//
// @Override
// public String[] getParameters()
// {
// return EMPTY_ARRAY;
// }
//
// }
| import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.IAsAdminConfig;
import org.n0pe.asadmin.commands.Uptime;
| /*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal uptime
* @description AsAdmin uptime mojo
*/
public class UptimeMojo
extends AbstractAsadminMojo
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/IAsAdminConfig.java
// public interface IAsAdminConfig
// {
//
// /**
// * @return A map of environment to use when forking the asadmin process.
// */
// Map<String, String> getEnvironmentVariables();
//
// /**
// * @return The glassfish home path.
// */
// String getGlassfishHome();
//
// /**
// * @return The username to use with asadmin.
// */
// String getUser();
//
// /**
// * @return The file where credentials are stored.
// */
// String getPasswordFile();
//
// /**
// * @return The glassfish host.
// */
// String getHost();
//
// /**
// * @return The glassfish port.
// */
// String getPort();
//
// /**
// * @return True if gf admin connection is secure.
// */
// boolean isSecure();
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Uptime.java
// public class Uptime
// extends AbstractAsAdminCmd
// {
//
// boolean requiresCredentials = false;
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "uptime";
// }
//
// @Override
// public String[] getParameters()
// {
// return EMPTY_ARRAY;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UptimeMojo.java
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.IAsAdminConfig;
import org.n0pe.asadmin.commands.Uptime;
/*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal uptime
* @description AsAdmin uptime mojo
*/
public class UptimeMojo
extends AbstractAsadminMojo
| implements IAsAdminConfig
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UptimeMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/IAsAdminConfig.java
// public interface IAsAdminConfig
// {
//
// /**
// * @return A map of environment to use when forking the asadmin process.
// */
// Map<String, String> getEnvironmentVariables();
//
// /**
// * @return The glassfish home path.
// */
// String getGlassfishHome();
//
// /**
// * @return The username to use with asadmin.
// */
// String getUser();
//
// /**
// * @return The file where credentials are stored.
// */
// String getPasswordFile();
//
// /**
// * @return The glassfish host.
// */
// String getHost();
//
// /**
// * @return The glassfish port.
// */
// String getPort();
//
// /**
// * @return True if gf admin connection is secure.
// */
// boolean isSecure();
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Uptime.java
// public class Uptime
// extends AbstractAsAdminCmd
// {
//
// boolean requiresCredentials = false;
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "uptime";
// }
//
// @Override
// public String[] getParameters()
// {
// return EMPTY_ARRAY;
// }
//
// }
| import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.IAsAdminConfig;
import org.n0pe.asadmin.commands.Uptime;
| /*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal uptime
* @description AsAdmin uptime mojo
*/
public class UptimeMojo
extends AbstractAsadminMojo
implements IAsAdminConfig
{
@Override
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/IAsAdminConfig.java
// public interface IAsAdminConfig
// {
//
// /**
// * @return A map of environment to use when forking the asadmin process.
// */
// Map<String, String> getEnvironmentVariables();
//
// /**
// * @return The glassfish home path.
// */
// String getGlassfishHome();
//
// /**
// * @return The username to use with asadmin.
// */
// String getUser();
//
// /**
// * @return The file where credentials are stored.
// */
// String getPasswordFile();
//
// /**
// * @return The glassfish host.
// */
// String getHost();
//
// /**
// * @return The glassfish port.
// */
// String getPort();
//
// /**
// * @return True if gf admin connection is secure.
// */
// boolean isSecure();
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Uptime.java
// public class Uptime
// extends AbstractAsAdminCmd
// {
//
// boolean requiresCredentials = false;
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "uptime";
// }
//
// @Override
// public String[] getParameters()
// {
// return EMPTY_ARRAY;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UptimeMojo.java
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.IAsAdminConfig;
import org.n0pe.asadmin.commands.Uptime;
/*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal uptime
* @description AsAdmin uptime mojo
*/
public class UptimeMojo
extends AbstractAsadminMojo
implements IAsAdminConfig
{
@Override
| protected AsAdminCmdList getAsCommandList()
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UptimeMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/IAsAdminConfig.java
// public interface IAsAdminConfig
// {
//
// /**
// * @return A map of environment to use when forking the asadmin process.
// */
// Map<String, String> getEnvironmentVariables();
//
// /**
// * @return The glassfish home path.
// */
// String getGlassfishHome();
//
// /**
// * @return The username to use with asadmin.
// */
// String getUser();
//
// /**
// * @return The file where credentials are stored.
// */
// String getPasswordFile();
//
// /**
// * @return The glassfish host.
// */
// String getHost();
//
// /**
// * @return The glassfish port.
// */
// String getPort();
//
// /**
// * @return True if gf admin connection is secure.
// */
// boolean isSecure();
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Uptime.java
// public class Uptime
// extends AbstractAsAdminCmd
// {
//
// boolean requiresCredentials = false;
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "uptime";
// }
//
// @Override
// public String[] getParameters()
// {
// return EMPTY_ARRAY;
// }
//
// }
| import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.IAsAdminConfig;
import org.n0pe.asadmin.commands.Uptime;
| /*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal uptime
* @description AsAdmin uptime mojo
*/
public class UptimeMojo
extends AbstractAsadminMojo
implements IAsAdminConfig
{
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException,
MojoFailureException
{
getLog().info( "Checking server uptime" );
final AsAdminCmdList list = new AsAdminCmdList();
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/IAsAdminConfig.java
// public interface IAsAdminConfig
// {
//
// /**
// * @return A map of environment to use when forking the asadmin process.
// */
// Map<String, String> getEnvironmentVariables();
//
// /**
// * @return The glassfish home path.
// */
// String getGlassfishHome();
//
// /**
// * @return The username to use with asadmin.
// */
// String getUser();
//
// /**
// * @return The file where credentials are stored.
// */
// String getPasswordFile();
//
// /**
// * @return The glassfish host.
// */
// String getHost();
//
// /**
// * @return The glassfish port.
// */
// String getPort();
//
// /**
// * @return True if gf admin connection is secure.
// */
// boolean isSecure();
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Uptime.java
// public class Uptime
// extends AbstractAsAdminCmd
// {
//
// boolean requiresCredentials = false;
//
// @Override
// public boolean needCredentials()
// {
// return true;
// }
//
// @Override
// public String getActionCommand()
// {
// return "uptime";
// }
//
// @Override
// public String[] getParameters()
// {
// return EMPTY_ARRAY;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/UptimeMojo.java
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.IAsAdminConfig;
import org.n0pe.asadmin.commands.Uptime;
/*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal uptime
* @description AsAdmin uptime mojo
*/
public class UptimeMojo
extends AbstractAsadminMojo
implements IAsAdminConfig
{
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException,
MojoFailureException
{
getLog().info( "Checking server uptime" );
final AsAdminCmdList list = new AsAdminCmdList();
| Uptime uptimeCmd = new Uptime();
|
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateMessageSecurityProviderMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateMessageSecurityProvider.java
// public class CreateMessageSecurityProvider
// extends AbstractAsAdminCmd
// {
//
// public static final String SECURITY_PROVIDER = "create-message-security-provider";
// public static final String LAYER_OPT = "--layer";
// public static final String PROVIDER_TYPE_OPT = "--providertype";
// public static final String CLASSNAME = "--classname";
// public static final String PROPERTY_OPT = "--property";
// private String providerName;
// private String providerType;
// private String layer;
// private String classname;
// private Map properties;
//
// private CreateMessageSecurityProvider()
// {
// }
//
// public CreateMessageSecurityProvider( String providerName )
// {
// this.providerName = providerName;
// }
//
// public CreateMessageSecurityProvider withLayer( String layer )
// {
// this.layer = layer;
// return this;
// }
//
// public CreateMessageSecurityProvider withProviderType( String providerType )
// {
// this.providerType = providerType;
// return this;
// }
//
// public CreateMessageSecurityProvider withClassName( String classname )
// {
// this.classname = classname;
// return this;
// }
//
// public CreateMessageSecurityProvider addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( providerName == null )
// {
// throw new IllegalStateException();
// }
// return SECURITY_PROVIDER;
// }
//
// public String[] getParameters()
// {
// if( ( providerType == null ) || ( layer == null ) || ( classname == null ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringBuffer sw = new StringBuffer();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, PROPERTY_OPT, sw.toString(), providerName
// };
//
// }
// else
// {
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, providerName
// };
// }
// return params;
// }
//
// }
| import java.util.Iterator;
import java.util.Map;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateMessageSecurityProvider; | /*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-message-security-provider
*/
public class CreateMessageSecurityProviderMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String providerName;
/**
* @parameter
* @required
*/
private String className;
/**
* @parameter default-value="SOAP"
* @required
*/
private String layer;
/**
* @parameter default-value="server"
* @required
*/
private String providerType;
/**
* @parameter
*/
private Map securityProviderProperties;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateMessageSecurityProvider.java
// public class CreateMessageSecurityProvider
// extends AbstractAsAdminCmd
// {
//
// public static final String SECURITY_PROVIDER = "create-message-security-provider";
// public static final String LAYER_OPT = "--layer";
// public static final String PROVIDER_TYPE_OPT = "--providertype";
// public static final String CLASSNAME = "--classname";
// public static final String PROPERTY_OPT = "--property";
// private String providerName;
// private String providerType;
// private String layer;
// private String classname;
// private Map properties;
//
// private CreateMessageSecurityProvider()
// {
// }
//
// public CreateMessageSecurityProvider( String providerName )
// {
// this.providerName = providerName;
// }
//
// public CreateMessageSecurityProvider withLayer( String layer )
// {
// this.layer = layer;
// return this;
// }
//
// public CreateMessageSecurityProvider withProviderType( String providerType )
// {
// this.providerType = providerType;
// return this;
// }
//
// public CreateMessageSecurityProvider withClassName( String classname )
// {
// this.classname = classname;
// return this;
// }
//
// public CreateMessageSecurityProvider addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( providerName == null )
// {
// throw new IllegalStateException();
// }
// return SECURITY_PROVIDER;
// }
//
// public String[] getParameters()
// {
// if( ( providerType == null ) || ( layer == null ) || ( classname == null ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringBuffer sw = new StringBuffer();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, PROPERTY_OPT, sw.toString(), providerName
// };
//
// }
// else
// {
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, providerName
// };
// }
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateMessageSecurityProviderMojo.java
import java.util.Iterator;
import java.util.Map;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateMessageSecurityProvider;
/*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-message-security-provider
*/
public class CreateMessageSecurityProviderMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String providerName;
/**
* @parameter
* @required
*/
private String className;
/**
* @parameter default-value="SOAP"
* @required
*/
private String layer;
/**
* @parameter default-value="server"
* @required
*/
private String providerType;
/**
* @parameter
*/
private Map securityProviderProperties;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateMessageSecurityProviderMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateMessageSecurityProvider.java
// public class CreateMessageSecurityProvider
// extends AbstractAsAdminCmd
// {
//
// public static final String SECURITY_PROVIDER = "create-message-security-provider";
// public static final String LAYER_OPT = "--layer";
// public static final String PROVIDER_TYPE_OPT = "--providertype";
// public static final String CLASSNAME = "--classname";
// public static final String PROPERTY_OPT = "--property";
// private String providerName;
// private String providerType;
// private String layer;
// private String classname;
// private Map properties;
//
// private CreateMessageSecurityProvider()
// {
// }
//
// public CreateMessageSecurityProvider( String providerName )
// {
// this.providerName = providerName;
// }
//
// public CreateMessageSecurityProvider withLayer( String layer )
// {
// this.layer = layer;
// return this;
// }
//
// public CreateMessageSecurityProvider withProviderType( String providerType )
// {
// this.providerType = providerType;
// return this;
// }
//
// public CreateMessageSecurityProvider withClassName( String classname )
// {
// this.classname = classname;
// return this;
// }
//
// public CreateMessageSecurityProvider addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( providerName == null )
// {
// throw new IllegalStateException();
// }
// return SECURITY_PROVIDER;
// }
//
// public String[] getParameters()
// {
// if( ( providerType == null ) || ( layer == null ) || ( classname == null ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringBuffer sw = new StringBuffer();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, PROPERTY_OPT, sw.toString(), providerName
// };
//
// }
// else
// {
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, providerName
// };
// }
// return params;
// }
//
// }
| import java.util.Iterator;
import java.util.Map;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateMessageSecurityProvider; | /*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-message-security-provider
*/
public class CreateMessageSecurityProviderMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String providerName;
/**
* @parameter
* @required
*/
private String className;
/**
* @parameter default-value="SOAP"
* @required
*/
private String layer;
/**
* @parameter default-value="server"
* @required
*/
private String providerType;
/**
* @parameter
*/
private Map securityProviderProperties;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Creating auth realm: " + providerName );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/CreateMessageSecurityProvider.java
// public class CreateMessageSecurityProvider
// extends AbstractAsAdminCmd
// {
//
// public static final String SECURITY_PROVIDER = "create-message-security-provider";
// public static final String LAYER_OPT = "--layer";
// public static final String PROVIDER_TYPE_OPT = "--providertype";
// public static final String CLASSNAME = "--classname";
// public static final String PROPERTY_OPT = "--property";
// private String providerName;
// private String providerType;
// private String layer;
// private String classname;
// private Map properties;
//
// private CreateMessageSecurityProvider()
// {
// }
//
// public CreateMessageSecurityProvider( String providerName )
// {
// this.providerName = providerName;
// }
//
// public CreateMessageSecurityProvider withLayer( String layer )
// {
// this.layer = layer;
// return this;
// }
//
// public CreateMessageSecurityProvider withProviderType( String providerType )
// {
// this.providerType = providerType;
// return this;
// }
//
// public CreateMessageSecurityProvider withClassName( String classname )
// {
// this.classname = classname;
// return this;
// }
//
// public CreateMessageSecurityProvider addProperty( String key, String value )
// {
// if( properties == null )
// {
// properties = new HashMap();
// }
// properties.put( key, value );
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( providerName == null )
// {
// throw new IllegalStateException();
// }
// return SECURITY_PROVIDER;
// }
//
// public String[] getParameters()
// {
// if( ( providerType == null ) || ( layer == null ) || ( classname == null ) )
// {
// throw new IllegalStateException();
// }
// final String[] params;
// if( properties != null && !properties.isEmpty() )
// {
// final StringBuffer sw = new StringBuffer();
// String key;
// for( final Iterator it = properties.keySet().iterator(); it.hasNext(); )
// {
// key = (String) it.next();
// sw.append( key ).append( "=" ).append( Util.quoteCommandArgument( (String) properties.get( key ) ) );
// if( it.hasNext() )
// {
// sw.append( ":" );
// }
// }
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, PROPERTY_OPT, sw.toString(), providerName
// };
//
// }
// else
// {
// params = new String[]
// {
// LAYER_OPT, layer, PROVIDER_TYPE_OPT, providerType, CLASSNAME, classname, providerName
// };
// }
// return params;
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/CreateMessageSecurityProviderMojo.java
import java.util.Iterator;
import java.util.Map;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.CreateMessageSecurityProvider;
/*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal create-message-security-provider
*/
public class CreateMessageSecurityProviderMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String providerName;
/**
* @parameter
* @required
*/
private String className;
/**
* @parameter default-value="SOAP"
* @required
*/
private String layer;
/**
* @parameter default-value="server"
* @required
*/
private String providerType;
/**
* @parameter
*/
private Map securityProviderProperties;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Creating auth realm: " + providerName );
final AsAdminCmdList list = new AsAdminCmdList(); | final CreateMessageSecurityProvider cmd = new CreateMessageSecurityProvider( providerName ).withClassName( className ). |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/DeleteJdbcConnectionPoolMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/DeleteJdbcConnectionPool.java
// public class DeleteJdbcConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String JDBC = "delete-jdbc-connection-pool";
// private String poolName;
//
// private DeleteJdbcConnectionPool()
// {
// }
//
// public DeleteJdbcConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return JDBC;
// }
//
// public String[] getParameters()
// {
// return new String[]
// {
// poolName
// };
// }
//
// }
| import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.DeleteJdbcConnectionPool; | /*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal delete-jdbc-connection-pool
*/
public class DeleteJdbcConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
@Override | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/DeleteJdbcConnectionPool.java
// public class DeleteJdbcConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String JDBC = "delete-jdbc-connection-pool";
// private String poolName;
//
// private DeleteJdbcConnectionPool()
// {
// }
//
// public DeleteJdbcConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return JDBC;
// }
//
// public String[] getParameters()
// {
// return new String[]
// {
// poolName
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/DeleteJdbcConnectionPoolMojo.java
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.DeleteJdbcConnectionPool;
/*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal delete-jdbc-connection-pool
*/
public class DeleteJdbcConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
@Override | protected AsAdminCmdList getAsCommandList() |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/DeleteJdbcConnectionPoolMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/DeleteJdbcConnectionPool.java
// public class DeleteJdbcConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String JDBC = "delete-jdbc-connection-pool";
// private String poolName;
//
// private DeleteJdbcConnectionPool()
// {
// }
//
// public DeleteJdbcConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return JDBC;
// }
//
// public String[] getParameters()
// {
// return new String[]
// {
// poolName
// };
// }
//
// }
| import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.DeleteJdbcConnectionPool; | /*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal delete-jdbc-connection-pool
*/
public class DeleteJdbcConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Delete jdbc connection pool: " + poolName );
final AsAdminCmdList list = new AsAdminCmdList(); | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/DeleteJdbcConnectionPool.java
// public class DeleteJdbcConnectionPool
// extends AbstractAsAdminCmd
// {
//
// public static final String JDBC = "delete-jdbc-connection-pool";
// private String poolName;
//
// private DeleteJdbcConnectionPool()
// {
// }
//
// public DeleteJdbcConnectionPool( String poolName )
// {
// this.poolName = poolName;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( poolName == null )
// {
// throw new IllegalStateException();
// }
// return JDBC;
// }
//
// public String[] getParameters()
// {
// return new String[]
// {
// poolName
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/DeleteJdbcConnectionPoolMojo.java
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.n0pe.asadmin.AsAdminCmdList;
import org.n0pe.asadmin.commands.DeleteJdbcConnectionPool;
/*
* Copyright (c) 2010, Christophe Souvignier.
* Copyright (c) 2010, Paul Merlin.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal delete-jdbc-connection-pool
*/
public class DeleteJdbcConnectionPoolMojo
extends AbstractAsadminMojo
{
/**
* @parameter
* @required
*/
private String poolName;
@Override
protected AsAdminCmdList getAsCommandList()
throws MojoExecutionException, MojoFailureException
{
getLog().info( "Delete jdbc connection pool: " + poolName );
final AsAdminCmdList list = new AsAdminCmdList(); | final DeleteJdbcConnectionPool cmd = new DeleteJdbcConnectionPool( poolName ); |
eskatos/asadmin | asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartClusterMojo.java | // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Cluster.java
// public class Cluster
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-cluster";
// public static final String STOP = "stop-cluster";
// private Boolean start = null;
// private String cluster;
//
// public Cluster( String cluster )
// {
// this.cluster = cluster;
// }
//
// public Cluster start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Cluster stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// cluster
// };
// }
//
// }
| import org.n0pe.asadmin.commands.Cluster;
import org.n0pe.asadmin.AsAdminCmdList;
| /*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-cluster
* @description AsAdmin start-cluster mojo
*/
public class StartClusterMojo
extends AbstractAsadminMojo
{
@Override
| // Path: asadmin-java/src/main/java/org/n0pe/asadmin/AsAdminCmdList.java
// public class AsAdminCmdList
// extends ArrayList<IAsAdminCmd>
// {
//
// private static final long serialVersionUID = 1L;
//
// public AsAdminCmdList()
// {
// super();
// }
//
// }
//
// Path: asadmin-java/src/main/java/org/n0pe/asadmin/commands/Cluster.java
// public class Cluster
// extends AbstractAsAdminCmd
// {
//
// public static final String START = "start-cluster";
// public static final String STOP = "stop-cluster";
// private Boolean start = null;
// private String cluster;
//
// public Cluster( String cluster )
// {
// this.cluster = cluster;
// }
//
// public Cluster start()
// {
// start = Boolean.TRUE;
// return this;
// }
//
// public Cluster stop()
// {
// start = Boolean.FALSE;
// return this;
// }
//
// public boolean needCredentials()
// {
// return true;
// }
//
// public String getActionCommand()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return start.booleanValue()
// ? START
// : STOP;
// }
//
// public String[] getParameters()
// {
// if( start == null )
// {
// throw new IllegalStateException();
// }
// return new String[]
// {
// cluster
// };
// }
//
// }
// Path: asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/StartClusterMojo.java
import org.n0pe.asadmin.commands.Cluster;
import org.n0pe.asadmin.AsAdminCmdList;
/*
* Copyright (c) 2011, J. Francis.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.n0pe.mojo.asadmin;
/**
* @goal start-cluster
* @description AsAdmin start-cluster mojo
*/
public class StartClusterMojo
extends AbstractAsadminMojo
{
@Override
| protected AsAdminCmdList getAsCommandList()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.