edu.stanford.smi.protegex.owl.swrl.bridge
Class LiteralInfo
java.lang.Object
edu.stanford.smi.protegex.owl.swrl.bridge.Info
edu.stanford.smi.protegex.owl.swrl.bridge.PropertyValueInfo
edu.stanford.smi.protegex.owl.swrl.bridge.LiteralInfo
- All Implemented Interfaces:
- Argument, LiteralArgument, DatatypeValue, ResultValue, Comparable
public class LiteralInfo
- extends PropertyValueInfo
- implements LiteralArgument, DatatypeValue
Info object to wrap Java and XML Schema primitve datatype literals.
For the moment we do not support (1) RDFSLiteral language tags, and (2) the types: byte[], and primitive XSD types Decimal, GDay,
GYear, GMonth, GMonthDay, QName, HexBinary, and NOTATION.
LiteralInfo
public LiteralInfo(OWLModel owlModel,
RDFSLiteral literal)
throws DatatypeConversionException
- Convert an RDFSLiteral to a LiteralInfo.
- Throws:
DatatypeConversionException
LiteralInfo
public LiteralInfo(String s)
LiteralInfo
public LiteralInfo(Number n)
LiteralInfo
public LiteralInfo(boolean b)
LiteralInfo
public LiteralInfo(int i)
LiteralInfo
public LiteralInfo(long l)
LiteralInfo
public LiteralInfo(float f)
LiteralInfo
public LiteralInfo(double d)
LiteralInfo
public LiteralInfo(short s)
LiteralInfo
public LiteralInfo(PrimitiveXSDType value)
isString
public boolean isString()
- Specified by:
isString
in interface DatatypeValue
isBoolean
public boolean isBoolean()
- Specified by:
isBoolean
in interface DatatypeValue
isNumeric
public boolean isNumeric()
- Specified by:
isNumeric
in interface DatatypeValue
isInteger
public boolean isInteger()
- Specified by:
isInteger
in interface DatatypeValue
isLong
public boolean isLong()
- Specified by:
isLong
in interface DatatypeValue
isFloat
public boolean isFloat()
- Specified by:
isFloat
in interface DatatypeValue
isDouble
public boolean isDouble()
- Specified by:
isDouble
in interface DatatypeValue
isShort
public boolean isShort()
- Specified by:
isShort
in interface DatatypeValue
isByte
public boolean isByte()
- Specified by:
isByte
in interface DatatypeValue
isBigDecimal
public boolean isBigDecimal()
- Specified by:
isBigDecimal
in interface DatatypeValue
isBigInteger
public boolean isBigInteger()
- Specified by:
isBigInteger
in interface DatatypeValue
isPrimitiveXSDType
public boolean isPrimitiveXSDType()
- Specified by:
isPrimitiveXSDType
in interface DatatypeValue
isTime
public boolean isTime()
- Specified by:
isTime
in interface DatatypeValue
isDate
public boolean isDate()
- Specified by:
isDate
in interface DatatypeValue
isDateTime
public boolean isDateTime()
- Specified by:
isDateTime
in interface DatatypeValue
isDuration
public boolean isDuration()
- Specified by:
isDuration
in interface DatatypeValue
isAnyURI
public boolean isAnyURI()
- Specified by:
isAnyURI
in interface DatatypeValue
isBase64Binary
public boolean isBase64Binary()
- Specified by:
isBase64Binary
in interface DatatypeValue
isHexBinary
public boolean isHexBinary()
- Specified by:
isHexBinary
in interface DatatypeValue
isGMonth
public boolean isGMonth()
- Specified by:
isGMonth
in interface DatatypeValue
isGYear
public boolean isGYear()
- Specified by:
isGYear
in interface DatatypeValue
isGYearMonth
public boolean isGYearMonth()
- Specified by:
isGYearMonth
in interface DatatypeValue
isGDay
public boolean isGDay()
- Specified by:
isGDay
in interface DatatypeValue
isGMonthDay
public boolean isGMonthDay()
- Specified by:
isGMonthDay
in interface DatatypeValue
isNOTATION
public boolean isNOTATION()
- Specified by:
isNOTATION
in interface DatatypeValue
isQName
public boolean isQName()
- Specified by:
isQName
in interface DatatypeValue
getString
public String getString()
throws DatatypeConversionException
- Specified by:
getString
in interface DatatypeValue
- Throws:
DatatypeConversionException
getNumber
public Number getNumber()
throws DatatypeConversionException
- Throws:
DatatypeConversionException
getPrimitiveXSDType
public PrimitiveXSDType getPrimitiveXSDType()
throws DatatypeConversionException
- Throws:
DatatypeConversionException
getBoolean
public boolean getBoolean()
throws DatatypeConversionException
- Specified by:
getBoolean
in interface DatatypeValue
- Throws:
DatatypeConversionException
getInt
public int getInt()
throws DatatypeConversionException
- Specified by:
getInt
in interface DatatypeValue
- Throws:
DatatypeConversionException
getLong
public long getLong()
throws DatatypeConversionException
- Specified by:
getLong
in interface DatatypeValue
- Throws:
DatatypeConversionException
getFloat
public float getFloat()
throws DatatypeConversionException
- Specified by:
getFloat
in interface DatatypeValue
- Throws:
DatatypeConversionException
getDouble
public double getDouble()
throws DatatypeConversionException
- Specified by:
getDouble
in interface DatatypeValue
- Throws:
DatatypeConversionException
getBigDecimal
public BigDecimal getBigDecimal()
throws DatatypeConversionException
- Specified by:
getBigDecimal
in interface DatatypeValue
- Throws:
DatatypeConversionException
getBigInteger
public BigInteger getBigInteger()
throws DatatypeConversionException
- Specified by:
getBigInteger
in interface DatatypeValue
- Throws:
DatatypeConversionException
getShort
public short getShort()
throws DatatypeConversionException
- Specified by:
getShort
in interface DatatypeValue
- Throws:
DatatypeConversionException
getByte
public byte getByte()
throws DatatypeConversionException
- Specified by:
getByte
in interface DatatypeValue
- Throws:
DatatypeConversionException
getTime
public Time getTime()
throws DatatypeConversionException
- Specified by:
getTime
in interface DatatypeValue
- Throws:
DatatypeConversionException
getDate
public Date getDate()
throws DatatypeConversionException
- Specified by:
getDate
in interface DatatypeValue
- Throws:
DatatypeConversionException
getDateTime
public DateTime getDateTime()
throws DatatypeConversionException
- Throws:
DatatypeConversionException
getDuration
public Duration getDuration()
throws DatatypeConversionException
- Specified by:
getDuration
in interface DatatypeValue
- Throws:
DatatypeConversionException
getAnyURI
public AnyURI getAnyURI()
throws DatatypeConversionException
- Specified by:
getAnyURI
in interface DatatypeValue
- Throws:
DatatypeConversionException
getHexBinary
public HexBinary getHexBinary()
throws DatatypeConversionException
- Specified by:
getHexBinary
in interface DatatypeValue
- Throws:
DatatypeConversionException
getBase64Binary
public Base64Binary getBase64Binary()
throws DatatypeConversionException
- Specified by:
getBase64Binary
in interface DatatypeValue
- Throws:
DatatypeConversionException
getGDay
public GDay getGDay()
throws DatatypeConversionException
- Specified by:
getGDay
in interface DatatypeValue
- Throws:
DatatypeConversionException
getGYearMonth
public GYearMonth getGYearMonth()
throws DatatypeConversionException
- Specified by:
getGYearMonth
in interface DatatypeValue
- Throws:
DatatypeConversionException
getGMonth
public GMonth getGMonth()
throws DatatypeConversionException
- Specified by:
getGMonth
in interface DatatypeValue
- Throws:
DatatypeConversionException
getGMonthDay
public GMonthDay getGMonthDay()
throws DatatypeConversionException
- Specified by:
getGMonthDay
in interface DatatypeValue
- Throws:
DatatypeConversionException
getGYear
public GYear getGYear()
throws DatatypeConversionException
- Specified by:
getGYear
in interface DatatypeValue
- Throws:
DatatypeConversionException
getNOTATION
public NOTATION getNOTATION()
throws DatatypeConversionException
- Specified by:
getNOTATION
in interface DatatypeValue
- Throws:
DatatypeConversionException
getQName
public QName getQName()
throws DatatypeConversionException
- Specified by:
getQName
in interface DatatypeValue
- Throws:
DatatypeConversionException
toString
public String toString()
- Specified by:
toString
in interface DatatypeValue
- Overrides:
toString
in class Object
getValueClassName
public Object getValueClassName()
getValue
public Object getValue()
asRDFSLiteral
public RDFSLiteral asRDFSLiteral(OWLModel owlModel)
throws DatatypeConversionException
- Throws:
DatatypeConversionException
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
Submit a bug report or feature request
Copyright (c) 1998-2007 Stanford University.