public boolean isComment() { return property.isComment(); }
@Deprecated public boolean isComment() { return property.isComment(); }
/** * Returns the comment. * * @param ontology the ontology * @return the comment * @throws Exception the exception */ private String getComment(OWLOntology ontology) throws Exception { for (OWLAnnotation annotation : ontology.getAnnotations()) { if (annotation.getProperty().isComment()) { return getValue(annotation); } } return null; }
potentialNames.add(annotation); else if (annotation.getProperty().isComment()) { tvpList.addPair(OBOVocabulary.COMMENT, ((OWLLiteral) annotation.getValue()).getLiteral());
potentialNames.add(annotation); else if (annotation.getProperty().isComment()) { tvpList.addPair(OBOVocabulary.COMMENT, ((OWLLiteral) annotation.getValue()).getLiteral());
private void writeHeader(OWLOntology ontology, Writer writer) throws OWLRendererException { OBOTagValuePairList tvpList = new OBOTagValuePairList(OBOVocabulary.getHeaderTags()); tvpList.setDefault(OBOVocabulary.DEFAULT_NAMESPACE, defaultPrefix); for (OWLAnnotation ax : ontology.getAnnotations()) { if (ax.getProperty().isComment()) { tvpList.addPair(OBOVocabulary.REMARK, ((OWLLiteral) ax.getValue()).getLiteral()); } else { tvpList.visit(ax); } } for (OWLImportsDeclaration importDecl : ontology.getImportsDeclarations()) { tvpList.addPair(OBOVocabulary.IMPORT, importDecl.getIRI().toString()); } Map<String, String> namespace2PrefixMap = loadUsedNamespaces(ontology); for (String namespace : namespace2PrefixMap.keySet()) { String mapping = namespace2PrefixMap.get(namespace) + " " + namespace; tvpList.addPair(OBOVocabulary.ID_SPACE, mapping); } // overwrite the existing values for below tvpList.setPair(OBOVocabulary.FORMAT_VERSION, "1.2"); tvpList.setPair(OBOVocabulary.DATE, getTimestampFormatter().format(new Date(System.currentTimeMillis()))); tvpList.setPair(OBOVocabulary.SAVED_BY, System.getProperty("user.name")); tvpList.setPair(OBOVocabulary.AUTO_GENERATED_BY, VersionInfo.getVersionInfo().toString()); tvpList.write(writer); }
private void writeHeader(OWLOntology ontology, Writer writer) throws OWLRendererException { OBOTagValuePairList tvpList = new OBOTagValuePairList(OBOVocabulary.getHeaderTags()); tvpList.setDefault(OBOVocabulary.DEFAULT_NAMESPACE, defaultPrefix); for (OWLAnnotation ax : ontology.getAnnotations()) { if (ax.getProperty().isComment()) { tvpList.addPair(OBOVocabulary.REMARK, ((OWLLiteral) ax.getValue()).getLiteral()); } else { tvpList.visit(ax); } } for (OWLImportsDeclaration importDecl : ontology.getImportsDeclarations()) { tvpList.addPair(OBOVocabulary.IMPORT, importDecl.getIRI().toString()); } Map<String, String> namespace2PrefixMap = loadUsedNamespaces(ontology); for (String namespace : namespace2PrefixMap.keySet()) { String mapping = namespace2PrefixMap.get(namespace) + " " + namespace; tvpList.addPair(OBOVocabulary.ID_SPACE, mapping); } // overwrite the existing values for below tvpList.setPair(OBOVocabulary.FORMAT_VERSION, "1.2"); tvpList.setPair(OBOVocabulary.DATE, getTimestampFormatter().format(new Date(System.currentTimeMillis()))); tvpList.setPair(OBOVocabulary.SAVED_BY, System.getProperty("user.name")); tvpList.setPair(OBOVocabulary.AUTO_GENERATED_BY, VersionInfo.getVersionInfo().toString()); tvpList.write(writer); }
private void writeHeader(OWLOntology ontology, Writer writer) { OBOTagValuePairList tvpList = new OBOTagValuePairList(OBOVocabulary.getHeaderTags()); tvpList.setDefault(OBOVocabulary.DEFAULT_NAMESPACE, defaultPrefix); for (OWLAnnotation ax : ontology.getAnnotations()) { if (ax.getProperty().isComment()) { tvpList.addPair(OBOVocabulary.REMARK, ((OWLLiteral) ax.getValue()).getLiteral()); } else { tvpList.visit(ax); } } for (OWLImportsDeclaration importDecl : ontology.getImportsDeclarations()) { tvpList.addPair(OBOVocabulary.IMPORT, importDecl.getIRI().toString()); } Map<String, String> namespace2PrefixMap = loadUsedNamespaces(ontology); for (String namespace : namespace2PrefixMap.keySet()) { String mapping = namespace2PrefixMap.get(namespace) + " " + namespace; tvpList.addPair(OBOVocabulary.ID_SPACE, mapping); } // overwrite the existing values for below tvpList.setPair(OBOVocabulary.FORMAT_VERSION, "1.2"); tvpList.setPair(OBOVocabulary.DATE, getTimestampFormatter().format(new Date(System.currentTimeMillis()))); tvpList.setPair(OBOVocabulary.SAVED_BY, System.getProperty("user.name")); tvpList.setPair(OBOVocabulary.AUTO_GENERATED_BY, VersionInfo.getVersionInfo().toString()); tvpList.write(writer); }
potentialNames.add(annotation); else if (annotation.getProperty().isComment()) { tvpList.addPair(OBOVocabulary.COMMENT, ((OWLLiteral) annotation.getValue()).getLiteral());