@Test public void fields_a() throws Exception { EntityMetadata md = getMd("composite/A.json"); CompositeMetadata a = CompositeMetadata.buildCompositeMetadata(md, new SimpleGMD()); Assert.assertEquals(6, a.getEntitySchema().getFields().getNumChildren()); ArrayField bfields = (ArrayField) a.getEntitySchema().getFields().getField("b"); Assert.assertNotNull(bfields); Assert.assertEquals(4, ((ObjectArrayElement) bfields.getElement()).getFields().getNumChildren()); }
public static CompositeMetadata buildCompositeMetadata(EntityMetadata root, GetMetadata gmd) { LOGGER.debug("enter buildCompositeMetadata"); Error.push("compositeMetadata"); try { CompositeMetadata cmd = buildCompositeMetadata(root, gmd, new Path(), null, new MutablePath()); return cmd; } finally { LOGGER.debug("end buildCompositeMetadata"); Error.pop(); } }
CompositeMetadata extends EntityMetadata { public static CompositeMetadata buildCompositeMetadata(EntityMetadata root, GetMetadata gmd) { LOGGER.debug("enter buildCompositeMetadata"); Error.push("compositeMetadata"); try { CompositeMetadata cmd = buildCompositeMetadata(root, gmd, new Path(), null, new MutablePath()); return cmd; } finally { LOGGER.debug("end buildCompositeMetadata"); Error.pop(); } } }
CompositeMetadata extends EntityMetadata { public static CompositeMetadata buildCompositeMetadata(EntityMetadata root, GetMetadata gmd) { LOGGER.debug("enter buildCompositeMetadata"); Error.push("compositeMetadata"); try { CompositeMetadata cmd = buildCompositeMetadata(root, gmd, new Path(), null, new MutablePath()); return cmd; } finally { LOGGER.debug("end buildCompositeMetadata"); Error.pop(); } } CompositeMetadata(EntityInfo info,
                             CompositeSchema schema);  CompositeMetadata(EntityInfo info,
                             CompositeSchema schema,
                             Path path,
                             CompositeMetadata parent); }
CompositeMetadata extends EntityMetadata { public static CompositeMetadata buildCompositeMetadata(EntityMetadata root, GetMetadata gmd) { LOGGER.debug("enter buildCompositeMetadata"); Error.push("compositeMetadata"); try { CompositeMetadata cmd = buildCompositeMetadata(root, gmd, new Path(), null, new MutablePath()); return cmd; } finally { LOGGER.debug("end buildCompositeMetadata"); Error.pop(); } } CompositeMetadata(EntityInfo info,
                             CompositeSchema schema);  CompositeMetadata(EntityInfo info,
                             CompositeSchema schema,
                             Path path,
                             CompositeMetadata parent); Path getEntityPath(); boolean isSimple(); CompositeMetadata getParent(); CompositeMetadata getChildMetadata(Path entityPath); ResolvedReferenceField getDescendantReference(Path entityPath); CompositeMetadata getDescendantMetadata(Path entityPath); ResolvedReferenceField getChildReference(Path entityPath); Set<Path> getChildPaths(); String toTreeString(); @Override String toString(); CompositeMetadata getEntityOfPath(Path path); CompositeMetadata getEntityOfField(FieldTreeNode field); ResolvedReferenceField getResolvedReferenceOfField(Path field); ResolvedReferenceField getResolvedReferenceOfField(FieldTreeNode field); Path getEntityRelativeFieldName(FieldTreeNode fieldNode); static CompositeMetadata buildCompositeMetadata(EntityMetadata root,
                                                           GetMetadata gmd); }
CompositeMetadata extends EntityMetadata { public static CompositeMetadata buildCompositeMetadata(EntityMetadata root, GetMetadata gmd) { LOGGER.debug("enter buildCompositeMetadata"); Error.push("compositeMetadata"); try { CompositeMetadata cmd = buildCompositeMetadata(root, gmd, new Path(), null, new MutablePath()); return cmd; } finally { LOGGER.debug("end buildCompositeMetadata"); Error.pop(); } } CompositeMetadata(EntityInfo info,
                             CompositeSchema schema);  CompositeMetadata(EntityInfo info,
                             CompositeSchema schema,
                             Path path,
                             CompositeMetadata parent); Path getEntityPath(); boolean isSimple(); CompositeMetadata getParent(); CompositeMetadata getChildMetadata(Path entityPath); ResolvedReferenceField getDescendantReference(Path entityPath); CompositeMetadata getDescendantMetadata(Path entityPath); ResolvedReferenceField getChildReference(Path entityPath); Set<Path> getChildPaths(); String toTreeString(); @Override String toString(); CompositeMetadata getEntityOfPath(Path path); CompositeMetadata getEntityOfField(FieldTreeNode field); ResolvedReferenceField getResolvedReferenceOfField(Path field); ResolvedReferenceField getResolvedReferenceOfField(FieldTreeNode field); Path getEntityRelativeFieldName(FieldTreeNode fieldNode); static CompositeMetadata buildCompositeMetadata(EntityMetadata root,
                                                           GetMetadata gmd);  }