com.openindex.openestate.tool
Class ImmoToolDbUtils

java.lang.Object
  extended by com.openindex.openestate.tool.ImmoToolDbUtils

public class ImmoToolDbUtils
extends Object

Hilfsfunktionen zum Datenbankzugriff.
$Id: ImmoToolDbUtils.java 856 2011-04-29 22:30:40Z andy $

Author:
Andreas Rudolph

Constructor Summary
ImmoToolDbUtils()
           
 
Method Summary
static void close(org.xmldb.api.base.Collection col)
           
static void copyCollection(org.xmldb.api.base.Collection srcCol, org.xmldb.api.base.Collection destCol, ImmoToolDb db)
          Alternative Implementierung zum Kopieren einer XML-Collection.
static void copyResource(String res, org.xmldb.api.base.Collection srcCol, org.xmldb.api.base.Collection destCol)
          Alternative Implementierung zum Kopieren einer XML-Resource.
static org.xmldb.api.modules.BinaryResource createBinaryResource(org.xmldb.api.base.Collection col, String name)
           
static org.xmldb.api.base.Resource createResource(org.xmldb.api.base.Collection col, String name, String type)
           
static org.xmldb.api.modules.XMLResource createXmlResource(org.xmldb.api.base.Collection col, String name)
           
static org.xmldb.api.base.ResourceSet executeXQuery(org.xmldb.api.base.Collection col, Reader reader)
           
static org.xmldb.api.base.ResourceSet executeXQuery(org.xmldb.api.base.Collection col, String xquery)
           
static boolean hasResource(org.xmldb.api.base.Collection col, String res)
           
static org.xmldb.api.modules.BinaryResource loadBinaryResource(org.xmldb.api.base.Collection col, String path)
           
static Properties loadProperties(org.xmldb.api.base.Collection col, String path)
           
static Properties loadProperties(org.xmldb.api.modules.XMLResource res)
           
static org.xmldb.api.base.ResourceSet loadResourceSet(org.xmldb.api.base.Collection col, String xquery)
           
static org.xmldb.api.modules.XMLResource loadXMLResource(org.xmldb.api.base.Collection col, String path)
           
static org.xmldb.api.modules.XMLResource loadXMLResourceByXQuery(org.xmldb.api.base.Collection col, String xquery)
           
static void removeResource(org.xmldb.api.base.Collection col, org.xmldb.api.base.Resource res)
           
static void storeProperties(org.xmldb.api.base.Collection col, Properties props, String path)
           
static void storeResource(org.xmldb.api.base.Collection col, org.xmldb.api.base.Resource res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImmoToolDbUtils

public ImmoToolDbUtils()
Method Detail

close

public static void close(org.xmldb.api.base.Collection col)

copyCollection

public static void copyCollection(org.xmldb.api.base.Collection srcCol,
                                  org.xmldb.api.base.Collection destCol,
                                  ImmoToolDb db)
                           throws org.xmldb.api.base.XMLDBException,
                                  ImmoToolDbException
Alternative Implementierung zum Kopieren einer XML-Collection. Die eXist-interne Implementierung scheint zu Problemen mit Binärdateien zu führen.

Parameters:
srcCol -
destCol -
db -
Throws:
org.xmldb.api.base.XMLDBException
ImmoToolDbException

copyResource

public static void copyResource(String res,
                                org.xmldb.api.base.Collection srcCol,
                                org.xmldb.api.base.Collection destCol)
                         throws org.xmldb.api.base.XMLDBException,
                                ImmoToolDbException
Alternative Implementierung zum Kopieren einer XML-Resource. Die eXist-interne Implementierung scheint zu Problemen mit Binärdateien zu führen.

Parameters:
res -
srcCol -
destCol -
Throws:
org.xmldb.api.base.XMLDBException
ImmoToolDbException

createBinaryResource

public static org.xmldb.api.modules.BinaryResource createBinaryResource(org.xmldb.api.base.Collection col,
                                                                        String name)
                                                                 throws ImmoToolDbException
Throws:
ImmoToolDbException

createResource

public static org.xmldb.api.base.Resource createResource(org.xmldb.api.base.Collection col,
                                                         String name,
                                                         String type)
                                                  throws ImmoToolDbException
Throws:
ImmoToolDbException

createXmlResource

public static org.xmldb.api.modules.XMLResource createXmlResource(org.xmldb.api.base.Collection col,
                                                                  String name)
                                                           throws ImmoToolDbException
Throws:
ImmoToolDbException

executeXQuery

public static org.xmldb.api.base.ResourceSet executeXQuery(org.xmldb.api.base.Collection col,
                                                           Reader reader)
                                                    throws ImmoToolDbException,
                                                           IOException
Throws:
ImmoToolDbException
IOException

executeXQuery

public static org.xmldb.api.base.ResourceSet executeXQuery(org.xmldb.api.base.Collection col,
                                                           String xquery)
                                                    throws ImmoToolDbException
Throws:
ImmoToolDbException

hasResource

public static boolean hasResource(org.xmldb.api.base.Collection col,
                                  String res)

loadBinaryResource

public static org.xmldb.api.modules.BinaryResource loadBinaryResource(org.xmldb.api.base.Collection col,
                                                                      String path)
                                                               throws ImmoToolDbException
Throws:
ImmoToolDbException

loadProperties

public static Properties loadProperties(org.xmldb.api.base.Collection col,
                                        String path)
                                 throws ImmoToolDbException
Throws:
ImmoToolDbException

loadProperties

public static Properties loadProperties(org.xmldb.api.modules.XMLResource res)
                                 throws ImmoToolDbException
Throws:
ImmoToolDbException

loadResourceSet

public static org.xmldb.api.base.ResourceSet loadResourceSet(org.xmldb.api.base.Collection col,
                                                             String xquery)
                                                      throws ImmoToolDbException
Throws:
ImmoToolDbException

loadXMLResource

public static org.xmldb.api.modules.XMLResource loadXMLResource(org.xmldb.api.base.Collection col,
                                                                String path)
                                                         throws ImmoToolDbException
Throws:
ImmoToolDbException

loadXMLResourceByXQuery

public static org.xmldb.api.modules.XMLResource loadXMLResourceByXQuery(org.xmldb.api.base.Collection col,
                                                                        String xquery)
                                                                 throws ImmoToolDbException
Throws:
ImmoToolDbException

removeResource

public static void removeResource(org.xmldb.api.base.Collection col,
                                  org.xmldb.api.base.Resource res)
                           throws ImmoToolDbException
Throws:
ImmoToolDbException

storeProperties

public static void storeProperties(org.xmldb.api.base.Collection col,
                                   Properties props,
                                   String path)
                            throws ImmoToolDbException
Throws:
ImmoToolDbException

storeResource

public static void storeResource(org.xmldb.api.base.Collection col,
                                 org.xmldb.api.base.Resource res)
                          throws ImmoToolDbException
Throws:
ImmoToolDbException


Copyright © 2012 OpenEstate. All Rights Reserved.