public class FleaProcessableDocument extends java.lang.Object implements ProcessableDocument, com.exalead.flea.FleaMessage
ProcessableDocument.Operation
Constructor and Description |
---|
FleaProcessableDocument() |
FleaProcessableDocument(Document document) |
FleaProcessableDocument(ProcessableDocument pdoc) |
FleaProcessableDocument(java.lang.String source,
java.lang.String uri) |
FleaProcessableDocument(java.lang.String source,
java.lang.String uri,
java.lang.String stamp) |
Modifier and Type | Method and Description |
---|---|
void |
addCustomDirective(java.lang.String key,
java.lang.String value)
Add a custom document-level directive
|
void |
addMeta(java.lang.String name,
java.lang.String value)
Add a new meta for the document.
|
void |
addPart(DocumentPart part)
Add a part.
|
DocumentPart |
addPart(java.lang.String name)
Create a new part inside the document and returns it.
|
DocumentPart |
addPart(java.lang.String name,
byte[] content)
Create a new part inside the document and returns it.
|
DocumentPart |
addPart(java.lang.String name,
java.nio.ByteBuffer content)
Create a new part inside the document and returns it.
|
void |
clearCustomDirectives() |
void |
clearMetas() |
void |
clearParts() |
void |
fleaDeserialize(byte[] data) |
void |
fleaDeserialize(com.exalead.flea.FleaInputStream fis) |
byte[] |
fleaSerialize() |
void |
fleaSerialize(com.exalead.flea.FleaOutputStream fos) |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getCustomDirectives()
Document-level directives
|
java.lang.String |
getFirstMetaValue(java.lang.String name)
Get the first value for the metas with a given name.
|
java.lang.Iterable<? extends Meta> |
getMetas()
Get all metas of this document.
|
java.lang.Iterable<? extends Meta> |
getMetas(java.util.Collection<java.lang.String> names)
Get the metas of this document with one of the given names.
|
java.lang.Iterable<? extends Meta> |
getMetas(java.lang.String name)
Get the metas of this document with a given name.
|
java.lang.Iterable<? extends Meta> |
getMetas(java.lang.String[] names)
Get the metas of this document with one of the given names.
|
java.lang.Iterable<java.lang.String> |
getMetaValues(java.lang.String name)
Get the values for the metas with a given name.
|
static FleaProcessableDocument |
getOrCreateFrom(ProcessableDocument pdoc) |
DocumentPart |
getPart(java.lang.String name)
Get the Binary Part with the given name.
|
java.lang.Iterable<? extends DocumentPart> |
getParts()
Get the Binary Parts associated to the document.
|
ProcessableDocument.Operation |
getProcessingFlag()
Get the global processing flag of the document.
|
java.lang.String |
getSource()
Get the source that generated this document
|
java.lang.String |
getStamp() |
java.lang.String |
getURI()
Get the URI of the Document.
|
int |
nbParts()
Get the number of parts
|
void |
removeCustomDirective(java.lang.String key)
Remove all custom document-level directives associated to this key
|
void |
removeMetas(java.util.Collection<java.lang.String> names)
Remove all metas with one of the given name.
|
void |
removeMetas(java.lang.String name)
Remove all metas with a given name.
|
void |
removeMetas(java.lang.String[] names)
Remove all metas with one of the given name.
|
void |
removePart(java.lang.String name)
Remove the part from the document.
|
void |
setProcessingFlag(ProcessableDocument.Operation op)
Set the global processing flag of the document.
|
void |
setSource(java.lang.String value) |
void |
setStamp(java.lang.String stamp) |
void |
setURI(java.lang.String value) |
java.lang.String |
toString() |
public FleaProcessableDocument()
public FleaProcessableDocument(ProcessableDocument pdoc)
public FleaProcessableDocument(Document document)
public FleaProcessableDocument(java.lang.String source, java.lang.String uri)
public FleaProcessableDocument(java.lang.String source, java.lang.String uri, java.lang.String stamp)
public static FleaProcessableDocument getOrCreateFrom(ProcessableDocument pdoc)
public java.lang.String getURI()
getURI
in interface ProcessableDocument
public void setURI(java.lang.String value)
public java.lang.String getStamp()
public void setStamp(java.lang.String stamp)
public java.lang.String getSource()
getSource
in interface ProcessableDocument
public void setSource(java.lang.String value)
public java.lang.Iterable<? extends Meta> getMetas()
getMetas
in interface ProcessableDocument
public java.lang.Iterable<? extends Meta> getMetas(java.lang.String name)
getMetas
in interface ProcessableDocument
public java.lang.Iterable<? extends Meta> getMetas(java.lang.String[] names)
getMetas
in interface ProcessableDocument
public java.lang.Iterable<? extends Meta> getMetas(java.util.Collection<java.lang.String> names)
getMetas
in interface ProcessableDocument
public java.lang.Iterable<java.lang.String> getMetaValues(java.lang.String name)
getMetaValues
in interface ProcessableDocument
public java.lang.String getFirstMetaValue(java.lang.String name)
ProcessableDocument
getFirstMetaValue
in interface ProcessableDocument
public void removeMetas(java.lang.String name)
removeMetas
in interface ProcessableDocument
public void removeMetas(java.lang.String[] names)
removeMetas
in interface ProcessableDocument
public void removeMetas(java.util.Collection<java.lang.String> names)
removeMetas
in interface ProcessableDocument
public void clearMetas()
public void addMeta(java.lang.String name, java.lang.String value)
addMeta
in interface ProcessableDocument
public java.lang.Iterable<? extends DocumentPart> getParts()
getParts
in interface ProcessableDocument
public DocumentPart getPart(java.lang.String name)
getPart
in interface ProcessableDocument
public int nbParts()
nbParts
in interface ProcessableDocument
public void removePart(java.lang.String name)
removePart
in interface ProcessableDocument
public void clearParts()
public void addPart(DocumentPart part) throws java.lang.IllegalArgumentException
addPart
in interface ProcessableDocument
java.lang.IllegalArgumentException
- a part with the same name already existspublic DocumentPart addPart(java.lang.String name) throws java.lang.IllegalArgumentException
addPart
in interface ProcessableDocument
name
- the part's namejava.lang.IllegalArgumentException
- a part with the same name already existspublic DocumentPart addPart(java.lang.String name, byte[] content) throws java.lang.IllegalArgumentException
addPart
in interface ProcessableDocument
name
- the part's namecontent
- the part's contentjava.lang.IllegalArgumentException
- a part with the same name already existspublic DocumentPart addPart(java.lang.String name, java.nio.ByteBuffer content) throws java.lang.IllegalArgumentException
addPart
in interface ProcessableDocument
name
- the part namejava.lang.IllegalArgumentException
- a part with the same name already existspublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getCustomDirectives()
getCustomDirectives
in interface ProcessableDocument
public void addCustomDirective(java.lang.String key, java.lang.String value)
addCustomDirective
in interface ProcessableDocument
public void removeCustomDirective(java.lang.String key)
removeCustomDirective
in interface ProcessableDocument
public void clearCustomDirectives()
public void setProcessingFlag(ProcessableDocument.Operation op)
setProcessingFlag
in interface ProcessableDocument
public ProcessableDocument.Operation getProcessingFlag()
getProcessingFlag
in interface ProcessableDocument
public void fleaDeserialize(com.exalead.flea.FleaInputStream fis) throws java.io.IOException
fleaDeserialize
in interface com.exalead.flea.FleaMessage
java.io.IOException
public void fleaDeserialize(byte[] data) throws java.io.IOException
fleaDeserialize
in interface com.exalead.flea.FleaMessage
java.io.IOException
public void fleaSerialize(com.exalead.flea.FleaOutputStream fos) throws java.io.IOException
fleaSerialize
in interface com.exalead.flea.FleaMessage
java.io.IOException
public byte[] fleaSerialize() throws java.io.IOException
fleaSerialize
in interface com.exalead.flea.FleaMessage
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2013 Dassault Systèmes, All Rights Reserved.