de.hedenus.xmltypes.impl
Class LongType

java.lang.Object
  extended by de.hedenus.xmltypes.impl.AbstractTypeImpl
      extended by de.hedenus.xmltypes.impl.W3SchemaType
          extended by de.hedenus.xmltypes.impl.BuiltInDerivedType
              extended by de.hedenus.xmltypes.impl.LongType
All Implemented Interfaces:
Type

public class LongType
extends BuiltInDerivedType

Long type.

Author:
Michael Hedenus

Field Summary
 
Fields inherited from class de.hedenus.xmltypes.impl.AbstractTypeImpl
baseTypes, name, typeFactory
 
Constructor Summary
protected LongType(TypeFactoryImpl typeFactory)
           
 
Method Summary
 java.lang.Class getRepresentationClass()
          Returns the mapped Java type.
 java.lang.Object parse(java.lang.String literal)
          Parses a lexical value.
 boolean validate(java.lang.Object value)
          Returns true iff the value is valid.
 
Methods inherited from class de.hedenus.xmltypes.impl.BuiltInDerivedType
isAbstract, isPrimitive
 
Methods inherited from class de.hedenus.xmltypes.impl.W3SchemaType
getTypeSystem
 
Methods inherited from class de.hedenus.xmltypes.impl.AbstractTypeImpl
checkNull, getBaseTypes, getName, toLiteral, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongType

protected LongType(TypeFactoryImpl typeFactory)
Method Detail

parse

public java.lang.Object parse(java.lang.String literal)
                       throws TypeException
Description copied from interface: Type
Parses a lexical value. Only the unconstrained base types may be used for parsing, i.e. it is possible that the parsing is successful but the resulting object is not valid according to the constraints of this particluar type. For example let the type be http://www.w3.org/2001/XMLSchema#nonNegativeInteger and the value be -5 then it is up to the implementation either to throw an exception (because the value is negative) or to return the value and let the application check it using the validate() method. The latter case would allow the user to be informed and to correct the value.
If the method is successful then the returned value should at least be valid according to the unconstrained base type of this particalur type.

Throws:
TypeException

validate

public boolean validate(java.lang.Object value)
Description copied from interface: Type
Returns true iff the value is valid.


getRepresentationClass

public java.lang.Class getRepresentationClass()
Description copied from interface: Type
Returns the mapped Java type.