/** * Add to map * * @param map * @param types * @param parentType */ private void addToMap(Map<String, String> map, List<Tree<ObjectType>> types, String parentType) { if (types != null) { for (Tree<ObjectType> type : types) { String typeName = type.getItem().getQueryName(); map.put(typeName, parentType); addToMap(map, type.getChildren(), typeName); } } }
/** * Import CMIS types to JCR repository. * * @param types CMIS types * @param typeManager JCR type manager * @param registry * @throws RepositoryException if there is a problem importing the types */ private void importTypes( List<Tree<ObjectType>> types, NodeTypeManager typeManager, NamespaceRegistry registry ) throws RepositoryException { for (Tree<ObjectType> tree : types) { importType(tree.getItem(), typeManager, registry); importTypes(tree.getChildren(), typeManager, registry); } }
if (tree.getChildren() == null) { failure = createResult(FAILURE, "Type children fetched via getTypeDescendants() don't match type children fetched via getTypeChildren(): " for (Tree<ObjectType> childType : tree.getChildren()) { if ((childType != null) && (childType.getItem() != null)) { typeDescendants.put(childType.getItem().getId(), childType.getItem()); numOfTypes += runTypeChecks(session, tree.getChildren());