@Override public String getName() { return parentOptions.getName(); }
private void parseExpandOption(ExpandOption expandOption, final EdmType contextType, final boolean isAll, final List<String> entitySetNames, final Map<String, AliasQueryOption> aliases) throws UriParserException, UriValidationException { if (expandOption != null) { if (!(contextType instanceof EdmStructuredType || isAll || (entitySetNames != null && !entitySetNames.isEmpty()))) { throw new UriValidationException("Expand is only allowed on structured types!", UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED, expandOption.getName()); } final String optionValue = expandOption.getText(); UriTokenizer expandTokenizer = new UriTokenizer(optionValue); final ExpandOption option = new ExpandParser(edm, odata, aliases, entitySetNames).parse(expandTokenizer, contextType instanceof EdmStructuredType ? (EdmStructuredType) contextType : null); checkOptionEOF(expandTokenizer, expandOption.getName(), optionValue); for (final ExpandItem item : option.getExpandItems()) { ((ExpandOptionImpl) expandOption).addExpandItem(item); } } }
private void parseExpandOption(ExpandOption expandOption, final EdmType contextType, final boolean isAll, final List<String> entitySetNames, final Map<String, AliasQueryOption> aliases) throws UriParserException, UriValidationException { if (expandOption != null) { if (!(contextType instanceof EdmStructuredType || isAll || (entitySetNames != null && !entitySetNames.isEmpty()))) { throw new UriValidationException("Expand is only allowed on structured types!", UriValidationException.MessageKeys.SYSTEM_QUERY_OPTION_NOT_ALLOWED, expandOption.getName()); } final String optionValue = expandOption.getText(); UriTokenizer expandTokenizer = new UriTokenizer(optionValue); final ExpandOption option = new ExpandParser(edm, odata, aliases, entitySetNames).parse(expandTokenizer, contextType instanceof EdmStructuredType ? (EdmStructuredType) contextType : null); checkOptionEOF(expandTokenizer, expandOption.getName(), optionValue); for (final ExpandItem item : option.getExpandItems()) { ((ExpandOptionImpl) expandOption).addExpandItem(item); } } }