pl.edu.agh.cast.data.template
Class Template

java.lang.Object
  extended by pl.edu.agh.cast.data.template.Template

public class Template
extends Object

Representation of the import template.

Author:
AGH CAST Team

Field Summary
static String NAMESPACE_ATTR_VALUE
          The namespace constant.
static String SCHEMA_LOCATION_ATTR_VALUE
          The template schema location.
static double TEMPLATE_VERSION
          The template version.
 
Constructor Summary
Template(String name, String modelId, String importerId, Map<String,String> importerOptions, Map<Integer,Integer> modelToDataMapping, Map<Integer,ModelColumnParameter[]> columnsParameters, String description)
          Constructor.
Template(String name, String modelId, String importerId, Map<String,String> importerOptions, Map<Integer,Integer> modelToDataMapping, String description)
          Constructor.
Template(String name, String modelId, String importerId, Map<String,String> importerOptions, String preprocessorId, Map<Integer,Integer> modelToDataMapping, Map<Integer,ModelColumnParameter[]> columnsParameters, String description)
          The default constructor.
 
Method Summary
 boolean equals(Object obj)
          
 String[] getColumnNames(int columnsCount)
          Returns column names.
 Map<Integer,ModelColumnParameter[]> getColumnsParameters()
           
 String getDescription()
           
 TemplateGroup getGroup()
           
 Integer[] getIgnoredColumns(int columnsCount)
          Returns ignored columns.
 String getImporterId()
           
 Map<String,String> getImporterOptions()
           
 String getModelId()
           
 Map<Integer,Integer> getModelToDataMapping()
           
 String getName()
           
 String getNamespace()
           
 String getPreprocessorId()
           
 String getSchemaLocation()
           
 String getXsiNamespace()
           
 int hashCode()
          
 void initNamespace()
          Initializes the namespace, XSI namespace and schema location attributes.
 Object readResolve()
          Trims template attributes after deserialization.
 void setColumnsParameters(Map<Integer,ModelColumnParameter[]> columnsParameters)
           
 void setGroup(TemplateGroup group)
           
 void setModelUtil(ModelUtil util)
           
 void setPreprocessorId(String preprocessorId)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NAMESPACE_ATTR_VALUE

public static final String NAMESPACE_ATTR_VALUE
The namespace constant.

See Also:
Constant Field Values

SCHEMA_LOCATION_ATTR_VALUE

public static final String SCHEMA_LOCATION_ATTR_VALUE
The template schema location.

See Also:
Constant Field Values

TEMPLATE_VERSION

public static final double TEMPLATE_VERSION
The template version.

See Also:
Constant Field Values
Constructor Detail

Template

public Template(String name,
                String modelId,
                String importerId,
                Map<String,String> importerOptions,
                String preprocessorId,
                Map<Integer,Integer> modelToDataMapping,
                Map<Integer,ModelColumnParameter[]> columnsParameters,
                String description)
The default constructor.

Parameters:
name - the template name
modelId - the template model identifier
importerId - the template importer identifier
importerOptions - the importer options
preprocessorId - the preprocessor identifier
modelToDataMapping - the model to data mapping
columnsParameters - the column parameters
description - the template description

Template

public Template(String name,
                String modelId,
                String importerId,
                Map<String,String> importerOptions,
                Map<Integer,Integer> modelToDataMapping,
                Map<Integer,ModelColumnParameter[]> columnsParameters,
                String description)
Constructor.

Parameters:
name - the template name
modelId - the template model identifier
importerId - the template importer identifier
importerOptions - the importer options
modelToDataMapping - the model to data mapping
columnsParameters - the column parameters
description - the template description

Template

public Template(String name,
                String modelId,
                String importerId,
                Map<String,String> importerOptions,
                Map<Integer,Integer> modelToDataMapping,
                String description)
Constructor.

Parameters:
name - the template name
modelId - the template model identifier
importerId - the template importer identifier
importerOptions - the importer options
modelToDataMapping - the model to data mapping
description - the template description
Method Detail

initNamespace

public void initNamespace()
Initializes the namespace, XSI namespace and schema location attributes.


equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

getColumnNames

public String[] getColumnNames(int columnsCount)
Returns column names.

Parameters:
columnsCount - the number of columns
Returns:
column names

getIgnoredColumns

public Integer[] getIgnoredColumns(int columnsCount)
Returns ignored columns.

Parameters:
columnsCount - the number of columns
Returns:
a table which contains ignored columns indexes, null if there is no ignored columns

readResolve

public Object readResolve()
                   throws ObjectStreamException
Trims template attributes after deserialization.

Returns:
template with trimmed attributes
Throws:
ObjectStreamException

getName

public String getName()

getModelId

public String getModelId()

getPreprocessorId

public String getPreprocessorId()

getImporterId

public String getImporterId()

getImporterOptions

public Map<String,String> getImporterOptions()

getDescription

public String getDescription()

getModelToDataMapping

public Map<Integer,Integer> getModelToDataMapping()

getColumnsParameters

public Map<Integer,ModelColumnParameter[]> getColumnsParameters()

getNamespace

public String getNamespace()

getXsiNamespace

public String getXsiNamespace()

getSchemaLocation

public String getSchemaLocation()

getGroup

public TemplateGroup getGroup()

setPreprocessorId

public void setPreprocessorId(String preprocessorId)

setGroup

public void setGroup(TemplateGroup group)

setColumnsParameters

public void setColumnsParameters(Map<Integer,ModelColumnParameter[]> columnsParameters)

setModelUtil

public void setModelUtil(ModelUtil util)


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.