summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
a599957)
application
fixes #7183
Change-Id: Ia83059a2c2331f770245635685b1b4e77887c904
SimanticsArguments.ONTOLOGY_RECOVERY_POLICY_REINSTALL,
SimanticsArguments.SERVER,
SimanticsArguments.LOCAL_SERVER_PORT,
SimanticsArguments.ONTOLOGY_RECOVERY_POLICY_REINSTALL,
SimanticsArguments.SERVER,
SimanticsArguments.LOCAL_SERVER_PORT,
+ SimanticsArguments.DISABLE_INDEX,
+ SimanticsArguments.DATABASE_ID,
};
IArguments result = Arguments.parse(args, accepted);
return result;
};
IArguments result = Arguments.parse(args, accepted);
return result;
SimanticsArguments.ONTOLOGY_RECOVERY_POLICY_REINSTALL,
SimanticsArguments.SERVER,
SimanticsArguments.LOCAL_SERVER_PORT,
SimanticsArguments.ONTOLOGY_RECOVERY_POLICY_REINSTALL,
SimanticsArguments.SERVER,
SimanticsArguments.LOCAL_SERVER_PORT,
+ SimanticsArguments.DISABLE_INDEX,
SimanticsArguments.DATABASE_ID,
};
IArguments result = Arguments.parse(args, accepted);
SimanticsArguments.DATABASE_ID,
};
IArguments result = Arguments.parse(args, accepted);
import org.simantics.db.Resource;
import org.simantics.db.Session;
import org.simantics.db.WriteGraph;
import org.simantics.db.Resource;
import org.simantics.db.Session;
import org.simantics.db.WriteGraph;
+import org.simantics.db.common.Indexing;
import org.simantics.db.common.procedure.adapter.ProcedureAdapter;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.RuntimeDatabaseException;
import org.simantics.db.common.procedure.adapter.ProcedureAdapter;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.RuntimeDatabaseException;
ontologyPolicy = OntologyRecoveryPolicy.ReinstallDatabase;
}
ontologyPolicy = OntologyRecoveryPolicy.ReinstallDatabase;
}
+ if (args.contains(SimanticsArguments.DISABLE_INDEX)) {
+ Indexing.setDefaultDependenciesIndexingEnabled(false);
+ }
+
+ String databaseDriverId = defaultDatabaseDriverId;
+ if (args.contains(SimanticsArguments.DATABASE_ID)) {
+ databaseDriverId = args.get(SimanticsArguments.DATABASE_ID);
+ Simantics.setDefaultDatabaseDriver(databaseDriverId);
+ }
+
int localPort = 0;
if (args.contains(SimanticsArguments.LOCAL_SERVER_PORT)) {
try {
int localPort = 0;
if (args.contains(SimanticsArguments.LOCAL_SERVER_PORT)) {
try {
- return startUpHeadless(progress, workspacePolicy, ontologyPolicy, localPort /*, remoteDatabase*/);
+ return startUpHeadless(progress, workspacePolicy, ontologyPolicy, localPort, databaseDriverId /*, remoteDatabase*/);
* @return
* @throws PlatformException
*/
* @return
* @throws PlatformException
*/
- public static ISessionContext startUpHeadless(IProgressMonitor progress, RecoveryPolicy workspacePolicy, OntologyRecoveryPolicy ontologyPolicy, int localPort) throws PlatformException {
+ public static ISessionContext startUpHeadless(IProgressMonitor progress, RecoveryPolicy workspacePolicy, OntologyRecoveryPolicy ontologyPolicy, int localPort, String databaseDriverId) throws PlatformException {
if (SimanticsPlatform.INSTANCE.sessionContext != null) {
throw new RuntimeDatabaseException("Simantics is already up and running.");
}
if (SimanticsPlatform.INSTANCE.sessionContext != null) {
throw new RuntimeDatabaseException("Simantics is already up and running.");
}
if (progress == null)
progress = new NullProgressMonitor();
if (progress == null)
progress = new NullProgressMonitor();
- return SimanticsPlatform.INSTANCE.startUp(defaultDatabaseDriverId, progress, workspacePolicy, ontologyPolicy, true, new ConsoleUserAgent());
+ return SimanticsPlatform.INSTANCE.startUp(databaseDriverId, progress, workspacePolicy, ontologyPolicy, true, new ConsoleUserAgent());