com.hp.hpl.jena.datatypes.xsd
Class XSDhexBinary

java.lang.Object
  extended by com.hp.hpl.jena.datatypes.BaseDatatype
      extended by com.hp.hpl.jena.datatypes.xsd.XSDDatatype
          extended by com.hp.hpl.jena.datatypes.xsd.XSDhexBinary
All Implemented Interfaces:
RDFDatatype

public class XSDhexBinary
extends XSDDatatype

Implement hexbinary type. Most of the work is done in the superclass. This only needs to implement the unparsing.

Version:
$Revision: 1.1 $ on $Date: 2009-06-29 08:56:03 $
Author:
Dave Reynolds

Nested Class Summary
 
Nested classes/interfaces inherited from class com.hp.hpl.jena.datatypes.BaseDatatype
BaseDatatype.TypedValue
 
Field Summary
 
Fields inherited from class com.hp.hpl.jena.datatypes.xsd.XSDDatatype
XSD, XSDanyURI, XSDbase64Binary, XSDboolean, XSDbyte, XSDdate, XSDdateTime, XSDdecimal, XSDdouble, XSDduration, XSDENTITY, XSDfloat, XSDgDay, XSDgMonth, XSDgMonthDay, XSDgYear, XSDgYearMonth, XSDhexBinary, XSDID, XSDIDREF, XSDint, XSDinteger, XSDlanguage, XSDlong, XSDName, XSDNCName, XSDnegativeInteger, XSDNMTOKEN, XSDnonNegativeInteger, XSDnonPositiveInteger, XSDnormalizedString, XSDNOTATION, XSDpositiveInteger, XSDQName, XSDshort, XSDstring, XSDtime, XSDtoken, XSDunsignedByte, XSDunsignedInt, XSDunsignedLong, XSDunsignedShort
 
Constructor Summary
XSDhexBinary(String typeName)
          Constructor.
 
Method Summary
 int getHashCode(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
          Default implementation of getHashCode() delegates to the default from the literal label.
 boolean isEqual(com.hp.hpl.jena.graph.impl.LiteralLabel value1, com.hp.hpl.jena.graph.impl.LiteralLabel value2)
          Compares two instances of values of the given datatype.
 boolean isValidValue(Object valueForm)
          Test whether the given object is a legal value form of this datatype.
 String unparse(Object value)
          Convert a value of this datatype out to lexical form.
 
Methods inherited from class com.hp.hpl.jena.datatypes.xsd.XSDDatatype
convertValidatedDataValue, extendedTypeDefinition, getHashCode, getJavaClass, isBaseTypeCompatible, isValidLiteral, loadUserDefined, loadUserDefined, loadXSDSimpleTypes, main, parse, parseValidated, trimPlus
 
Methods inherited from class com.hp.hpl.jena.datatypes.BaseDatatype
cannonicalise, getURI, isValid, langTagCompatible, normalizeSubType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XSDhexBinary

public XSDhexBinary(String typeName)
Constructor.

Parameters:
typeName - the name of the XSD type to be instantiated, this is used to lookup a type definition from the Xerces schema factory.
Method Detail

isValidValue

public boolean isValidValue(Object valueForm)
Test whether the given object is a legal value form of this datatype. Brute force implementation.

Specified by:
isValidValue in interface RDFDatatype
Overrides:
isValidValue in class BaseDatatype

unparse

public String unparse(Object value)
Convert a value of this datatype out to lexical form.

Specified by:
unparse in interface RDFDatatype
Overrides:
unparse in class XSDDatatype

isEqual

public boolean isEqual(com.hp.hpl.jena.graph.impl.LiteralLabel value1,
                       com.hp.hpl.jena.graph.impl.LiteralLabel value2)
Compares two instances of values of the given datatype. This ignores lang tags and just uses the java.lang.Number equality.

Specified by:
isEqual in interface RDFDatatype
Overrides:
isEqual in class XSDDatatype

getHashCode

public int getHashCode(com.hp.hpl.jena.graph.impl.LiteralLabel lit)
Description copied from class: BaseDatatype
Default implementation of getHashCode() delegates to the default from the literal label.

Specified by:
getHashCode in interface RDFDatatype
Overrides:
getHashCode in class BaseDatatype


Licenced under the Apache License, Version 2.0