private void createIntersectionEquivalentClass() { OWLClassExpression equivalentClass; if (intersectionOfOperands.size() == 1) { equivalentClass = intersectionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectIntersectionOf(intersectionOfOperands); } createEquivalentClass(equivalentClass); }
private void createUnionEquivalentClass() { OWLClassExpression equivalentClass; if (unionOfOperands.size() == 1) { equivalentClass = unionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectUnionOf(unionOfOperands); } createEquivalentClass(equivalentClass); }
private void createUnionEquivalentClass() { OWLClassExpression equivalentClass; if (unionOfOperands.size() == 1) { equivalentClass = unionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectUnionOf(unionOfOperands); } createEquivalentClass(equivalentClass); }
private void createIntersectionEquivalentClass() { OWLClassExpression equivalentClass; if (intersectionOfOperands.size() == 1) { equivalentClass = intersectionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectIntersectionOf(intersectionOfOperands); } createEquivalentClass(equivalentClass); }
private void createUnionEquivalentClass() { OWLClassExpression equivalentClass; if (unionOfOperands.size() == 1) { equivalentClass = unionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectUnionOf(unionOfOperands); } createEquivalentClass(equivalentClass); }
private void createIntersectionEquivalentClass() { OWLClassExpression equivalentClass; if (intersectionOfOperands.size() == 1) { equivalentClass = intersectionOfOperands.iterator().next(); } else { equivalentClass = getDataFactory().getOWLObjectIntersectionOf(intersectionOfOperands); } createEquivalentClass(equivalentClass); }
public OWLClass getCurrentClass() { return getDataFactory().getOWLClass(getIRI(currentId)); }
public OWLClass getCurrentClass() { return getDataFactory().getOWLClass(getIRI(currentId)); }
public OWLClass getCurrentClass() { return getDataFactory().getOWLClass(getIRI(currentId)); }
public OWLEntity getCurrentEntity() { if (isTerm()) { return getCurrentClass(); } else if (isTypedef()) { // Sometimes, we can have symbolic names e.g. has_part. It's not really clear how to tell the difference IRI propertyIRI = getRelationIRIFromSymbolicIdOrOBOId(currentId); return getDataFactory().getOWLObjectProperty(propertyIRI); } else { return getDataFactory().getOWLNamedIndividual(getIRI(currentId)); } }
public OWLEntity getCurrentEntity() { if (isTerm()) { return getCurrentClass(); } else if (isTypedef()) { return getDataFactory().getOWLObjectProperty(getIRI(currentId)); } else { return getDataFactory().getOWLNamedIndividual(getIRI(currentId)); } }
public OWLEntity getCurrentEntity() { if (isTerm()) { return getCurrentClass(); } else if (isTypedef()) { // Sometimes, we can have symbolic names e.g. has_part. It's not really clear how to tell the difference IRI propertyIRI = getRelationIRIFromSymbolicIdOrOBOId(currentId); return getDataFactory().getOWLObjectProperty(propertyIRI); } else { return getDataFactory().getOWLNamedIndividual(getIRI(currentId)); } }
public OWLAnnotation parseXRef(String xref) { Matcher matcher = XREF_PATTERN.matcher(xref); if (matcher.matches()) { OWLDataFactory df = getDataFactory(); String xrefQuotedString = matcher.group(XREF_QUOTED_STRING_GROUP); annotationValue = getDataFactory().getOWLLiteral(xrefId); OWLDataFactory df = getDataFactory(); OWLAnnotationProperty xrefProperty = df.getOWLAnnotationProperty(OBOVocabulary.XREF.getIRI()); return df.getOWLAnnotation(xrefProperty, df.getOWLLiteral(xref));
public OWLAnnotation parseXRef(String xref) { Matcher matcher = XREF_PATTERN.matcher(xref); if (matcher.matches()) { OWLDataFactory df = getDataFactory(); String xrefQuotedString = matcher.group(XREF_QUOTED_STRING_GROUP); annotationValue = getDataFactory().getOWLLiteral(xrefId); OWLDataFactory df = getDataFactory(); OWLAnnotationProperty xrefProperty = df.getOWLAnnotationProperty(OBOVocabulary.XREF.getIRI()); return df.getOWLAnnotation(xrefProperty, df.getOWLLiteral(xref));
OWLLiteral con = getDataFactory().getOWLTypedLiteral(value); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(getIRI(tag)); OWLAnnotation anno = getDataFactory().getOWLAnnotation(property, con); owlOntologyManager.applyChange(new AddOntologyAnnotation(ontology, anno)); OWLLiteral con = getDataFactory().getOWLStringLiteral(value); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(getIRI(tag)); OWLAnnotation anno = getDataFactory().getOWLAnnotation(property, con); OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(subject, anno); owlOntologyManager.applyChange(new AddAxiom(ontology, ax));
OWLLiteral con = getDataFactory().getOWLLiteral(unescapeTagValue(value)); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(getIRIFromTagName(tag)); OWLAnnotation anno = getDataFactory().getOWLAnnotation(property, con); owlOntologyManager.applyChange(new AddOntologyAnnotation(ontology, anno)); OWLLiteral con = getDataFactory().getOWLLiteral(unescapeTagValue(value)); IRI annotationPropertyIRI = getIRIFromTagName(tag); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(annotationPropertyIRI); OWLAnnotation anno = getDataFactory().getOWLAnnotation(property, con); OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(subject, anno); owlOntologyManager.addAxiom(ontology, ax); OWLDeclarationAxiom annotationPropertyDeclaration = getDataFactory().getOWLDeclarationAxiom(property); owlOntologyManager.addAxiom(ontology, annotationPropertyDeclaration);
OWLLiteral con = getDataFactory().getOWLLiteral(unescapeTagValue(value)); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(getIRIFromTagName(tag)); OWLAnnotation anno = getDataFactory().getOWLAnnotation(property, con); owlOntologyManager.applyChange(new AddOntologyAnnotation(ontology, anno)); OWLLiteral con = getDataFactory().getOWLLiteral(unescapeTagValue(value)); IRI annotationPropertyIRI = getIRIFromTagName(tag); OWLAnnotationProperty property = getDataFactory().getOWLAnnotationProperty(annotationPropertyIRI); OWLAnnotation anno = getDataFactory().getOWLAnnotation(property, con); OWLAnnotationAssertionAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(subject, anno); owlOntologyManager.addAxiom(ontology, ax); OWLDeclarationAxiom annotationPropertyDeclaration = getDataFactory().getOWLDeclarationAxiom(property); owlOntologyManager.addAxiom(ontology, annotationPropertyDeclaration);
private void createEquivalentClass(OWLClassExpression classExpression) { OWLAxiom ax = getDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getCurrentClass(), classExpression)); getOWLOntologyManager().applyChange(new AddAxiom(ontology, ax)); }
private void createEquivalentClass(OWLClassExpression classExpression) { OWLAxiom ax = getDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getCurrentClass(), classExpression)); getOWLOntologyManager().applyChange(new AddAxiom(ontology, ax)); }
private void createEquivalentClass(OWLClassExpression classExpression) { OWLAxiom ax = getDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getCurrentClass(), classExpression)); getOWLOntologyManager().applyChange(new AddAxiom(ontology, ax)); }