List<Object> offlineObjects = conf.getObjects();
if (adapterMode.equals(AdapterMode.ONLINE)) {
accessor = accessManager.getRepositoryAccessor(connectionInfo);
this.session = accessor.getSession(connectionInfo);
this.adapter = new DObjectFactoryImp(accessor, session);
} else if (adapterMode.equals(AdapterMode.TOLERATED_OFFLINE)) {
try {
accessor = accessManager.getRepositoryAccessor(connectionInfo);
this.session = accessor.getSession(connectionInfo);
RepositoryAccess offlineAccess = accessManager.getRepositoryAccess(offlineObjects);
this.adapter = new DObjectFactoryImp(accessor, offlineAccess, session, adapterMode);
} catch (RepositoryAccessException e) {
accessor = accessManager.getRepositoryAccess(offlineObjects);
this.adapter = new DObjectFactoryImp(accessor, session, AdapterMode.STRICT_OFFLINE);
}
} else if (adapterMode.equals(AdapterMode.STRICT_OFFLINE)) {
accessor = accessManager.getRepositoryAccess(offlineObjects);
this.adapter = new DObjectFactoryImp(accessor, session, adapterMode);
}
this.bridgeDefinitions = conf.getBridgeDefinitions();
this.ontologyURI = conf.getOntologyURI();
this.namingStrategy = new DefaultNamingStrategy(accessor, session, this.ontModel);