| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.franz.ag.ValueObject
com.franz.ag.ValueNode
com.franz.ag.Literal
com.franz.ag.EncodedLiteral
This class implements 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 dicusssed 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 class com.franz.ag.Literal | 
equals, getAGId, getDatatype, getLabel, getType, hashCode, queryLabel, queryLanguage, queryType | 
| Methods inherited from class com.franz.ag.ValueNode | 
compareTo, getObjectStatements, queryAGId | 
| Methods inherited from class com.franz.ag.ValueObject | 
compareTo | 
| Methods inherited from class java.lang.Object | 
getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.openrdf.model.Value | 
getObjectStatements | 
| Methods inherited from interface java.lang.Comparable | 
compareTo | 
| Method Detail | 
public java.lang.String getEncoding()
public java.lang.Object getValue()
public void add()
         throws AllegroGraphException
LiteralA Literal instance is in the triple store if queryAGId() returns a non-null value.
add in class LiteralAllegroGraphExceptionpublic java.lang.String toString()
Literal
toString in class Literalpublic java.lang.String getLanguage()
getLanguage in interface LiteralgetLanguage in class Literal
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||