@Override public NodeTypeIterator getSubtypes() { Map<String, Set<String>> inheritance = Maps.newHashMap(); Tree root = definition.getParent(); for (Tree child : root.getChildren()) { String oakName = getOakName(child); PropertyState supertypes = child.getProperty(JCR_SUPERTYPES); if (supertypes != null) { for (String supername : supertypes.getValue(Type.NAMES)) { Set<String> subtypes = inheritance.get(supername); if (subtypes == null) { subtypes = Sets.newHashSet(); inheritance.put(supername, subtypes); } subtypes.add(oakName); } } } Map<String, NodeType> subtypes = Maps.newHashMap(); addSubtypes(getOakName(), subtypes, root, inheritance); return new NodeTypeIteratorAdapter(subtypes.values()); }
@Override public NodeTypeIterator getSubtypes() { Map<String, Set<String>> inheritance = Maps.newHashMap(); Tree root = definition.getParent(); for (Tree child : root.getChildren()) { String oakName = getOakName(child); PropertyState supertypes = child.getProperty(JCR_SUPERTYPES); if (supertypes != null) { for (String supername : supertypes.getValue(Type.NAMES)) { Set<String> subtypes = inheritance.get(supername); if (subtypes == null) { subtypes = Sets.newHashSet(); inheritance.put(supername, subtypes); } subtypes.add(oakName); } } } Map<String, NodeType> subtypes = Maps.newHashMap(); addSubtypes(getOakName(), subtypes, root, inheritance); return new NodeTypeIteratorAdapter(subtypes.values()); }
@Override public NodeTypeIterator getSubtypes() { Map<String, Set<String>> inheritance = Maps.newHashMap(); Tree root = definition.getParent(); for (Tree child : root.getChildren()) { String oakName = getOakName(child); PropertyState supertypes = child.getProperty(JCR_SUPERTYPES); if (supertypes != null) { for (String supername : supertypes.getValue(Type.NAMES)) { Set<String> subtypes = inheritance.get(supername); if (subtypes == null) { subtypes = Sets.newHashSet(); inheritance.put(supername, subtypes); } subtypes.add(oakName); } } } Map<String, NodeType> subtypes = Maps.newHashMap(); addSubtypes(getOakName(), subtypes, root, inheritance); return new NodeTypeIteratorAdapter(subtypes.values()); }