Class ExtractionModel

java.lang.Object
net.sf.jailer.extractionmodel.ExtractionModel

public class ExtractionModel extends Object
Extraction-model, defines the subject and the RestrictionModel of an extraction.
Author:
Ralf Wisser
  • Field Details

    • subject

      public final Table subject
      The table to read from.
    • subjectLimitDefinition

      public SubjectLimitDefinition subjectLimitDefinition
      Subject Limit Definition
    • additionalSubjects

      public List<ExtractionModel.AdditionalSubject> additionalSubjects
      Additional Subjects.
    • dataModel

      public final DataModel dataModel
      The restricted data-model to be used for extraction.
    • version

      public final int[] version
      Version.
  • Constructor Details

    • ExtractionModel

      public ExtractionModel(DataModel dataModel, ExecutionContext executionContext)
      Constructor for empty restriction models.
      Parameters:
      dataModel - the data model to restrict
    • ExtractionModel

      public ExtractionModel(String fileName, Map<String,String> sourceSchemaMapping, Map<String,String> parameters, ExecutionContext executionContext) throws IOException
      Constructor.
      Parameters:
      fileName - the name of the model-file
      parameters - 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,String> parameters, ExecutionContext executionContext, boolean failOnMissingSubject) throws IOException
      Constructor.
      Parameters:
      modelURL - the URL of the model-file
      parameters - 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 file
      executionContext - the execution context
      Returns:
      the data model folder name, or null if not specified in the file
      Throws:
      IOException - if an I/O error occurs or the file is not a valid extraction model
    • getCondition

      public String getCondition()
      Gets the subject condition.
      Returns:
      the subject condition
    • getSubjectTableName

      public String 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 null if the subject table is known