return;
}
pending.add(node);
Set<RDFTriple> triples = new TreeSet<RDFTriple>(new TripleComparator());
triples.addAll(getGraph().getTriplesForSubject(node));
RDFTriple candidatePrettyPrintTypeTriple = null;
for (RDFTriple triple : getGraph().getTriplesForSubject(node)) {
URI propertyURI = triple.getProperty().getURI();
if (propertyURI.equals(OWLRDFVocabulary.RDF_TYPE.getURI()) && !triple.getObject().isAnonymous()) {
if (OWLRDFVocabulary.BUILT_IN_VOCABULARY.contains(triple.getObject().getURI())) {
if (prettyPrintedTypes.contains(triple.getObject().getURI())) {
candidatePrettyPrintTypeTriple = triple;
}
}
else {
candidatePrettyPrintTypeTriple = triple;
}
}
}
if (candidatePrettyPrintTypeTriple == null) {
writer.writeStartElement(RDF_DESCRIPTION.getURI());
}
else {
writer.writeStartElement(candidatePrettyPrintTypeTriple.getObject().getURI());
}
if (!node.isAnonymous()) {
writer.writeAboutAttribute(node.getURI());
}
for (RDFTriple triple : triples) {
if (candidatePrettyPrintTypeTriple != null && candidatePrettyPrintTypeTriple.equals(triple)) {
continue;
}
writer.writeStartElement(triple.getProperty().getURI());
RDFNode objectNode = triple.getObject();
if (!objectNode.isLiteral()) {