|
2.8.0: 2008-09-08 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.basedb.core.plugin.AbstractPlugin
net.sf.basedb.plugins.AbstractFlatFileImporter
net.sf.basedb.plugins.batchimport.AbstractItemImporter<I>
public abstract class AbstractItemImporter<I extends BasicItem>
An abstract base class for plug-ins that import items in batch. This class implements job configuration, file parsing, logging, error handling, etc. Actual implementations have to provide item-specific parts, such as:
InteractivePlugin.getGuiContexts()
method.
getIdMethods()
addMoreColumnMappingParameters(List)
createItemQuery()
createColumnMappers(FlatFileParser, boolean)
createItem(DbControl, FlatFileParser.Data)
updateItem(DbControl, BasicItem, FlatFileParser.Data)
and updateMultiLineItem(DbControl, BasicItem, FlatFileParser.Data, int)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
Plugin.MainType |
Fields inherited from class net.sf.basedb.core.plugin.AbstractPlugin |
---|
annotationSection, configuration, COPY_ANNOTATIONS, job, OVERWRITE_ANNOTATIONS, sc |
Constructor Summary | |
---|---|
AbstractItemImporter()
|
Method Summary | ||
---|---|---|
protected void |
addMoreColumnMappingParameters(List<PluginParameter<?>> parameters)
Add column mapping parameters for item-specific properties. |
|
protected void |
addMoreErrorParameters(List<PluginParameter<?>> parameters)
Add extra parameters to the "Error handling" section that the subclass needs. |
|
protected void |
addMoreJobParameters(List<PluginParameter<?>> parameters)
Add extra job parameters that the subclass needs. |
|
protected void |
addMoreParsingParameters(List<PluginParameter<?>> parameters)
Add extra parameters to the "Parser settings" section that the subclass needs. |
|
protected void |
begin(FlatFileParser ffp)
Setup error handling and pre-load some of the configuration options. |
|
protected void |
beginData()
Setup column mapping. |
|
void |
configure(GuiContext context,
Request request,
Response response)
Configure the plugin. |
|
protected void |
createColumnMappers(FlatFileParser ffp,
boolean cropStrings)
Create mappers that can be used to extract data values from the file that is currently being parsed by the ffp FlatFileParser . |
|
protected abstract I |
createItem(DbControl dc,
FlatFileParser.Data data)
Create a new item and populate it with data from the current line. |
|
protected abstract ItemQuery<I> |
createItemQuery()
Create a new query that returns items of the importable type. |
|
protected void |
doneWithItem(DbControl dc,
I item,
int numMultiLines)
Called when the importer is finished with an item. |
|
protected void |
end(boolean success)
Called just after the last line of the file has been parsed, or immediately after an error has ocurred. |
|
protected ArrayBatch |
findArrayBatch(DbControl dc,
IdMethod idMethod,
String identifier)
Find an array batch with a given identifier. |
|
protected ArrayDesign |
findArrayDesign(DbControl dc,
IdMethod idMethod,
String identifier)
Find an array design with a given identifier. |
|
protected ArraySlide |
findArraySlide(DbControl dc,
IdMethod idMethod,
String identifier)
Find an array slide with a given identifier. |
|
protected BioSource |
findBioSource(DbControl dc,
IdMethod idMethod,
String identifier)
Find a biosource with a given identifier. |
|
protected DataFileType |
findDataFileType(DbControl dc,
IdMethod idMethod,
String identifier)
Find a data file type with a given identifier. |
|
protected Extract |
findExtract(DbControl dc,
IdMethod idMethod,
String identifier)
Find an extract with a given identifier. |
|
protected Software |
findFeatureExtractionSoftware(DbControl dc,
IdMethod idMethod,
String identifier)
Find a feature extraction software with a given identifier. |
|
protected Hybridization |
findHybridization(DbControl dc,
IdMethod idMethod,
String identifier)
Find a hybridization with a given identifier. |
|
protected Hardware |
findHybridizationStation(DbControl dc,
IdMethod idMethod,
String identifier)
Find a hybridization station with a given identifier. |
|
protected Label |
findLabel(DbControl dc,
IdMethod idMethod,
String identifier)
Find a label with a given identifier. |
|
protected LabeledExtract |
findLabeledExtract(DbControl dc,
IdMethod idMethod,
String identifier)
Find a labled extract with a given identifier. |
|
protected Platform |
findPlatform(DbControl dc,
IdMethod idMethod,
String identifier)
Find a platform with a given identifier. |
|
protected Hardware |
findPrintRobot(DbControl dc,
IdMethod idMethod,
String identifier)
Find a print robot with a given identifier. |
|
protected Protocol |
findProtocol(DbControl dc,
IdMethod idMethod,
String identifier)
Find a protocol with a given identifier. |
|
protected
|
findReferencedItem(DbControl dc,
IdMethod idMethod,
ItemQuery<T> query,
String identifier)
Find a referenced item. |
|
protected Sample |
findSample(DbControl dc,
IdMethod idMethod,
String identifier)
Find a sample with a given identifier. |
|
protected Scan |
findScan(DbControl dc,
IdMethod idMethod,
String identifier)
Find a scan with a given identifier. |
|
protected Hardware |
findScanner(DbControl dc,
IdMethod idMethod,
String identifier)
Find a scanner with a given identifier. |
|
protected PlatformVariant |
findVariant(DbControl dc,
Platform platform,
IdMethod idMethod,
String identifier)
Find a platform variant with a given identifier. |
|
protected RequestInformation |
getConfigureOptionsParameters(GuiContext context)
|
|
protected RequestInformation |
getConfigureParserParameters(GuiContext context,
boolean forJob)
|
|
protected IdMethod |
getIdMethod(String method)
Get the id method to use for finding items. |
|
protected IdMethod[] |
getIdMethods()
Get an array with all identification methods that can be used to find items. |
|
protected FlatFileParser |
getInitializedFlatFileParser()
Create and initialise a flat file parser by setting all regular expressions and other options. |
|
protected FlatFileParser |
getInitializedFlatFileParser(ParameterValues parameters)
|
|
private Pattern |
getPattern(ParameterValues parameters,
String name)
|
|
RequestInformation |
getRequestInformation(GuiContext context,
String command)
This method will return the RequestInformation for a given command, i.e. |
|
protected String |
getSuccessMessage(int skippedLines)
Called if the parsing was successful to let the subclass generate a simple message that is sent back to the core and user interface. |
|
protected void |
handleData(FlatFileParser.Data data)
Called by the parser for every line in the file that is a data line. |
|
protected
|
initReferenceQuery(DbControl dc,
IdMethod idMethod,
ItemQuery<T> query)
Initialise a query that is used to find referenced items. |
|
String |
isInContext(GuiContext context,
Object item)
Check if the plugin can be used on the specified object. |
|
protected Date |
parseDate(String date)
Parse a string to a date using the date format specified by the 'Date format' parameter. |
|
boolean |
requiresConfiguration()
Return TRUE, since the the implementation requires it for finding the regular expressions used by the FlatFileParser . |
|
protected void |
setUpErrorHandling()
Don't use AbstractFlatFileImporter to handle errors. |
|
boolean |
supportsConfigurations()
Returns TRUE, since that is how the plugins used to work before this method was introduced. |
|
protected abstract void |
updateItem(DbControl dc,
I item,
FlatFileParser.Data data)
Update an item with data from the current line. |
|
protected void |
updateMultiLineItem(DbControl dc,
I item,
FlatFileParser.Data data,
int multiLineNum)
Update an item with data from a multi-line entry. |
Methods inherited from class net.sf.basedb.plugins.AbstractFlatFileImporter |
---|
addErrorHandler, checkColumnMapping, doImport, getCharset, getCharset, getCharsetParameter, getDecimalSeparator, getDecimalSeparatorParameter, getErrorHandler, getErrorOption, getMainType, getMapper, getNumberFormat, getNumBytes, getPrimaryLocationFilter, getProgress, getSignalHandler, handleHeader, handleSection, isImportable, isImportable, log, log, log, log, run, wrapInputStream |
Methods inherited from class net.sf.basedb.core.plugin.AbstractPlugin |
---|
checkInterrupted, closeLogFile, createLogFile, done, getCopyAnnotationsParmeter, getCurrentConfiguration, getCurrentJob, getOverwriteAnnotationsParameters, getPermissions, init, log, log, storeValue, storeValue, storeValues, validateRequestParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.plugin.InteractivePlugin |
---|
getGuiContexts |
Methods inherited from interface net.sf.basedb.core.plugin.Plugin |
---|
done, getAbout, getMainType, getPermissions, init, run |
Field Detail |
---|
private static final String CONFIGURE_OPTIONS
protected static final StringParameterType optionalColumnMapping
protected static final StringParameterType requiredColumnMapping
protected static final PluginParameter<String> identificationSection
protected static final PluginParameter<String> internalIdColumnMapping
protected static final PluginParameter<String> nameColumnMapping
protected static final PluginParameter<String> descriptionColumnMapping
protected static final PluginParameter<String> externalIdColumnMapping
protected static final PluginParameter<String> protocolColumnMapping
private static final PluginParameter<String> itemNotFoundErrorParameter
private static final PluginParameter<String> itemExistsErrorParameter
private static final PluginParameter<String> multipleItemsFoundErrorParameter
private static final PluginParameter<String> referenceNotFoundErrorParameter
private static final PluginParameter<String> multipleReferencesFoundErrorParameter
private DbControl dc
private FlatFileParser ffp
private NumberFormat numberFormat
private DateFormatter dateFormatter
private IdMethod idMethod
private String idMapping
private Mapper idMapper
private ItemQuery<I extends BasicItem> itemQuery
private String lastIdentifier
private I extends BasicItem lastItem
private int numMultiLines
private boolean skippedLast
private boolean dryRun
private ClassMapErrorHandler errorHandler
private boolean cropStrings
private boolean createNotFoundItems
private boolean failIfNotFoundItems
private boolean updateExistingItems
private boolean failIfItemExists
private boolean failIfMultipleFoundItems
private boolean failIfNotFoundReference
private boolean failIfMultipleFoundReferences
private int numUpdated
private int numCreated
private int numError
private int numNotFound
private int numExisted
private ItemQuery<Protocol> protocolQuery
private ItemQuery<Label> labelQuery
private ItemQuery<Hardware> hybStationQuery
private ItemQuery<Hardware> scannerQuery
private ItemQuery<Hardware> robotQuery
private ItemQuery<Software> featureQuery
private ItemQuery<Platform> platformQuery
private ItemQuery<PlatformVariant> variantQuery
private ItemQuery<DataFileType> fileTypeQuery
private ItemQuery<BioSource> bioSourceQuery
private ItemQuery<Sample> sampleQuery
private ItemQuery<Extract> extractQuery
private ItemQuery<LabeledExtract> labeledExtractQuery
private ItemQuery<ArraySlide> arraySlideQuery
private ItemQuery<Hybridization> hybQuery
private ItemQuery<Scan> scanQuery
private ItemQuery<ArrayDesign> designQuery
private ItemQuery<ArrayBatch> batchQuery
private Map<String,BasicItem> itemCache
private RequestInformation configureParser
private RequestInformation configureOptions
Constructor Detail |
---|
public AbstractItemImporter()
Method Detail |
---|
public boolean requiresConfiguration()
AbstractFlatFileImporter
FlatFileParser
. If this
method is overridden and returns FALSE, the subclass must also override
the AbstractFlatFileImporter.getInitializedFlatFileParser()
method and provide a
parser with all regular expressions and other options set.
requiresConfiguration
in interface Plugin
requiresConfiguration
in class AbstractFlatFileImporter
public boolean supportsConfigurations()
AbstractPlugin
supportsConfigurations
in interface Plugin
supportsConfigurations
in class AbstractPlugin
public String isInContext(GuiContext context, Object item)
InteractivePlugin
BasicItem
or BasicData
object, or null if called from
a list context. A client application should only call this method for
contexts matching one of
the contexts in the set returned by the InteractivePlugin.getGuiContexts()
method. For GuiContext.Type.ITEM
contexts an item
of the correct type should be passed as a parameter.
The plug-in can response with a null value indicating success, a warning-level message or throw an exception to indicate an error-level message. Client application should normally only show error-level messages to users, unless the user has requested to see warning messages.
NOTE! Before BASE 2.4 all messages were treated as error-level messages.
isInContext
in interface InteractivePlugin
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
item
- The currently active item, it's type should match the
GuiContext.getItem()
type, or null if the context is a list
context
Null
if the plugin can use that item, or
a warning-level message explaining why the plugin can't be usedpublic void configure(GuiContext context, Request request, Response response)
InteractivePlugin
InteractivePlugin.getRequestInformation(GuiContext, String)
.
configure
in interface InteractivePlugin
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
request
- Request object with the command and parametersresponse
- Response object in for the plugin to response
throughpublic RequestInformation getRequestInformation(GuiContext context, String command) throws BaseException
InteractivePlugin
RequestInformation
for a given command, i.e.
the list of parameters and some nice help text.
getRequestInformation
in interface InteractivePlugin
context
- The current context of the client application,
it is one of the values found in set returned by InteractivePlugin.getGuiContexts()
command
- The command
RequestInformation
for the command
BaseException
- if there is an errorprotected FlatFileParser getInitializedFlatFileParser() throws BaseException
AbstractFlatFileImporter
AbstractPlugin.configuration
settings. If a subclass doesn't store the parameters
there it must override this method and initialise the parser.
getInitializedFlatFileParser
in class AbstractFlatFileImporter
BaseException
protected void setUpErrorHandling()
setUpErrorHandling
in class AbstractFlatFileImporter
protected void begin(FlatFileParser ffp)
begin
in class AbstractFlatFileImporter
AbstractFlatFileImporter.end(boolean)
protected void beginData()
beginData
in class AbstractFlatFileImporter
protected void handleData(FlatFileParser.Data data) throws BaseException
AbstractFlatFileImporter
handleData
in class AbstractFlatFileImporter
BaseException
protected void end(boolean success)
AbstractFlatFileImporter
AbstractFlatFileImporter.begin(FlatFileParser)
method here.
end
in class AbstractFlatFileImporter
success
- TRUE if the file was parsed successfully, FALSE otherwiseAbstractFlatFileImporter.begin(FlatFileParser)
protected String getSuccessMessage(int skippedLines)
AbstractFlatFileImporter
178 reporters imported successfully
.
The default implementation always return null.
getSuccessMessage
in class AbstractFlatFileImporter
skippedLines
- The number of data lines that were skipped due to errorsprotected IdMethod[] getIdMethods()
PropertyIdMethod.DEFAULT_METHODS
. Subclasses that import items that can use
other methods, should override this method.
protected void addMoreJobParameters(List<PluginParameter<?>> parameters)
parameters
- The list of parameters to add the column
mapping parameters toprotected void addMoreParsingParameters(List<PluginParameter<?>> parameters)
parameters
- The list of parameters to add the column
mapping parameters toprotected void addMoreColumnMappingParameters(List<PluginParameter<?>> parameters)
nameColumnMapping
and descriptionColumnMapping
. This
method is called during configuration of the plug-in.
parameters
- The list of parameters to add the column
mapping parameters toprotected void addMoreErrorParameters(List<PluginParameter<?>> parameters)
parameters
- The list of parameters to add the column
mapping parameters toprotected abstract ItemQuery<I> createItemQuery()
getQuery()
should
be returned, eg. Sample.getQuery()
.
protected void createColumnMappers(FlatFileParser ffp, boolean cropStrings)
ffp
FlatFileParser
.
This method is called during initialisation of the plug-in when the
FlatFileParser.parseHeaders()
has successfully found the start of
data. Use the AbstractFlatFileImporter.getMapper(FlatFileParser, String, Integer, Mapper)
to create column mappers. Example:
nameMapper = getMapper(ffp, job.getValue("nameColumnMapping"), cropStrings ? Nameable.MAX_NAME_LENGTH : null, null);
ffp
- The parser that is parsing the data filecropStrings
- If strings that are too long to fit in the database
should be cropped or not (=generate an error)protected abstract I createItem(DbControl dc, FlatFileParser.Data data)
DbControl.saveItem(BasicItem)
. This is done automatically
by the core implementation.
BioSource bs = BioSource.getNew(dc); // Set properties; see example on updateItem method return bs;
If the current data line doesn't have data for all required
properties, this method should throw an InvalidUseOfNullException
exception.
This method is called during import when current item can be found and if the user has selected to create missing item.
dc
- The DbControl to use for database accessdata
- The current data line
protected abstract void updateItem(DbControl dc, I item, FlatFileParser.Data data)
if (nameMapper != null) item.setName(nameMapper.getValue(data)); if (descriptionMapper != null) item.setDescription(descriptionMapper.getValue(data)); ...This method is called during import to update an existing item.
dc
- The DbControl to use for database accessitem
- The item to updatedata
- The current data lineprotected void updateMultiLineItem(DbControl dc, I item, FlatFileParser.Data data, int multiLineNum)
dc
- The DbControl to use for database accessitem
- The item to updatedata
- The current data linemultiLineNum
- The number of the multi-line entry, starting with 1
for the first multi-lineprotected void doneWithItem(DbControl dc, I item, int numMultiLines)
dc
- The DbControl to use for database accessitem
- The item to updatenumMultiLines
- The number of the multi-line entries, starting with 1
for the first multi-line (0 for single-line entries)protected IdMethod getIdMethod(String method)
getIdMethods()
for a method
with the given name. If no method can be found PropertyIdMethod.NAME
is returned.
protected Date parseDate(String date)
Mapper
interface doesn't
supports it.
protected Protocol findProtocol(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Label findLabel(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Hardware findHybridizationStation(DbControl dc, IdMethod idMethod, String identifier)
NOTE! A scanner is a Hardware
item with it type set to
HardwareType.HYBRIDIZATION_STATION
.
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Hardware findScanner(DbControl dc, IdMethod idMethod, String identifier)
NOTE! A scanner is a Hardware
item with it type set to
HardwareType.SCANNER
.
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Hardware findPrintRobot(DbControl dc, IdMethod idMethod, String identifier)
NOTE! A print robot is a Hardware
item with it type set to
HardwareType.PRINT_ROBOT
.
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Software findFeatureExtractionSoftware(DbControl dc, IdMethod idMethod, String identifier)
NOTE! A feature extraction software is a Software
item with it's
type set to SoftwareType.FEATURE_EXTRACTION
.
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Platform findPlatform(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected PlatformVariant findVariant(DbControl dc, Platform platform, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessplatform
- If given, searched only variants of this platformidentifier
- The identifier protocol
protected DataFileType findDataFileType(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected BioSource findBioSource(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Sample findSample(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Extract findExtract(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected LabeledExtract findLabeledExtract(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected ArraySlide findArraySlide(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Hybridization findHybridization(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected Scan findScan(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected ArrayDesign findArrayDesign(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected ArrayBatch findArrayBatch(DbControl dc, IdMethod idMethod, String identifier)
NOTE! The first time this method is called a query object is initialised
using the IdMethod.prepareQuery(DbControl, ItemQuery)
method.
Subsequent calls uses the same query. Thus, this method should always be
called with the same id method object, otherwise the result is undefined.
dc
- The DbControl to use for database accessidentifier
- The identifier protocol
protected <T extends BasicItem> ItemQuery<T> initReferenceQuery(DbControl dc, IdMethod idMethod, ItemQuery<T> query)
IdMethod.prepareQuery(DbControl, ItemQuery)
and
then adds Include
options: MINE, IN_PROJECT, SHARED and OTHERS.
The query will only search for items that the logged in user has
USE permission for.
dc
- A DbControl used for database accessidMethod
- The identification method to usequery
- The query to initialised
protected <T extends BasicItem> T findReferencedItem(DbControl dc, IdMethod idMethod, ItemQuery<T> query, String identifier)
itemCache
.
If no item is found in the cache it uses the query and id method
(IdMethod.find(DbControl, ItemQuery, String)
) to look for the item.
The result of the lookup is stored in the cache (even if no item is found).
dc
- A DbControl used for database accessidMethod
- The identification methodquery
- identifier
-
ItemNotFoundException
- If no item is found and the error handling is set to
fail for this condition
BaseException
- If multiple items are found and the error handling is set to
fail for this conditionprivate Pattern getPattern(ParameterValues parameters, String name) throws BaseException
BaseException
protected FlatFileParser getInitializedFlatFileParser(ParameterValues parameters) throws BaseException
BaseException
protected RequestInformation getConfigureParserParameters(GuiContext context, boolean forJob)
protected RequestInformation getConfigureOptionsParameters(GuiContext context)
|
2.8.0: 2008-09-08 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |