protected OWLDataProperty updateView(OWLDataProperty property) { list.setRootObject(property == null ? null : property.getIRI()); return property; } }
/** * Builder initialized from an existing object. * * @param expected the existing object * @param df data factory */ public BuilderDataProperty(OWLDataProperty expected, OWLDataFactory df) { this(df); withIRI(expected.getIRI()); }
protected OWLDataProperty updateView(OWLDataProperty property) { list.setRootObject(property == null ? null : property.getIRI()); return property; } }
protected OWLDataProperty updateView(OWLDataProperty property) { list.setRootObject(property == null ? null : property.getIRI()); return property; } }
/** * Builder initialized from an existing object. * * @param expected * the existing object * @param df * data factory */ public BuilderDataProperty(OWLDataProperty expected, OWLDataFactory df) { this(df); withIRI(expected.getIRI()); }
protected Atom getRoleAtom(OWLDataPropertyExpression dataProperty,Term first,Term second) { AtomicRole atomicRole; if (dataProperty instanceof OWLDataProperty) atomicRole=AtomicRole.create(((OWLDataProperty)dataProperty).getIRI().toString()); else throw new IllegalStateException("Internal error: unsupported type of data property!"); if (m_allAtomicDataRoles.contains(atomicRole)) return Atom.create(atomicRole,first,second); else throw new IllegalArgumentException("Internal error: fresh properties in property assertions are not compatible with incremental ABox loading!"); } protected Individual getIndividual(OWLIndividual individual) {
protected Atom getRoleAtom(OWLDataPropertyExpression dataProperty,Term first,Term second) { AtomicRole atomicRole; if (dataProperty instanceof OWLDataProperty) atomicRole=AtomicRole.create(((OWLDataProperty)dataProperty).getIRI().toString()); else throw new IllegalStateException("Internal error: unsupported type of data property!"); if (m_allAtomicDataRoles.contains(atomicRole)) return Atom.create(atomicRole,first,second); else throw new IllegalArgumentException("Internal error: fresh properties in property assertions are not compatible with incremental ABox loading!"); } protected Individual getIndividual(OWLIndividual individual) {
@Override public void visit(OWLDataProperty property) { process(property); property.getIRI().accept(this); }
protected static Atom getRoleAtom(OWLDataPropertyExpression dataProperty,Term first,Term second) { if (dataProperty instanceof OWLDataProperty) { AtomicRole property=AtomicRole.create(((OWLDataProperty)dataProperty).getIRI().toString()); return Atom.create(property,first,second); } else throw new IllegalStateException("Internal error: unsupported type of data property!"); } protected static Individual getIndividual(OWLIndividual individual) {
@Override public Boolean visit(OWLDataProperty property) { return !modelManager.getActiveOntology().getAxioms(property, Imports.EXCLUDED).isEmpty() || !modelManager.getActiveOntology().getAnnotationAssertionAxioms(property.getIRI()).isEmpty(); }
protected void illegalDataPropertyPunning(OWLDataProperty property) { if (getCurrentOntology().containsObjectPropertyInSignature(property.getIRI(), INCLUDED)) { illegalPunning(property); } if (getCurrentOntology().containsAnnotationPropertyInSignature(property.getIRI(), INCLUDED)) { illegalPunning(property); } }
@Override public void visit(OWLDataProperty property) { writer.writeStartElement(DATA_PROPERTY); writer.writeIRIAttribute(property.getIRI()); writer.writeEndElement(); }
protected void illegalDataPropertyPunning(OWLDataProperty property) { if (getCurrentOntology().containsObjectPropertyInSignature(property.getIRI(), INCLUDED)) { illegalPunning(property); } if (getCurrentOntology().containsAnnotationPropertyInSignature(property.getIRI(), INCLUDED)) { illegalPunning(property); } }
@Override public void visit(OWLDataProperty property) { if (!writeEntitiesAsURIs) { write(DATA_PROPERTY); writeOpenBracket(); } property.getIRI().accept(this); if (!writeEntitiesAsURIs) { writeCloseBracket(); } }
@Override public void visit(OWLDataProperty property) { if (!writeEntitiesAsURIs) { write(DATA_PROPERTY); writeOpenBracket(); } property.getIRI().accept(this); if (!writeEntitiesAsURIs) { writeCloseBracket(); } }
protected void reservedForDataProperty(OWLDataProperty property) { if (!property.isOWLTopDataProperty() && !property.isOWLBottomDataProperty() && property.getIRI().isReservedVocabulary()) { violations.add(new UseOfReservedVocabularyForDataPropertyIRI(getCurrentOntology(), getCurrentAxiom(), property)); } }
protected void undeclaredDataProperty(OWLDataProperty property) { if (!property.isBuiltIn() && !property.getIRI().isReservedVocabulary() && !getCurrentOntology().isDeclared(property, INCLUDED)) { violations.add( new UseOfUndeclaredDataProperty(getCurrentOntology(), getCurrentAxiom(), property)); } }
protected void undeclaredDataProperty(OWLDataProperty property) { if (!property.isBuiltIn() && !property.getIRI().isReservedVocabulary() && !getCurrentOntology().isDeclared(property, INCLUDED)) { violations.add( new UseOfUndeclaredDataProperty(getCurrentOntology(), getCurrentAxiom(), property)); } }
public AttributeType<?> resourceType(OWLDataProperty property) { OWL2Datatype propertyType= eval(() -> { Optional<OWLDataPropertyRangeAxiom> ax = ontology.dataPropertyRangeAxioms(property) .filter(rangeAxiom -> rangeAxiom.getRange().isOWLDatatype() && rangeAxiom.getRange().asOWLDatatype().isBuiltIn()) .findFirst(); return ax.isPresent() ? ax.get().getRange().asOWLDatatype().getBuiltInDatatype() : null; }); AttributeType.DataType<?> graknType = propertyType == null ? AttributeType.DataType.STRING : owlBuiltInToGraknDatatype(propertyType); AttributeType<?> attributeType = tx.putAttributeType(namer.fromIri(property.getIRI()), graknType); return attributeType; }
private void initialiseDataPropertyFrameSections() { //@formatter:off initialiseSection(new AnnAxiom<OWLDataProperty, OWLDataPropertyExpression>(x -> parseDataProperty(), SUB_PROPERTY_OF, (s, o, anns) -> df.getOWLSubDataPropertyOfAxiom(s, o, anns)), dataPropertyFrameSections); initialiseSection(new AnnAxiom<OWLDataProperty, OWLDataPropertyExpression>(x -> parseDataProperty(), EQUIVALENT_TO, (s, o, anns) -> df.getOWLEquivalentDataPropertiesAxiom(s,o, anns)), dataPropertyFrameSections); initialiseSection(new AnnAxiom<OWLDataProperty, OWLDataPropertyExpression>(x -> parseDataProperty(), DISJOINT_WITH, (s, o, anns) -> df.getOWLDisjointDataPropertiesAxiom(s,o, anns)), dataPropertyFrameSections); initialiseSection(new AnnAxiom<OWLDataProperty, OWLClassExpression>(x -> parseUnion(), DOMAIN, (s, o, anns) -> df.getOWLDataPropertyDomainAxiom(s, o, anns)), dataPropertyFrameSections); initialiseSection(new AnnAxiom<OWLDataProperty, OWLDataRange>(x -> parseDataRange(), RANGE, (s, o, anns) -> df.getOWLDataPropertyRangeAxiom(s, o, anns)), dataPropertyFrameSections); initialiseSection(new AnnAxiom<OWLDataProperty, OWLDataPropertyCharacteristicAxiom>(this::parseDataPropertyCharacteristic, CHARACTERISTICS, (s, o, anns) -> o.getAnnotatedAxiom(anns)), dataPropertyFrameSections); initialiseSection(new AnnAxiom<OWLDataProperty, OWLAnnotation>(x -> parseAnnotation(), ANNOTATIONS, (s, o, anns) -> df.getOWLAnnotationAssertionAxiom(s.getIRI(), o, anns)), dataPropertyFrameSections); //@formatter:on }