public interface DocumentMetadataPatchBuilder
Modifier and Type | Interface and Description |
---|---|
static interface |
DocumentMetadataPatchBuilder.Call
A Call specifies how to apply a built-in or library function
when replacing an existing fragment.
|
static interface |
DocumentMetadataPatchBuilder.CallBuilder
A CallBuilder constructs a Call to a built-in or library function
to produce the replacement for an existing fragment.
|
static class |
DocumentMetadataPatchBuilder.Cardinality
The Cardinality enumeration indicates the number of times
that a path can match without error (which defaults to
ZERO_OR_MORE, meaning any number of matches).
|
static interface |
DocumentMetadataPatchBuilder.PatchHandle
A PatchHandle produced by the builder can produce a string
representation of the patch for saving, logging, or other uses.
|
Modifier and Type | Method and Description |
---|---|
DocumentMetadataPatchBuilder |
addCollection(String... collections)
Adds the specified collections.
|
DocumentMetadataPatchBuilder |
addPermission(String role,
DocumentMetadataHandle.Capability... capabilities)
Adds a role with the specified capabilities
|
DocumentMetadataPatchBuilder |
addPropertyValue(QName name,
Object value)
Adds a new metadata property with a namespaced name.
|
DocumentMetadataPatchBuilder |
addPropertyValue(String name,
Object value)
Adds a new metadata property with a simple name.
|
DocumentMetadataPatchBuilder.PatchHandle |
build()
Builds the patch that modifies the metadata or content of the
database document and provides a handle for sending the patch
to the server using the patch() method of the DocumentManager.
|
DocumentMetadataPatchBuilder.CallBuilder |
call()
A factory method for building calls to modify an existing node
by applying built-in functions or functions from a library.
|
DocumentMetadataPatchBuilder |
deleteCollection(String... collections)
Deletes the specified collections.
|
DocumentMetadataPatchBuilder |
deletePermission(String... roles)
Deletes the specified roles.
|
DocumentMetadataPatchBuilder |
deleteProperty(QName... names)
Deletes the specified metadata properties with namespaced names.
|
DocumentMetadataPatchBuilder |
deleteProperty(String... names)
Deletes the specified metadata properties with simple names.
|
IterableNamespaceContext |
getNamespaces()
Returns the namespaces available for the paths
of a patch against XML documents.
|
DocumentMetadataPatchBuilder |
library(String ns,
String at)
Specifies an XQuery library installed on the server
that supplies functions for modifying existing fragments.
|
DocumentMetadataPatchBuilder |
replaceCollection(String oldCollection,
String newCollection)
Replaces the specified collection.
|
DocumentMetadataPatchBuilder |
replacePermission(String role,
DocumentMetadataHandle.Capability... newCapabilities)
Replaces the existing capabilities of a role.
|
DocumentMetadataPatchBuilder |
replacePermission(String oldRole,
String newRole,
DocumentMetadataHandle.Capability... newCapabilities)
Replaces an existing role with a new role.
|
DocumentMetadataPatchBuilder |
replacePropertyApply(QName name,
DocumentMetadataPatchBuilder.Call call)
Specifies a replacement operation by applying a function
to a metadata property having a namespaced name.
|
DocumentMetadataPatchBuilder |
replacePropertyApply(String name,
DocumentMetadataPatchBuilder.Call call)
Specifies a replacement operation by applying a function
to a metadata property having a simple name.
|
DocumentMetadataPatchBuilder |
replacePropertyValue(QName name,
Object newValue)
Replaces the existing value of a metadata property having a namespaced name.
|
DocumentMetadataPatchBuilder |
replacePropertyValue(QName oldName,
QName newName,
Object newValue)
Replaces an existing metadata property with a new property having a namespaced name.
|
DocumentMetadataPatchBuilder |
replacePropertyValue(String name,
Object newValue)
Replaces the existing value of a metadata property having a simple name.
|
DocumentMetadataPatchBuilder |
replacePropertyValue(String oldName,
String newName,
Object newValue)
Replaces an existing metadata property with a new property having a simple name.
|
void |
setNamespaces(IterableNamespaceContext namespaces)
Declares the namespaces available for the paths
of a patch against XML documents.
|
DocumentMetadataPatchBuilder |
setQuality(int quality)
Sets the search quality of the document.
|
IterableNamespaceContext getNamespaces()
void setNamespaces(IterableNamespaceContext namespaces)
EditableNamespaceContext
class to edit a set of namespaces. Note that the
following prefixes are predefined for internal use:
rapi, prop, xsi, and xsnamespaces
- the declared namespacesDocumentMetadataPatchBuilder library(String ns, String at)
ns
- the XQuery library namespaceat
- the XQuery library path on the serverDocumentMetadataPatchBuilder addCollection(String... collections)
collections
- the collection identifiersDocumentMetadataPatchBuilder deleteCollection(String... collections)
collections
- the collection identifiersDocumentMetadataPatchBuilder replaceCollection(String oldCollection, String newCollection)
oldCollection
- the identifier for the existing collectionnewCollection
- the identifier for the new collectionDocumentMetadataPatchBuilder addPermission(String role, DocumentMetadataHandle.Capability... capabilities)
role
- the name of the rolecapabilities
- the set of capabilitiesDocumentMetadataPatchBuilder deletePermission(String... roles)
roles
- the names of the rolesDocumentMetadataPatchBuilder replacePermission(String role, DocumentMetadataHandle.Capability... newCapabilities)
role
- the name of the rolenewCapabilities
- the replacing set of capabilitiesDocumentMetadataPatchBuilder replacePermission(String oldRole, String newRole, DocumentMetadataHandle.Capability... newCapabilities)
oldRole
- the name of the replaced rolenewRole
- the name of the replacing rolenewCapabilities
- the capabilities of the replacing roleDocumentMetadataPatchBuilder addPropertyValue(String name, Object value)
name
- the name of the new propertyvalue
- the value of the new propertyDocumentMetadataPatchBuilder addPropertyValue(QName name, Object value)
name
- the namespaced name of the new propertyvalue
- the value of the new propertyDocumentMetadataPatchBuilder deleteProperty(String... names)
names
- the property namesDocumentMetadataPatchBuilder deleteProperty(QName... names)
names
- the namespaced property namesDocumentMetadataPatchBuilder replacePropertyValue(String name, Object newValue)
name
- the name of the existing propertynewValue
- the new value of the propertyDocumentMetadataPatchBuilder replacePropertyValue(QName name, Object newValue)
name
- the namespaced name of the existing propertynewValue
- the new value of the propertyDocumentMetadataPatchBuilder replacePropertyValue(String oldName, String newName, Object newValue)
oldName
- the name of the existing propertynewName
- the name of the replacing propertynewValue
- the value of the propertyDocumentMetadataPatchBuilder replacePropertyValue(QName oldName, QName newName, Object newValue)
oldName
- the namespaced name of the existing propertynewName
- the namespaced name of the replacing propertynewValue
- the value of the propertyDocumentMetadataPatchBuilder.CallBuilder call()
DocumentMetadataPatchBuilder replacePropertyApply(String name, DocumentMetadataPatchBuilder.Call call)
name
- the name of the existing propertycall
- the specification of the function callDocumentMetadataPatchBuilder replacePropertyApply(QName name, DocumentMetadataPatchBuilder.Call call)
name
- the name of the existing propertycall
- the specification of the function callDocumentMetadataPatchBuilder setQuality(int quality)
quality
- the new value for search qualityDocumentMetadataPatchBuilder.PatchHandle build() throws MarkLogicIOException
MarkLogicIOException
Copyright © 2013-2016 MarkLogic Corporation.