triples.addAll(getGraph().getTriplesForSubject(node));
// if (node.isAnonymous() && !renderedAnonymousNodes.contains(node)) {
//
// renderedAnonymousNodes.add(node);
// }
RDFTriple candidatePrettyPrintTypeTriple = null;
for (RDFTriple triple : triples) {
IRI propertyIRI = triple.getProperty().getIRI();
if (propertyIRI.equals(OWLRDFVocabulary.RDF_TYPE.getIRI()) && !triple.getObject().isAnonymous()) {
if (OWLRDFVocabulary.BUILT_IN_VOCABULARY_IRIS.contains(triple.getObject().getIRI())) {
if (prettyPrintedTypes.contains(triple.getObject().getIRI())) {
candidatePrettyPrintTypeTriple = triple;
}
} else {
candidatePrettyPrintTypeTriple = triple;
}
}
}
if (candidatePrettyPrintTypeTriple == null) {
writer.writeStartElement(RDF_DESCRIPTION.getIRI());
} else {
writer.writeStartElement(candidatePrettyPrintTypeTriple.getObject().getIRI());
}
if (!node.isAnonymous()) {
writer.writeAboutAttribute(node.getIRI());
}
// else {
// if (getGraph().isAnonymousNodeSharedSubject(node)) {
// writer.writeNodeIDAttribute(node);
// }
// }
for (RDFTriple triple : triples) {
if (candidatePrettyPrintTypeTriple != null && candidatePrettyPrintTypeTriple.equals(triple)) {
continue;
}
writer.writeStartElement(triple.getProperty().getIRI());
RDFNode objectNode = triple.getObject();
if (!objectNode.isLiteral()) {