@Test public void project_r1_in_R() throws Exception { EntityMetadata md = getMd("composite/R.json"); GMD gmd = new GMD(); gmd.add(projection("{'field':'r','include':1}")); CompositeMetadata r = CompositeMetadata.buildCompositeMetadata(md, gmd); System.out.println(r.toTreeString()); Assert.assertNull(r.getChildMetadata(new Path("b"))); Assert.assertNull(r.getChildMetadata(new Path("obj1.c"))); Assert.assertNotNull(r.getChildMetadata(new Path("r"))); Assert.assertNull(r.getChildMetadata(new Path("r.0.b"))); }
public void add(Projection p) { projections.add(p); }
AbstractGetMetadata implements CompositeMetadata.GetMetadata, Serializable { public void add(Projection p) { projections.add(p); } }
AbstractGetMetadata implements CompositeMetadata.GetMetadata, Serializable { public void add(Projection p) { projections.add(p); } AbstractGetMetadata();  AbstractGetMetadata(Projection projection,
                               QueryExpression query);  AbstractGetMetadata(List<Projection> projections,
                               List<QueryExpression> queries); }
AbstractGetMetadata implements CompositeMetadata.GetMetadata, Serializable { public void add(Projection p) { projections.add(p); } AbstractGetMetadata();  AbstractGetMetadata(Projection projection,
                               QueryExpression query);  AbstractGetMetadata(List<Projection> projections,
                               List<QueryExpression> queries); void add(Projection p); void add(QueryExpression q); @Override EntityMetadata getMetadata(Path injectionField,
                                      String entityName,
                                      String version); }
AbstractGetMetadata implements CompositeMetadata.GetMetadata, Serializable { public void add(Projection p) { projections.add(p); } AbstractGetMetadata();  AbstractGetMetadata(Projection projection,
                               QueryExpression query);  AbstractGetMetadata(List<Projection> projections,
                               List<QueryExpression> queries); void add(Projection p); void add(QueryExpression q); @Override EntityMetadata getMetadata(Path injectionField,
                                      String entityName,
                                      String version);  }