jigcell.compare
Interface ITypeChecker

All Known Subinterfaces:
IStructuredTypeChecker
All Known Implementing Classes:
BooleanTypeChecker, BuddingYeastNocPhenotype, BuddingYeastPhenotype, BuddingYeastWildtypeProperties, GenericPhenotype, IntegerTypeChecker, ListTypeChecker, RealTypeChecker, StringTypeChecker, StructuredTypeChecker, StructuredTypeCheckerTemplate, TimeSeriesTypeChecker, TypeChecker, TypeCheckerTemplate, UntypedTypeChecker

public interface ITypeChecker

A type that describes the structure of a data element.

Additionally a public static method is required to be implemented:

A type checker.

This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.

Author:
Nicholas Allen

Field Summary
static java.lang.String ATTRIBUTE_TYPE
          Attribute key for generators who wish to associate a type name
static java.lang.String METHOD_GENERATE
          Name of the static method to be invoked for type checkers
static java.lang.String OPTION_TYPECHECKER
          Attribute key for generators who wish to associate a type checker
 
Method Summary
 IComponentDescription getDescription()
          A description for this type.
 java.lang.String getName()
          A name for this type.
 IDataElement.Type getType()
          The structural type this checker matches.
 boolean isCompatible(ITypeChecker type)
          Whether a data type can be converted to this type.
 boolean validate(IDataElement data)
          Whether a data element is an instance of this type.
 

Field Detail

ATTRIBUTE_TYPE

static final java.lang.String ATTRIBUTE_TYPE
Attribute key for generators who wish to associate a type name

See Also:
Constant Field Values

METHOD_GENERATE

static final java.lang.String METHOD_GENERATE
Name of the static method to be invoked for type checkers

See Also:
Constant Field Values

OPTION_TYPECHECKER

static final java.lang.String OPTION_TYPECHECKER
Attribute key for generators who wish to associate a type checker

See Also:
Constant Field Values
Method Detail

getDescription

IComponentDescription getDescription()
A description for this type. Implementations that do not want to provide a description should return null.


getName

java.lang.String getName()
A name for this type.


getType

IDataElement.Type getType()
The structural type this checker matches.


isCompatible

boolean isCompatible(ITypeChecker type)
Whether a data type can be converted to this type.

Parameters:
type - Type to convert from

validate

boolean validate(IDataElement data)
Whether a data element is an instance of this type.

Parameters:
data - Data element