Skip navigation links

Oracle® Fusion Middleware Oracle Imaging and Process Management Java API Reference
11g Release 1 (11.1.1)

E12853-02


oracle.imaging
Class Input.Mappings

java.lang.Object
  extended by oracle.imaging.Input.Mappings

Enclosing class:
Input

public static class Input.Mappings
extends java.lang.Object

Defines the Input.FieldMapings for one or an Application's primary index, and provides the NameIdof the Applicationproviding 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 Inputis added via InputService#addInputDefinition(Input), these input primaryMappings are verified in the following ways:


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.FieldMapto the currently-set primaryMappings.
 NameId getApplication()
          Retrieves the NameIdof the Application from which the source fields for all IndexMappingsmust 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.FieldMapings have been set.
protected  void prePersist()
           
 void setApplication(NameId application)
          Sets the NameIdof 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.FieldMaps 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

Input.Mappings

public Input.Mappings()
Constructs a new InputMappings without specifying the source Application or any Input.FieldMap.

Input.Mappings

public Input.Mappings(NameId application)
Constructs a new InputMappings which draws its source fields from the specified Application.
Parameters:
application - the name, ID or both an application

Input.Mappings

public 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.
Parameters:
application - the name, ID or both of an application
mappings - 1 or more Field Mappings derived from the provided application

Input.Mappings

public 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.
Parameters:
application - the name, ID or both of an application
mappings - 1 or more primaryMappings derived from the provided application
documentFileSource - The input stream location of where the document file is located

Method Detail

prePersist

protected void prePersist()

addPrimaryMapping

public void addPrimaryMapping(Input.FieldMap mapping)
                       throws ImagingException
Appends the provided Input.FieldMapto 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.

Parameters:
mapping - a new FieldMap to add to the current primaryMappings
Throws:
ImagingException

getApplication

public NameId getApplication()
Retrieves the NameIdof the Application from which the source fields for all IndexMappingsmust be drawn.
Returns:
the name, ID, or both, of an application

getPrimaryMappings

public java.util.List<Input.FieldMap> getPrimaryMappings()
Retrieves the currently-set IndexMappings, or null if none have been set.
Returns:
the current primaryMappings, or null

isEmpty

public boolean isEmpty()
Retrieves a flag indicating whether any Input.FieldMapings have been set.
Returns:
true if Input.getMappings() is null or an empty array

setApplication

public void setApplication(NameId application)
Sets the NameIdof 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.
Parameters:
application - the name, ID, or both, of an application

setPrimaryMappings

public void setPrimaryMappings(java.util.List<Input.FieldMap> mappings)
Sets the provided Input.FieldMaps 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.

Parameters:
mappings - the new primaryMappings

hasPrimaryMapping

public boolean hasPrimaryMapping(java.lang.String inputSection)
Checks to see if the given input section is mapped to an Application Field in the primary index.
Parameters:
inputSection - The input field of the map to look for
Returns:
true if the mapping exists in the map set; otherwise, false.

getMapping

public Input.FieldMap getMapping(int index)
                          throws java.lang.ArrayIndexOutOfBoundsException
Retrieves the Input.FieldMap at the provided index within the primary index.
Parameters:
index - the array index of the desired index-specific primaryMappings
Returns:
the fieldMap at the requested index
Throws:
java.lang.ArrayIndexOutOfBoundsException - Thrown if no primaryMappings have been set, or if the specified index is not valid.

getMapping

public Input.FieldMap getMapping(java.lang.String inputSection)
                          throws ImagingException
Fetches the Input.FieldMap class in the primary index for the specified Input Section.
Parameters:
inputSection - The Input Section to search the maps for.
Returns:
The FieldMap class that matches the given Input Section.
Throws:
ImagingException - If no mapping could be found.

getMappingIfExists

public Input.FieldMap getMappingIfExists(java.lang.String inputSection)
Fetches the Input.FieldMap class in the primary index for the specified Input Section.
Parameters:
inputSection - The Input Section to search the maps for.
Returns:
The FieldMap class that matches the given Input Section or null if it cannot be found

getMapping

public Input.FieldMap getMapping(Application.FieldDefinition appField)
                          throws ImagingException
Fetches the Input.FieldMap class in the primary index for the specified Application Field Definition.
Parameters:
appField - The Application field to search for
Returns:
The FieldMap class that matches the given Input Section.
Throws:
ImagingException - If no mapping could be found.

getMappingIfExists

public Input.FieldMap getMappingIfExists(Application.FieldDefinition appField)
Fetches the Input.FieldMap class in the primary index for the specified Application Field Definition.
Parameters:
appField - The Application field to search for
Returns:
The FieldMap class that matches the given Input Section or null if it cannot be found.

size

public int size()
Retrieves a count of the currently-set primaryMappings, if any.
Returns:
the number of primaryMappings currently set, or 0 if no primaryMappings have been set

setFileInputSection

public void setFileInputSection(java.lang.String sourceInputSection)
Sets the location of where where to find the document file in the input data stream.
Parameters:
sourceInputSection - The location of the document file in the Input Source.

getFileInputSection

public java.lang.String getFileInputSection()
Retrieves the input stream section that conatins the document file source.
Returns:
The document file source mapping.

Skip navigation links

Oracle® Fusion Middleware Oracle Imaging and Process Management Java API Reference
11g Release 1 (11.1.1)

E12853-02


Copyright © 2010, Oracle and/or its affiliates. All rights reserved.