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 void handle(String currentId, String value, String qualifierBlock, String comment) { if (getConsumer().isTerm()) { // We simply add a subclass axiom applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLSubClassOfAxiom( getClassFromId(currentId), getClassFromId(value)) )); } else if (getConsumer().isTypedef()) { // We simply add a sub property axiom applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLSubObjectPropertyOfAxiom( getOWLObjectProperty(currentId), getOWLObjectProperty(value)) )); } } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { if (getConsumer().isTerm()) { // We simply add a subclass axiom applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLSubClassOfAxiom( getClassFromId(currentId), getClassFromId(value)) )); } else if (getConsumer().isTypedef()) { // We simply add a sub property axiom applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLSubObjectPropertyOfAxiom( getOWLObjectProperty(currentId), getOWLObjectProperty(value)) )); } } }
public void handle(String id, String value) { if (getConsumer().isTerm()) { // We simply add a subclass axiom applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLSubClassOfAxiom( getClassFromId(id), getClassFromId(value)) )); } else if (getConsumer().isTypedef()) { // We simply add a sub property axiom applyChange(new AddAxiom(getOntology(), getDataFactory().getOWLSubObjectPropertyOfAxiom( getOWLObjectProperty(id), getOWLObjectProperty(value)) )); } } }
public void handle(String currentId, String value, String qualifierBlock, String comment) { // This is an annotation - but add as a label OWLEntity ent; if (getConsumer().isTerm()) { ent = getDataFactory().getOWLClass(getIRIFromOBOId(currentId)); } else if (getConsumer().isTypedef()) { ent = getDataFactory().getOWLObjectProperty(getIRIFromOBOId(currentId)); } else { ent = getDataFactory().getOWLNamedIndividual(getIRIFromOBOId(currentId)); } OWLLiteral con = getDataFactory().getOWLLiteral(value); OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(getDataFactory().getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()), ent.getIRI(), con); applyChange(new AddAxiom(getOntology(), ax)); } }
public void handle(String id, String value) { // This is an annotation - but add as a label OWLEntity ent; if (getConsumer().isTerm()) { ent = getDataFactory().getOWLClass(getIRIFromValue(id)); } else if (getConsumer().isTypedef()) { ent = getDataFactory().getOWLObjectProperty(getIRIFromValue(id)); } else { ent = getDataFactory().getOWLNamedIndividual(getIRIFromValue(id)); } OWLLiteral con = getDataFactory().getOWLTypedLiteral(value); OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(getDataFactory().getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()), ent.getIRI(), con); applyChange(new AddAxiom(getOntology(), ax)); } }
@Override public void handle(String currentId, String value, String qualifierBlock, String comment) { // This is an annotation - but add as a label OWLEntity ent; if (getConsumer().isTerm()) { ent = getDataFactory().getOWLClass(getIRIFromOBOId(currentId)); } else if (getConsumer().isTypedef()) { ent = getDataFactory().getOWLObjectProperty(getIRIFromOBOId(currentId)); } else { ent = getDataFactory().getOWLNamedIndividual(getIRIFromOBOId(currentId)); } OWLLiteral con = getDataFactory().getOWLLiteral(value); OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(getDataFactory().getOWLAnnotationProperty(OWLRDFVocabulary.RDFS_LABEL.getIRI()), ent.getIRI(), con); applyChange(new AddAxiom(getOntology(), ax)); } }