|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
SixdmlUpdateService.java This is a Service that enables the execution of updates within the context of a Collection or against the documents stored in the Collection. Created: Fri Jan 11 11:55:20 2002
| Method Summary | |
void |
addNamespaceMapping(String prefix,
String namespaceURI)
Add a mapping between a given prefix and a namespace to the service's internal namespace map. |
void |
clearNamespaceMappings()
Clear all namespace mappings in the service's internal namespace map. |
int |
delete(String query,
SixdmlCollection collection)
Deletes all nodes that match the expression from the target document. |
int |
delete(String query,
SixdmlResource resource)
Deletes all nodes that match the expression from the target document. |
int |
delete(String query,
String predicate,
SixdmlCollection collection)
Deletes all nodes that match the expression from the target document. |
String |
getNamespaceMapping(String prefix)
Obtain the namespace URI mapped to a particular prefix. |
int |
insertAttribute(String query,
SixdmlCollection collection,
String name,
String value)
Inserts an attribute node as a child of each of the nodes returned from the XPath query. |
int |
insertAttribute(String query,
SixdmlCollection collection,
String name,
String value,
String namespaceURI)
Inserts an attribute node as a child of each of the nodes returned from the XPath query. |
int |
insertAttribute(String query,
SixdmlResource resource,
String name,
String value)
Inserts an attribute node as a child of each of the nodes returned from the XPath query. |
int |
insertAttribute(String query,
SixdmlResource resource,
String name,
String value,
String namespaceURI)
Inserts an attribute node as a child of each of the nodes returned from the XPath query. |
int |
insertAttribute(String query,
String predicate,
SixdmlCollection collection,
String name,
String value)
Inserts an attribute node as a child of each of the nodes returned from the XPath query. |
int |
insertAttribute(String query,
String predicate,
SixdmlCollection collection,
String name,
String value,
String namespaceURI)
Inserts an attribute node as a child of each of the nodes returned from the XPath query. |
int |
insertChild(String query,
NodeList nodes,
SixdmlCollection collection)
Inserts a node as a child of each of the nodes returned from the XPath query. |
int |
insertChild(String query,
NodeList nodes,
SixdmlResource resource)
Inserts a node as a child of each of the nodes returned from the XPath query. |
int |
insertChild(String query,
String predicate,
NodeList nodes,
SixdmlCollection collection)
Inserts a node as a child of each of the nodes returned from the XPath query. |
int |
insertChild(String query,
String fragment,
SixdmlCollection collection)
Inserts an XML fragment as a child of each of the nodes returned from the XPath query. |
int |
insertChild(String query,
String fragment,
SixdmlResource resource)
Inserts an XML fragment as a child of each of the nodes returned from the XPath query. |
int |
insertChild(String query,
String predicate,
String fragment,
SixdmlCollection collection)
Inserts an XML fragment as a child of each of the nodes returned from the XPath query. |
int |
insertSibling(String query,
NodeList nodes,
SixdmlCollection collection,
boolean before)
Inserts a node as a sibling of each of the nodes returned from the XPath query. |
int |
insertSibling(String query,
NodeList nodes,
SixdmlResource resource,
boolean before)
Inserts a node as a sibling of each of the nodes returned from the XPath query. |
int |
insertSibling(String query,
String predicate,
NodeList nodes,
SixdmlCollection collection,
boolean before)
Inserts a node as a sibling of each of the nodes returned from the XPath query. |
int |
insertSibling(String query,
String fragment,
SixdmlCollection collection,
boolean before)
Inserts an XML fragment as a sibling of each of the nodes returned from the XPath query. |
int |
insertSibling(String query,
String fragment,
SixdmlResource resource,
boolean before)
Inserts an XML fragment as a sibling of each of the nodes returned from the XPath query. |
int |
insertSibling(String query,
String predicate,
String fragment,
SixdmlCollection collection,
boolean before)
Inserts an XML fragment as a sibling of each of the nodes returned from the XPath query. |
void |
removeNamespaceMapping(String prefix)
Remove a mapping between a given prefix and a namespace to the service's internal namespace map. |
int |
rename(String query,
String name,
String namespaceURI,
SixdmlCollection collection)
Renames one or more attribute or element nodes. |
int |
rename(String query,
String name,
String namespaceURI,
SixdmlResource resource)
Renames one or more attribute or element nodes. |
int |
rename(String query,
String predicate,
String name,
String namespaceURI,
SixdmlCollection collection)
Renames one or more attribute or element nodes. |
int |
replace(String query,
NodeList nodes,
SixdmlCollection collection)
Replaces one or more element, processing-instruction, comment, or text nodes with the new node. |
int |
replace(String query,
NodeList nodes,
SixdmlResource resource)
Replaces one or more element, processing-instruction, comment, or text nodes with the new node. |
int |
replace(String query,
String fragment,
SixdmlCollection collection)
Replaces one or more element, processing-instruction, comment, or text nodes with the new node. |
int |
replace(String query,
String fragment,
SixdmlResource resource)
Replaces one or more element, processing-instruction, comment, or text nodes with the new node. |
int |
replace(String query,
String predicate,
String fragment,
SixdmlCollection collection)
Replaces one or more element, processing-instruction, comment, or text nodes with the new node. |
void |
setNamespaceMap(SixdmlNamespaceMap nsMap)
Set the SixdmlNamespaceMap used by this class to map prefixes to namespace URIs used in XPath queries. |
| Methods inherited from interface org.xmldb.api.base.Service |
getName, getVersion, setCollection |
| Methods inherited from interface org.xmldb.api.base.Configurable |
getProperty, setProperty |
| Method Detail |
public void setNamespaceMap(SixdmlNamespaceMap nsMap)
throws XMLDBException
nsMap - the new namespace map to use.XMLDBException - if anything goes wrong.
public void addNamespaceMapping(String prefix,
String namespaceURI)
throws XMLDBException
prefix - key with which the specified namespace URI is associated.namespaceURI - value to be associated with the specified prefix.XMLDBException - if anything goes wrong.
public void removeNamespaceMapping(String prefix)
throws XMLDBException
prefix - key with which the specified namespace URI is associated.XMLDBException - if anything goes wrong.
public void clearNamespaceMappings()
throws XMLDBException
XMLDBException - if anything goes wrong.
public String getNamespaceMapping(String prefix)
throws XMLDBException
prefix - the prefix whose namespace is being sought.
public int insertSibling(String query,
String fragment,
SixdmlResource resource,
boolean before)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - The XML fragment to insertresource - the document to perform the update againstbefore - if this is true then the new node wil be inserted before each of the selected node
while if it is false the new node will be inserted after the selected nodes in the tree.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is the document root and an attempt is
made to insert anything besides comments or processing instructions.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int insertChild(String query,
String fragment,
SixdmlResource resource)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - The XML fragment to insertresource - the document to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node, document node
or set of element nodes.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int insertSibling(String query,
NodeList nodes,
SixdmlResource resource,
boolean before)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenodes - The DOM node(s) to insertresource - the document to perform the update againstbefore - if this is true then the new node wil be inserted before each of the selcted node
while if it is false the new node will be inserted after the selected nodes in the tree.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is the document root and an attempt is
made to insert anything besides comments or processing instructions.
public int insertChild(String query,
NodeList nodes,
SixdmlResource resource)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenodes - The DOM node(s) to insertresource - the document to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node, document node
or set of element nodes.
public int insertAttribute(String query,
SixdmlResource resource,
String name,
String value)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updateresource - the document to perform the update againstname - The name of the attribute to insert.value - the value of the attribute to insert.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node
or set of element nodes.
public int insertAttribute(String query,
SixdmlResource resource,
String name,
String value,
String namespaceURI)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updateresource - the document to perform the update againstname - The name of the attribute to insert. It should be an XML qualified name.value - the value of the attribute to insert.namespaceURI - the namsepace URI for the attribute nodeXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node
or set of element nodes.
public int delete(String query,
SixdmlResource resource)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to delete.resource - the document to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if no nodes matching the query are found.
public int replace(String query,
NodeList nodes,
SixdmlResource resource)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenodes - The DOM node(s) to insertresource - the document to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more comment, text,
processing-instruction, or element nodes.
public int replace(String query,
String fragment,
SixdmlResource resource)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - the XML fragment to insert.resource - the document to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more comment, text,
processing-instruction, or element nodes.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int rename(String query,
String name,
String namespaceURI,
SixdmlResource resource)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatename - The new namenamespaceURI - the namespace URI for the element being inserted. If it is null
then it is assumed the new item has no namespace URI.resource - the document to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more attribute or
element nodes.
public int insertSibling(String query,
String fragment,
SixdmlCollection collection,
boolean before)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - The XML fragment to insertcollection - the collection whose documents to perform the update againstbefore - if this is true then the new node wil be inserted before each of the selected node
while if it is false the new node will be inserted after the selected nodes in the tree.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is the document root and an attempt is
made to insert anything besides comments or processing instructions.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int insertChild(String query,
String fragment,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - The XML fragment to insertcollection - the collection whose documents to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node, document node
or set of element nodes.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int insertSibling(String query,
NodeList nodes,
SixdmlCollection collection,
boolean before)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenode - The DOM node(s) to insertcollection - the collection whose documents to perform the update againstbefore - if this is true then the new node wil be inserted before each of the selcted node
while if it is false the new node will be inserted after the selected nodes in the tree.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is the document root and an attempt is
made to insert anything besides comments or processing instructions.
public int insertChild(String query,
NodeList nodes,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenode - The DOM node(s) to insertcollection - the collection whose documents to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node, document node
or set of element nodes.
public int insertAttribute(String query,
SixdmlCollection collection,
String name,
String value)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatecollection - the collection whose documents to perform the update againstname - The name of the attribute to insert.value - the value of the attribute to insert.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node
or set of element nodes.
public int insertAttribute(String query,
SixdmlCollection collection,
String name,
String value,
String namespaceURI)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatecollection - the collection whose documents to perform the update againstname - The name of the attribute to insert. It should be an XML qualified name.value - the value of the attribute to insert.namespaceURI - the namsepace URI for the attribute nodeXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node
or set of element nodes.
public int delete(String query,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException
query - The query which selects the nodes to delete.collection - the collection whose documents to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.
public int replace(String query,
NodeList nodes,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenodes - The DOM node(s) to insertcollection - the collection whose documents to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more comment, text,
processing-instruction, or element nodes.
public int replace(String query,
String fragment,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - the XML fragment to insert.collection - the collection whose documents to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more comment, text,
processing-instruction, or element nodes.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int rename(String query,
String name,
String namespaceURI,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatename - The new namenamespaceURI - the namespace URI for the element being inserted. If it is null
then it is assumed the new item has no namespace URI.collection - the collection whose documents to perform the update againstXMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more attribute or
element nodes.
public int insertChild(String query,
String predicate,
String fragment,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - The XML fragment to insertcollection - the collection whose documents to perform the update againstpredicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node, document node
or set of element nodes.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int insertChild(String query,
String predicate,
NodeList nodes,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenodes - The DOM node(s) to insertcollection - the collection whose documents to perform the update againstpredicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node, document node
or set of element nodes.
public int insertSibling(String query,
String predicate,
NodeList nodes,
SixdmlCollection collection,
boolean before)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatenodes - The DOM node(s) to insertcollection - the collection whose documents to perform the update againstbefore - if this is true then the new node wil be inserted before each of the selcted node
while if it is false the new node will be inserted after the selected nodes in the tree.predicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is the document root and an attempt is
made to insert anything besides comments or processing instructions.
public int insertSibling(String query,
String predicate,
String fragment,
SixdmlCollection collection,
boolean before)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - The XML fragment to insertcollection - the collection whose documents to perform the update againstbefore - if this is true then the new node wil be inserted before each of the selected node
while if it is false the new node will be inserted after the selected nodes in the tree.predicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is the document root and an attempt is
made to insert anything besides comments or processing instructions.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int insertAttribute(String query,
String predicate,
SixdmlCollection collection,
String name,
String value)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatecollection - the collection whose documents to perform the update againstname - The name of the attribute to insert.value - the value of the attribute to insert.predicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node
or set of element nodes.
public int insertAttribute(String query,
String predicate,
SixdmlCollection collection,
String name,
String value,
String namespaceURI)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatecollection - the collection whose documents to perform the update againstname - The name of the attribute to insert. It should be an XML qualified name.value - the value of the attribute to insert.namespaceURI - the namsepace URI for the attribute nodepredicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not an element node
or set of element nodes.
public int delete(String query,
String predicate,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException
query - The query which selects the nodes to delete.collection - the collection whose documents to perform the update againstpredicate - a filter expression used to determine which documents to update within the collection.
public int replace(String query,
String predicate,
String fragment,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
NonWellFormedXMLException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatefragment - the XML fragment to insert.collection - the collection whose documents to perform the update againstpredicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more comment, text,
processing-instruction, or element nodes.NonWellFormedXMLException - if the XML fragment is not a valid XML fragment.
public int rename(String query,
String predicate,
String name,
String namespaceURI,
SixdmlCollection collection)
throws XMLDBException,
InvalidQueryException,
UpdateTypeMismatchException
query - The query which selects the nodes to updatename - The new namenamespaceURI - the namespace URI for the element being inserted. If it is null
then it is assumed the new item has no namespace URI.collection - the collection whose documents to perform the update againstpredicate - a filter expression used to determine which documents to update within the collection.XMLDBException - if a database error occurs during the insertion.InvalidQueryException - if the XPath query is invalid.UpdateTypeMismatchException - if the target node is not one or more comment, text,
processing-instruction, or element nodes.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||