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); } } }
.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)));
.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)));
.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)));
.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)));