Examples of ObjectListImpl


Examples of com.sun.org.apache.xerces.internal.impl.xs.util.ObjectListImpl

                table = fGlobalNotationDeclsExt;
                break;
            }

            Object[] entries = table.getEntries();
            fComponentsExt[objectType] = new ObjectListImpl(entries, entries.length);
        }

        return fComponentsExt[objectType];
    }
View Full Code Here

Examples of com.sun.org.apache.xerces.internal.impl.xs.util.ObjectListImpl

                table = fGlobalNotationDeclsExt;
                break;
            }

            Object[] entries = table.getEntries();
            fComponentsExt[objectType] = new ObjectListImpl(entries, entries.length);
        }

        return fComponentsExt[objectType];
    }
View Full Code Here

Examples of mf.org.apache.xerces.impl.xs.util.ObjectListImpl

            if (fEnumeration != null) {
                facets[count] =
                    new XSMVFacetImpl(
                            FACET_ENUMERATION,
                            this.getLexicalEnumeration(),
                            new ObjectListImpl(fEnumeration, fEnumerationSize),
                            enumerationAnnotations);
                count++;
            }
            fMultiValueFacets = new XSObjectListImpl(facets, count);
        }
View Full Code Here

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

    public static ObjectList convert(CmisObjectListType objectList) {
        if (objectList == null) {
            return null;
        }

        ObjectListImpl result = new ObjectListImpl();

        List<ObjectData> objects = new ArrayList<ObjectData>();
        for (CmisObjectType object : objectList.getObjects()) {
            objects.add(convert(object));
        }

        result.setObjects(objects);
        result.setHasMoreItems(objectList.isHasMoreItems());
        result.setNumItems(objectList.getNumItems());

        // handle extensions
        convertExtension(objectList, result);

        return result;
View Full Code Here

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

    public ObjectList buildResultList(TypeManager tm, String user, Boolean includeAllowableActions,
            IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) {

        sortMatches();

        ObjectListImpl res = new ObjectListImpl();
        res.setNumItems(BigInteger.valueOf(matches.size()));
        int start = 0;
        if (skipCount != null) {
            start = (int) skipCount.longValue();
        }
        if (start < 0) {
            start = 0;
        }
        if (start > matches.size()) {
            start = matches.size();
        }
        int stop = 0;
        if (maxItems != null) {
            stop = start + (int) maxItems.longValue();
        }
        if (stop <= 0 || stop > matches.size()) {
            stop = matches.size();
        }
        res.setHasMoreItems(stop < matches.size());
        if (start > 0 || stop > 0) {
            matches = matches.subList(start, stop);
        }
        List<ObjectData> objDataList = new ArrayList<ObjectData>();
        Map<String, String> props = queryObj.getRequestedProperties();
        Map<String, String> funcs = queryObj.getRequestedFuncs();
        for (StoredObject so : matches) {
            TypeDefinition td = tm.getTypeById(so.getTypeId()).getTypeDefinition();
            ObjectData od = PropertyCreationHelper.getObjectDataQueryResult(td, so, user, props, funcs,
                    includeAllowableActions, includeRelationships, renditionFilter);

            objDataList.add(od);
        }
        res.setObjects(objDataList);
        return res;
    }
View Full Code Here

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

            String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
            String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension,
            ObjectInfoHandler objectInfos) {

        validator.getCheckedOutDocs(context, repositoryId, folderId, extension);
        ObjectListImpl res = new ObjectListImpl();
        List<ObjectData> odList = new ArrayList<ObjectData>();

        LOG.debug("start getCheckedOutDocs()");

        String user = context.getUsername();
        if (null == folderId) {
            List<StoredObject> checkedOuts = fStoreManager.getObjectStore(repositoryId).getCheckedOutDocuments(
                    orderBy, context.getUsername(), includeRelationships);
            for (StoredObject checkedOut : checkedOuts) {
                TypeDefinition td = fStoreManager.getTypeById(repositoryId, checkedOut.getTypeId()).getTypeDefinition();
//                DocumentVersion workingCopy = ((VersionedDocument) checkedOut).getPwc();
//                if (null == workingCopy)
//                  throw new CmisConstraintException("document " + checkedOut + " is checked out but has no working copy");      
                ObjectData od = PropertyCreationHelper.getObjectData(td, checkedOut, filter, user,
                        includeAllowableActions, includeRelationships, renditionFilter, false, false, extension);
                if (context.isObjectInfoRequired()) {
                    ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                    fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, /* workingCopy */ checkedOut, objectInfo);
                    objectInfos.addObjectInfo(objectInfo);
                }
                odList.add(od);
            }
        } else {
            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, false, -1, -1, false, context
                            .isObjectInfoRequired() ? objectInfos : null, user);
            for (ObjectInFolderData child : children.getObjects()) {
                ObjectData obj = child.getObject();
                StoredObject so = fStoreManager.getObjectStore(repositoryId).getObjectById(obj.getId());
                LOG.info("Checked out: children:" + obj.getId());
                if (so instanceof DocumentVersion && ((DocumentVersion) so).getParentDocument().isCheckedOut()) {
                    odList.add(obj);
                    if (context.isObjectInfoRequired()) {
                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                        fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, objectInfo);
                        objectInfos.addObjectInfo(objectInfo);
                    }
                }
            }
        }
        res.setObjects(odList);
        res.setNumItems(BigInteger.valueOf(odList.size()));

        LOG.debug("end getCheckedOutDocs()");
        return res;
    }
