com.facetmap.simple
Class XmlGenerator
java.lang.Object
com.facetmap.simple.XmlGenerator
- public class XmlGenerator
- extends java.lang.Object
Contains XML output functionality. This is a stateful generator, so all
output methods are synchronized. Typically you should create a new
XmlGenerator for each output task.
If you extend this class, new methods that create Document
objects should synchronize on this XmlGenerator object. Methods that build
Elements should not be synchronized, but they should only be called by other
Element-builders and the synchronized Document-builders. That's why they're
protected.
|
Field Summary |
protected org.w3c.dom.Document |
doc
|
protected Map |
map
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
protected Map map
doc
protected org.w3c.dom.Document doc
XmlGenerator
public XmlGenerator()
getDefaultSerializer
public static XMLSerializer getDefaultSerializer(java.io.Writer w)
getDataOnlySerializer
public static XMLSerializer getDataOnlySerializer(java.io.Writer w)
outputDocument
public void outputDocument(org.w3c.dom.Document d,
java.io.Writer w)
throws java.io.IOException
- Throws:
java.io.IOException
outputDocumentElement
public void outputDocumentElement(org.w3c.dom.Document d,
java.io.Writer w)
throws java.io.IOException
- Throws:
java.io.IOException
outputMap
public void outputMap(Map m,
java.io.Writer w)
throws java.io.IOException,
DataException,
InternalException
- Throws:
java.io.IOException
DataException
InternalException
outputSelection
public void outputSelection(Selection s,
java.io.Writer w)
throws java.io.IOException,
DataException,
InternalException
- Throws:
java.io.IOException
DataException
InternalException
outputException
public void outputException(java.lang.Exception exc,
java.io.Writer w)
throws java.io.IOException
- Throws:
java.io.IOException
documentOf
public org.w3c.dom.Document documentOf(Map facetmap)
modelOf
protected org.w3c.dom.Element modelOf(Taxonomy tax)
modelOf
protected org.w3c.dom.Element modelOf(Spectrum spect)
modelOf
protected org.w3c.dom.Element modelOf(TaxonomicHeading h)
modelOf
protected org.w3c.dom.Element modelOf(SpectrumHeading h)
modelOf
protected org.w3c.dom.Element modelOf(Resource r)
modelOf
protected org.w3c.dom.Element modelOf(XmlGenerator.HeadingRef fr)
modelOf
public org.w3c.dom.Element modelOf(Selection s)
throws DataException,
InternalException
- Throws:
DataException
InternalException
modelOf
public org.w3c.dom.Element modelOf(java.lang.Exception exc)
documentOf
public org.w3c.dom.Document documentOf(Selection s)
throws DataException,
InternalException
- Throws:
DataException
InternalException
documentOf
public org.w3c.dom.Document documentOf(java.lang.Exception exc)