/** * Gets the oWL object property. * * @param iri the iri * @return the oWL object property */ protected OWLObjectProperty getOWLObjectProperty(IRI iri) { return df.getOWLObjectProperty(iri); }
public OWLIndividualAxiom translate(ObjectPropertyAssertion opa) { IRI roleIRI = IRI.create(opa.getProperty().getName()); OWLObjectProperty property = dataFactory.getOWLObjectProperty(roleIRI); OWLIndividual subject = translate(opa.getSubject()); OWLIndividual object = translate(opa.getObject()); return dataFactory.getOWLObjectPropertyAssertionAxiom(property, subject, object); }
@Override @Nullable public OWLObjectProperty getOWLObjectProperty(String name) { if (objectPropertyNames.contains(name)) { return df.getOWLObjectProperty(getIRI(name)); } return null; }
final public OWLObjectProperty ObjectPropertyIRI() throws ParseException { IRI iri; iri = IRI(); return dataFactory.getOWLObjectProperty(iri); }
@Nonnull @Override public Optional<OWLAxiom> visit(@Nonnull OWLObjectProperty property) { return strategy.getDeprecatedObjectPropertyParentIri() .map(parent -> dataFactory.getOWLSubObjectPropertyOfAxiom(property, dataFactory.getOWLObjectProperty(parent))); }
/** * @param dataFactory data factory to use * @return set of SKOS object properties */ public static Set<OWLObjectProperty> getObjectProperties(OWLDataFactory dataFactory) { return asSet(stream().filter(v -> v.entityType.equals(OBJECT_PROPERTY)).map(v -> dataFactory .getOWLObjectProperty(v.iri))); }
/** * @param dataFactory data factory to use * @return set of SKOS object properties */ public static Set<OWLObjectProperty> getObjectProperties(OWLDataFactory dataFactory) { return asSet(stream().filter(v -> v.entityType.equals(OBJECT_PROPERTY)).map(v -> dataFactory .getOWLObjectProperty(v.iri))); }
@Override public OWLObjectProperty buildObject() { if (pm != null && string != null) { return df.getOWLObjectProperty(getString(), getPM()); } return df.getOWLObjectProperty(getIRI()); } }
@Override public OWLObjectProperty buildObject() { if (pm != null && string != null) { return df.getOWLObjectProperty(getString(), getPM()); } return df.getOWLObjectProperty(getIRI()); } }
private static Map<OWLEntity, IRI> remap(Map<IRI, IRI> iriReplacementMap, OWLDataFactory df) { Map<OWLEntity, IRI> map = new HashMap<>(); iriReplacementMap.forEach((k, v) -> { map.put(df.getOWLClass(k), v); map.put(df.getOWLObjectProperty(k), v); map.put(df.getOWLDataProperty(k), v); map.put(df.getOWLNamedIndividual(k), v); map.put(df.getOWLDatatype(k), v); map.put(df.getOWLAnnotationProperty(k), v); }); return map; }
/** * Tr object prop. * * @param relId the rel id * @return the oWL object property */ protected OWLObjectProperty trObjectProp(String relId) { return fac.getOWLObjectProperty(oboIdToIRI(mapPropId(relId))); }
/** * Tr object prop. * * @param v the v * @return the oWL object property expression */ protected OWLObjectPropertyExpression trObjectProp(Object v) { return fac.getOWLObjectProperty(oboIdToIRI(mapPropId((String) v))); }
/** * Tr object prop. * * @param relId the rel id * @return the oWL object property */ protected OWLObjectProperty trObjectProp(String relId) { return fac.getOWLObjectProperty(oboIdToIRI(mapPropId(relId))); }
/** * Tr object prop. * * @param v the v * @return the oWL object property expression */ protected OWLObjectPropertyExpression trObjectProp(Object v) { return fac.getOWLObjectProperty(oboIdToIRI(mapPropId((String) v))); }
default void addObject(final IRI property, final OWLNamedIndividual object) { final OWLObjectProperty owlProperty = getFactory().getOWLObjectProperty(property); addObjectPropertyAxiom(owlProperty, getMe(), object); }
private OWLObjectProperty getOWLObjectProperty(String name) { OWLObjectProperty prop = checker.getOWLObjectProperty(name); if (prop == null && objectPropertyNames.contains(name)) { prop = df.getOWLObjectProperty(getIRI(name)); } if (prop == null) { throw new ExceptionBuilder().withObject().build(); } return prop; }
@Override public void handleTriple(IRI s, IRI p, IRI o) { if (!isAnon(s)) { OWLObjectProperty op = df.getOWLObjectProperty(s); add(df.getOWLDeclarationAxiom(op, anns())); } addOp(s, true); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { if (Boolean.parseBoolean(value)) { OWLObjectProperty prop = getDataFactory() .getOWLObjectProperty(getIRIFromOBOId(currentId)); OWLAxiom ax = getDataFactory().getOWLTransitiveObjectPropertyAxiom(prop); applyChange(new AddAxiom(getOntology(), ax)); } } }
public BuiltInPropertyManager(OWLDataFactory factory) { m_factory=factory; m_topObjectProperty=m_factory.getOWLObjectProperty(IRI.create(AtomicRole.TOP_OBJECT_ROLE.getIRI())); m_bottomObjectProperty=m_factory.getOWLObjectProperty(IRI.create(AtomicRole.BOTTOM_OBJECT_ROLE.getIRI())); m_topDataProperty=m_factory.getOWLDataProperty(IRI.create(AtomicRole.TOP_DATA_ROLE.getIRI())); m_bottomDataProperty=m_factory.getOWLDataProperty(IRI.create(AtomicRole.BOTTOM_DATA_ROLE.getIRI())); } public void axiomatizeBuiltInPropertiesAsNeeded(OWLAxioms axioms,boolean skipTopObjectProperty,boolean skipBottomObjectProperty,boolean skipTopDataProperty,boolean skipBottomDataProperty) {
protected OWLClassExpression getOWLClassOrRestriction(String termList) { String[] strings = termList.split(" "); if (strings.length == 1) { return getDataFactory().getOWLClass(getIRIFromOBOId(strings[0])); } String id0 = strings[0]; String id1 = strings[1]; IRI propertyIRI = getConsumer().getRelationIRIFromSymbolicIdOrOBOId(id0); OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(propertyIRI); OWLClass filler = getDataFactory().getOWLClass(getIRIFromOBOId(id1)); return getDataFactory().getOWLObjectSomeValuesFrom(prop, filler); }