/** * Tr class. * * @param v the v * @return the oWL class expression */ protected OWLClassExpression trClass(Object v) { return trClass((String) v); }
/** * Tr class. * * @param v the v * @return the oWL class expression */ protected OWLClassExpression trClass(Object v) { return trClass((String) v); }
/** * Tr class. * * @param v the v * @return the oWL class expression */ protected OWLClassExpression trClass(Object v) { return trClass((String) v); }
/** * Tr class. * * @param v the v * @return the oWL class expression */ protected OWLClassExpression trClass(Object v) { return trClass((String) v); }
/** * Tr intersection of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trIntersectionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectIntersectionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr intersection of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trIntersectionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectIntersectionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr union of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trUnionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); // TODO - quals if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { LOG.error("union_of n-ary slots not is standard - converting anyway"); iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectUnionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr union of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trUnionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); // TODO - quals if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { LOG.error("union_of n-ary slots not is standard - converting anyway"); iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectUnionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr union of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trUnionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); // TODO - quals if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { LOG.error("union_of n-ary slots not is standard - converting anyway"); iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectUnionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr intersection of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trIntersectionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectIntersectionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr union of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trUnionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); // TODO - quals if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { LOG.error("union_of n-ary slots not is standard - converting anyway"); iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectUnionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr intersection of. * * @param cls the cls * @param clauses the clauses * @return the oWL axiom */ protected OWLAxiom trIntersectionOf(OWLClass cls, Collection<Clause> clauses) { Set<OWLAnnotation> annotations = trAnnotations(clauses); Set<OWLClassExpression> eSet = new HashSet<>(); eSet.add(cls); Set<OWLClassExpression> iSet = new HashSet<>(); for (Clause clause : clauses) { Collection<QualifierValue> qvs = clause.getQualifierValues(); if (clause.getValues().size() == 1) { iSet.add(trClass(clause.getValue())); } else { iSet.add(trRel((String) clause.getValue(), (String) clause.getValue2(), qvs)); } } eSet.add(fac.getOWLObjectIntersectionOf(iSet)); // TODO - fix this if (annotations.isEmpty()) { return fac.getOWLEquivalentClassesAxiom(eSet); } else { return fac.getOWLEquivalentClassesAxiom(eSet, annotations); } }
/** * Tr term frame. * * @param termFrame the term frame * @return the oWL class expression */ public OWLClassExpression trTermFrame(Frame termFrame) { OWLClass cls = trClass(checkNotNull(termFrame.getId())); add(fac.getOWLDeclarationAxiom(cls)); termFrame.getTags().stream().filter(OboFormatTag.TAG_ALT_ID.getTag()::equals).forEach(t -> // Generate deprecated and replaced_by details for alternate // identifier add(translateAltIds(termFrame.getClauses(t), cls.getIRI(), true))); termFrame.getTags().forEach(t -> add(trTermFrameClauses(cls, termFrame.getClauses(t), t))); return cls; }
/** * Tr term frame. * * @param termFrame the term frame * @return the oWL class expression */ public OWLClassExpression trTermFrame(Frame termFrame) { OWLClass cls = trClass(checkNotNull(termFrame.getId())); add(fac.getOWLDeclarationAxiom(cls)); termFrame.getTags().stream().filter(OboFormatTag.TAG_ALT_ID.getTag()::equals).forEach(t -> // Generate deprecated and replaced_by details for alternate // identifier add(translateAltIds(termFrame.getClauses(t), cls.getIRI(), true))); termFrame.getTags().forEach(t -> add(trTermFrameClauses(cls, termFrame.getClauses(t), t))); return cls; }
ax = fac.getOWLSubClassOfAxiom(clsx, trClass((String) clause.getValue()), annotations); } else if (tagConstant == OboFormatTag.TAG_RELATIONSHIP) { Set<OWLClassExpression> cSet = new HashSet<>(); cSet.add(clsx); cSet.add(trClass((String) clause.getValue())); ax = fac.getOWLDisjointClassesAxiom(cSet, annotations); } else if (tagConstant == OboFormatTag.TAG_EQUIVALENT_TO) { Set<OWLClassExpression> cSet = new HashSet<>(); cSet.add(clsx); cSet.add(trClass((String) clause.getValue())); ax = fac.getOWLEquivalentClassesAxiom(cSet, annotations); } else {
/** * Tr term frame. * * @param termFrame the term frame * @return the oWL class expression */ public OWLClassExpression trTermFrame(Frame termFrame) { OWLClass cls = trClass(checkNotNull(termFrame.getId())); add(fac.getOWLDeclarationAxiom(cls)); termFrame.getTags().stream().filter(OboFormatTag.TAG_ALT_ID.getTag()::equals).forEach(t -> // Generate deprecated and replaced_by details for alternate // identifier add(translateAltIds(termFrame.getClauses(t), cls.getIRI(), true))); termFrame.getTags().forEach(t -> add(trTermFrameClauses(cls, termFrame.getClauses(t), t))); return cls; }
/** * Tr term frame. * * @param termFrame the term frame * @return the oWL class expression */ public OWLClassExpression trTermFrame(Frame termFrame) { OWLClass cls = trClass(checkNotNull(termFrame.getId())); add(fac.getOWLDeclarationAxiom(cls)); termFrame.getTags().stream().filter(OboFormatTag.TAG_ALT_ID.getTag()::equals).forEach(t -> // Generate deprecated and replaced_by details for alternate // identifier add(translateAltIds(termFrame.getClauses(t), cls.getIRI(), true))); termFrame.getTags().forEach(t -> add(trTermFrameClauses(cls, termFrame.getClauses(t), t))); return cls; }
OWLEntity altIdEntity; if (isClass) { altIdEntity = trClass(altId); } else { IRI altIdIRI = oboIdToIRI(altId);
OWLEntity altIdEntity; if (isClass) { altIdEntity = trClass(altId); } else { IRI altIdIRI = oboIdToIRI(altId);
OWLEntity altIdEntity; if (isClass) { altIdEntity = trClass(altId); } else { IRI altIdIRI = oboIdToIRI(altId);