@Override public boolean isCollection() { UriInfoImpl uriInfo = (UriInfoImpl) path; UriResource lastResourcePart = uriInfo.getLastResourcePart(); return lastResourcePart instanceof UriResourcePartTyped ? ((UriResourcePartTyped) lastResourcePart).isCollection() : false; }
@Override public boolean isCollection() { UriInfoImpl uriInfo = (UriInfoImpl) path; UriResource lastResourcePart = uriInfo.getLastResourcePart(); return lastResourcePart instanceof UriResourcePartTyped ? ((UriResourcePartTyped) lastResourcePart).isCollection() : false; }
private UriInfo parseGroupingProperty(final EdmStructuredType referencedType) throws UriParserException { UriInfoImpl uriInfo = new UriInfoImpl(); final String identifierLeft = parsePathPrefix(uriInfo, referencedType); if (identifierLeft != null) { throw new UriParserSemanticException("Unknown identifier in grouping property path.", UriParserSemanticException.MessageKeys.EXPRESSION_PROPERTY_NOT_IN_TYPE, identifierLeft, uriInfo.getLastResourcePart() != null && uriInfo.getLastResourcePart() instanceof UriResourcePartTyped ? ((UriResourcePartTyped) uriInfo.getLastResourcePart()) .getType().getFullQualifiedName().getFullQualifiedNameAsString() : ""); } return uriInfo; }
private UriInfo parseGroupingProperty(final EdmStructuredType referencedType) throws UriParserException { UriInfoImpl uriInfo = new UriInfoImpl(); final String identifierLeft = parsePathPrefix(uriInfo, referencedType); if (identifierLeft != null) { throw new UriParserSemanticException("Unknown identifier in grouping property path.", UriParserSemanticException.MessageKeys.EXPRESSION_PROPERTY_NOT_IN_TYPE, identifierLeft, uriInfo.getLastResourcePart() != null && uriInfo.getLastResourcePart() instanceof UriResourcePartTyped ? ((UriResourcePartTyped) uriInfo.getLastResourcePart()) .getType().getFullQualifiedName().getFullQualifiedNameAsString() : ""); } return uriInfo; }
@Override public EdmType getType() { UriInfoImpl uriInfo = (UriInfoImpl) path; UriResourceImpl lastResourcePart = (UriResourceImpl) uriInfo.getLastResourcePart(); if (lastResourcePart instanceof UriResourceWithKeysImpl) { UriResourceWithKeysImpl lastKeyPred = (UriResourceWithKeysImpl) lastResourcePart; if (lastKeyPred.getTypeFilterOnEntry() != null) { return lastKeyPred.getTypeFilterOnEntry(); } else if (lastKeyPred.getTypeFilterOnCollection() != null) { return lastKeyPred.getTypeFilterOnCollection(); } return lastKeyPred.getType(); } else if (lastResourcePart instanceof UriResourceTypedImpl) { UriResourceTypedImpl lastTyped = (UriResourceTypedImpl) lastResourcePart; EdmType type = lastTyped.getTypeFilter(); if (type != null) { return type; } return lastTyped.getType(); } else if (lastResourcePart instanceof UriResourceActionImpl) { return ((UriResourceActionImpl) lastResourcePart).getType(); } else { return null; } }
@Override public EdmType getType() { UriInfoImpl uriInfo = (UriInfoImpl) path; UriResourceImpl lastResourcePart = (UriResourceImpl) uriInfo.getLastResourcePart(); if (lastResourcePart instanceof UriResourceWithKeysImpl) { UriResourceWithKeysImpl lastKeyPred = (UriResourceWithKeysImpl) lastResourcePart; if (lastKeyPred.getTypeFilterOnEntry() != null) { return lastKeyPred.getTypeFilterOnEntry(); } else if (lastKeyPred.getTypeFilterOnCollection() != null) { return lastKeyPred.getTypeFilterOnCollection(); } return lastKeyPred.getType(); } else if (lastResourcePart instanceof UriResourceTypedImpl) { UriResourceTypedImpl lastTyped = (UriResourceTypedImpl) lastResourcePart; EdmType type = lastTyped.getTypeFilter(); if (type != null) { return type; } return lastTyped.getType(); } else if (lastResourcePart instanceof UriResourceActionImpl) { return ((UriResourceActionImpl) lastResourcePart).getType(); } else { return null; } }
item.setResourcePath(ExpandParser.parseExpandPath(tokenizer, edm, referencedType, item)); final EdmType type = ParserHelper.getTypeInformation((UriResourcePartTyped) ((UriInfoImpl) item.getResourcePath()).getLastResourcePart()); if (tokenizer.next(TokenKind.COMMA)) { if (tokenizer.next(TokenKind.FilterTrafo)) {
item.setResourcePath(ExpandParser.parseExpandPath(tokenizer, edm, referencedType, item)); final EdmType type = ParserHelper.getTypeInformation((UriResourcePartTyped) ((UriInfoImpl) item.getResourcePath()).getLastResourcePart()); if (tokenizer.next(TokenKind.COMMA)) { if (tokenizer.next(TokenKind.FilterTrafo)) {
UriResourcePartTyped lastPart = (UriResourcePartTyped) resource.getLastResourcePart();
UriResourcePartTyped lastPart = (UriResourcePartTyped) resource.getLastResourcePart();
final UriResource lastResourcePart = uriInfo.getLastResourcePart(); if (lastResourcePart == null) { throw new UriParserSyntaxException("Invalid 'aggregateExpr' syntax.",
final UriResource lastResourcePart = uriInfo.getLastResourcePart(); if (lastResourcePart == null) { throw new UriParserSyntaxException("Invalid 'aggregateExpr' syntax.",