String getDescription() {
StringBuffer result = new StringBuffer();
Iterator<Triple> titleStatements = graph.filter(
uri, DCTERMS.title, null);
while (titleStatements.hasNext()) {
Resource object = titleStatements.next().getObject();
if (object instanceof Literal) {
result.append("title: ");
result.append (((Literal) object).getLexicalForm());
result.append("\n");
}
}
Iterator<Triple> descriptionStatements = graph.filter(
uri, DCTERMS.description, null);
while (descriptionStatements.hasNext()) {
Resource object = descriptionStatements.next().getObject();
if (object instanceof Literal) {
result.append("description: ");
result.append (((Literal) object).getLexicalForm());
result.append("\n");
}
}
Iterator<Triple> skosDefStatements = graph.filter(
uri, SKOS.definition, null);
while (skosDefStatements.hasNext()) {
Resource object = skosDefStatements.next().getObject();
if (object instanceof Literal) {
result.append("definition: ");
result.append (((Literal) object).getLexicalForm());
result.append("\n");
}
}
Iterator<Triple> rdfsCommentStatements = graph.filter(
uri, RDFS.comment, null);
while (rdfsCommentStatements.hasNext()) {
Resource object = rdfsCommentStatements.next().getObject();
if (object instanceof Literal) {
result.append("comment: ");
result.append(((Literal) object).getLexicalForm());
result.append("\n");
}
}
Iterator<Triple> skosNoteStatements = graph.filter(
uri, SKOS.note, null);
while (skosNoteStatements.hasNext()) {
Resource object = skosNoteStatements.next().getObject();
if (object instanceof Literal) {
result.append("note: ");
result.append (((Literal) object).getLexicalForm());
result.append("\n");
}
}
Iterator<Triple> skosExampleStatements = graph.filter(
uri, SKOS.example, null);
while (skosExampleStatements.hasNext()) {
Resource object = skosExampleStatements.next().getObject();
if (object instanceof Literal) {
result.append("example: ");
result.append (((Literal) object).getLexicalForm());
result.append("\n");
} else if (object instanceof UriRef) {