@Override public IRI visit(IRI iri) { for (EntityType<?> entityType : EntityType.values()) { OWLEntity entity = df.getOWLEntity(entityType, iri); IRI replacementIRI = replacementMap.get(entity); if (replacementIRI != null) { return replacementIRI; } } return iri; }
/** * Gets an entity that has the same IRI as this entity but is of the specified type. * @param entityType The type of the entity to obtain. This entity is not affected in any way. * @return An entity that has the same IRI as this entity and is of the specified type */ public <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType) { return getOWLDataFactory().getOWLEntity(entityType, iri); }
@Override public IRI visit(IRI iri) { for (EntityType<?> entityType : EntityType.values()) { OWLEntity entity = df.getOWLEntity(entityType, iri); IRI replacementIRI = replacementMap.get(entity); if (replacementIRI != null) { return replacementIRI; } } return iri; }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + errorCounter.incrementAndGet()); return dataFactory.getOWLEntity(entityType, iri); }
@Override public IRI visit(IRI iri) { for (EntityType<?> entityType : EntityType.values()) { OWLEntity entity = df.getOWLEntity(entityType, iri); IRI replacementIRI = replacementMap.get(entity); if (replacementIRI != null) { return replacementIRI; } } return iri; }
public Optional<Item> parseItem(String content) { final Optional<IRI> iri = parseIRI(content); if(!iri.isPresent()) { return Optional.empty(); } E entity = dataFactory.getOWLEntity(entityType, iri.get()); return Optional.of(createItem(entity)); }
public static <T extends OWLEntity> T getFreshOWLEntity(@Nonnull EntityType<T> entityType, @Nonnull String shortName, @Nonnull Optional<String> langTag, @Nonnull OWLDataFactory dataFactory) { String iri = getFreshIRIString(shortName, langTag); return dataFactory.getOWLEntity(entityType, IRI.create(iri)); }
public <E extends OWLEntity> E getRenamedEntity(E entity) { IRI renamedIRI = map.get(entity.getIRI()); if(renamedIRI == null) { return entity; } return (E) dataFactory.getOWLEntity(entity.getEntityType(), renamedIRI); }
@Override public void visit(IRI iri) { obj = iri; for (EntityType<?> entityType : EntityType.values()) { assert entityType != null; OWLEntity entity = df.getOWLEntity(entityType, iri); OWLEntity replacementIRI = replacementMap.get(entity); if (replacementIRI != null) { obj = replacementIRI.getIRI(); break; } } }
/** * Gets an entity that has the same IRI as this entity but is of the specified type. * @param entityType The type of the entity to obtain. This entity is not affected in any way. * @return An entity that has the same IRI as this entity and is of the specified type */ public <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType) { return getOWLDataFactory().getOWLEntity(entityType, getIRI()); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
private <E extends OWLEntity> E getErrorEntity(EntityType<E> entityType) { IRI iri = IRI.create("http://org.semanticweb.owlapi/error#", "Error" + ERRORCOUNTER.incrementAndGet()); LOGGER.error("Entity not properly recognized, missing triples in input? {} for type {}", iri, entityType); if (configuration.isStrict()) { throw new OWLParserException( "Entity not properly recognized, missing triples in input? " + iri + " for type " + entityType); } return df.getOWLEntity(entityType, iri); }
/** * Gets an entity that has the same IRI as this entity but is of the specified type. * @param entityType The type of the entity to obtain. This entity is not affected in any way. * @return An entity that has the same IRI as this entity and is of the specified type */ public <E extends OWLEntity> E getOWLEntity(EntityType<E> entityType) { return getOWLDataFactory().getOWLEntity(entityType, getIRI()); }
/** * Convert a JENA Node into an OWL entity of the given type. * @param node the JENA node * @param entityType the type of the OWL entity, e.g. class, property, etc. * @return the OWL entity */ public static <T extends OWLEntity> T asOWLEntity(Node node, EntityType<T> entityType) { return dataFactory.getOWLEntity(entityType, IRI.create(node.getURI())); } }
@Override public OWLEntity buildObject() { if (pm != null && string != null) { return df.getOWLEntity(getEntityType(), getPM().getIRI(getString())); } return df.getOWLEntity(getEntityType(), getIRI()); } }
@Override public OWLEntity buildObject() { if (pm != null && string != null) { return df.getOWLEntity(getEntityType(), getPM().getIRI(getString())); } return df.getOWLEntity(getEntityType(), getIRI()); } }
@Override public OWLEntity buildObject() { if (pm != null && string != null) { return df.getOWLEntity(getEntityType(), getPM().getIRI(getString())); } return df.getOWLEntity(getEntityType(), getIRI()); } }
@Override public OWLEntity buildObject() { if (pm != null && string != null) { return df.getOWLEntity(getEntityType(), getPM().getIRI(getString())); } return df.getOWLEntity(getEntityType(), getIRI()); } }