org.jecars.backup
Class JB_ExportData

java.lang.Object
  extended by org.jecars.backup.JB_ExportData

public class JB_ExportData
extends java.lang.Object

JB_ExportData

Version:
$Id: JB_ExportData.java,v 1.6 2007/11/09 16:24:25 weertj Exp $

Constructor Summary
JB_ExportData()
           
 
Method Summary
protected  java.lang.String encodeString(java.lang.String pValue)
           
protected  java.lang.String encodeValue(javax.jcr.Value pValue)
           
protected  java.lang.String exportBinaryProperty(javax.jcr.Property pProperty, JB_Options pOptions)
           
protected  void exportNode(int pLevel, javax.jcr.Node pNode, java.io.DataOutputStream pStream, JB_Options pOptions)
          Export node
protected  void exportProperties(int pLevel, javax.jcr.Node pNode, java.io.DataOutputStream pStream, JB_Options pOptions, javax.jcr.Node pBaseNode)
          Export properties
protected  void exportSysProperties(javax.jcr.Node pNode, java.io.DataOutputStream pStream)
           
 void exportToDirectory(javax.jcr.Node pStartNode, JB_Options pOptions)
           
 void exportToStream(javax.jcr.Node pStartNode, java.io.OutputStream pStream, JB_Options pOptions)
           
protected  void exportVersionNode(javax.jcr.Node pBaseNode, int pLevel, javax.jcr.version.Version pVersion, java.io.DataOutputStream pStream, JB_Options pOptions)
          Export version
protected  boolean isSysProperty(java.lang.String pPropName)
           
protected  void writeProperty(javax.jcr.Property p, java.io.DataOutputStream pStream, JB_Options pOptions)
          Write property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JB_ExportData

public JB_ExportData()
Method Detail

exportToDirectory

public void exportToDirectory(javax.jcr.Node pStartNode,
                              JB_Options pOptions)
                       throws java.io.FileNotFoundException,
                              javax.jcr.RepositoryException,
                              java.io.IOException,
                              java.lang.Exception
Throws:
java.io.FileNotFoundException
javax.jcr.RepositoryException
java.io.IOException
java.lang.Exception

exportToStream

public void exportToStream(javax.jcr.Node pStartNode,
                           java.io.OutputStream pStream,
                           JB_Options pOptions)
                    throws javax.jcr.RepositoryException,
                           java.io.IOException
Throws:
javax.jcr.RepositoryException
java.io.IOException

encodeString

protected java.lang.String encodeString(java.lang.String pValue)
                                 throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

encodeValue

protected java.lang.String encodeValue(javax.jcr.Value pValue)
                                throws javax.jcr.ValueFormatException,
                                       java.lang.IllegalStateException,
                                       javax.jcr.RepositoryException,
                                       java.io.UnsupportedEncodingException
Throws:
javax.jcr.ValueFormatException
java.lang.IllegalStateException
javax.jcr.RepositoryException
java.io.UnsupportedEncodingException

isSysProperty

protected boolean isSysProperty(java.lang.String pPropName)

exportSysProperties

protected void exportSysProperties(javax.jcr.Node pNode,
                                   java.io.DataOutputStream pStream)
                            throws javax.jcr.RepositoryException,
                                   java.io.IOException
Throws:
javax.jcr.RepositoryException
java.io.IOException

exportVersionNode

protected void exportVersionNode(javax.jcr.Node pBaseNode,
                                 int pLevel,
                                 javax.jcr.version.Version pVersion,
                                 java.io.DataOutputStream pStream,
                                 JB_Options pOptions)
                          throws javax.jcr.RepositoryException,
                                 java.io.IOException
Export version

Throws:
javax.jcr.RepositoryException
java.io.IOException

exportNode

protected void exportNode(int pLevel,
                          javax.jcr.Node pNode,
                          java.io.DataOutputStream pStream,
                          JB_Options pOptions)
                   throws javax.jcr.RepositoryException,
                          java.io.IOException
Export node

Throws:
javax.jcr.RepositoryException
java.io.IOException

exportProperties

protected void exportProperties(int pLevel,
                                javax.jcr.Node pNode,
                                java.io.DataOutputStream pStream,
                                JB_Options pOptions,
                                javax.jcr.Node pBaseNode)
                         throws javax.jcr.RepositoryException,
                                java.io.IOException
Export properties

Throws:
javax.jcr.RepositoryException
java.io.IOException

writeProperty

protected void writeProperty(javax.jcr.Property p,
                             java.io.DataOutputStream pStream,
                             JB_Options pOptions)
                      throws javax.jcr.RepositoryException,
                             java.io.IOException
Write property

Throws:
javax.jcr.RepositoryException
java.io.IOException

exportBinaryProperty

protected java.lang.String exportBinaryProperty(javax.jcr.Property pProperty,
                                                JB_Options pOptions)
                                         throws javax.jcr.RepositoryException,
                                                java.io.UnsupportedEncodingException,
                                                java.io.FileNotFoundException,
                                                java.io.IOException
Throws:
javax.jcr.RepositoryException
java.io.UnsupportedEncodingException
java.io.FileNotFoundException
java.io.IOException