gov.nasa.pds.tools.label.validate
Class ElementValidator
java.lang.Object
gov.nasa.pds.tools.label.validate.ElementValidator
public class ElementValidator
- extends Object
This class will validate an element value or set of values against an
Dictionary.
- Version:
- $Revision: 8454 $
- Author:
- pramirez, jagander
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementValidator
public ElementValidator()
validate
public static boolean validate(AttributeStatement attribute,
Label label,
Dictionary dictionary,
ElementDefinition definition)
throws UnsupportedTypeException
- Throws:
UnsupportedTypeException
validate
public static boolean validate(AttributeStatement attribute,
Label label,
Dictionary dictionary,
String objectContext)
throws DefinitionNotFoundException,
UnsupportedTypeException
- Checks to see whether an
AttributeStatement
is correct. Will look
up the definition in the given dictionary. An object context may be
supplied as elements can have aliases that are appropriate within an
object. Set objectContext to null if there if the lookup should be
performed without care to the surrounding object.
- Parameters:
dictionary
- where to look up the elementobjectContext
- enclosing the element to be looked upattribute
- statement to be validated
- Returns:
- flag indicating whether or not the statement was valid against the
definition found
- Throws:
DefinitionNotFoundException
- if definition for element is not found
UnsupportedTypeException
- if type of element is not supported
validate
public static boolean validate(AttributeStatement attribute,
Label label,
Dictionary dictionary)
throws DefinitionNotFoundException,
UnsupportedTypeException
- Throws:
DefinitionNotFoundException
UnsupportedTypeException
Copyright © 2005-2011 Planetary Data System. All Rights Reserved.