writer.writeStartElement(rdfPrefix, "Bag",
Annotation.URI_RDF_SYNTAX_NS);
writer.writeCharacters("\n");
for (int i = 0; i < history.getCreatorCount(); i++) {
Creator creator = history.getCreator(i);
writer.writeCharacters(whiteSpace + createIndentationString(2 * indentCount));
writer.writeStartElement(rdfPrefix, "li",
Annotation.URI_RDF_SYNTAX_NS);
writer.writeAttribute(rdfPrefix, Annotation.URI_RDF_SYNTAX_NS,
"parseType", "Resource");
String vCardPrefix = rdfNamespaces.get(Creator.URI_RDF_VCARD_NS);
if (creator.isSetFamilyName()
|| creator.isSetGivenName()) {
writer.writeCharacters("\n");
writer.writeCharacters(whiteSpace + createIndentationString(3 * indentCount));
writer.writeStartElement(vCardPrefix, "N",
Creator.URI_RDF_VCARD_NS);
writer.writeAttribute(Annotation.URI_RDF_SYNTAX_NS,
"parseType", "Resource");
writer.writeCharacters("\n");
if (creator.isSetFamilyName()) {
writer.writeCharacters(whiteSpace + createIndentationString(4 * indentCount));
writer.writeStartElement(vCardPrefix, "Family",
Creator.URI_RDF_VCARD_NS);
writer.writeCharacters(creator.getFamilyName());
writer.writeEndElement();
writer.writeCharacters("\n");
}
if (creator.isSetGivenName()) {
writer.writeCharacters(whiteSpace + createIndentationString(4 * indentCount));
writer.writeStartElement(vCardPrefix, "Given",
Creator.URI_RDF_VCARD_NS);
writer.writeCharacters(creator.getGivenName());
writer.writeEndElement();
writer.writeCharacters("\n");
}
writer.writeCharacters(whiteSpace + createIndentationString(3 * indentCount));
writer.writeEndElement();
}
writer.writeCharacters("\n");
if (creator.isSetEmail()) {
writer.writeCharacters(whiteSpace + createIndentationString(3 * indentCount));
writer.writeStartElement(vCardPrefix, "EMAIL",
Creator.URI_RDF_VCARD_NS);
writer.writeCharacters(creator.getEmail());
writer.writeEndElement();
writer.writeCharacters("\n");
}
if (creator.isSetOrganisation()) {
writer.writeCharacters(whiteSpace + createIndentationString(3 * indentCount));
writer.writeStartElement(vCardPrefix, "ORG",
Creator.URI_RDF_VCARD_NS);
writer.writeAttribute(rdfPrefix,
Annotation.URI_RDF_SYNTAX_NS, "parseType",
"Resource");
writer.writeCharacters("\n");
writer.writeCharacters(whiteSpace + createIndentationString(4 * indentCount));
writer.writeStartElement(vCardPrefix, "Orgname",
Creator.URI_RDF_VCARD_NS);
writer.writeCharacters(creator.getOrganisation());
writer.writeEndElement();
writer.writeCharacters("\n");
writer.writeCharacters(whiteSpace + createIndentationString(3 * indentCount));
writer.writeEndElement();
writer.writeCharacters("\n");
}
// adding any additional element/value
if (creator.isSetOtherAttributes()) {
for (String elementName : creator.getOtherAttributes().keySet()) {
String characters = creator.getOtherAttribute(elementName);
writer.writeCharacters(whiteSpace + createIndentationString(3 * indentCount));
writer.writeStartElement(vCardPrefix, elementName, Creator.URI_RDF_VCARD_NS);
writer.writeCharacters(characters);
writer.writeEndElement();