public abstract class CollectionImpl extends java.lang.Object implements Collection
Modifier and Type | Class and Description |
---|---|
static class |
CollectionImpl.CollectionType
Enumeration for collection type
|
Collection.CollectionAlreadyExistException, Collection.CollectionCreationException, Collection.CollectionException
Constructor and Description |
---|
CollectionImpl(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
AddElement(java.util.List<XMLResource> listResources) |
void |
AddElementByResultSet(java.lang.String Locator,
UpdateEventConsumer consumer)
Stores the given resources in the collection
|
void |
close() |
Collection |
createCollection(java.lang.String collectionName)
Creates a new Collection
|
Collection |
createPartitionedCollection(java.lang.String collectionName)
Creates a new partitioned collection
|
XMLResource |
createResource(java.lang.String name,
java.lang.Object content,
java.lang.String Type) |
void |
deleteCollection(java.lang.String collectionName)
Removes a collection from the ExistDB
|
java.util.List<java.lang.String> |
executeXPathDirect(java.lang.String xPath) |
java.lang.String |
executeXPathIndirect(java.lang.String xPath) |
java.util.List<java.lang.String> |
executeXQueryDirect(java.lang.String xQuery)
execute the xquery
|
java.lang.String |
executeXQueryInDirect(java.lang.String xQuery) |
int |
getChildCollectionCount()
Gets the number of children
|
Collection |
getCurrentCollection()
Returns the current collection
|
java.lang.String |
getName()
Gets the collection name
|
org.xmldb.api.base.Service |
getService(java.lang.String service,
java.lang.String version) |
Collection |
openSubCollection(java.lang.String collectionName)
Open a subCollection
|
java.util.List<java.lang.String> |
removeElements(java.lang.String[] toRemove)
removes elements from the collection
|
abstract java.util.List<java.lang.String> |
store(java.util.List<XMLResource> resources) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, getResourceById
public Collection openSubCollection(java.lang.String collectionName) throws Collection.CollectionException
Collection
openSubCollection
in interface Collection
Collection.CollectionException
public void close() throws Collection.CollectionException
close
in interface Collection
Collection.CollectionException
public java.lang.String getName()
Collection
getName
in interface Collection
public org.xmldb.api.base.Service getService(java.lang.String service, java.lang.String version) throws java.lang.Exception
java.lang.Exception
public int getChildCollectionCount() throws Collection.CollectionException
Collection
getChildCollectionCount
in interface Collection
Collection.CollectionException
public abstract java.util.List<java.lang.String> store(java.util.List<XMLResource> resources) throws Collection.CollectionException
Collection.CollectionException
public java.util.List<java.lang.String> removeElements(java.lang.String[] toRemove) throws Collection.CollectionException
removeElements
in interface Collection
toRemove
- List of Resources IDCollection.CollectionException
public XMLResource createResource(java.lang.String name, java.lang.Object content, java.lang.String Type) throws XMLDBException
XMLDBException
public Collection createCollection(java.lang.String collectionName) throws Collection.CollectionAlreadyExistException, Collection.CollectionCreationException
createCollection
in interface Collection
collectionName
- String the collection nameCollectionException
Collection.CollectionAlreadyExistException
Collection.CollectionCreationException
public Collection createPartitionedCollection(java.lang.String collectionName) throws Collection.CollectionAlreadyExistException, Collection.CollectionCreationException
createPartitionedCollection
in interface Collection
collectionName
- the colection nameCollectionCreationException
- if the creation failsCollection.CollectionAlreadyExistException
Collection.CollectionCreationException
public java.util.List<java.lang.String> executeXQueryDirect(java.lang.String xQuery) throws java.lang.Exception
executeXQueryDirect
in interface Collection
xQuery
- the xqueryjava.lang.Exception
- If exist failspublic java.lang.String executeXQueryInDirect(java.lang.String xQuery) throws java.lang.Exception
executeXQueryInDirect
in interface Collection
xQuery
- java.lang.Exception
public java.lang.String executeXPathIndirect(java.lang.String xPath) throws java.lang.Exception
executeXPathIndirect
in interface Collection
xPath
- java.lang.Exception
public java.util.List<java.lang.String> executeXPathDirect(java.lang.String xPath) throws java.lang.Exception
executeXPathDirect
in interface Collection
xPath
- java.lang.Exception
public void deleteCollection(java.lang.String collectionName) throws Collection.CollectionException
deleteCollection
in interface Collection
if
- the operation failsCollection.CollectionException
public Collection getCurrentCollection()
public void AddElementByResultSet(java.lang.String Locator, UpdateEventConsumer consumer)
Collection
AddElementByResultSet
in interface Collection
public java.util.List<java.lang.String> AddElement(java.util.List<XMLResource> listResources) throws java.lang.Exception
AddElement
in interface Collection
java.lang.Exception