public class Document extends java.lang.Object implements java.io.Serializable, IDocument
PushAPI
).Modifier and Type | Class and Description |
---|---|
static class |
Document.DidAndSlice
Internal identifier of a document in the CloudView system.
|
Modifier and Type | Field and Description |
---|---|
protected KeyValuesContainer<java.lang.String,java.lang.String> |
directives
Document directives.
|
protected static java.lang.String |
FORCED_DID_NAME |
protected static java.lang.String |
FORCED_SLICE_NAME |
protected MetaContainer |
metaContainer
Document meta data.
|
protected PartContainer |
partContainer
Document parts.
|
protected java.lang.String |
stamp
Document stamp.
|
protected java.lang.String |
uri
Unique identifier of the document.
|
Constructor and Description |
---|
Document(java.lang.String uri)
Document constructor specifying the document unique identifier
|
Document(java.lang.String uri,
java.lang.String stamp)
Document constructor specifying the document unique identifier and the
document stamp.
|
Document(java.lang.String uri,
java.lang.String stamp,
PartContainer partContainer,
MetaContainer metaContainer)
Document constructor specifying the whole document content.
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomDirective(java.lang.String key,
java.lang.String value)
Adds a new custom directive.
|
void |
addMeta(Meta meta)
Adds a new meta data to this document.
|
void |
addMeta(java.lang.String name,
java.lang.String value)
Add a new meta to this document.
|
void |
addPart(Part part)
Adds a new part to this document.
|
void |
deleteCustomDirectives()
Delete all custom directives of this document.
|
void |
deleteMeta(java.lang.String name)
Delete all the Meta that match the given meta data name.
|
void |
deleteMetas()
Delete all metas of this document.
|
void |
deletePart(java.lang.String name)
Delete all the Part that match the given part name.
|
void |
deleteParts()
Delete all the part of this document.
|
KeyValuesContainer<java.lang.String,java.lang.String> |
getDirectiveContainer()
Gets the directives container associated with this document.
|
java.lang.String |
getForcedDid()
Gets the value of the forcedDid directive.
|
java.lang.String |
getForcedSlice()
Gets the value of the forcedSlice directive.
|
MetaContainer |
getMetaContainer()
Gets the meta container associated with this document.
|
PartContainer |
getPartContainer()
Gets the part container associated with this document.
|
java.lang.String |
getStamp()
Gets the document stamp.
|
java.lang.String |
getUri()
Gets the document unique identifier.
|
void |
setCustomDirective(java.lang.String key,
java.lang.String value)
Set the value of a custom directive.
|
void |
setCustomDirectives(java.lang.String key,
java.util.List<java.lang.String> values)
Sets the set of values of a custom directive.
|
void |
setForcedDid(java.lang.String value)
Sets the value of the forcedDid directive.
|
void |
setForcedSlice(java.lang.String value)
Sets the value of the forcedSlice directive.
|
void |
setStamp(java.lang.String stamp)
Sets the document stamp.
|
void |
setUri(java.lang.String uri)
Sets the unique identifier of the document.
|
java.lang.String |
toString()
Simple document serializer.
|
protected java.lang.String uri
protected java.lang.String stamp
protected PartContainer partContainer
protected MetaContainer metaContainer
protected KeyValuesContainer<java.lang.String,java.lang.String> directives
protected static final java.lang.String FORCED_DID_NAME
protected static final java.lang.String FORCED_SLICE_NAME
public Document(java.lang.String uri, java.lang.String stamp, PartContainer partContainer, MetaContainer metaContainer) throws PushAPIException
uri
- the unique identifier of the document.stamp
- the stamp of the document.partContainer
- the container of parts of the document - cannot be null.metaContainer
- the container of meta data of the document - cannot be null.PushAPIException
- if one of uri, stamp, partContainer, or
metaContainer is null.public Document(java.lang.String uri, java.lang.String stamp)
uri
- the unique identifier of the document.stamp
- the stamp of the document.public Document(java.lang.String uri)
uri
- the unique identifier of the document.public void addMeta(Meta meta)
public void addMeta(java.lang.String name, java.lang.String value)
public void deleteMeta(java.lang.String name)
deleteMeta
in interface IDocument
name
- the meta data name to delete.public void addPart(Part part)
public void deletePart(java.lang.String name)
deletePart
in interface IDocument
name
- the part name to delete.public java.lang.String getStamp()
PushAPI
for more
information on how to retrieve indexed stamps).public void setStamp(java.lang.String stamp)
public java.lang.String getUri()
PushAPI
for more
information on how to use the hierarchical organization of indexed
documents.).public void setUri(java.lang.String uri)
public java.lang.String getForcedDid()
getForcedDid
in interface IDocument
public void setForcedDid(java.lang.String value)
setForcedDid
in interface IDocument
value
- the internal document identifier to be used (32 bits integer)public java.lang.String getForcedSlice()
getForcedSlice
in interface IDocument
public void setForcedSlice(java.lang.String value)
setForcedSlice
in interface IDocument
value
- the slice number to be used (32 bits integer).public void addCustomDirective(java.lang.String key, java.lang.String value)
addCustomDirective
in interface IDocument
key
- the directive name.value
- the directive value.public void setCustomDirective(java.lang.String key, java.lang.String value)
setCustomDirective
in interface IDocument
key
- the directive name.value
- the directive value.public void setCustomDirectives(java.lang.String key, java.util.List<java.lang.String> values)
setCustomDirectives
in interface IDocument
key
- the directive name.values
- the directive values.public PartContainer getPartContainer()
getPartContainer
in interface IDocument
public MetaContainer getMetaContainer()
getMetaContainer
in interface IDocument
public KeyValuesContainer<java.lang.String,java.lang.String> getDirectiveContainer()
getDirectiveContainer
in interface IDocument
public void deleteMetas()
IDocument
deleteMetas
in interface IDocument
public void deleteParts()
IDocument
deleteParts
in interface IDocument
public void deleteCustomDirectives()
IDocument
deleteCustomDirectives
in interface IDocument
Copyright © 2013 Dassault Systèmes, All Rights Reserved.