Package org.apache.chemistry.opencmis.client.api

Examples of org.apache.chemistry.opencmis.client.api.ObjectType


            statement.append('*');
        } else {
            statement.append(select);
        }

        final ObjectType type = getTypeDefinition(typeId);
        statement.append(" FROM ");
        statement.append(type.getQueryName());

        if (where != null && where.trim().length() > 0) {
            statement.append(" WHERE ");
            statement.append(where);
        }
View Full Code Here


        if ((source == null) || (source.getId() == null)) {
            throw new IllegalArgumentException("Source must be set!");
        }

        // get the type of the source document
        ObjectType type = null;
        List<SecondaryType> secondaryTypes = null;
        if (source instanceof CmisObject) {
            type = ((CmisObject) source).getType();
            secondaryTypes = ((CmisObject) source).getSecondaryTypes();
        } else {
            CmisObject sourceObj = getObject(source);
            type = sourceObj.getType();
            secondaryTypes = sourceObj.getSecondaryTypes();
        }

        if (type.getBaseTypeId() != BaseTypeId.CMIS_DOCUMENT) {
            throw new IllegalArgumentException("Source object must be a document!");
        }

        String newId = getBinding().getObjectService().createDocumentFromSource(getRepositoryId(), source.getId(),
                objectFactory.convertProperties(properties, type, secondaryTypes, CREATE_AND_CHECKOUT_UPDATABILITY),
View Full Code Here

                            .get(PropertyIds.SECONDARY_OBJECT_TYPE_IDS).getValues();
                    if (isNotEmpty(stids)) {
                        secondaryTypes = new ArrayList<SecondaryType>();
                        for (String stid : stids) {
                            if (stid != null) {
                                ObjectType type = session.getTypeDefinition(stid);
                                if (type instanceof SecondaryType) {
                                    secondaryTypes.add((SecondaryType) type);
                                }
                            }
                        }
View Full Code Here

        // Types
        System.out.println("\nTypes...");
        System.out.println("--------");
        // Look at the type definition
        System.out.println("Getting type definition for doc");
        ObjectType objectType = session.getTypeDefinition(doc.getType().getId());
        System.out.println("doc is of type " + objectType.getDisplayName());
        System.out.println("isBaseType() returns " + (objectType.isBaseType() ? "true" : "false"));
        ObjectType baseType = objectType.getBaseType();
        if (baseType == null) {
            System.out.println("getBaseType() returns null");
        } else {
            System.out.println("getBaseType() returns " + baseType.getDisplayName());
        }
        ObjectType parentType = objectType.getParentType();
        if (parentType == null) {
            System.out.println("getParentType() returns null");
        } else {
            System.out.println("getParentType() returns " + parentType.getDisplayName());
        }
        System.out.println("Listing child types of " + objectType.getDisplayName());
        for (ObjectType o : objectType.getChildren()) {
            System.out.println("\t" + o.getDisplayName());
        }
View Full Code Here

        objectOperationContext = new ClientOperationContext(OBJECT_PREFIX, sessionParameters);

        // folder operation context
        if (!sessionParameters.containsKey(FOLDER_PREFIX + ClientOperationContext.FILTER)) {
            ObjectType type = session.getTypeDefinition(BaseTypeId.CMIS_DOCUMENT.value());

            StringBuilder filter = new StringBuilder();
            for (String propId : PROPERTY_SET) {
                PropertyDefinition<?> propDef = type.getPropertyDefinitions().get(propId);
                if (propDef != null) {
                    if (filter.length() > 0) {
                        filter.append(",");
                    }
                    filter.append(propDef.getQueryName());
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.client.api.ObjectType

Copyright © 2018 www.massapicom. 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.