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 UriResource parsePathSegment(final EdmElement property) throws UriParserException { if (property == null || !(property.getType().getKind() == EdmTypeKind.COMPLEX || property instanceof EdmNavigationProperty)) { // Could be a customAggregate or $count. return null; } if (tokenizer.next(TokenKind.SLASH)) { final EdmStructuredType typeCast = ParserHelper.parseTypeCast(tokenizer, edm, (EdmStructuredType) property.getType()); if (typeCast != null) { ParserHelper.requireNext(tokenizer, TokenKind.SLASH); } return property.getType().getKind() == EdmTypeKind.COMPLEX ? new UriResourceComplexPropertyImpl((EdmProperty) property).setTypeFilter(typeCast) : new UriResourceNavigationPropertyImpl((EdmNavigationProperty) property).setCollectionTypeFilter(typeCast); } else { return null; } }
private UriResource parsePathSegment(final EdmElement property) throws UriParserException { if (property == null || !(property.getType().getKind() == EdmTypeKind.COMPLEX || property instanceof EdmNavigationProperty)) { // Could be a customAggregate or $count. return null; } if (tokenizer.next(TokenKind.SLASH)) { final EdmStructuredType typeCast = ParserHelper.parseTypeCast(tokenizer, edm, (EdmStructuredType) property.getType()); if (typeCast != null) { ParserHelper.requireNext(tokenizer, TokenKind.SLASH); } return property.getType().getKind() == EdmTypeKind.COMPLEX ? new UriResourceComplexPropertyImpl((EdmProperty) property).setTypeFilter(typeCast) : new UriResourceNavigationPropertyImpl((EdmNavigationProperty) property).setCollectionTypeFilter(typeCast); } else { return null; } }
uriInfo.addResourcePart( property instanceof EdmNavigationProperty ? new UriResourceNavigationPropertyImpl((EdmNavigationProperty) property) : property.getType().getKind() == EdmTypeKind.COMPLEX ? new UriResourceComplexPropertyImpl((EdmProperty) property) :
uriInfo.addResourcePart( property instanceof EdmNavigationProperty ? new UriResourceNavigationPropertyImpl((EdmNavigationProperty) property) : property.getType().getKind() == EdmTypeKind.COMPLEX ? new UriResourceComplexPropertyImpl((EdmProperty) property) :
resource.addResourcePart(new UriResourceNavigationPropertyImpl(navigationProperty));
ParserHelper.parseNavigationKeyPredicate(tokenizer, navigationProperty, edm, null, aliases); ParserHelper.requireTokenEnd(tokenizer); return new UriResourceNavigationPropertyImpl(navigationProperty) .setKeyPredicates(keyPredicate);
resource.addResourcePart(new UriResourceNavigationPropertyImpl(navigationProperty));
ParserHelper.parseNavigationKeyPredicate(tokenizer, navigationProperty, edm, null, aliases); ParserHelper.requireTokenEnd(tokenizer); return new UriResourceNavigationPropertyImpl(navigationProperty) .setKeyPredicates(keyPredicate);
new UriResourceNavigationPropertyImpl((EdmNavigationProperty) property); navigationResource.setKeyPredicates( ParserHelper.parseNavigationKeyPredicate(tokenizer, (EdmNavigationProperty) property,
new UriResourceNavigationPropertyImpl((EdmNavigationProperty) property); navigationResource.setKeyPredicates( ParserHelper.parseNavigationKeyPredicate(tokenizer, (EdmNavigationProperty) property,
referencedType.getName(), name); } else { resource.addResourcePart(new UriResourceNavigationPropertyImpl(navigationProperty));
referencedType.getName(), name); } else { resource.addResourcePart(new UriResourceNavigationPropertyImpl(navigationProperty));