SMOutputElement annotationElement, XMLStreamWriter writer,
int indent) throws XMLStreamException {
// Logger logger = Logger.getLogger(SBMLWriter.class);
String whiteSpace = createIndentationString(indent);
SMNamespace namespace = annotationElement.getNamespace(
Annotation.URI_RDF_SYNTAX_NS, "rdf");
annotationElement.setIndentation(whiteSpace, indent, indentCount);
SMOutputElement rdfElement = annotationElement.addElement(namespace,
"RDF");
/*
* TODO: Check which name spaces are really required and add only those;
* particularly, if name spaces are missing and it is known from the
* kind of RDF annotation, which name spaces are needed, these should be
* added automatically here.
*/
Map<String, String> rdfNamespaces = annotation.getRDFAnnotationNamespaces();
for (String namespaceURI : rdfNamespaces.keySet()) {
if (!namespaceURI.equals(namespace.getURI())) {
writer.writeNamespace(rdfNamespaces.get(namespaceURI), namespaceURI);
}
}
// Checking if all the necessary namespaces are defined