gov.nasa.pds.tools.dict.type
Interface TypeChecker

All Known Subinterfaces:
NumericTypeChecker
All Known Implementing Classes:
AlphabetChecker, AlphaNumericChecker, CharacterChecker, ContextDependentChecker, DataSetChecker, DateChecker, DoubleChecker, IdentifierChecker, IntegerChecker, NonDecimalChecker, RealChecker, TimeChecker

public interface TypeChecker

Version:
$Revision: 4967 $
Author:
pramirez, jagander

Method Summary
 Object cast(String value, AttributeStatement attribute)
          Tries to cast the value to the appropriate type and return the value
 void checkMaxLength(String value, ElementDefinition def, AttributeStatement attribute)
          Checks to make sure that the value does not exceed the maximum length
 void checkMinLength(String value, ElementDefinition def, AttributeStatement attribute)
          Checks to make sure that the value does fall below the minimum length length
 

Method Detail

cast

Object cast(String value,
            AttributeStatement attribute)
            throws InvalidTypeException
Tries to cast the value to the appropriate type and return the value

Parameters:
value - which must be cast
Returns:
value after it has been cast
Throws:
InvalidTypeException - thrown when value can not be cast

checkMinLength

void checkMinLength(String value,
                    ElementDefinition def,
                    AttributeStatement attribute)
                    throws InvalidLengthException
Checks to make sure that the value does fall below the minimum length length

Parameters:
value - to be checked
def - contains the bound
Throws:
InvalidLengthException - thrown when value falls below minimum

checkMaxLength

void checkMaxLength(String value,
                    ElementDefinition def,
                    AttributeStatement attribute)
                    throws InvalidLengthException
Checks to make sure that the value does not exceed the maximum length

Parameters:
value - to be checked
def - contains the bound
Throws:
InvalidLengthException - thrown when value exceeds maximum


Copyright © 2005–2013 Planetary Data System. All rights reserved.