Package org.apache.olingo.odata2.api.edm
Class EdmLiteral
- java.lang.Object
-
- org.apache.olingo.odata2.api.edm.EdmLiteral
-
public final class EdmLiteral extends Object
@org.apache.olingo.odata2.DoNotImplementRepresentation of a simple-typed literal
The literal is in default representation. The URI representation differs from the default representation mainly in the additional presence of type indicators (prefixes or suffixes, respectively); since the type information is stored here separately, the default representation is more appropriate. Should the URI representation be needed, it can be re-created by calling
EdmSimpleType.toUriLiteral(java.lang.String).- See Also:
EdmLiteralKind
-
-
Constructor Summary
Constructors Constructor Description EdmLiteral(EdmSimpleType type, String literal)Creates anEdmLiteralobject out of the simple type and the literal string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLiteral()Gets the literal String.EdmSimpleTypegetType()Gets the simple type of the literal.StringtoString()
-
-
-
Constructor Detail
-
EdmLiteral
public EdmLiteral(EdmSimpleType type, String literal)
Creates anEdmLiteralobject out of the simple type and the literal string.- Parameters:
type-EdmSimpleTypesimple typeliteral- String literal in default (not URI) representation
-
-
Method Detail
-
getType
public EdmSimpleType getType()
Gets the simple type of the literal.- Returns:
EdmSimpleTypeobject
-
getLiteral
public String getLiteral()
Gets the literal String.- Returns:
Stringliteral in default (not URI) representation
-
-