View Full Code Here

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

    public ObjectList buildResultList(TypeManager tm, String user, Boolean includeAllowableActions,
            IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount) {

        sortMatches();

        ObjectListImpl res = new ObjectListImpl();
        res.setNumItems(BigInteger.valueOf(matches.size()));
        int start = 0;
        if (skipCount != null) {
            start = (int) skipCount.longValue();
        }
        if (start < 0) {
            start = 0;
        }
        if (start > matches.size()) {
            start = matches.size();
        }
        int stop = 0;
        if (maxItems != null) {
            stop = start + (int) maxItems.longValue();
        }
        if (stop <= 0 || stop > matches.size()) {
            stop = matches.size();
        }
        res.setHasMoreItems(stop < matches.size());
        if (start > 0 || stop > 0) {
            matches = matches.subList(start, stop);
        }
        List<ObjectData> objDataList = new ArrayList<ObjectData>();
        Map<String, String> props = queryObj.getRequestedProperties();
        Map<String, String> funcs = queryObj.getRequestedFuncs();
        for (StoredObject so : matches) {
            TypeDefinition td = tm.getTypeById(so.getTypeId()).getTypeDefinition();
            ObjectData od = PropertyCreationHelper.getObjectDataQueryResult(td, so, user, props, funcs,
                    includeAllowableActions, includeRelationships, renditionFilter);

            objDataList.add(od);
        }
        res.setObjects(objDataList);
        return res;
    }
View Full Code Here

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

            String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
            String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension,
            ObjectInfoHandler objectInfos) {

        validator.getCheckedOutDocs(context, repositoryId, folderId, extension);
        ObjectListImpl res = new ObjectListImpl();
        List<ObjectData> odList = new ArrayList<ObjectData>();

        LOG.debug("start getCheckedOutDocs()");

        String user = context.getUsername();
        if (null == folderId) {
            List<StoredObject> checkedOuts = fStoreManager.getObjectStore(repositoryId).getCheckedOutDocuments(
                    orderBy, context.getUsername(), includeRelationships);
            for (StoredObject checkedOut : checkedOuts) {
                TypeDefinition td = fStoreManager.getTypeById(repositoryId, checkedOut.getTypeId()).getTypeDefinition();
//                DocumentVersion workingCopy = ((VersionedDocument) checkedOut).getPwc();
//                if (null == workingCopy)
//                  throw new CmisConstraintException("document " + checkedOut + " is checked out but has no working copy");      
                ObjectData od = PropertyCreationHelper.getObjectData(td, checkedOut, filter, user,
                        includeAllowableActions, includeRelationships, renditionFilter, false, false, extension);
                if (context.isObjectInfoRequired()) {
                    ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                    fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, /* workingCopy */ checkedOut, objectInfo);
                    objectInfos.addObjectInfo(objectInfo);
                }
                odList.add(od);
            }
        } else {
            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, false, -1, -1, false, context
                            .isObjectInfoRequired() ? objectInfos : null, user);
            for (ObjectInFolderData child : children.getObjects()) {
                ObjectData obj = child.getObject();
                StoredObject so = fStoreManager.getObjectStore(repositoryId).getObjectById(obj.getId());
                LOG.info("Checked out: children:" + obj.getId());
                if (so instanceof DocumentVersion && ((DocumentVersion) so).getParentDocument().isCheckedOut()) {
                    odList.add(obj);
                    if (context.isObjectInfoRequired()) {
                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                        fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, objectInfo);
                        objectInfos.addObjectInfo(objectInfo);
                    }
                }
            }
        }
        res.setObjects(odList);
        res.setNumItems(BigInteger.valueOf(odList.size()));

        LOG.debug("end getCheckedOutDocs()");
        return res;
    }
