/** * Adds the. * * @param axiom the axiom */ protected void add(@Nullable OWLAxiom axiom) { if (axiom == null) { LOG.error("no axiom"); return; } add(Collections.singleton(axiom)); }
/** * Adds the. * * @param axiom the axiom */ protected void add(@Nullable OWLAxiom axiom) { if (axiom == null) { LOG.error("no axiom"); return; } add(Collections.singleton(axiom)); }
/** * Adds the. * * @param axiom the axiom */ protected void add(@Nullable OWLAxiom axiom) { if (axiom == null) { LOG.error("no axiom"); return; } add(Collections.singleton(axiom)); }
/** * Adds the. * * @param axiom the axiom */ protected void add(@Nullable OWLAxiom axiom) { if (axiom == null) { LOG.error("no axiom"); return; } add(Collections.singleton(axiom)); }
/** * 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; }
/** * Tr tag to annotation prop. * * @param tag the tag * @return the oWL annotation property */ protected OWLAnnotationProperty trTagToAnnotationProp(String tag) { IRI iri = trTagToIRI(tag); OWLAnnotationProperty ap = fac.getOWLAnnotationProperty(iri); if (!apToDeclare.contains(ap)) { apToDeclare.add(ap); add(fac.getOWLDeclarationAxiom(ap)); Obo2OWLVocabulary vocab = Obo2OWLConstants.getVocabularyObj(tag); if (vocab != null) { add(fac.getOWLAnnotationAssertionAxiom(iri, fac.getRDFSLabel(vocab.getLabel()))); } } return ap; }
/** * Tr tag to annotation prop. * * @param tag the tag * @return the oWL annotation property */ protected OWLAnnotationProperty trTagToAnnotationProp(String tag) { IRI iri = trTagToIRI(tag); OWLAnnotationProperty ap = fac.getOWLAnnotationProperty(iri); if (!apToDeclare.contains(ap)) { apToDeclare.add(ap); add(fac.getOWLDeclarationAxiom(ap)); Obo2OWLVocabulary vocab = Obo2OWLConstants.getVocabularyObj(tag); if (vocab != null) { add(fac.getOWLAnnotationAssertionAxiom(iri, fac.getRDFSLabel(vocab.getLabel()))); } } return ap; }
/** * Tr tag to annotation prop. * * @param tag the tag * @return the oWL annotation property */ protected OWLAnnotationProperty trTagToAnnotationProp(String tag) { IRI iri = trTagToIRI(tag); OWLAnnotationProperty ap = fac.getOWLAnnotationProperty(iri); if (!apToDeclare.contains(ap)) { apToDeclare.add(ap); add(fac.getOWLDeclarationAxiom(ap)); Obo2OWLVocabulary vocab = Obo2OWLConstants.getVocabularyObj(tag); if (vocab != null) { add(fac.getOWLAnnotationAssertionAxiom(iri, fac.getRDFSLabel(vocab.getLabel()))); } } return ap; }
/** * 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; }
/** * Tr tag to annotation prop. * * @param tag the tag * @return the oWL annotation property */ protected OWLAnnotationProperty trTagToAnnotationProp(String tag) { IRI iri = trTagToIRI(tag); OWLAnnotationProperty ap = fac.getOWLAnnotationProperty(iri); if (!apToDeclare.contains(ap)) { apToDeclare.add(ap); add(fac.getOWLDeclarationAxiom(ap)); Obo2OWLVocabulary vocab = Obo2OWLConstants.getVocabularyObj(tag); if (vocab != null) { add(fac.getOWLAnnotationAssertionAxiom(iri, fac.getRDFSLabel(vocab.getLabel()))); } } return ap; }
String id = checkNotNull(typedefFrame.getId()); OWLObjectProperty p = trObjectProp(id); add(fac.getOWLDeclarationAxiom(p)); String xid = translateShorthandIdToExpandedId(id); if (!xid.equals(id)) { .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax); OWLAxiom axiom = trRelationIntersectionOf(id, p, clauses); if (axiom != null) { add(axiom); add(axiom); add(translateAltIds(clauses, p.getIRI(), false)); } else { clauses.forEach(c -> add(trTypedefClause(p, tag, c)));
String id = checkNotNull(typedefFrame.getId()); OWLObjectProperty p = trObjectProp(id); add(fac.getOWLDeclarationAxiom(p)); String xid = translateShorthandIdToExpandedId(id); if (!xid.equals(id)) { .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax); OWLAxiom axiom = trRelationIntersectionOf(id, p, clauses); if (axiom != null) { add(axiom); add(axiom); add(translateAltIds(clauses, p.getIRI(), false)); } else { clauses.forEach(c -> add(trTypedefClause(p, tag, c)));
String id = checkNotNull(typedefFrame.getId()); OWLAnnotationProperty p = trAnnotationProp(id); add(fac.getOWLDeclarationAxiom(p)); .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax); typedefFrame.getClauses(tag).forEach(c -> add(trGenericClause(p, tag, c)));
String id = checkNotNull(typedefFrame.getId()); OWLAnnotationProperty p = trAnnotationProp(id); add(fac.getOWLDeclarationAxiom(p)); .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax); typedefFrame.getClauses(tag).forEach(c -> add(trGenericClause(p, tag, c)));
String id = checkNotNull(typedefFrame.getId()); OWLAnnotationProperty p = trAnnotationProp(id); add(fac.getOWLDeclarationAxiom(p)); .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax); typedefFrame.getClauses(tag).forEach(c -> add(trGenericClause(p, tag, c)));
String id = checkNotNull(typedefFrame.getId()); OWLAnnotationProperty p = trAnnotationProp(id); add(fac.getOWLDeclarationAxiom(p)); .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax); typedefFrame.getClauses(tag).forEach(c -> add(trGenericClause(p, tag, c)));
add(fac.getOWLDeclarationAxiom((OWLClass) ce));
add(fac.getOWLDeclarationAxiom((OWLClass) ce));