continue;
}
writer.writeStartElement(triple.getPredicate().getIRI());
RDFNode objectNode = triple.getObject();
if (!objectNode.isLiteral()) {
RDFResource objectRes = (RDFResource) objectNode;
if (objectRes.isAnonymous()) {
// Special rendering for lists
if (isObjectList(objectRes)) {
writer.writeParseTypeAttribute();
List<RDFNode> list = new ArrayList<>();
toJavaList(objectRes, list);
for (RDFNode n : list) {
if (n.isAnonymous()) {
render((RDFResourceBlankNode) n);
} else {
if (n.isLiteral()) {
RDFLiteral litNode = (RDFLiteral) n;
writer.writeStartElement(RDFS_LITERAL
.getIRI());
if (!litNode.isPlainLiteral()) {
writer.writeDatatypeAttribute(litNode
.getDatatype());
} else if (litNode.hasLang()) {
writer.writeLangAttribute(litNode
.getLang());
}
writer.writeTextContent(litNode
.getLexicalValue());
writer.writeEndElement();
} else {
writer.writeStartElement(RDF_DESCRIPTION
.getIRI());
writer.writeAboutAttribute(n.getIRI());
writer.writeEndElement();
}
}
}
} else {
render(objectRes);
}
} else {
writer.writeResourceAttribute(objectRes.getIRI());
}
} else {
RDFLiteral rdfLiteralNode = (RDFLiteral) objectNode;
if (!rdfLiteralNode.isPlainLiteral()) {
writer.writeDatatypeAttribute(rdfLiteralNode.getDatatype());