コード例 #1
0
 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;
 }
コード例 #2
0
 public RepositoryModel openRepositoryModel() {
   if (null == sesameRepository) return null;
   RepositoryModel result = new RepositoryModel(sesameRepository);
   if (result != null) {
     result.open();
   }
   return result;
 }
コード例 #3
0
 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;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 public void closeRepositoryModel(RepositoryModel modelToClose) {
   if (modelToClose != null) {
     modelToClose.close();
   }
 }