protected void addAnnotation(String id, String uriID, OWLLiteral value) { IRI subject = getIRIFromOBOId(id); OWLAnnotationProperty annotationProperty = getDataFactory().getOWLAnnotationProperty(getIRIFromOBOId(uriID)); OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(annotationProperty, subject, value); applyChange(new AddAxiom(getOntology(), ax)); } }
protected void addAnnotation(String id, String uriID, OWLLiteral value) { IRI subject = getIRIFromValue(id); OWLAnnotationProperty annotationProperty = getDataFactory().getOWLAnnotationProperty(getIRIFromValue(uriID)); OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(annotationProperty, subject, value); applyChange(new AddAxiom(getOntology(), ax)); } }
protected OWLClass getOWLClass(String id) { return getDataFactory().getOWLClass(getIRIFromValue(id)); }
public OWLClass getClassFromId(String s) { return getDataFactory().getOWLClass(getIRIFromOBOId(s)); }
/** * Gets an {@link OWLAnnotation} for a tag value pair. * @param tagName The tag name. * @param value The tag value. Note that the tag value is un-escaped and stripped of double quotes if they exist. * @return An {@link OWLAnnotation} that is formed by converting the tagName to an IRI and then to an * {@link OWLAnnotationProperty} and the value to an {@link OWLLiteral}. */ public OWLAnnotation getAnnotationForTagValuePair(String tagName, String value) { IRI tagIRI = getTagIRI(tagName); OWLDataFactory df = getDataFactory(); OWLAnnotationProperty annotationProperty = df.getOWLAnnotationProperty(tagIRI); String unescapedString = getUnquotedString(value); OWLLiteral annotationValue = df.getOWLLiteral(unescapedString); return df.getOWLAnnotation(annotationProperty, annotationValue); }
protected OWLClassExpression getOWLClassOrRestriction(String termList) { StringTokenizer tok = new StringTokenizer(termList, " ", false); String id0 = null; String id1 = null; id0 = tok.nextToken(); if (tok.hasMoreTokens()) { id1 = tok.nextToken(); } if (id1 == null) { return getDataFactory().getOWLClass(getIRIFromOBOId(id0)); } else { IRI propertyIRI = getConsumer().getRelationIRIFromSymbolicIdOrOBOId(id0); OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(propertyIRI); OWLClass filler = getDataFactory().getOWLClass(getIRIFromOBOId(id1)); return getDataFactory().getOWLObjectSomeValuesFrom(prop, filler); } }
protected OWLLiteral getBooleanConstant(boolean b) { return getDataFactory().getOWLLiteral(b); }
protected OWLObjectProperty getOWLObjectProperty(String id) { return getDataFactory().getOWLObjectProperty(getIRIFromOBOId(id)); }
/** Gets an {@link OWLAnnotation} for a tag value pair. * * @param tagName * The tag name. * @param value * The tag value. Note that the tag value is un-escaped and * stripped of double quotes if they exist. * @return An {@link OWLAnnotation} that is formed by converting the tagName * to an IRI and then to an {@link OWLAnnotationProperty} and the * value to an {@link OWLLiteral}. */ public OWLAnnotation getAnnotationForTagValuePair(String tagName, String value) { IRI tagIRI = getTagIRI(tagName); OWLDataFactory df = getDataFactory(); OWLAnnotationProperty annotationProperty = df.getOWLAnnotationProperty(tagIRI); String unescapedString = getUnquotedString(value); OWLLiteral annotationValue = df.getOWLLiteral(unescapedString); return df.getOWLAnnotation(annotationProperty, annotationValue); }
protected OWLClassExpression getOWLClassOrRestriction(String termList) { StringTokenizer tok = new StringTokenizer(termList, " ", false); String id0 = null; String id1 = null; id0 = tok.nextToken(); if (tok.hasMoreTokens()) { id1 = tok.nextToken(); } if (id1 == null) { return getDataFactory().getOWLClass(getIRIFromOBOId(id0)); } else { IRI propertyIRI = getConsumer().getRelationIRIFromSymbolicIdOrOBOId(id0); OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(propertyIRI); OWLClass filler = getDataFactory().getOWLClass(getIRIFromOBOId(id1)); return getDataFactory().getOWLObjectSomeValuesFrom(prop, filler); } }
public OWLClass getClassFromId(String s) { return getDataFactory().getOWLClass(getIRIFromValue(s)); }
protected OWLLiteral getBooleanConstant(boolean b) { return getDataFactory().getOWLLiteral(b); }
protected void addAnnotation(String id, String uriID, OWLLiteral value) { IRI subject = getIRIFromOBOId(id); OWLAnnotationProperty annotationProperty = getDataFactory() .getOWLAnnotationProperty(getIRIFromOBOId(uriID)); OWLAxiom ax = getDataFactory().getOWLAnnotationAssertionAxiom(annotationProperty, subject, value); applyChange(new AddAxiom(getOntology(), ax)); } }
protected OWLClass getOWLClass(String id) { return getDataFactory().getOWLClass(getIRIFromOBOId(id)); }
protected OWLObjectProperty getOWLObjectProperty(String id) { return getDataFactory().getOWLObjectProperty(getIRIFromValue(id)); }
protected OWLLiteral getBooleanConstant(Boolean b) { if (b) { return getDataFactory().getOWLTypedLiteral("true", getDataFactory().getOWLDatatype(XSDVocabulary.BOOLEAN.getIRI())); } else { return getDataFactory().getOWLTypedLiteral("false", getDataFactory().getOWLDatatype(XSDVocabulary.BOOLEAN.getIRI())); } }
protected OWLClass getOWLClass(String id) { return getDataFactory().getOWLClass(getIRIFromOBOId(id)); }
protected OWLClassExpression getOWLClassOrRestriction(String termList) { StringTokenizer tok = new StringTokenizer(termList, " ", false); String id0 = null; String id1 = null; id0 = tok.nextToken(); if (tok.hasMoreTokens()) { id1 = tok.nextToken(); } if (id1 == null) { return getDataFactory().getOWLClass(getIRIFromValue(id0)); } else { OWLObjectProperty prop = getDataFactory().getOWLObjectProperty(getIRIFromValue(id0)); OWLClass filler = getDataFactory().getOWLClass(getIRIFromValue(id1)); return getDataFactory().getOWLObjectSomeValuesFrom(prop, filler); } }
public OWLClass getClassFromId(String s) { return getDataFactory().getOWLClass(getIRIFromOBOId(s)); }
public OWLClass getCurrentClass() { return getDataFactory().getOWLClass(getIRIFromValue(consumer.getCurrentId())); }