Class DocumentViewExporter
- java.lang.Object
-
- org.apache.jackrabbit.commons.xml.Exporter
-
- org.apache.jackrabbit.commons.xml.DocumentViewExporter
-
public class DocumentViewExporter extends Exporter
Document view exporter.- Since:
- Jackrabbit JCR Commons 1.5
-
-
Constructor Summary
Constructors Constructor Description DocumentViewExporter(Session session, ContentHandler handler, boolean recurse, boolean binary)Creates a document view exporter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexportNode(String uri, String local, Node node)Exports the given node either as XML characters (if it's anxml:textnode) or as an XML element with properties mapped to XML attributes.protected voidexportProperty(String uri, String local, int type, Value[] values)Does nothing.protected voidexportProperty(String uri, String local, Value value)Maps the given single-valued property to an XML attribute.-
Methods inherited from class org.apache.jackrabbit.commons.xml.Exporter
addAttribute, addNamespace, characters, endElement, export, exportNodes, exportProperties, getXMLName, startElement
-
-
-
-
Constructor Detail
-
DocumentViewExporter
public DocumentViewExporter(Session session, ContentHandler handler, boolean recurse, boolean binary)
Creates a document view exporter.- Parameters:
session- current sessionhandler- SAX event handler for the exportrecurse- whether to recursively export the whole subtreebinary- whether to export binary values
-
-
Method Detail
-
exportNode
protected void exportNode(String uri, String local, Node node) throws RepositoryException, SAXException
Exports the given node either as XML characters (if it's anxml:textnode) or as an XML element with properties mapped to XML attributes.- Specified by:
exportNodein classExporter- Parameters:
uri- node namespacelocal- node namenode- node- Throws:
RepositoryException- if a repository error occursSAXException- if a SAX error occurs
-
exportProperty
protected void exportProperty(String uri, String local, Value value) throws RepositoryException
Maps the given single-valued property to an XML attribute.- Specified by:
exportPropertyin classExporter- Parameters:
uri- property namespacelocal- property namevalue- property value- Throws:
RepositoryException- if a repository error occurs
-
exportProperty
protected void exportProperty(String uri, String local, int type, Value[] values)
Does nothing. Multi-valued properties are skipped for the time being until a way of properly handling/detecting multi-valued properties on re-import is found. Skipping multi-valued properties entirely is legal according to "6.4.2.5 Multi-value Properties" of the JSR 170 specification.- Specified by:
exportPropertyin classExporter- Parameters:
uri- property namespacelocal- property nametype- property typevalues- property values- See Also:
- JCR-325
-
-