public abstract class AbstractSimpleType extends Object implements EdmSimpleType
EDM_NAMESPACE, SYSTEM_NAMESPACE| Constructor and Description |
|---|
AbstractSimpleType() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
EdmTypeKind |
getKind() |
String |
getName() |
String |
getNamespace()
Namespace of this
EdmType |
int |
hashCode() |
protected abstract <T> T |
internalValueOfString(String value,
EdmLiteralKind literalKind,
EdmFacets facets,
Class<T> returnType) |
protected abstract <T> String |
internalValueToString(T value,
EdmLiteralKind literalKind,
EdmFacets facets) |
boolean |
isCompatible(EdmSimpleType simpleType)
Checks type compatibility.
|
String |
toString() |
String |
toUriLiteral(String literal)
Converts default literal representation to URI literal representation.
|
boolean |
validate(String value,
EdmLiteralKind literalKind,
EdmFacets facets)
Validates literal value.
|
<T> T |
valueOfString(String value,
EdmLiteralKind literalKind,
EdmFacets facets,
Class<T> returnType)
Converts literal representation of value to system data type.
|
String |
valueToString(Object value,
EdmLiteralKind literalKind,
EdmFacets facets)
Converts system data type to literal representation of value.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDefaultTypepublic String getNamespace() throws EdmException
EdmTypeEdmTypegetNamespace in interface EdmTypeEdmExceptionpublic EdmTypeKind getKind()
getKind in interface EdmTypeEdmTypeKind of this EdmTypepublic String getName() throws EdmException
getName in interface EdmNamedEdmExceptionpublic boolean isCompatible(EdmSimpleType simpleType)
EdmSimpleTypeisCompatible in interface EdmSimpleTypesimpleType - the EdmSimpleType to be tested for compatibilitytrue if the provided type is compatible to this typepublic boolean validate(String value, EdmLiteralKind literalKind, EdmFacets facets)
EdmSimpleTypevalidate in interface EdmSimpleTypevalue - the literal valueliteralKind - the kind of literal representation of valuefacets - additional constraints for parsing (optional)true if the validation is successfulEdmLiteralKind,
EdmFacetspublic final <T> T valueOfString(String value, EdmLiteralKind literalKind, EdmFacets facets, Class<T> returnType) throws EdmSimpleTypeException
EdmSimpleTypevalueOfString in interface EdmSimpleTypevalue - the literal representation of valueliteralKind - the kind of literal representation of valuefacets - additional constraints for parsing (optional)returnType - the class of the returned value; it must be one of the
list in the documentation of EdmSimpleTypereturnType indicatesEdmSimpleTypeExceptionEdmLiteralKind,
EdmFacetsprotected abstract <T> T internalValueOfString(String value, EdmLiteralKind literalKind, EdmFacets facets, Class<T> returnType) throws EdmSimpleTypeException
EdmSimpleTypeExceptionpublic final String valueToString(Object value, EdmLiteralKind literalKind, EdmFacets facets) throws EdmSimpleTypeException
EdmSimpleTypeConverts system data type to literal representation of value.
Returns null if value is null
and the facets allow the null value.
valueToString in interface EdmSimpleTypevalue - the Java value as Object; its type must be one of the list
in the documentation of EdmSimpleTypeliteralKind - the requested kind of literal representationfacets - additional constraints for formatting (optional)EdmSimpleTypeExceptionEdmLiteralKind,
EdmFacetsprotected abstract <T> String internalValueToString(T value, EdmLiteralKind literalKind, EdmFacets facets) throws EdmSimpleTypeException
EdmSimpleTypeExceptionpublic String toUriLiteral(String literal) throws EdmSimpleTypeException
EdmSimpleTypetoUriLiteral in interface EdmSimpleTypeliteral - the literal in default representationEdmSimpleTypeExceptionCopyright © 2020. All rights reserved.