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)); } }
private void setupTagHandlers() { handlerMap = new HashMap<String, TagValueHandler>(); addTagHandler(new IDTagValueHandler(this)); addTagHandler(new NameTagValueHandler(this)); addTagHandler(new IsATagValueHandler(this)); addTagHandler(new PartOfTagValueHandler(this)); addTagHandler(new TransitiveTagValueHandler(this)); addTagHandler(new SymmetricTagValueHandler(this)); addTagHandler(new RelationshipTagValueHandler(this)); addTagHandler(new UnionOfHandler(this)); addTagHandler(new IntersectionOfHandler(this)); addTagHandler(new DisjointFromHandler(this)); addTagHandler(new AsymmetricHandler(this)); addTagHandler(new InverseHandler(this)); addTagHandler(new ReflexiveHandler(this)); addTagHandler(new TransitiveOverHandler(this)); addTagHandler(new DefaultNamespaceTagValueHandler(this)); }
private void setupTagHandlers() { handlerMap = new HashMap<String, TagValueHandler>(); addTagHandler(new OntologyTagValueHandler(this)); addTagHandler(new IDTagValueHandler(this)); addTagHandler(new NameTagValueHandler(this)); addTagHandler(new IsATagValueHandler(this)); addTagHandler(new PartOfTagValueHandler(this)); addTagHandler(new TransitiveTagValueHandler(this)); addTagHandler(new SymmetricTagValueHandler(this)); addTagHandler(new RelationshipTagValueHandler(this)); addTagHandler(new UnionOfHandler(this)); addTagHandler(new IntersectionOfHandler(this)); addTagHandler(new DisjointFromHandler(this)); addTagHandler(new AsymmetricHandler(this)); addTagHandler(new InverseHandler(this)); addTagHandler(new ReflexiveHandler(this)); addTagHandler(new TransitiveOverHandler(this)); addTagHandler(new DefaultNamespaceTagValueHandler(this)); addTagHandler(new SynonymTagValueHandler(this)); addTagHandler(new XRefTagHandler(this)); addTagHandler(new DefTagValueHandler(this)); addTagHandler(new IsObsoleteTagValueHandler(this)); addTagHandler(new IDSpaceTagValueHandler(this)); addTagHandler(new DataVersionTagValueHandler(this)); addTagHandler(new SynonymTypeDefTagHandler(this)); addTagHandler(new AltIdTagValueHandler(this)); }
@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)); } }
private void setupTagHandlers() { handlerMap = new HashMap<String, TagValueHandler>(); addTagHandler(new OntologyTagValueHandler(this)); addTagHandler(new IDTagValueHandler(this)); addTagHandler(new NameTagValueHandler(this)); addTagHandler(new IsATagValueHandler(this)); addTagHandler(new PartOfTagValueHandler(this)); addTagHandler(new TransitiveTagValueHandler(this)); addTagHandler(new SymmetricTagValueHandler(this)); addTagHandler(new RelationshipTagValueHandler(this)); addTagHandler(new UnionOfHandler(this)); addTagHandler(new IntersectionOfHandler(this)); addTagHandler(new DisjointFromHandler(this)); addTagHandler(new AsymmetricHandler(this)); addTagHandler(new InverseHandler(this)); addTagHandler(new ReflexiveHandler(this)); addTagHandler(new TransitiveOverHandler(this)); addTagHandler(new DefaultNamespaceTagValueHandler(this)); addTagHandler(new SynonymTagValueHandler(this)); addTagHandler(new XRefTagHandler(this)); addTagHandler(new DefTagValueHandler(this)); addTagHandler(new IsObsoleteTagValueHandler(this)); addTagHandler(new IDSpaceTagValueHandler(this)); addTagHandler(new DataVersionTagValueHandler(this)); addTagHandler(new SynonymTypeDefTagHandler(this)); addTagHandler(new AltIdTagValueHandler(this)); }