public class PAPIProcessableDocument extends java.lang.Object implements ProcessableDocument
ProcessableDocument.Operation
Constructor and Description |
---|
PAPIProcessableDocument(FleaProcessableDocument pdoc)
Build a new PAPIProcessableDocument
|
PAPIProcessableDocument(FleaProcessableDocument pdoc,
int did,
int slice)
Build a new PAPIProcessableDocument with its did/slice infos
|
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 document and returns it.
|
DocumentPart |
addPart(java.lang.String name,
byte[] content)
Create a new part inside document and returns it.
|
DocumentPart |
addPart(java.lang.String name,
java.nio.ByteBuffer content)
Create a new part inside document and returns it.
|
void |
clearCustomDirectives() |
void |
clearMetas() |
void |
clearParts() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getCustomDirectives()
Document-level directives
|
int |
getDid() |
long |
getEstimatedInputSize() |
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.
|
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.
|
int |
getSlice() |
java.lang.String |
getSource()
Get the source that generated this document
|
java.lang.String |
getStamp() |
FleaProcessableDocument |
getUnderlyingFleaProcessableDocument()
Get the underlying FleaProcessableDocument
|
java.lang.String |
getURI()
Get the URI of the Document.
|
boolean |
isUpdate() |
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 |
setDid(int did) |
void |
setProcessingFlag(ProcessableDocument.Operation op)
Set the global processing flag of the document.
|
void |
setSlice(int slice) |
void |
setStamp(java.lang.String stamp) |
void |
setUpdate(boolean update) |
void |
setURI(java.lang.String uri)
Set the URI of the underlying FleaProcessableDocument
|
public PAPIProcessableDocument(FleaProcessableDocument pdoc)
public PAPIProcessableDocument(FleaProcessableDocument pdoc, int did, int slice)
public FleaProcessableDocument getUnderlyingFleaProcessableDocument()
public void setURI(java.lang.String uri)
public boolean isUpdate()
public void setUpdate(boolean update)
public int getSlice()
public void setSlice(int slice)
public int getDid()
public void setDid(int did)
public java.lang.String getStamp()
public void setStamp(java.lang.String stamp)
public long getEstimatedInputSize()
public void addMeta(java.lang.String name, java.lang.String value)
ProcessableDocument
addMeta
in interface ProcessableDocument
public java.lang.Iterable<java.lang.String> getMetaValues(java.lang.String name)
ProcessableDocument
getMetaValues
in interface ProcessableDocument
public java.lang.String getFirstMetaValue(java.lang.String name)
ProcessableDocument
getFirstMetaValue
in interface ProcessableDocument
public java.lang.Iterable<? extends Meta> getMetas()
ProcessableDocument
getMetas
in interface ProcessableDocument
public java.lang.Iterable<? extends Meta> getMetas(java.lang.String name)
ProcessableDocument
getMetas
in interface ProcessableDocument
public java.lang.Iterable<? extends Meta> getMetas(java.lang.String[] names)
ProcessableDocument
getMetas
in interface ProcessableDocument
public java.lang.Iterable<? extends Meta> getMetas(java.util.Collection<java.lang.String> names)
ProcessableDocument
getMetas
in interface ProcessableDocument
public java.lang.Iterable<? extends DocumentPart> getParts()
ProcessableDocument
getParts
in interface ProcessableDocument
public java.lang.String getSource()
ProcessableDocument
getSource
in interface ProcessableDocument
public java.lang.String getURI()
ProcessableDocument
getURI
in interface ProcessableDocument
public void removeMetas(java.lang.String name)
ProcessableDocument
removeMetas
in interface ProcessableDocument
public void removeMetas(java.lang.String[] names)
ProcessableDocument
removeMetas
in interface ProcessableDocument
public void removeMetas(java.util.Collection<java.lang.String> names)
ProcessableDocument
removeMetas
in interface ProcessableDocument
public void removePart(java.lang.String name)
ProcessableDocument
removePart
in interface ProcessableDocument
public void clearMetas()
public void clearParts()
public int nbParts()
ProcessableDocument
nbParts
in interface ProcessableDocument
public void setProcessingFlag(ProcessableDocument.Operation op)
ProcessableDocument
setProcessingFlag
in interface ProcessableDocument
public ProcessableDocument.Operation getProcessingFlag()
ProcessableDocument
getProcessingFlag
in interface ProcessableDocument
public void addPart(DocumentPart part)
ProcessableDocument
addPart
in interface ProcessableDocument
public DocumentPart addPart(java.lang.String name)
ProcessableDocument
addPart
in interface ProcessableDocument
name
- the part's namepublic DocumentPart addPart(java.lang.String name, byte[] content)
ProcessableDocument
addPart
in interface ProcessableDocument
name
- the part's namecontent
- the part's contentpublic DocumentPart addPart(java.lang.String name, java.nio.ByteBuffer content)
ProcessableDocument
addPart
in interface ProcessableDocument
name
- the part namepublic java.util.Map<java.lang.String,java.util.List<java.lang.String>> getCustomDirectives()
ProcessableDocument
getCustomDirectives
in interface ProcessableDocument
public void addCustomDirective(java.lang.String key, java.lang.String value)
ProcessableDocument
addCustomDirective
in interface ProcessableDocument
public void removeCustomDirective(java.lang.String key)
ProcessableDocument
removeCustomDirective
in interface ProcessableDocument
public void clearCustomDirectives()
public DocumentPart getPart(java.lang.String name)
ProcessableDocument
getPart
in interface ProcessableDocument
Copyright © 2013 Dassault Systèmes, All Rights Reserved.