|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.xmldb.XMLDBUtilities
This contains some utility methods for accessing and interacting with XMLDB database collections.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
Constructor Summary | |
XMLDBUtilities()
|
Method Summary | |
static void |
addResource(org.xmldb.api.base.Collection collection,
java.lang.String resourceName,
java.lang.String resourcePath)
Adds a named resource to the specified parent collection. |
static void |
addResource(java.lang.String url,
java.io.File file)
Adds the new resource at the specified location to the specified collection. |
static org.xmldb.api.base.Collection |
createCollection(org.xmldb.api.base.Collection parent,
java.lang.String name)
Creates the specified collection. |
static void |
createCollection(java.lang.String url)
Creates the collection at the specified URL. |
static void |
removeCollection(org.xmldb.api.base.Collection parent,
java.lang.String name)
Removes the named collection from the specified parent collection. |
static void |
removeCollection(java.lang.String url)
Removes the collection at the specified URL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
Constructor Detail |
public XMLDBUtilities()
Method Detail |
public static org.xmldb.api.base.Collection createCollection(org.xmldb.api.base.Collection parent, java.lang.String name) throws org.xmldb.api.base.XMLDBException
parent
- Parent collectionname
- Name of new collection
org.xmldb.api.base.XMLDBException
- If any problems arisepublic static void addResource(org.xmldb.api.base.Collection collection, java.lang.String resourceName, java.lang.String resourcePath) throws org.xmldb.api.base.XMLDBException, XMLFileException, XMLDocumentException, XMLParseException
collection
- Parent collectionresourceName
- Name of new resourceresourcePath
- Path to XML file containing resource content.
org.xmldb.api.base.XMLDBException
- If any problems arise
XMLFileException
- If there are problems accessing the file.
XMLDocumentException
- If the file does not contain valid XML.
XMLParseException
- If there are internal problems when parsing the file.public static void removeCollection(org.xmldb.api.base.Collection parent, java.lang.String name) throws org.xmldb.api.base.XMLDBException
parent
- Parent collectionname
- Name of collection to remove
org.xmldb.api.base.XMLDBException
- If any problems arisepublic static void createCollection(java.lang.String url) throws org.xmldb.api.base.XMLDBException
url
- The full URL to the new collection.
org.xmldb.api.base.XMLDBException
- If any problems arisepublic static void addResource(java.lang.String url, java.io.File file) throws org.xmldb.api.base.XMLDBException, DAIFileNotFoundException, DAIFileNotFileException, DAIFileReadIOException
url
- The URL of the collection to add the resource to.file
- The file containing the new XML resource content. The name of
the resource is determined using the file name without the
extension.
org.xmldb.api.base.XMLDBException
- If any problems arise
DAIFileNotFoundException
- The file is not found
DAIFileNotFileException,
- The file is not a file (e.g. it's a directory)
DAIFileReadIOException
- There is a problem in reading the file.
DAIFileNotFileException
public static void removeCollection(java.lang.String url) throws org.xmldb.api.base.XMLDBException
url
- The URL of the collection to remove.
org.xmldb.api.base.XMLDBException
- If any problems arise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |