protected void handleDate(String t, @Nullable Clause clause) { if (clause != null) { Object value = clause.getValue(); String dateString = null; if (value instanceof Date) { dateString = OBOFormatConstants.headerDateFormat().format((Date) value); } else if (value instanceof String) { dateString = (String) value; } if (dateString != null) { addOntologyAnnotation(trTagToAnnotationProp(t), trLiteral(dateString), trAnnotations(clause)); } else { // TODO: Throw Exceptions OBOFormatException e = new OBOFormatException( "Cannot translate clause «" + clause + '»'); LOG.error("Cannot translate: {}", clause, e); } } }
protected void handleDate(String t, @Nullable Clause clause) { if (clause != null) { Object value = clause.getValue(); String dateString = null; if (value instanceof Date) { dateString = OBOFormatConstants.headerDateFormat().format((Date) value); } else if (value instanceof String) { dateString = (String) value; } if (dateString != null) { addOntologyAnnotation(trTagToAnnotationProp(t), trLiteral(dateString), trAnnotations(clause)); } else { // TODO: Throw Exceptions OBOFormatException e = new OBOFormatException( "Cannot translate clause «" + clause + '»'); LOG.error("Cannot translate: {}", clause, e); } } }
protected void handleDate(String t, @Nullable Clause clause) { if (clause != null) { Object value = clause.getValue(); String dateString = null; if (value instanceof Date) { dateString = OBOFormatConstants.headerDateFormat().format((Date) value); } else if (value instanceof String) { dateString = (String) value; } if (dateString != null) { addOntologyAnnotation(trTagToAnnotationProp(t), trLiteral(dateString), trAnnotations(clause)); } else { // TODO: Throw Exceptions OBOFormatException e = new OBOFormatException( "Cannot translate clause «" + clause + '»'); LOG.error("Cannot translate: {}", clause, e); } } }
protected void handleDate(String t, @Nullable Clause clause) { if (clause != null) { Object value = clause.getValue(); String dateString = null; if (value instanceof Date) { dateString = OBOFormatConstants.headerDateFormat().format((Date) value); } else if (value instanceof String) { dateString = (String) value; } if (dateString != null) { addOntologyAnnotation(trTagToAnnotationProp(t), trLiteral(dateString), trAnnotations(clause)); } else { // TODO: Throw Exceptions OBOFormatException e = new OBOFormatException( "Cannot translate clause «" + clause + '»'); LOG.error("Cannot translate: {}", clause, e); } } }
/** * Tr annotations. * * @param clause the clause * @param anns the anns */ protected void trAnnotations(Clause clause, Set<OWLAnnotation> anns) { Collection<Xref> xrefs = clause.getXrefs(); for (Xref x : xrefs) { if (!x.getIdref().isEmpty()) { OWLAnnotationProperty ap = trTagToAnnotationProp(OboFormatTag.TAG_XREF.getTag()); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(x)); anns.add(ann); } } Collection<QualifierValue> qvs = clause.getQualifierValues(); for (QualifierValue qv : qvs) { String qTag = qv.getQualifier(); if (SKIPPED_QUALIFIERS.contains(qTag)) { continue; } OWLAnnotationProperty ap = trTagToAnnotationProp(qTag); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(qv.getValue())); anns.add(ann); } }
/** * Tr annotations. * * @param clause the clause * @param anns the anns */ protected void trAnnotations(Clause clause, Set<OWLAnnotation> anns) { Collection<Xref> xrefs = clause.getXrefs(); for (Xref x : xrefs) { if (!x.getIdref().isEmpty()) { OWLAnnotationProperty ap = trTagToAnnotationProp(OboFormatTag.TAG_XREF.getTag()); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(x)); anns.add(ann); } } Collection<QualifierValue> qvs = clause.getQualifierValues(); for (QualifierValue qv : qvs) { String qTag = qv.getQualifier(); if (SKIPPED_QUALIFIERS.contains(qTag)) { continue; } OWLAnnotationProperty ap = trTagToAnnotationProp(qTag); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(qv.getValue())); anns.add(ann); } }
/** * Tr annotations. * * @param clause the clause * @param anns the anns */ protected void trAnnotations(Clause clause, Set<OWLAnnotation> anns) { Collection<Xref> xrefs = clause.getXrefs(); for (Xref x : xrefs) { if (!x.getIdref().isEmpty()) { OWLAnnotationProperty ap = trTagToAnnotationProp(OboFormatTag.TAG_XREF.getTag()); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(x)); anns.add(ann); } } Collection<QualifierValue> qvs = clause.getQualifierValues(); for (QualifierValue qv : qvs) { String qTag = qv.getQualifier(); if (SKIPPED_QUALIFIERS.contains(qTag)) { continue; } OWLAnnotationProperty ap = trTagToAnnotationProp(qTag); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(qv.getValue())); anns.add(ann); } }
/** * Tr annotations. * * @param clause the clause * @param anns the anns */ protected void trAnnotations(Clause clause, Set<OWLAnnotation> anns) { Collection<Xref> xrefs = clause.getXrefs(); for (Xref x : xrefs) { if (!x.getIdref().isEmpty()) { OWLAnnotationProperty ap = trTagToAnnotationProp(OboFormatTag.TAG_XREF.getTag()); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(x)); anns.add(ann); } } Collection<QualifierValue> qvs = clause.getQualifierValues(); for (QualifierValue qv : qvs) { String qTag = qv.getQualifier(); if (SKIPPED_QUALIFIERS.contains(qTag)) { continue; } OWLAnnotationProperty ap = trTagToAnnotationProp(qTag); OWLAnnotation ann = fac.getOWLAnnotation(ap, trLiteral(qv.getValue())); anns.add(ann); } }
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OWLAnnotation ann = fac .getOWLAnnotation(trAnnotationProp(IRI_PROP_ISREVERSIBLEPROPERTYCHAIN), trLiteral("true")); annotations.add(ann);
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OboFormatTag.TAG_COMMENT.getTag()); add(fac.getOWLAnnotationAssertionAxiom(ap, childAnnotProp.getIRI(), trLiteral(clause.getValue2()))); OWLAnnotationProperty ap = trTagToAnnotationProp( OboFormatTag.TAG_NAME.getTag()); add(fac.getOWLAnnotationAssertionAxiom(ap, childIRI, trLiteral(values[1]))); if (values.length > 2 && !values[2].toString().isEmpty()) { ap = trTagToAnnotationProp(OboFormatTag.TAG_SCOPE.getTag()); .forEach(c -> addOntologyAnnotation(fac.getRDFSComment(), trLiteral(c .getValue()), trAnnotations(c))); } else if (tag == OboFormatTag.TAG_IDSPACE) { } else { headerFrame.getClauses(t) .forEach(c -> addOntologyAnnotation(trTagToAnnotationProp(t), trLiteral(c .getValue()), trAnnotations(c)));
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OWLAxiom ax = fac .getOWLAnnotationAssertionAxiom(trTagToAnnotationProp("shorthand"), p.getIRI(), trLiteral(id), new HashSet<OWLAnnotation>()); add(ax);
OboFormatTag.TAG_COMMENT.getTag()); add(fac.getOWLAnnotationAssertionAxiom(ap, childAnnotProp.getIRI(), trLiteral(clause.getValue2()))); OWLAnnotationProperty ap = trTagToAnnotationProp( OboFormatTag.TAG_NAME.getTag()); add(fac.getOWLAnnotationAssertionAxiom(ap, childIRI, trLiteral(values[1]))); if (values.length > 2 && !values[2].toString().isEmpty()) { ap = trTagToAnnotationProp(OboFormatTag.TAG_SCOPE.getTag()); .forEach(c -> addOntologyAnnotation(fac.getRDFSComment(), trLiteral(c .getValue()), trAnnotations(c))); } else if (tag == OboFormatTag.TAG_IDSPACE) { } else { headerFrame.getClauses(t) .forEach(c -> addOntologyAnnotation(trTagToAnnotationProp(t), trLiteral(c .getValue()), trAnnotations(c)));
OboFormatTag.TAG_COMMENT.getTag()); add(fac.getOWLAnnotationAssertionAxiom(ap, childAnnotProp.getIRI(), trLiteral(clause.getValue2()))); OWLAnnotationProperty ap = trTagToAnnotationProp( OboFormatTag.TAG_NAME.getTag()); add(fac.getOWLAnnotationAssertionAxiom(ap, childIRI, trLiteral(values[1]))); if (values.length > 2 && !values[2].toString().isEmpty()) { ap = trTagToAnnotationProp(OboFormatTag.TAG_SCOPE.getTag()); .forEach(c -> addOntologyAnnotation(fac.getRDFSComment(), trLiteral(c .getValue()), trAnnotations(c))); } else if (tag == OboFormatTag.TAG_IDSPACE) { } else { headerFrame.getClauses(t) .forEach(c -> addOntologyAnnotation(trTagToAnnotationProp(t), trLiteral(c .getValue()), trAnnotations(c)));