Class EdmGeometryLineString
java.lang.Object
org.apache.olingo.commons.core.edm.primitivetype.SingletonPrimitiveType
org.apache.olingo.commons.core.edm.primitivetype.AbstractGeospatialType<LineString>
org.apache.olingo.commons.core.edm.primitivetype.EdmGeometryLineString
- All Implemented Interfaces:
EdmNamed,EdmPrimitiveType,EdmType
-
Field Summary
FieldsFields inherited from class org.apache.olingo.commons.core.edm.primitivetype.AbstractGeospatialType
dimension, typeFields inherited from class org.apache.olingo.commons.core.edm.primitivetype.SingletonPrimitiveType
nameFields inherited from interface org.apache.olingo.commons.api.edm.EdmPrimitiveType
EDM_NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfromUriLiteral(String literal) Converts URI literal representation to default literal representation.static EdmGeometryLineStringprotected <T> TinternalValueOfString(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, Class<T> returnType) protected <T> StringinternalValueToString(T value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) booleanisCompatible(EdmPrimitiveType primitiveType) Checks type compatibility.toString()toUriLiteral(String literal) Converts default literal representation to URI literal representation.booleanvalidate(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) Validates literal value.final <T> TvalueOfString(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, Class<T> returnType) Converts literal representation of value to system data type.final StringvalueToString(Object value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) Converts system data type to literal representation of value.Methods inherited from class org.apache.olingo.commons.core.edm.primitivetype.AbstractGeospatialType
getDefaultType, stringToCollection, stringToLineString, stringToMultiLineString, stringToMultiPoint, stringToMultiPolygon, stringToPoint, stringToPolygon, toString, toString, toString, toString, toString, toString, toStringMethods inherited from class org.apache.olingo.commons.core.edm.primitivetype.SingletonPrimitiveType
equals, getKind, getName, getNamespace, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.olingo.commons.api.edm.EdmPrimitiveType
validateDecimals
-
Field Details
-
uriPrefix
-
uriSuffix
-
fqn
-
-
Constructor Details
-
EdmGeometryLineString
public EdmGeometryLineString()
-
-
Method Details
-
getInstance
-
internalValueOfString
protected <T> T internalValueOfString(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, Class<T> returnType) throws EdmPrimitiveTypeException - Throws:
EdmPrimitiveTypeException
-
internalValueToString
protected <T> String internalValueToString(T value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) throws EdmPrimitiveTypeException - Throws:
EdmPrimitiveTypeException
-
getFullQualifiedName
- Specified by:
getFullQualifiedNamein interfaceEdmType- Returns:
- full qualified name
-
isCompatible
Description copied from interface:EdmPrimitiveTypeChecks type compatibility.- Specified by:
isCompatiblein interfaceEdmPrimitiveType- Parameters:
primitiveType- theEdmPrimitiveTypeto be tested for compatibility- Returns:
trueif the provided type is compatible to this type
-
validate
public boolean validate(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) Description copied from interface:EdmPrimitiveTypeValidates literal value.- Specified by:
validatein interfaceEdmPrimitiveType- Parameters:
value- the literal valueisNullable- whether thenullvalue is allowedmaxLength- the maximum lengthprecision- the precisionscale- the scaleisUnicode- whether non-ASCII characters are allowed (relevant only for Edm.String)- Returns:
trueif the validation is successful
-
valueOfString
public final <T> T valueOfString(String value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode, Class<T> returnType) throws EdmPrimitiveTypeException Description copied from interface:EdmPrimitiveTypeConverts literal representation of value to system data type.- Specified by:
valueOfStringin interfaceEdmPrimitiveType- Parameters:
value- the literal representation of valueisNullable- whether thenullvalue is allowedmaxLength- the maximum lengthprecision- the precisionscale- the scaleisUnicode- whether non-ASCII characters are allowed (relevant only for Edm.String)returnType- the class of the returned value; it must be one of the list in the documentation ofEdmPrimitiveType- Returns:
- the value as an instance of the class the parameter
returnTypeindicates - Throws:
EdmPrimitiveTypeException
-
valueToString
public final String valueToString(Object value, Boolean isNullable, Integer maxLength, Integer precision, Integer scale, Boolean isUnicode) throws EdmPrimitiveTypeException Description copied from interface:EdmPrimitiveTypeConverts system data type to literal representation of value.Returns
nullif value isnullandnullis an allowed value.- Specified by:
valueToStringin interfaceEdmPrimitiveType- Parameters:
value- the Java value as Object; its type must be one of the list in the documentation ofEdmPrimitiveTypeisNullable- whether thenullvalue is allowedmaxLength- the maximum lengthprecision- the precisionscale- the scaleisUnicode- whether non-ASCII characters are allowed (relevant only for Edm.String)- Returns:
- literal representation as String
- Throws:
EdmPrimitiveTypeException
-
toUriLiteral
Description copied from interface:EdmPrimitiveTypeConverts default literal representation to URI literal representation.Returns
nullif the literal isnull. Does not perform any validation.- Specified by:
toUriLiteralin interfaceEdmPrimitiveType- Parameters:
literal- the literal in default representation- Returns:
- URI literal representation as String
-
fromUriLiteral
Description copied from interface:EdmPrimitiveTypeConverts URI literal representation to default literal representation.Returns
nullif the literal isnull. Checks the presence of a required prefix and of required surrounding quotation marks but does not perform any further validation.- Specified by:
fromUriLiteralin interfaceEdmPrimitiveType- Parameters:
literal- the literal in URI representation- Returns:
- default literal representation as String
- Throws:
EdmPrimitiveTypeException- if a required prefix or required surrounding quotation marks are missing
-
toString
-