Class ExtractionModel
java.lang.Object
net.sf.jailer.extractionmodel.ExtractionModel
Extraction-model, defines the subject and the
RestrictionModel
of an extraction.- Author:
- Ralf Wisser
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAdditional Subject.static class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExtractionModel(String fileName, Map<String, String> sourceSchemaMapping, Map<String, String> parameters, ExecutionContext executionContext) Constructor.ExtractionModel(URL modelURL, Map<String, String> sourceSchemaMapping, Map<String, String> parameters, ExecutionContext executionContext, boolean failOnMissingSubject) Constructor.ExtractionModel(DataModel dataModel, ExecutionContext executionContext) Constructor for empty restriction models. -
Method Summary
Modifier and TypeMethodDescriptionGets the subject condition.Gets the name of the subject table, in case the subject table is unknown in the data model.static StringloadDatamodelFolder(String fileName, ExecutionContext executionContext) Loads the data model folder name from an extraction model file.
-
Field Details
-
subject
The table to read from. -
subjectLimitDefinition
Subject Limit Definition -
additionalSubjects
Additional Subjects. -
dataModel
The restricted data-model to be used for extraction. -
version
public final int[] versionVersion.
-
-
Constructor Details
-
ExtractionModel
Constructor for empty restriction models.- Parameters:
dataModel- the data model to restrict
-
ExtractionModel
public ExtractionModel(String fileName, Map<String, String> sourceSchemaMapping, Map<String, throws IOExceptionString> parameters, ExecutionContext executionContext) Constructor.- Parameters:
fileName- the name of the model-fileparameters- apply this parameter-value mapping to all restriction conditions, XML templates and filters- Throws:
IOException
-
ExtractionModel
public ExtractionModel(URL modelURL, Map<String, String> sourceSchemaMapping, Map<String, throws IOExceptionString> parameters, ExecutionContext executionContext, boolean failOnMissingSubject) Constructor.- Parameters:
modelURL- the URL of the model-fileparameters- apply this parameter-value mapping to all restriction conditions, XML templates and filters- Throws:
IOException
-
-
Method Details
-
loadDatamodelFolder
public static String loadDatamodelFolder(String fileName, ExecutionContext executionContext) throws IOException Loads the data model folder name from an extraction model file.- Parameters:
fileName- the name of the extraction model fileexecutionContext- the execution context- Returns:
- the data model folder name, or
nullif not specified in the file - Throws:
IOException- if an I/O error occurs or the file is not a valid extraction model
-
getCondition
-
getSubjectTableName
Gets the name of the subject table, in case the subject table is unknown in the data model.- Returns:
- the subject table name, or
nullif the subject table is known
-