pl.edu.agh.cast.data.model.property.validator
Class ReferencePropertyValidator

java.lang.Object
  extended by pl.edu.agh.cast.data.model.property.validator.PropertyValidator
      extended by pl.edu.agh.cast.data.model.property.validator.ReferencePropertyValidator

public class ReferencePropertyValidator
extends PropertyValidator

Class for validating element reference property types. References to elements are represented instances of Identifiable interface.

The properties of PropertyType.REFERENCE type cannot be deserialized from String, thus methods checkFormat(String) and convert(String), as well as PropertyValidator.isValidClass(Object) and PropertyValidator.convertFromStringFormat(String) throw UnsupportedOperationException.

Author:
AGH CAST Team

Constructor Summary
ReferencePropertyValidator()
           
 
Method Summary
protected  boolean checkFormat(String value)
          
protected  Object convert(String value)
          
 Class<?> getTypeClass()
          Gets class associated with specific property type.
 
Methods inherited from class pl.edu.agh.cast.data.model.property.validator.PropertyValidator
convertFromStringFormat, convertToStringFormat, isValidClass, isValidStringFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferencePropertyValidator

public ReferencePropertyValidator()
Method Detail

checkFormat

protected boolean checkFormat(String value)

Specified by:
checkFormat in class PropertyValidator
Throws:
UnsupportedOperationException - since this operation is invalid for properties of PropertyType.REFERENCE type
See Also:
PropertyValidator.checkFormat(java.lang.String)

convert

protected Object convert(String value)

Specified by:
convert in class PropertyValidator
Throws:
UnsupportedOperationException - since this operation is invalid for properties of PropertyType.REFERENCE type
See Also:
PropertyValidator.convert(java.lang.String)

getTypeClass

public Class<?> getTypeClass()
Gets class associated with specific property type.

Specified by:
getTypeClass in class PropertyValidator
Returns:
class associated with property type
See Also:
PropertyValidator.getTypeClass()


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