View Full Code Here

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

            String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships,
            String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension,
            ObjectInfoHandler objectInfos) {

        validator.getCheckedOutDocs(context, repositoryId, folderId, extension);
        ObjectListImpl res = new ObjectListImpl();
        List<ObjectData> odList = new ArrayList<ObjectData>();

        LOG.debug("start getCheckedOutDocs()");

        String user = context.getUsername();
        if (null == folderId) {
            List<StoredObject> checkedOuts = fStoreManager.getObjectStore(repositoryId).getCheckedOutDocuments(
                    orderBy, context.getUsername(), includeRelationships);
            for (StoredObject checkedOut : checkedOuts) {
                TypeDefinition td = fStoreManager.getTypeById(repositoryId, checkedOut.getTypeId()).getTypeDefinition();
//                DocumentVersion workingCopy = ((VersionedDocument) checkedOut).getPwc();
//                if (null == workingCopy)
//                  throw new CmisConstraintException("document " + checkedOut + " is checked out but has no working copy");      
                ObjectData od = PropertyCreationHelper.getObjectData(td, checkedOut, filter, user,
                        includeAllowableActions, includeRelationships, renditionFilter, false, false, extension);
                if (context.isObjectInfoRequired()) {
                    ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                    fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, /* workingCopy */ checkedOut, objectInfo);
                    objectInfos.addObjectInfo(objectInfo);
                }
                odList.add(od);
            }
        } else {
            LOG.debug("getting checked-out documents for folder: " + folderId);
            ObjectInFolderList children = getChildrenIntern(repositoryId, folderId, filter, orderBy,
                    includeAllowableActions, includeRelationships, renditionFilter, false, -1, -1, false, context
                            .isObjectInfoRequired() ? objectInfos : null, user);
            for (ObjectInFolderData child : children.getObjects()) {
                ObjectData obj = child.getObject();
                StoredObject so = fStoreManager.getObjectStore(repositoryId).getObjectById(obj.getId());
                LOG.debug("Checked out: children:" + obj.getId());
                if (so instanceof DocumentVersion && ((DocumentVersion) so).getParentDocument().isCheckedOut()) {
                    odList.add(obj);
                    if (context.isObjectInfoRequired()) {
                        ObjectInfoImpl objectInfo = new ObjectInfoImpl();
                        fAtomLinkProvider.fillInformationForAtomLinks(repositoryId, so, objectInfo);
                        objectInfos.addObjectInfo(objectInfo);
                    }
                }
            }
        }
        res.setObjects(odList);
        res.setNumItems(BigInteger.valueOf(odList.size()));

        LOG.debug("end getCheckedOutDocs()");
        return res;
    }
View Full Code Here

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

    public static ObjectList convertObjectList(Map<String, Object> json, boolean isQueryResult) {
        if (json == null) {
            return null;
        }

        ObjectListImpl result = new ObjectListImpl();

        List<Object> jsonChildren = getList(json.get(isQueryResult ? JSON_QUERYRESULTLIST_RESULTS
                : JSON_OBJECTLIST_OBJECTS));
        List<ObjectData> objects = new ArrayList<ObjectData>();

        if (jsonChildren != null) {
            for (Object obj : jsonChildren) {
                Map<String, Object> jsonObject = getMap(obj);
                if (jsonObject != null) {
                    objects.add(convertObject(jsonObject));
                }
            }
        }

        result.setObjects(objects);
        result.setHasMoreItems(getBoolean(json, isQueryResult ? JSON_QUERYRESULTLIST_NUM_ITEMS
                : JSON_OBJECTLIST_HAS_MORE_ITEMS));
        result.setNumItems(getInteger(json, isQueryResult ? JSON_QUERYRESULTLIST_NUM_ITEMS : JSON_OBJECTLIST_NUM_ITEMS));

        convertExtension(json, result, isQueryResult ? QUERYRESULTLIST_KEYS : OBJECTLIST_KEYS);

        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.