summaryrefslogtreecommitdiff
path: root/src/plugins/xml/XmlOutput.hpp
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-04-08 19:34:18 +0200
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2016-04-25 22:19:34 +0200
commitf2f20d5cae37064a329ee451efb6f2f26e2a0f0b (patch)
treeeb8c9814c1c79f7f892e2ac18e3dda2cacf49014 /src/plugins/xml/XmlOutput.hpp
parent06efbbafaac6da7d8beba7a37234b3a848b8a8fa (diff)
started to implement capabilities for ontology serialization.
Diffstat (limited to 'src/plugins/xml/XmlOutput.hpp')
-rw-r--r--src/plugins/xml/XmlOutput.hpp31
1 files changed, 6 insertions, 25 deletions
diff --git a/src/plugins/xml/XmlOutput.hpp b/src/plugins/xml/XmlOutput.hpp
index 55c1c67..da49094 100644
--- a/src/plugins/xml/XmlOutput.hpp
+++ b/src/plugins/xml/XmlOutput.hpp
@@ -36,35 +36,12 @@ namespace ousia {
namespace xml {
class XmlTransformer {
-private:
- std::map<std::string, std::string> transformAttributes(
- const std::string &name, DocumentEntity *entity, Logger &logger,
- bool pretty);
-
- void addNameAttribute(Handle<ousia::Node> n,
- std::map<std::string, std::string> &attrs);
-
- void transformChildren(DocumentEntity *parentEntity, Handle<Element> parent,
- Logger &logger, bool pretty);
-
- Rooted<Element> transformStructuredEntity(Handle<Element> parent,
- Handle<StructuredEntity> s,
- Logger &logger, bool pretty);
-
- Rooted<Element> transformAnchor(Handle<Element> parent, Handle<Anchor> a,
- Logger &logger, bool pretty);
-
- Rooted<Text> transformPrimitive(Handle<Element> parent, Handle<Type> type,
- Handle<DocumentPrimitive> p, Logger &logger,
- bool pretty);
public:
/**
* This writes an XML serialization of the given document to the given
* output stream. The serialization is equivalent to the input XML format,
* safe for the ontology references. TODO: Can we change this? If so: how?
- * Note, though, that the serialization will not exploit transparency.
- * TODO: Can we change that?
*
* @param doc is some Document.
* @param out is the output stream the XML serialization of the document
@@ -74,10 +51,14 @@ public:
* typesystems that were imported in this document.
* @param pretty is a flag that manipulates whether newlines and tabs are
* used.
+ * @param flat if this flag is set the result will be a 'standalone'
+ * version of the document including serialized versions of
+ * all referenced ontologies and typesystems.
*/
void writeXml(Handle<Document> doc, std::ostream &out, Logger &logger,
- ResourceManager &resMgr, bool pretty);
+ ResourceManager &resMgr, bool pretty = true,
+ bool flat = false);
};
}
}
-#endif
+#endif \ No newline at end of file