|
|||||||
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
public class 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 | |
---|---|
static String |
NORMALIZE_HTML
Property to be passed to setProperty(String, String) . |
Constructor Summary | |
---|---|
LocalCollection(User user,
BrokerPool brokerPool,
LocalCollection parent,
XmldbURI name,
AccessContext accessCtx)
Create a collection identified by its name. |
|
LocalCollection(User user,
BrokerPool brokerPool,
XmldbURI collection,
AccessContext accessCtx)
Create a collection with no parent (root collection). |
Method Summary | |
---|---|
void |
addObserver(Observer o)
Add a new observer to the list. |
void |
close()
Close the current collection. |
String |
createId()
Creates a unique name for a database resource Uniqueness is only guaranteed within the eXist instance The name is based on a hex encoded string of a random integer and will have the format xxxxxxxx.xml where x is in the range 0 to 9 and a to f |
org.xmldb.api.base.Resource |
createResource(String id,
String type)
|
AccessContext |
getAccessContext()
|
org.xmldb.api.base.Collection |
getChildCollection(String name)
|
int |
getChildCollectionCount()
|
String[] |
getChildCollections()
|
Date |
getCreationTime()
Returns the time of creation of the collection. |
String |
getName()
|
org.xmldb.api.base.Collection |
getParentCollection()
|
String |
getPath()
|
XmldbURI |
getPathURI()
|
String |
getProperty(String property)
|
org.xmldb.api.base.Resource |
getResource(String id)
|
int |
getResourceCount()
|
String[] |
getResources()
|
org.xmldb.api.base.Service |
getService(String name,
String version)
Possible services: XPathQueryService, XQueryService, CollectionManagementService (CollectionManager), UserManagementService, DatabaseInstanceManager, XUpdateQueryService, IndexQueryService, ValidationService. |
org.xmldb.api.base.Service[] |
getServices()
|
XmldbURI |
getURI()
|
boolean |
isOpen()
|
boolean |
isRemoteCollection()
|
String[] |
listChildCollections()
|
String[] |
listResources()
|
void |
registerService(org.xmldb.api.base.Service serv)
|
void |
removeResource(org.xmldb.api.base.Resource res)
|
void |
setProperty(String property,
String value)
|
void |
setReader(XMLReader reader)
set user-defined Reader |
void |
storeResource(org.xmldb.api.base.Resource resource)
|
void |
storeResource(org.xmldb.api.base.Resource resource,
Date a,
Date b)
|
Methods inherited from class java.util.Observable |
---|
countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NORMALIZE_HTML
setProperty(String, String)
.
When storing documents, pass HTML files through an HTML parser
(NekoHTML) instead of the XML parser. The HTML parser will normalize
the HTML into well-formed XML.
Constructor Detail |
---|
public LocalCollection(User user, BrokerPool brokerPool, XmldbURI collection, AccessContext accessCtx) throws org.xmldb.api.base.XMLDBException
user
- brokerPool
- collection
-
org.xmldb.api.base.XMLDBException
public LocalCollection(User user, BrokerPool brokerPool, LocalCollection parent, XmldbURI name, AccessContext accessCtx) throws org.xmldb.api.base.XMLDBException
user
- brokerPool
- parent
- name
-
org.xmldb.api.base.XMLDBException
Method Detail |
---|
public AccessContext getAccessContext()
public void close() throws org.xmldb.api.base.XMLDBException
close
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public String createId() throws org.xmldb.api.base.XMLDBException
createId
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public org.xmldb.api.base.Resource createResource(String id, String type) throws org.xmldb.api.base.XMLDBException
createResource
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public org.xmldb.api.base.Collection getChildCollection(String name) throws org.xmldb.api.base.XMLDBException
getChildCollection
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public int getChildCollectionCount() throws org.xmldb.api.base.XMLDBException
getChildCollectionCount
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public String getName() throws org.xmldb.api.base.XMLDBException
getName
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public org.xmldb.api.base.Collection getParentCollection() throws org.xmldb.api.base.XMLDBException
getParentCollection
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public String getPath() throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException
public XmldbURI getPathURI()
getPathURI
in interface CollectionImpl
public String getProperty(String property) throws org.xmldb.api.base.XMLDBException
getProperty
in interface org.xmldb.api.base.Configurable
org.xmldb.api.base.XMLDBException
public org.xmldb.api.base.Resource getResource(String id) throws org.xmldb.api.base.XMLDBException
getResource
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public int getResourceCount() throws org.xmldb.api.base.XMLDBException
getResourceCount
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public org.xmldb.api.base.Service getService(String name, String version) throws org.xmldb.api.base.XMLDBException
getService
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public org.xmldb.api.base.Service[] getServices() throws org.xmldb.api.base.XMLDBException
getServices
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public boolean isOpen() throws org.xmldb.api.base.XMLDBException
isOpen
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public String[] listChildCollections() throws org.xmldb.api.base.XMLDBException
listChildCollections
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public String[] getChildCollections() throws org.xmldb.api.base.XMLDBException
getChildCollections
in interface CollectionImpl
org.xmldb.api.base.XMLDBException
public String[] listResources() throws org.xmldb.api.base.XMLDBException
listResources
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public String[] getResources() throws org.xmldb.api.base.XMLDBException
getResources
in interface CollectionImpl
org.xmldb.api.base.XMLDBException
public void registerService(org.xmldb.api.base.Service serv) throws org.xmldb.api.base.XMLDBException
org.xmldb.api.base.XMLDBException
public void removeResource(org.xmldb.api.base.Resource res) throws org.xmldb.api.base.XMLDBException
removeResource
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public void setProperty(String property, String value) throws org.xmldb.api.base.XMLDBException
setProperty
in interface org.xmldb.api.base.Configurable
org.xmldb.api.base.XMLDBException
public void storeResource(org.xmldb.api.base.Resource resource) throws org.xmldb.api.base.XMLDBException
storeResource
in interface org.xmldb.api.base.Collection
org.xmldb.api.base.XMLDBException
public void storeResource(org.xmldb.api.base.Resource resource, Date a, Date b) throws org.xmldb.api.base.XMLDBException
storeResource
in interface CollectionImpl
org.xmldb.api.base.XMLDBException
public Date getCreationTime() throws org.xmldb.api.base.XMLDBException
CollectionImpl
getCreationTime
in interface CollectionImpl
org.xmldb.api.base.XMLDBException
public void addObserver(Observer o)
addObserver
in class Observable
public boolean isRemoteCollection() throws org.xmldb.api.base.XMLDBException
isRemoteCollection
in interface CollectionImpl
org.xmldb.api.base.XMLDBException
public void setReader(XMLReader reader)
reader
- public XmldbURI getURI()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |