]> gerrit.simantics Code Review - simantics/interop.git/blobdiff - org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/XMLElementWriter.java
Initial support for XML export (order of Elements is not kept)
[simantics/interop.git] / org.simantics.xml.sax.base / src / org / simantics / xml / sax / base / XMLElementWriter.java
diff --git a/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/XMLElementWriter.java b/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/XMLElementWriter.java
new file mode 100644 (file)
index 0000000..cde7809
--- /dev/null
@@ -0,0 +1,25 @@
+package org.simantics.xml.sax.base;\r
+\r
+import java.util.Collection;\r
+import java.util.List;\r
+\r
+import javax.xml.stream.XMLStreamException;\r
+import javax.xml.stream.XMLStreamWriter;\r
+\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.Statement;\r
+import org.simantics.db.exception.DatabaseException;\r
+\r
+public interface XMLElementWriter {\r
+\r
+       public java.lang.String getElementId();\r
+       public Resource getType(ReadGraph graph) throws DatabaseException;\r
+       //public int idPriority();\r
+       public void start(ReadGraph graph, WriterElement instance, XMLStreamWriter writer) throws XMLStreamException, DatabaseException;\r
+       public void attributes(ReadGraph graph, WriterElement instance, Collection<Statement> attributes, XMLStreamWriter writer) throws XMLStreamException, DatabaseException;\r
+       public void characters(ReadGraph graph, WriterElement instance, XMLStreamWriter writer) throws XMLStreamException, DatabaseException;\r
+       public List<Resource> children(ReadGraph graph, WriterElement instance, XMLStreamWriter writer) throws XMLStreamException, DatabaseException;\r
+       public void end(ReadGraph graph, WriterElement instance, XMLStreamWriter writer) throws XMLStreamException, DatabaseException;\r
+       \r
+}\r