Exemplo n.º 1
0
 public boolean canHandleStreaming(IRI subject, IRI predicate, IRI object) {
   // Can handle if object isn;t anonymous and either the object
   // IRI is owl:Thing, or it is not part of the build in vocabulary
   return !isAnonymous(object)
       && (object.equals(OWLRDFVocabulary.OWL_THING.getIRI())
           || !OWLRDFVocabulary.BUILT_IN_VOCABULARY_IRIS.contains(object));
 }
 private <T extends OWLEntity> T createNewForBuiltInEntity(
     String entityName, final Class<T> entityType) {
   if (isPrefixedName(entityName)) {
     IRI entityIri = expand(entityName);
     if (OWLRDFVocabulary.BUILT_IN_VOCABULARY_IRIS.contains(entityIri)) {
       try {
         return createNew(entityName, entityType);
       } catch (OWLEntityCreationException e) {
         throw new IllegalArgumentException(e.getMessage());
       }
     }
   }
   return null;
 }
Exemplo n.º 3
0
 public void handleTriple(IRI subject, IRI predicate, IRI object)
     throws UnloadableImportException {
   if (OWLRDFVocabulary.BUILT_IN_VOCABULARY_IRIS.contains(object)) {
     if (!object.equals(OWLRDFVocabulary.OWL_THING.getIRI())) {
       // Can't have instance of built in vocabulary!
       // Shall we throw an exception here?
       logger.fine("Individual of builtin type " + object);
     }
   }
   addAxiom(
       getDataFactory()
           .getOWLClassAssertionAxiom(
               translateClassExpression(object),
               translateIndividual(subject),
               getPendingAnnotations()));
   consumeTriple(subject, predicate, object);
 }