if (n.isAnonymous()) {
render((RDFResourceNode) n);
}
else {
if (n.isLiteral()) {
RDFLiteralNode litNode = (RDFLiteralNode) n;
writer.writeStartElement(OWLRDFVocabulary.RDFS_LITERAL.getURI());
if (litNode.getDatatype() != null) {
writer.writeDatatypeAttribute(litNode.getDatatype());
}
else if (litNode.getLang() != null) {
writer.writeLangAttribute(litNode.getLang());
}
writer.writeTextContent((litNode.getLiteral()));
writer.writeEndElement();
}
else {
writer.writeStartElement(RDF_DESCRIPTION.getURI());
writer.writeAboutAttribute(n.getURI());
writer.writeEndElement();
}
}
}
}
else {
render(objectRes);
}
}
else {
writer.writeResourceAttribute(objectRes.getURI());
}
}
else {
RDFLiteralNode rdfLiteralNode = ((RDFLiteralNode) objectNode);
if (rdfLiteralNode.getDatatype() != null) {
writer.writeDatatypeAttribute(rdfLiteralNode.getDatatype());
}
else if (rdfLiteralNode.getLang() != null) {
writer.writeLangAttribute(rdfLiteralNode.getLang());
}
writer.writeTextContent(rdfLiteralNode.getLiteral());
}
writer.writeEndElement();
}
writer.writeEndElement();
pending.remove(node);