Examples of CmisPropertiesType


Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

    public void testParser() throws Exception {
        ByteArrayOutputStream bao = new ByteArrayOutputStream();

        // set up an object
        CmisPropertiesType properties = new CmisPropertiesType();

        CmisPropertyString propName = new CmisPropertyString();
        propName.setPropertyDefinitionId(PropertyIds.NAME);
        propName.getValue().add("TestName");
        properties.getProperty().add(propName);

        CmisPropertyInteger propInt = new CmisPropertyInteger();
        propInt.setPropertyDefinitionId("IntProp");
        propInt.getValue().add(BigInteger.valueOf(1));
        propInt.getValue().add(BigInteger.valueOf(2));
        propInt.getValue().add(BigInteger.valueOf(3));
        properties.getProperty().add(propInt);

        CmisPropertyDecimal propDec = new CmisPropertyDecimal();
        propDec.setPropertyDefinitionId("DecProp");
        propDec.getValue().add(
                new BigDecimal("3.14159253589793238462643383279502884197"
                        + "169399375105820974944592307816406286208998628034825342117067982148086513"));
        properties.getProperty().add(propDec);

        CmisObjectType object1 = new CmisObjectType();
        object1.setProperties(properties);

        // write the entry
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

    public static CmisPropertiesType convert(Properties properties) {
        if (properties == null) {
            return null;
        }

        CmisPropertiesType result = new CmisPropertiesType();

        if (properties.getProperties() != null) {
            for (PropertyData<?> property : properties.getProperties().values()) {
                result.getProperty().add(convert(property));
            }
        }

        // handle extensions
        convertExtension(properties, result);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

     * Creates a CMIS object that only contains an id in the property list.
     */
    protected CmisObjectType createIdObject(String objectId) {
        CmisObjectType object = new CmisObjectType();

        CmisPropertiesType properties = new CmisPropertiesType();
        object.setProperties(properties);

        CmisPropertyId idProperty = new CmisPropertyId();
        properties.getProperty().add(idProperty);
        idProperty.setPropertyDefinitionId(PropertyIds.OBJECT_ID);
        idProperty.getValue().add(objectId);

        return object;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

     * Creates a CMIS object that only contains an id in the property list.
     */
    protected CmisObjectType createIdObject(String objectId) {
        CmisObjectType object = new CmisObjectType();

        CmisPropertiesType properties = new CmisPropertiesType();
        object.setProperties(properties);

        CmisPropertyId idProperty = new CmisPropertyId();
        properties.getProperty().add(idProperty);
        idProperty.setPropertyDefinitionId(PropertyIds.OBJECT_ID);
        idProperty.getValue().add(objectId);

        return object;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

        CmisObjectType object = new CmisObjectType();
        object.setProperties(convert(properties));
        object.setPolicyIds(convertPolicyIds(policies));

        if (object.getProperties() == null) {
            object.setProperties(new CmisPropertiesType());
        }

        String mediaType = null;
        InputStream stream = null;
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

    public static CmisPropertiesType convert(Properties properties) {
        if (properties == null) {
            return null;
        }

        CmisPropertiesType result = new CmisPropertiesType();

        if (properties.getProperties() != null) {
            for (PropertyData<?> property : properties.getPropertyList()) {
                result.getProperty().add(convert(property));
            }
        }

        // handle extensions
        convertExtension(properties, result);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

     * Creates a CMIS object that only contains an id in the property list.
     */
    protected CmisObjectType createIdObject(String objectId) {
        CmisObjectType object = new CmisObjectType();

        CmisPropertiesType properties = new CmisPropertiesType();
        object.setProperties(properties);

        CmisPropertyId idProperty = new CmisPropertyId();
        properties.getProperty().add(idProperty);
        idProperty.setPropertyDefinitionId(PropertyIds.OBJECT_ID);
        idProperty.getValue().add(objectId);

        return object;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

    public static CmisPropertiesType convert(Properties properties) {
        if (properties == null) {
            return null;
        }

        CmisPropertiesType result = new CmisPropertiesType();

        if (properties.getProperties() != null) {
            for (PropertyData<?> property : properties.getProperties().values()) {
                result.getProperty().add(convert(property));
            }
        }

        // handle extensions
        convertExtension(properties, result);
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

     * Creates a CMIS object that only contains an id in the property list.
     */
    protected CmisObjectType createIdObject(String objectId) {
        CmisObjectType object = new CmisObjectType();

        CmisPropertiesType properties = new CmisPropertiesType();
        object.setProperties(properties);

        CmisPropertyId idProperty = new CmisPropertyId();
        properties.getProperty().add(idProperty);
        idProperty.setPropertyDefinitionId(PropertyIds.OBJECT_ID);
        idProperty.getValue().add(objectId);

        return object;
    }
View Full Code Here

Examples of org.apache.chemistry.opencmis.commons.impl.jaxb.CmisPropertiesType

    public static CmisPropertiesType convert(Properties properties) {
        if (properties == null) {
            return null;
        }

        CmisPropertiesType result = new CmisPropertiesType();

        if (properties.getProperties() != null) {
            for (PropertyData<?> property : properties.getProperties().values()) {
                result.getProperty().add(convert(property));
            }
        }

        // handle extensions
        convertExtension(properties, 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.