pl.edu.agh.cast.importer.base.template
Interface IImportTemplate

All Superinterfaces:
Serializable
All Known Implementing Classes:
ImportTemplate

public interface IImportTemplate
extends Serializable

An interface which defines template for import process. It contains fully configured tokenizer, parser and converter. The templates are used to perform an import process without configuration.

Author:
AGH CAST Team

Field Summary
static String TEMPLATE_FILE_EXTENSION
          File extension for import templates.
 
Method Summary
 IImportTemplate createCopy()
          Creates a copy of this template.
 IImportConverter getConverter()
          Gets an import converter.
 String getDescription()
          Gets template description.
 UUID getId()
          Gets template id.
 String getName()
          Gets template name.
 IImportParser getParser()
          Gets an import parser.
 IImportTokenizer getTokenizer()
          Gets import tokenizer.
 int getVersion()
          Gets version of template.
 boolean isComplete()
          Checks if a template is configured properly which means that all tokenizer, parser and converter are set and they are properly configured too.
 void setConverter(IImportConverter converter)
          Sets a new import converter.
 void setDescription(String description)
          Sets template not null description.
 void setName(String name)
          Sets template not null name.
 void setParser(IImportParser parser)
          Sets a new import parser.
 void setTokenizer(IImportTokenizer tokenizer)
          Sets a new import tokenizer.
 

Field Detail

TEMPLATE_FILE_EXTENSION

static final String TEMPLATE_FILE_EXTENSION
File extension for import templates.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Gets template name. Template name can be displayed in a list of templates.

Returns:
template name

setName

void setName(String name)
Sets template not null name.

Parameters:
name - a new template name

getDescription

String getDescription()
Gets template description. The description should contain information about the template usage such as which domain model, which kind of files, etc.

Returns:
template description

setDescription

void setDescription(String description)
Sets template not null description.

Parameters:
description - new template description

getTokenizer

IImportTokenizer getTokenizer()
Gets import tokenizer.

Returns:
import tokenizer

setTokenizer

void setTokenizer(IImportTokenizer tokenizer)
Sets a new import tokenizer.

Parameters:
tokenizer - a new import tokenizer

getParser

IImportParser getParser()
Gets an import parser.

Returns:
an import parser

setParser

void setParser(IImportParser parser)
Sets a new import parser.

Parameters:
parser - a new import parser

getConverter

IImportConverter getConverter()
Gets an import converter.

Returns:
an import converter

setConverter

void setConverter(IImportConverter converter)
Sets a new import converter.

Parameters:
converter - a new import converter

getVersion

int getVersion()
Gets version of template.

Returns:
template version

getId

UUID getId()
Gets template id.

Returns:
template id

isComplete

boolean isComplete()
Checks if a template is configured properly which means that all tokenizer, parser and converter are set and they are properly configured too.

Returns:
true if template is properly configured, false otherwise

createCopy

IImportTemplate createCopy()
Creates a copy of this template. Reference to all fields are copied, excepting id which is generated.

Returns:
a copy of this template


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