|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface LexiconKeyBuilder.IDatatypeKeyCoder
Interface for classes encapsulating the logic to encode (and where possible, decode) datatype literals.
| Field Summary | |
|---|---|
static int |
CODE_OTHER
Code used for unrecognized or otherwise unhandled data types. |
static int |
CODE_XML_LITERAL
An RDF.XMLLITERAL. |
static int |
CODE_XSD_ANYURI
|
static int |
CODE_XSD_BASE64BINARY
|
static int |
CODE_XSD_BOOLEAN
|
static int |
CODE_XSD_BYTE
|
static int |
CODE_XSD_DATE
|
static int |
CODE_XSD_DATETIME
|
static int |
CODE_XSD_DECIMAL
Arbitrary magnitude decimal values with arbitrary digits after the decimal. |
static int |
CODE_XSD_DOUBLE
|
static int |
CODE_XSD_DURATION
Deprecated. until good semantics have been developed. |
static int |
CODE_XSD_FLOAT
|
static int |
CODE_XSD_GMONTHDAY
|
static int |
CODE_XSD_GYEAR
|
static int |
CODE_XSD_GYEARMONTH
|
static int |
CODE_XSD_HEXBINARY
|
static int |
CODE_XSD_INT
|
static int |
CODE_XSD_INTEGER
|
static int |
CODE_XSD_LONG
|
static int |
CODE_XSD_NOTATION
|
static int |
CODE_XSD_QNAME
|
static int |
CODE_XSD_SHORT
|
static int |
CODE_XSD_STRING
|
static int |
CODE_XSD_TIME
|
static int |
CODE_XSD_UBYTE
|
static int |
CODE_XSD_UINT
|
static int |
CODE_XSD_ULONG
|
static int |
CODE_XSD_USHORT
|
| Method Summary | |
|---|---|
int |
code()
Return the unique code designated for the primitive data type handled by this coder. |
String |
decode(byte[] key,
int off,
int len)
Decode a slice of a byte[] containing a key formed by encode(IKeyBuilder, String). |
void |
encode(IKeyBuilder keyBuilder,
String text)
Interpret the text as some specific data type and encode a representation of that data type value suitable for an index whose keys are unsigned byte[]s. |
boolean |
isDecodable()
Return true if the implementation of this interface
encodes keys which can be decoded without loss. |
| Field Detail |
|---|
static final int CODE_OTHER
static final int CODE_XSD_STRING
static final int CODE_XSD_BOOLEAN
static final int CODE_XSD_DECIMAL
static final int CODE_XSD_FLOAT
static final int CODE_XSD_DOUBLE
static final int CODE_XSD_DURATION
static final int CODE_XSD_DATETIME
static final int CODE_XSD_TIME
static final int CODE_XSD_DATE
static final int CODE_XSD_GYEARMONTH
static final int CODE_XSD_GYEAR
static final int CODE_XSD_GMONTHDAY
static final int CODE_XSD_HEXBINARY
static final int CODE_XSD_BASE64BINARY
static final int CODE_XSD_ANYURI
static final int CODE_XSD_QNAME
static final int CODE_XSD_NOTATION
static final int CODE_XSD_INTEGER
static final int CODE_XSD_LONG
static final int CODE_XSD_INT
static final int CODE_XSD_SHORT
static final int CODE_XSD_BYTE
static final int CODE_XSD_ULONG
static final int CODE_XSD_UINT
static final int CODE_XSD_USHORT
static final int CODE_XSD_UBYTE
static final int CODE_XML_LITERAL
RDF.XMLLITERAL.
| Method Detail |
|---|
void encode(IKeyBuilder keyBuilder,
String text)
keyBuilder - The object used to build up the key.text - A lexical representation of the value.
String decode(byte[] key,
int off,
int len)
encode(IKeyBuilder, String).
key - The byte[].off - The first byte in the slice.len - The length of the slice.
UnsupportedOperationException - If the keys for the datatype encoded by this interface
can not be decoded without loss. For example, this is
true of XMLSchema.STRING when compressed Unicode
sort keys are used.boolean isDecodable()
true if the implementation of this interface
encodes keys which can be decoded without loss. "Loss" means that it
is not possible to decode a value which correspond to the same point
in the value space of the datatype. For example, .5 and
0.5 both represent the same point in the
XMLSchema.FLOAT value space. These values are therefore
decodable without loss, even though the decoded value might not have
the same lexical representation.
int code()
3.2.1 string
3.2.2 boolean
3.2.3 decimal
3.2.4 float
3.2.5 double
3.2.6 duration
3.2.7 dateTime
3.2.8 time
3.2.9 date
3.2.10 gYearMonth
3.2.11 gYear
3.2.12 gMonthDay
3.2.13 gDay
3.2.14 gMonth
3.2.15 hexBinary
3.2.16 base64Binary
3.2.17 anyURI
3.2.18 QName
3.2.19 NOTATION
http://www.w3.org/TR/swbp-xsch-datatypes/,
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||