Class JsonIdentifier
java.lang.Object
com.semedy.reasoner.api.symboltable.ExternalDataType
com.semedy.reasoner.symboltable.encoder.JsonIdentifier
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptiondirectDecode
(long code) Decode the code (if possible)
The encoding of the standard types looks as following:
_direct = 1L << 63; indicates that the code is direct encoded
_shortstring = 1L << 62; bit 62 must not be used for another encoding
_inttype = 2L << 59
_floattype = 3L << 59
_booleantype = 4L << 59long
Encode the value of this as a long (if possible) delivers 0 if it is not possibleboolean
byte[]
getBytes()
Create a byte representation
Used in symbol table to write this byte representation to filebyte
getId()
return unique id of external data type (50..100)byte[]
getKey()
Create a byte representation of the key used in symbol tableReturns a string representation of value.getValue()
return the valueint
hashCode()
boolean
boolean
parse value of data type out of StringtoString()
return the "external" String representation which starts with an underscoreMethods inherited from class com.semedy.reasoner.api.symboltable.ExternalDataType
createValue
-
Constructor Details
-
JsonIdentifier
-
JsonIdentifier
-
JsonIdentifier
public JsonIdentifier()
-
-
Method Details
-
equals
- Overrides:
equals
in classExternalDataType
-
hashCode
public int hashCode()- Overrides:
hashCode
in classExternalDataType
-
directDecode
Description copied from class:ExternalDataType
Decode the code (if possible)
The encoding of the standard types looks as following:
_direct = 1L << 63; indicates that the code is direct encoded
_shortstring = 1L << 62; bit 62 must not be used for another encoding
_inttype = 2L << 59
_floattype = 3L << 59
_booleantype = 4L << 59- Specified by:
directDecode
in classExternalDataType
- Throws:
DatatypeConfigurationException
-
directEncode
Description copied from class:ExternalDataType
Encode the value of this as a long (if possible) delivers 0 if it is not possible- Specified by:
directEncode
in classExternalDataType
- Returns:
- Throws:
DatatypeConfigurationException
-
getId
public byte getId()Description copied from class:ExternalDataType
return unique id of external data type (50..100)- Specified by:
getId
in classExternalDataType
- Returns:
- unique id of external data type
-
getString
Description copied from class:ExternalDataType
Returns a string representation of value.
This string representation must be parseable by "parse"- Specified by:
getString
in classExternalDataType
-
getValue
Description copied from class:ExternalDataType
return the value- Specified by:
getValue
in classExternalDataType
- Returns:
-
parse
Description copied from class:ExternalDataType
parse value of data type out of String- Specified by:
parse
in classExternalDataType
- Returns:
-
getBytes
public byte[] getBytes()Description copied from class:ExternalDataType
Create a byte representation
Used in symbol table to write this byte representation to file- Overrides:
getBytes
in classExternalDataType
- Returns:
-
getKey
public byte[] getKey()Description copied from class:ExternalDataType
Create a byte representation of the key used in symbol table- Overrides:
getKey
in classExternalDataType
- Returns:
- byte representation
-
isTopIdentifier
public boolean isTopIdentifier() -
isSubIdentifier
public boolean isSubIdentifier() -
toString
Description copied from class:ExternalDataType
return the "external" String representation which starts with an underscore- Overrides:
toString
in classExternalDataType
-