Examples of TypeDefinitionListImpl


Examples of org.apache.chemistry.opencmis.commons.impl.dataobjects.TypeDefinitionListImpl

        // repository exists

        int skip = skipCount == null ? 0 : skipCount.intValue();
        int max = maxItems == null ? -1 : maxItems.intValue();

        TypeDefinitionListImpl result = new TypeDefinitionListImpl();
        List<TypeDefinitionContainer> children;
        if (typeId == null) {
            // spec says that base types must be returned in this case
            children = fStoreManager.getRootTypes(repositoryId, inclPropDefs);
        } else {
            children = getTypeDescendants(context, repositoryId, typeId, BigInteger.valueOf(1),
                    inclPropDefs, null);
        }
        result.setNumItems(BigInteger.valueOf(children.size()));
        result.setHasMoreItems(children.size() > max - skip);
        List<TypeDefinition> childrenTypes = new ArrayList<TypeDefinition>();
        ListIterator<TypeDefinitionContainer> it = children.listIterator(skip);
        if (max < 0) {
            max = children.size();
        }
        for (int i = skip; i < max + skip && it.hasNext(); i++) {
            childrenTypes.add(it.next().getTypeDefinition());
        }

        result.setList(childrenTypes);
        return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.