|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.xqj.marklogic.MarkLogicXQInsertOptions
public class MarkLogicXQInsertOptions
MarkLogic specific extensions to the XQJ2 XQInsertOptions
class.
This class is uesd to describe metadata about content when inserting into MarkLogic Server.
For instance when inserting a document, you may describe:
Use an instance of this class when using XQConnection2.insertItem(java.lang.String, javax.xml.xquery.XQItem, com.xqj2.XQInsertOptions)
.
Field Summary | |
---|---|
static int |
DOCUMENT_REPAIR_DEFAULT
|
static int |
DOCUMENT_REPAIR_FULL
|
static int |
DOCUMENT_REPAIR_NONE
|
Fields inherited from interface com.xqj2.XQInsertOptions |
---|
DEFAULT_ENCODING |
Constructor Summary | |
---|---|
MarkLogicXQInsertOptions()
Create a new instance of a MarkLogicXQInsertOptions . |
Method Summary | |
---|---|
String[] |
getCollections()
Gets the document collections for this MarkLogicXQInsertOptions instance. |
int |
getDocumentRepairLevel()
Gets the document repair level associated with this MarkLogicXQInsertOptions instance. |
String |
getEncoding()
Gets the document encoding for this MarkLogicXQInsertOptions instance. |
BigInteger[] |
getForestIds()
Gets the Forest ID keys associated with this MarkLogicXQInsertOptions instance. |
String |
getLanguage()
Gets the language associated with this MarkLogicXQInsertOptions instance. |
Locale |
getLocale()
Gets the Locale of this MarkLogicXQInsertOptions instance. |
String |
getNamespace()
Gets the namespace associated with this MarkLogicXQInsertOptions instance. |
Permission[] |
getPermissions()
Return document permissions currently in effect for this MarkLogicXQInsertOptions instance. |
int |
getQuality()
Gets the document quality value which is currently associated with this MarkLogicXQInsertOptions instance. |
Permission |
newExecutePermission(String role)
Creates a new "execute" Permission instance. |
Permission |
newInsertPermission(String role)
Creates a new "insert" Permission instance. |
Permission |
newReadPermission(String role)
Creates a new "read" Permission instance. |
Permission |
newUpdatePermission(String role)
Creates a new "update" Permission instance. |
void |
setCollections(String[] collections)
Sets the collection URIs associated with this MarkLogicXQInsertOptions instance. |
void |
setDocumentRepairLevel(int documentRepairLevel)
Sets the document repair level of this MarkLogicXQInsertOptions instance. |
void |
setEncoding(String encoding)
Sets the document encoding of this MarkLogicXQInsertOptions instance. |
void |
setForestIds(BigInteger[] forestIds)
Sets the Forest IDs associated with this MarkLogicXQInsertOptions instance. |
void |
setLanguage(String language)
Sets the language associated with this MarkLogicXQInsertOptions instance. |
void |
setLocale(Locale locale)
Sets the Locale for this MarkLogicXQInsertOptions instance. |
void |
setNamespace(String namespace)
Sets the namespace associated with this MarkLogicXQInsertOptions instance. |
void |
setPermissions(Permission[] permissions)
Sets the document permissions of this MarkLogicXQInsertOptions instance. |
void |
setQuality(int quality)
Sets the document quality value associated with this MarkLogicXQInsertOptions instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DOCUMENT_REPAIR_DEFAULT
public static final int DOCUMENT_REPAIR_FULL
public static final int DOCUMENT_REPAIR_NONE
Constructor Detail |
---|
public MarkLogicXQInsertOptions()
MarkLogicXQInsertOptions
.
Method Detail |
---|
public Permission[] getPermissions()
MarkLogicXQInsertOptions
instance.
Permission
objects, or null.public void setPermissions(Permission[] permissions)
MarkLogicXQInsertOptions
instance.
permissions
- an array of Permission
objects, null is allowed.public Permission newExecutePermission(String role)
Permission
instance.
role
- the role name of the "execute" Permission
instance.
Permission
instance.public Permission newInsertPermission(String role)
Permission
instance.
role
- the role name of the "insert" Permission
instance.
Permission
instance.public Permission newReadPermission(String role)
Permission
instance.
role
- the role name of the "read" Permission
instance.
Permission
instance.public Permission newUpdatePermission(String role)
Permission
instance.
role
- the role name of the "update" Permission
instance.
Permission
instance.public void setCollections(String[] collections)
Sets the collection URIs associated with this MarkLogicXQInsertOptions
instance.
If the collections
parameter is null
, documents will be added to the
current user's default collections.
For each collection passed that is protected, the user must have appropriate permissions to
update that collection or have the any-collection
privilege.
For each collection given that is unprotected, the user must have the unprotected-collections
privilege.
collections
- an array of String
items, null is allowed.public String[] getCollections()
MarkLogicXQInsertOptions
instance.
XQMarkLogicXQInsertOptions
instance, may be null.public void setEncoding(String encoding)
MarkLogicXQInsertOptions
instance.
setEncoding
in interface XQInsertOptions
encoding
- a String representing the encoding used by MarkLogicXQInsertOptions
instance.public String getEncoding()
MarkLogicXQInsertOptions
instance.
getEncoding
in interface XQInsertOptions
MarkLogicXQInsertOptions
instance.public Locale getLocale()
Locale
of this MarkLogicXQInsertOptions
instance.
Locale
instance currently used by this MarkLogicXQInsertOptions
instance.public void setLocale(Locale locale)
Locale
for this MarkLogicXQInsertOptions
instance.
locale
- an instance of Locale
.public String getNamespace()
Gets the namespace associated with this MarkLogicXQInsertOptions
instance.
May be null, which is the default namespace.
MarkLogicXQInsertOptions
instance.public void setNamespace(String namespace)
Sets the namespace associated with this MarkLogicXQInsertOptions
instance.
May be null, which is the default namespace.
namespace
- the namespace to associate with this MarkLogicXQInsertOptions
instance.public void setDocumentRepairLevel(int documentRepairLevel)
Sets the document repair level of this MarkLogicXQInsertOptions
instance.
value must be one of:
MarkLogicXQInsertOptions.DOCUMENT_REPAIR_DEFAULT
MarkLogicXQInsertOptions.DOCUMENT_REPAIR_FULL
MarkLogicXQInsertOptions.DOCUMENT_REPAIR_NONE
documentRepairLevel
- the document repair level to associate with this MarkLogicXQInsertOptions
instance.public int getDocumentRepairLevel()
MarkLogicXQInsertOptions
instance.
MarkLogicXQInsertOptions
instance.public BigInteger[] getForestIds()
MarkLogicXQInsertOptions
instance.
public void setForestIds(BigInteger[] forestIds)
Sets the Forest IDs associated with this MarkLogicXQInsertOptions
instance.
Inserted documents will be placed in any one of the given forest IDs.
If an inserted documents exists in the database and forestIds
is not specified,
the document will remain in its existing forest.
When inserting, if the given Forest IDs do not exist, i.e. they are not attached to the database, an XQException
will be thrown.
If a document exists and the forest in which it is stored is set to delete-only
, then you must pass forest ids to include one or more forests that allow updates.
forestIds
- an array of BigInteger
, which may be null, in which case there will be no forest preference.public int getQuality()
MarkLogicXQInsertOptions
instance.
MarkLogicXQInsertOptions
instance's document quality.public void setQuality(int quality)
MarkLogicXQInsertOptions
instance.
quality
- the document quality to associate with this MarkLogicXQInsertOptions
instance, default is 0.public String getLanguage()
MarkLogicXQInsertOptions
instance.
MarkLogicXQInsertOptions
instance.public void setLanguage(String language)
MarkLogicXQInsertOptions
instance.
language
- the language which will be associated with this MarkLogicXQInsertOptions
instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |