|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
SixdmlCollection.java This is collection represents a group of XML resources that can be queried or updated collectively similarly to how rows in a relational table can be queried and updated collectively. Created: Thu Jan 10 04:23:49 2002
| Method Summary | |
void |
addIndex(SixdmlIndex index)
Adds an index to apply to the collection. |
SixdmlIndex[] |
getIndices()
Returns an array of SixdmlIndex objects that apply to this collection. |
void |
insertDocument(String name,
String xmlString)
Adds an XML document created from the string argument to the collection. |
void |
insertDocument(String name,
URL documentSource)
Adds an XML document loaded from the specified URL to the collection. |
void |
removeDocument(String name)
Removes an XML document from the collection. |
void |
removeIndex(String name)
Removes a particular index from the collection. |
void |
setSchema(URL schemaFile)
Sets the XML schema or DTD that will be used to constrain the documents in this collection. |
String |
showSchema()
Returns the contents of the schema for the collection as a string. |
void |
unsetSchema()
Unsets the schema for this collection. |
| Methods inherited from interface org.xmldb.api.base.Collection |
close, createId, createResource, getChildCollection, getChildCollectionCount, getName, getParentCollection, getResource, getResourceCount, getService, getServices, isOpen, listChildCollections, listResources, removeResource, storeResource |
| Methods inherited from interface org.xmldb.api.base.Configurable |
getProperty, setProperty |
| Method Detail |
public void setSchema(URL schemaFile)
throws InvalidCollectionDocumentException,
IOException,
InvalidSchemaException,
XMLDBException
schemaFile - the location of the schema file either on the local file
system or over the internet.InvalidCollectionDocumentException - if an XML document in the
collection fails to be validated by the schema.IOException - if an error occurs while trying to retrieve the file.InvalidSchemaException - if the schema is invalid.XMLDBException - if a database error occurs.
public String showSchema()
throws XMLDBException
XMLDBException - if a database error occurs.
public void unsetSchema()
throws XMLDBException
XMLDBException - if a database error occurs.
public void insertDocument(String name,
String xmlString)
throws DocumentAlreadyExistsException,
InvalidCollectionDocumentException,
NonWellFormedXMLException,
XMLDBException
name - the name of the document.xmlString - the string representation of a well-formed XML documentDocumentAlreadyExistsException - if there already exists a document with
the specified name in the database.InvalidCollectionDocumentException - if the document fails to validate against
the collection's schema.NonWellFormedXMLException - if the XML is not well formed.XMLDBException - if a database error occurs.
public void insertDocument(String name,
URL documentSource)
throws DocumentAlreadyExistsException,
IOException,
InvalidCollectionDocumentException,
NonWellFormedXMLException,
XMLDBException
name - the name of the document.xmlString - the string representation of a well-formed XML documentDocumentAlreadyExistsException - if there already exists a document with
the specified name in the database.IOException - if an error occurs while trying to retrieve the file.InvalidCollectionDocumentException - if the document fails to validate against
the collection's schema.NonWellFormedXMLException - if the XML is not well formed.XMLDBException - if a database error occurs.
public void removeDocument(String name)
throws NonExistentDocumentException,
XMLDBException
name - the name of the document.NonExistentDocumentException - if the document does not exist
in the collection.XMLDBException - if a database error occurs.
public void addIndex(SixdmlIndex index)
throws UnsupportedIndexTypeException,
IndexAlreadyExistsException,
XMLDBException
index - the index to addUnsupportedIndexTypeException - if the index is of a type unsupported
by the database.IndexAlreadyExistsException - if an index with the same name already exists
for the collection.XMLDBException - if a database error occurs.
public void removeIndex(String name)
throws NonExistentIndexException,
XMLDBException
index - the index to addXMLDBException - if a database error occurs.
public SixdmlIndex[] getIndices()
throws XMLDBException
XMLDBException - if a database error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||