private Enumeration createEnumExpression(final String primitiveValueLiteral) throws UriParserException { final EdmEnumType enumType = getEnumType(primitiveValueLiteral); // The Enumeration interface could be extended to handle the value as a whole, in line with the primitive type. try { return new EnumerationImpl(enumType, Arrays.asList(enumType.fromUriLiteral(primitiveValueLiteral).split(","))); } catch (final EdmPrimitiveTypeException e) { // This part should not be reached, so a general error message key can be re-used. throw new UriParserSemanticException("Wrong enumeration value '" + primitiveValueLiteral + "'.", e, UriParserSemanticException.MessageKeys.UNKNOWN_PART, primitiveValueLiteral); } }
private Enumeration createEnumExpression(final String primitiveValueLiteral) throws UriParserException { final EdmEnumType enumType = getEnumType(primitiveValueLiteral); // The Enumeration interface could be extended to handle the value as a whole, in line with the primitive type. try { return new EnumerationImpl(enumType, Arrays.asList(enumType.fromUriLiteral(primitiveValueLiteral).split(","))); } catch (final EdmPrimitiveTypeException e) { // This part should not be reached, so a general error message key can be re-used. throw new UriParserSemanticException("Wrong enumeration value '" + primitiveValueLiteral + "'.", e, UriParserSemanticException.MessageKeys.UNKNOWN_PART, primitiveValueLiteral); } }