|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EncodedLiteral
This interface defines Literal instances that hold encoded AllegroGraph values. Encoded values allow queries that match a range of values; they can also be used to store data in a more compact form.
Encoded literals are discussed in more detail in the AllegroGraph Introduction.
Encoded literals are created by calling the methods
AllegroGraph.createEncodedLiteral(String, String)
,
AllegroGraph.createEncodedLiteral(long, String)
, or
AllegroGraph.createEncodedLiteral(double, String)
.
Encoded literals are also created when bulk loading from an N-Triples
file if datatype or predicate mappings are defined in the triple store.
See AllegroGraph.setDataMapping(String[])
and friends.
Encoding name | What is encoded and how |
---|---|
"triple-id" | the long integer returned by Triple.queryAGId() is encoded as a value suitable for abbreviated reification. |
"single-float" | a float or double value is encoded as a range-searchable literal. |
"double-float" | a float or double value is encoded as a range-searchable literal. |
"gyear" | a string value is encoded as a range-searchable literal; the value should conform to the XML Schema type "gYear". |
"time" | a string value is encoded as a range-searchable literal; the value should conform to the XML Schema type "time". |
"date" | a string value is encoded as a range-searchable literal; the value should conform to the XML Schema type "date". |
"long" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "long". |
"short" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "short". |
"int" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "int". |
"byte" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "byte". |
"unsigned-long" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "unsignedLong". |
"unsigned-short" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "unsignedShort". |
"unsigned-int" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "unsignedInt". |
"unsigned-byte" | an integer value is encoded as a range-searchable literal; the value should conform to the XML Schema type "unsignedByte". |
"date-time" | a containing an ISO 8601 date-time value is encoded as a range-searchable literal; the value should conform to the XML Schema type "dateTime". |
Method Summary | |
---|---|
void |
add()
Add this literal to the AllegroGraph triple store. |
java.lang.String |
getEncoding()
Get the encoding used for this literal value. |
java.lang.String |
getLanguage()
This method overrides the method in the Literal class, and returns null. |
java.lang.Object |
getValue()
Get the object that represents the encoded value of the literal. |
java.lang.String |
toString()
This method overrides the generic toString method. |
Methods inherited from interface com.franz.agbase.LiteralNode |
---|
equals, getAGId, getDatatype, getLabel, getType, hashCode, queryLabel, queryLanguage, queryType |
Methods inherited from interface com.franz.agbase.ValueNode |
---|
compareTo, getObjectStatements, queryAGId |
Method Detail |
---|
java.lang.String getEncoding()
java.lang.Object getValue()
void add() throws AllegroGraphException
LiteralNode
A Literal instance is in the triple store if queryAGId() returns a non-null value.
add
in interface LiteralNode
AllegroGraphException
java.lang.String toString()
LiteralNode
toString
in interface LiteralNode
toString
in class java.lang.Object
java.lang.String getLanguage()
getLanguage
in interface LiteralNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |