/** * Creates a node to be tested for the given metadata object and value policy. */ private <T extends AbstractMetadata> TreeNode create(final T metadata, final Class<? super T> baseType) { final MetadataStandard standard = MetadataStandard.ISO_19115; final TreeTableView table = new TreeTableView(standard, metadata, baseType, valuePolicy); return (TreeNode) table.getRoot(); }
/** * Creates a collection to be tested for the given metadata object and value policy. */ private static TreeNodeChildren create(final DefaultCitation citation, final ValueExistencePolicy valuePolicy) { final MetadataStandard standard = MetadataStandard.ISO_19115; final TreeTableView table = new TreeTableView(standard, citation, Citation.class, valuePolicy); final TreeNode node = (TreeNode) table.getRoot(); final PropertyAccessor accessor = standard.getAccessor(new CacheKey(citation.getClass()), true); return new TreeNodeChildren(node, citation, accessor); }