// Write new subject:
writeNewLine();
writeStartOfStartTag(RDF.NAMESPACE, "Description");
if (subj instanceof BNode) {
BNode bNode = (BNode)subj;
writeAttribute(RDF.NAMESPACE, "nodeID", bNode.getID());
}
else {
URI uri = (URI)subj;
writeAttribute(RDF.NAMESPACE, "about", uri.toString());
}
writeEndOfStartTag();
writeNewLine();
lastWrittenSubject = subj;
}
// PREDICATE
writeIndent();
writeStartOfStartTag(predNamespace, predLocalName);
// OBJECT
if (obj instanceof Resource) {
Resource objRes = (Resource)obj;
if (objRes instanceof BNode) {
BNode bNode = (BNode)objRes;
writeAttribute(RDF.NAMESPACE, "nodeID", bNode.getID());
}
else {
URI uri = (URI)objRes;
writeAttribute(RDF.NAMESPACE, "resource", uri.toString());
}