|
Oracle® Imaging and Process Management Java API Reference 11g Release 1 (11.1.1) E12853-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.imaging.Input.Mappings
public static class Input.Mappings
Defines the Input.FieldMap
ings for one or an Application's primary index, and provides the NameId
of the Application
providing the source fields used. When a document is added via the InputService
, these primaryMappings are used to load index data from the document into any targetItemId indexes which have been defined.
There are three system sections in the mappings to store where to look for information about the document in the input stream. The sections are the document file path, the document's locale and the document's character set. Setting these values provides more information specifies where the document is and provides more information about the document.
When an Input
is added via InputService#addInputDefinition(Input)
, these input primaryMappings are verified in the following ways:
getApplication()
value is tested to ensure the referenced Application exists.Input.getMappings()
is tested to ensure that mappings for at least one field have been provided.IndexMappings
.Constructor Summary | |
---|---|
Input.Mappings() Constructs a new InputMappings without specifying the source Application or any Input.FieldMap . |
|
Input.Mappings(NameId application) Constructs a new InputMappings which draws its source fields from the specified Application . |
|
Input.Mappings(NameId application, java.util.List<Input.FieldMap> mappings) Constructs a new InputMappings containing the provided primaryMappings, which are all expected to have source fields drawn from the specified Application . |
|
Input.Mappings(NameId application, java.util.List<Input.FieldMap> mappings, java.lang.String documentFileSource) Constructs a new InputMappings containing the provided primaryMappings, which are all expected to have source fields drawn from the specified Application . |
Method Summary | |
---|---|
void |
addPrimaryMapping(Input.FieldMap mapping) Appends the provided Input.FieldMap to the currently-set primaryMappings. |
NameId |
getApplication() Retrieves the NameId of the Application from which the source fields for all IndexMappings must be drawn. |
java.lang.String |
getFileInputSection() Retrieves the input stream section that conatins the document file source. |
Input.FieldMap |
getMapping(Application.FieldDefinition appField) Fetches the Input.FieldMap class in the primary index for the specified Application Field Definition. |
Input.FieldMap |
getMapping(int index) Retrieves the Input.FieldMap at the provided index within the primary index. |
Input.FieldMap |
getMapping(java.lang.String inputSection) Fetches the Input.FieldMap class in the primary index for the specified Input Section. |
Input.FieldMap |
getMappingIfExists(Application.FieldDefinition appField) Fetches the Input.FieldMap class in the primary index for the specified Application Field Definition. |
Input.FieldMap |
getMappingIfExists(java.lang.String inputSection) Fetches the Input.FieldMap class in the primary index for the specified Input Section. |
java.util.List<Input.FieldMap> |
getPrimaryMappings() Retrieves the currently-set IndexMappings , or null if none have been set. |
boolean |
hasPrimaryMapping(java.lang.String inputSection) Checks to see if the given input section is mapped to an Application Field in the primary index. |
boolean |
isEmpty() Retrieves a flag indicating whether any Input.FieldMap ings have been set. |
protected void |
prePersist() |
void |
setApplication(NameId application) Sets the NameId of the Application from which all of the source fields used by all of the applicationFields in the set of mappings. |
void |
setFileInputSection(java.lang.String sourceInputSection) Sets the location of where where to find the document file in the input data stream. |
void |
setPrimaryMappings(java.util.List<Input.FieldMap> mappings) Sets the provided Input.FieldMap s as the current primaryMappings for this application, replacing any previously-set primaryMappings. |
int |
size() Retrieves a count of the currently-set primaryMappings, if any. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Input.Mappings()
Application
or any Input.FieldMap
.public Input.Mappings(NameId application)
Application
.
application
- the name, ID or both an applicationpublic Input.Mappings(NameId application, java.util.List<Input.FieldMap> mappings)
Application
.
application
- the name, ID or both of an applicationmappings
- 1 or more Field Mappings derived from the provided applicationpublic Input.Mappings(NameId application, java.util.List<Input.FieldMap> mappings, java.lang.String documentFileSource)
Application
.
application
- the name, ID or both of an applicationmappings
- 1 or more primaryMappings derived from the provided applicationdocumentFileSource
- The input stream location of where the document file is locatedMethod Detail |
---|
protected void prePersist()
public void addPrimaryMapping(Input.FieldMap mapping) throws ImagingException
Input.FieldMap
to the currently-set primaryMappings. If no primaryMappings have been set, then the primaryMappings are created with the provided mapping being the only element in the set.
If the provided map is null
, has a missing application field guid or name or the Input Section is empty then an exception is thrown. However, no testing is performed to ensure that the provided mapping doesn't overlap another mapping. It is left to the calling code to ensure that all of the new primaryMappings truly are new.
If any current primaryMappings should be replaced with the provided primaryMappings, you should call #setMappings(List<FieldMap>)
instead.
mapping
- a new FieldMap to add to the current primaryMappingsImagingException
public NameId getApplication()
NameId
of the Application
from which the source fields for all IndexMappings
must be drawn.public java.util.List<Input.FieldMap> getPrimaryMappings()
IndexMappings
, or null
if none have been set.null
public boolean isEmpty()
Input.FieldMap
ings have been set.true
if Input.getMappings()
is null
or an empty arraypublic void setApplication(NameId application)
NameId
of the Application
from which all of the source fields used by all of the applicationFields in the set of mappings. This value may not be null
.application
- the name, ID, or both, of an applicationpublic void setPrimaryMappings(java.util.List<Input.FieldMap> mappings)
Input.FieldMap
s as the current primaryMappings for this application, replacing any previously-set primaryMappings.
If any existing primaryMappings should be retained, with the new primaryMappings appended, you should call Input.Mappings#addPrimaryMapping(java.util.List<oracle.imaging.Input.FieldMap>)
instead.
mappings
- the new primaryMappingspublic boolean hasPrimaryMapping(java.lang.String inputSection)
inputSection
- The input field of the map to look fortrue
if the mapping exists in the map set; otherwise, false.public Input.FieldMap getMapping(int index) throws java.lang.ArrayIndexOutOfBoundsException
Input.FieldMap
at the provided index within the primary index.index
- the array index of the desired index-specific primaryMappingsjava.lang.ArrayIndexOutOfBoundsException
- Thrown if no primaryMappings have been set, or if the specified index is not valid.public Input.FieldMap getMapping(java.lang.String inputSection) throws ImagingException
Input.FieldMap
class in the primary index for the specified Input Section.inputSection
- The Input Section to search the maps for.ImagingException
- If no mapping could be found.public Input.FieldMap getMappingIfExists(java.lang.String inputSection)
Input.FieldMap
class in the primary index for the specified Input Section.inputSection
- The Input Section to search the maps for.public Input.FieldMap getMapping(Application.FieldDefinition appField) throws ImagingException
Input.FieldMap
class in the primary index for the specified Application Field Definition.appField
- The Application field to search forImagingException
- If no mapping could be found.public Input.FieldMap getMappingIfExists(Application.FieldDefinition appField)
Input.FieldMap
class in the primary index for the specified Application Field Definition.appField
- The Application field to search forpublic int size()
0
if no primaryMappings have been setpublic void setFileInputSection(java.lang.String sourceInputSection)
sourceInputSection
- The location of the document file in the Input Source.public java.lang.String getFileInputSection()
|
Oracle® Imaging and Process Management Java API Reference 11g Release 1 (11.1.1) E12853-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |