protected ExpandItemImpl buildExpandItem(final EdmNavigationProperty edmNavigationProperty) { return new ExpandItemImpl() .setResourcePath(new UriInfoImpl() .addResourcePart(new UriResourceNavigationPropertyImpl(edmNavigationProperty))); } }
protected ExpandItemImpl buildExpandItem(final EdmNavigationProperty edmNavigationProperty) { return new ExpandItemImpl() .setResourcePath(new UriInfoImpl() .addResourcePart(new UriResourceNavigationPropertyImpl(edmNavigationProperty))); } }
private static ExpandOptionImpl constructDraftTreeExpand(EdmEntityType rootEntityType,ExpandOptionImpl eO,Map<String,List<String>> draftTree) { if(eO==null) { eO=new ExpandOptionImpl(); } if(rootEntityType.getNavigationPropertyNames()!=null && !rootEntityType.getNavigationPropertyNames().isEmpty()) { for(String navName:rootEntityType.getNavigationPropertyNames()) { EdmNavigationProperty expandNp=rootEntityType.getNavigationProperty(navName); if(draftTree.get(rootEntityType.getName()).contains(expandNp.getType().getName())) { UriResourceNavigationPropertyImpl adminNaVPropImpl=new UriResourceNavigationPropertyImpl(expandNp); UriInfoImpl uriInfoForExpand = new UriInfoImpl().addResourcePart(adminNaVPropImpl); //Recursively set compositions ExpandOption innerExpandoption=constructDraftTreeExpand(expandNp.getType(),(ExpandOptionImpl) uriInfoForExpand.getExpandOption(),draftTree); if(innerExpandoption!=null) { uriInfoForExpand.setSystemQueryOption(innerExpandoption); ExpandItem eI = new ExpandItemImpl().setResourcePath(uriInfoForExpand).setSystemQueryOption(innerExpandoption); eO.addExpandItem(eI); } } } return eO; } return eO; }
private ExpandItem parseCrossJoinItem(UriTokenizer tokenizer) throws UriParserSemanticException { ExpandItemImpl item = new ExpandItemImpl(); if (tokenizer.next(TokenKind.STAR)) { item.setIsStar(true); } else if (tokenizer.next(TokenKind.ODataIdentifier)) { String entitySetName = tokenizer.getText(); if (crossjoinEntitySetNames.contains(entitySetName)) { UriInfoImpl resource = new UriInfoImpl().setKind(UriInfoKind.resource); final UriResourceEntitySetImpl entitySetResourceSegment = new UriResourceEntitySetImpl(edm.getEntityContainer().getEntitySet(entitySetName)); resource.addResourcePart(entitySetResourceSegment); item.setResourcePath(resource); } else { throw new UriParserSemanticException("Unknown crossjoin entity set.", UriParserSemanticException.MessageKeys.UNKNOWN_PART, entitySetName); } } else { throw new UriParserSemanticException("If the target resource is a crossjoin an entity set is " + "needed as the starting point.", UriParserSemanticException.MessageKeys.UNKNOWN_PART); } return item; }
private ExpandItem parseCrossJoinItem(UriTokenizer tokenizer) throws UriParserSemanticException { ExpandItemImpl item = new ExpandItemImpl(); if (tokenizer.next(TokenKind.STAR)) { item.setIsStar(true); } else if (tokenizer.next(TokenKind.ODataIdentifier)) { String entitySetName = tokenizer.getText(); if (crossjoinEntitySetNames.contains(entitySetName)) { UriInfoImpl resource = new UriInfoImpl().setKind(UriInfoKind.resource); final UriResourceEntitySetImpl entitySetResourceSegment = new UriResourceEntitySetImpl(edm.getEntityContainer().getEntitySet(entitySetName)); resource.addResourcePart(entitySetResourceSegment); item.setResourcePath(resource); } else { throw new UriParserSemanticException("Unknown crossjoin entity set.", UriParserSemanticException.MessageKeys.UNKNOWN_PART, entitySetName); } } else { throw new UriParserSemanticException("If the target resource is a crossjoin an entity set is " + "needed as the starting point.", UriParserSemanticException.MessageKeys.UNKNOWN_PART); } return item; }
private ExpandOption parseExpandTrafo(final EdmStructuredType referencedType) throws UriParserException, UriValidationException { ExpandItemImpl item = new ExpandItemImpl(); item.setResourcePath(ExpandParser.parseExpandPath(tokenizer, edm, referencedType, item)); final EdmType type = ParserHelper.getTypeInformation((UriResourcePartTyped) ((UriInfoImpl) item.getResourcePath()).getLastResourcePart());
private ExpandOption parseExpandTrafo(final EdmStructuredType referencedType) throws UriParserException, UriValidationException { ExpandItemImpl item = new ExpandItemImpl(); item.setResourcePath(ExpandParser.parseExpandPath(tokenizer, edm, referencedType, item)); final EdmType type = ParserHelper.getTypeInformation((UriResourcePartTyped) ((UriInfoImpl) item.getResourcePath()).getLastResourcePart());
item.setResourcePath(resource); }else{ final EdmStructuredType newReferencedType = typeCastSuffix != null ? typeCastSuffix item.setResourcePath(resource);
item.setResourcePath(resource); }else{ final EdmStructuredType newReferencedType = typeCastSuffix != null ? typeCastSuffix item.setResourcePath(resource);