public RepositoryModel openRepositoryModel(String context) { if (null == context || context.equalsIgnoreCase("") || null == sesameRepository) return null; RepositoryModel result = new RepositoryModel(new URIImpl(context), sesameRepository); if (result != null) { result.open(); } return result; }
public RepositoryModel openRepositoryModel() { if (null == sesameRepository) return null; RepositoryModel result = new RepositoryModel(sesameRepository); if (result != null) { result.open(); } return result; }
public RepositoryModel openRepositoryModel() throws RDFRepositoryException { if (null == sesameRepository) { throw new RDFRepositoryException("The connector has not been initialized correctly"); } RepositoryModel result = new RepositoryModel(sesameRepository); if (null == result) { throw new RDFRepositoryException("Can not open the repository"); } result.open(); return result; }
public RepositoryModel openRepositoryModel(URI contextUri) throws RDFRepositoryException { if (null == sesameRepository) { throw new RDFRepositoryException("The connector has not been initialized correctly"); } RepositoryModel result = null; if (contextUri != null && contextUri.toString() != null && contextUri.toString() != "") { URIImpl contextUriInRepository = new URIImpl(contextUri.toString()); result = new RepositoryModel(contextUriInRepository, sesameRepository); } else { result = new RepositoryModel(sesameRepository); } if (null == result) { throw new RDFRepositoryException("Can not open the repository"); } result.open(); return result; }
public void closeRepositoryModel(RepositoryModel modelToClose) { if (modelToClose != null) { modelToClose.close(); } }