|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
org.exist.xmldb.LocalCollection
A local implementation of the Collection interface. This is used when the database is running in embedded mode. Extends Observable to allow status callbacks during indexing. Methods storeResource notifies registered observers about the progress of the indexer by passing an object of type ProgressIndicator to the observer.
| Field Summary | |
protected BrokerPool |
brokerPool
|
protected static java.util.Properties |
defaultProperties
|
protected boolean |
needsSync
|
protected java.util.ArrayList |
observers
|
protected LocalCollection |
parent
|
protected java.lang.String |
path
|
protected java.util.Properties |
properties
|
protected User |
user
|
| Constructor Summary | |
LocalCollection(User user,
BrokerPool brokerPool,
LocalCollection parent,
java.lang.String name,
AccessContext accessCtx)
Create a collection identified by its name. |
|
LocalCollection(User user,
BrokerPool brokerPool,
java.lang.String collection,
AccessContext accessCtx)
Create a collection with no parent (root collection). |
|
| Method Summary | |
void |
addObserver(java.util.Observer o)
Add a new observer to the list. |
protected boolean |
checkOwner(Collection collection,
User user)
|
protected boolean |
checkPermissions(Collection collection,
int perm)
|
void |
close()
Close the current collection. |
java.lang.String |
createId()
|
Resource |
createResource(java.lang.String id,
java.lang.String type)
|
AccessContext |
getAccessContext()
|
org.xmldb.api.base.Collection |
getChildCollection(java.lang.String name)
|
int |
getChildCollectionCount()
|
java.lang.String[] |
getChildCollections()
|
protected Collection |
getCollection()
|
protected Collection |
getCollectionWithLock(int lockMode)
|
java.util.Date |
getCreationTime()
Returns the time of creation of the collection. |
java.lang.String |
getName()
|
org.xmldb.api.base.Collection |
getParentCollection()
|
java.lang.String |
getPath()
|
java.lang.String |
getProperty(java.lang.String property)
|
Resource |
getResource(java.lang.String id)
|
int |
getResourceCount()
|
java.lang.String[] |
getResources()
|
Service |
getService(java.lang.String name,
java.lang.String version)
Possible services: XPathQueryService, XQueryService, CollectionManagementService (CollectionManager), UserManagementService, DatabaseInstanceManager, XUpdateQueryService, IndexQueryService, ValidationService. |
Service[] |
getServices()
|
XmldbURI |
getURI()
|
boolean |
isOpen()
|
boolean |
isRemoteCollection()
|
java.lang.String[] |
listChildCollections()
|
java.lang.String[] |
listResources()
|
void |
registerService(Service serv)
|
void |
removeResource(Resource res)
|
protected void |
saveCollection()
|
void |
setProperty(java.lang.String property,
java.lang.String value)
|
void |
setReader(org.xml.sax.XMLReader reader)
set user-defined Reader |
void |
storeResource(Resource resource)
|
void |
storeResource(Resource resource,
java.util.Date a,
java.util.Date b)
|
| Methods inherited from class java.util.Observable |
clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final java.util.Properties defaultProperties
protected java.lang.String path
protected BrokerPool brokerPool
protected java.util.Properties properties
protected LocalCollection parent
protected User user
protected java.util.ArrayList observers
protected boolean needsSync
| Constructor Detail |
public LocalCollection(User user,
BrokerPool brokerPool,
java.lang.String collection,
AccessContext accessCtx)
throws XMLDBException
user - brokerPool - collection -
XMLDBException
public LocalCollection(User user,
BrokerPool brokerPool,
LocalCollection parent,
java.lang.String name,
AccessContext accessCtx)
throws XMLDBException
user - brokerPool - parent - name -
XMLDBException| Method Detail |
public AccessContext getAccessContext()
protected Collection getCollectionWithLock(int lockMode)
throws XMLDBException
XMLDBException
protected void saveCollection()
throws XMLDBException
XMLDBException
protected Collection getCollection()
throws XMLDBException
XMLDBException
protected boolean checkOwner(Collection collection,
User user)
throws XMLDBException
XMLDBException
protected boolean checkPermissions(Collection collection,
int perm)
throws XMLDBException
XMLDBException
public void close()
throws XMLDBException
XMLDBException
public java.lang.String createId()
throws XMLDBException
XMLDBException
public Resource createResource(java.lang.String id,
java.lang.String type)
throws XMLDBException
XMLDBException
public org.xmldb.api.base.Collection getChildCollection(java.lang.String name)
throws XMLDBException
XMLDBException
public int getChildCollectionCount()
throws XMLDBException
XMLDBException
public java.lang.String getName()
throws XMLDBException
XMLDBException
public org.xmldb.api.base.Collection getParentCollection()
throws XMLDBException
XMLDBException
public java.lang.String getPath()
throws XMLDBException
XMLDBException
public java.lang.String getProperty(java.lang.String property)
throws XMLDBException
XMLDBException
public Resource getResource(java.lang.String id)
throws XMLDBException
XMLDBException
public int getResourceCount()
throws XMLDBException
XMLDBException
public Service getService(java.lang.String name,
java.lang.String version)
throws XMLDBException
XMLDBException
public Service[] getServices()
throws XMLDBException
XMLDBException
public boolean isOpen()
throws XMLDBException
XMLDBException
public java.lang.String[] listChildCollections()
throws XMLDBException
XMLDBException
public java.lang.String[] getChildCollections()
throws XMLDBException
getChildCollections in interface CollectionImplXMLDBException
public java.lang.String[] listResources()
throws XMLDBException
XMLDBException
public java.lang.String[] getResources()
throws XMLDBException
getResources in interface CollectionImplXMLDBException
public void registerService(Service serv)
throws XMLDBException
XMLDBException
public void removeResource(Resource res)
throws XMLDBException
XMLDBException
public void setProperty(java.lang.String property,
java.lang.String value)
throws XMLDBException
XMLDBException
public void storeResource(Resource resource)
throws XMLDBException
XMLDBException
public void storeResource(Resource resource,
java.util.Date a,
java.util.Date b)
throws XMLDBException
storeResource in interface CollectionImplXMLDBException
public java.util.Date getCreationTime()
throws XMLDBException
CollectionImpl
getCreationTime in interface CollectionImplXMLDBExceptionpublic void addObserver(java.util.Observer o)
public boolean isRemoteCollection()
throws XMLDBException
isRemoteCollection in interface CollectionImplXMLDBExceptionpublic void setReader(org.xml.sax.XMLReader reader)
public XmldbURI getURI()
getURI in interface CollectionImpl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||