/** * @param <T> the generic type * @param tag the tag * @param cls the cls * @return the tag value for tag and class */ @Nullable public <T> T getTagValue(OboFormatTag tag, Class<T> cls) { return getTagValue(tag.getTag(), cls); }
/** * @param tag the tag * @return the clauses for tag */ public List<Clause> getClauses(OboFormatTag tag) { return getClauses(tag.getTag()); }
/** * @param tag tag */ public Clause(OboFormatTag tag) { this(tag.getTag()); }
/** * @param <T> the generic type * @param tag the tag * @param cls the cls * @return the tag values for tag and class */ public <T> Collection<T> getTagValues(OboFormatTag tag, Class<T> cls) { return getTagValues(tag.getTag(), cls); }
/** * Tr. * * @param ax the ax */ protected void tr(OWLDisjointObjectPropertiesAxiom ax) { trNaryPropertyAxiom(ax, OboFormatTag.TAG_DISJOINT_FROM.getTag()); }
/** * @param tag tag */ public Clause(OboFormatTag tag) { this(tag.getTag()); }
/** * Tr. * * @param ax the ax */ protected void tr(OWLDisjointObjectPropertiesAxiom ax) { trNaryPropertyAxiom(ax, OboFormatTag.TAG_DISJOINT_FROM.getTag()); }
private static Set<OWLAnnotationProperty> getProperties(OWLDataFactory factory, OboFormatTag... tags) { Set<OWLAnnotationProperty> set = new HashSet<>(); for (OboFormatTag tag : tags) { set.add(factory.getOWLAnnotationProperty(OWLAPIObo2Owl.trTagToIRI(tag.getTag()))); } return set; }
/** * @param tag the tag * @return the clauses for tag */ public List<Clause> getClauses(OboFormatTag tag) { return getClauses(tag.getTag()); }
private boolean isMetadataTag(OWLAnnotationProperty p) { final IRI metadataTagIRI = IRI .create(Obo2OWLConstants.OIOVOCAB_IRI_PREFIX, OboFormatTag.TAG_IS_METADATA_TAG .getTag()); return owlOntology.annotationAssertionAxioms(p.getIRI()) .anyMatch(ax -> metadataTagIRI.equals(ax.getProperty() .getIRI())); }
/** * Tr. * * @param ax the ax */ protected void tr(OWLEquivalentObjectPropertiesAxiom ax) { trNaryPropertyAxiom(ax, OboFormatTag.TAG_EQUIVALENT_TO.getTag()); }
/** * Tr. * * @param ax the ax */ protected void tr(OWLInverseFunctionalObjectPropertyAxiom ax) { OWLObjectPropertyExpression prop = ax.getProperty(); if (prop.isOWLObjectProperty() && trObjectProperty(prop.asOWLObjectProperty(), OboFormatTag.TAG_IS_INVERSE_FUNCTIONAL.getTag(), Boolean.TRUE, ax.annotations())) { return; } error(ax, true); }
protected Clause clause(OWLObjectProperty prop, @Nullable String tag, String value) { Frame f = getTypedefFrame(prop); if (OboFormatTag.TAG_ID.getTag().equals(tag)) { Clause clause = f.getClause(tag); assert clause != null; clause.setValue(value); return clause; } else { Clause clause = new Clause(tag, value); f.addClause(clause); return clause; } }
/** * @param tag tag * @param value value */ public Clause(OboFormatTag tag, String value) { this(tag.getTag(), value); }
/** * Tr. * * @param ax the ax */ protected void tr(OWLDisjointObjectPropertiesAxiom ax) { trNaryPropertyAxiom(ax, OboFormatTag.TAG_DISJOINT_FROM.getTag()); }
/** * @param <T> the generic type * @param tag the tag * @param cls the cls * @return the tag values for tag and class */ public <T> Collection<T> getTagValues(OboFormatTag tag, Class<T> cls) { return getTagValues(tag.getTag(), cls); }
private static Set<OWLAnnotationProperty> getProperties(OWLDataFactory factory, OboFormatTag... tags) { Set<OWLAnnotationProperty> set = new HashSet<>(); for (OboFormatTag tag : tags) { set.add(factory.getOWLAnnotationProperty(OWLAPIObo2Owl.trTagToIRI(tag.getTag()))); } return set; }
private boolean isOBODefinitionProperty(OWLAnnotationProperty property) { IRI propertyIRI = property.getIRI(); IRI defIRI = Obo2OWLConstants.getVocabularyObj(TAG_DEF.getTag()).getIRI(); if (propertyIRI.equals(defIRI)) { return true; } String fragment = propertyIRI.getFragment(); return fragment.endsWith(IAOVocabulary.DEFINITION.getSuffix()); }
private OWLAnnotationProperty trSynonymType(String type) { if (type.equals(OboFormatTag.TAG_RELATED.getTag()) || type.equals(OboFormatTag.TAG_EXACT.getTag()) || type.equals(OboFormatTag.TAG_NARROW.getTag()) || type.equals(OboFormatTag.TAG_BROAD.getTag())) { return trTagToAnnotationProp(type); } return trAnnotationProp(type); }
private Clause createRelationshipClauseWithRestrictions( OWLQuantifiedObjectRestriction r, String fillerId, Set<QualifierValue> qvs, OWLSubClassOfAxiom ax) { Clause c = new Clause(); c.setTag(OboFormatTag.TAG_RELATIONSHIP.getTag()); c.addValue(this.getIdentifier(r.getProperty())); c.addValue(fillerId); c.setQualifierValues(qvs); addQualifiers(c, ax.getAnnotations()); return c; }