From f2f20d5cae37064a329ee451efb6f2f26e2a0f0b Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Wed, 8 Apr 2015 19:34:18 +0200 Subject: started to implement capabilities for ontology serialization. --- src/plugins/xml/XmlOutput.hpp | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'src/plugins/xml/XmlOutput.hpp') 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 transformAttributes( - const std::string &name, DocumentEntity *entity, Logger &logger, - bool pretty); - - void addNameAttribute(Handle n, - std::map &attrs); - - void transformChildren(DocumentEntity *parentEntity, Handle parent, - Logger &logger, bool pretty); - - Rooted transformStructuredEntity(Handle parent, - Handle s, - Logger &logger, bool pretty); - - Rooted transformAnchor(Handle parent, Handle a, - Logger &logger, bool pretty); - - Rooted transformPrimitive(Handle parent, Handle type, - Handle 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 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 -- cgit v1.2.3