Package org.apache.chemistry.opencmis.commons.enums

Examples of org.apache.chemistry.opencmis.commons.enums.PropertyType


    private Map<String,List<Object>> getConstraintsFromDocument(Document d) {
        Map<String,List<Object>> constraints = new HashMap<String,List<Object>>();
        List<org.apache.chemistry.opencmis.client.api.Property<?>> docProps = d.getProperties();
        for (org.apache.chemistry.opencmis.client.api.Property<?> p : docProps) {
            if (!excludedProperties.contains(p.getQueryName())) {
                PropertyType t = p.getType();
                List<Object> values = new ArrayList<Object>();
                if (p.isMultiValued()) {
                    values.addAll(CMISUtils.getTypedPropertyValues(t, p.getValues()));
                } else {
                    values.add(CMISUtils.getTypedPropertyValue(t, p.getValue()));
View Full Code Here


        g.addAll(metadata);
        LiteralFactory literalFactory = LiteralFactory.getInstance();

        List<Property<?>> docProps = o.getProperties();
        for (Property<?> p : docProps) {
            PropertyType t = p.getType();
            UriRef pURI = getPropertyURI(p);
            if (pURI == null) {
                continue;
            }
View Full Code Here

        Assert.assertEquals(false, l.isEmpty());
        Iterator<Property<?>> i = l.iterator();
        while (i.hasNext()) {
            Property<?> p = i.next();
            Object value = p.getFirstValue();
            PropertyType t = p.getType();

            Assert.assertNotNull(p);
            Assert.assertNotNull(t);

            switch (t) {
View Full Code Here

        Assert.assertEquals(false, l.isEmpty());
        Iterator<Property<?>> i = l.iterator();
        while (i.hasNext()) {
            Property<?> p = i.next();
            Object value = p.getFirstValue();
            PropertyType t = p.getType();

            Assert.assertNotNull(p);
            Assert.assertNotNull(t);

            switch (t) {
View Full Code Here

            if (propertyId.endsWith(Constants.PARAM_OBJECT_ID))
              id = (String) property.getValue();

            if (property.getValue() !=null
                || property.getValues() != null) {
              PropertyType propertyType = property.getType();

              switch (propertyType) {

              case STRING:
              case ID:
View Full Code Here

                if (propertyId.endsWith(Constants.PARAM_OBJECT_ID))
                  id = (String) property.getValue();
   
                  if (property.getValue() !=null
                      || property.getValues() != null) {
                    PropertyType propertyType = property.getType();
     
                    switch (propertyType) {
     
                    case STRING:
                    case ID:
View Full Code Here

            if (propertyId.endsWith(Constants.PARAM_OBJECT_ID))
              id = (String) property.getValue();

            if (property.getValue() !=null
                || property.getValues() != null) {
              PropertyType propertyType = property.getType();

              switch (propertyType) {

              case STRING:
              case ID:
View Full Code Here

            if (propertyId.endsWith(Constants.PARAM_OBJECT_ID))
              id = (String) property.getValue();

            if (property.getValue() !=null
                || property.getValues() != null) {
              PropertyType propertyType = property.getType();

              switch (propertyType) {

              case STRING:
              case ID:
View Full Code Here

        AbstractPropertyDefinition<?> result = null;

        String id = getString(json, JSON_PROPERTY_ID);

        // find property type
        PropertyType propertyType = getEnum(json, JSON_PROPERTY_TYPE_PROPERTY_TYPE, PropertyType.class);
        if (propertyType == null) {
            throw new CmisRuntimeException("Invalid property type '" + id + "'! Data type not set!");
        }

        // find
View Full Code Here

                if (id == null && queryName == null) {
                    throw new CmisRuntimeException(
                            "Invalid property! Neither a property ID nor a query name is provided!");
                }

                PropertyType propertyType = null;
                try {
                    propertyType = PropertyType.fromValue(getString(jsonPropertyMap, JSON_PROPERTY_DATATYPE));
                } catch (Exception e) {
                    throw new CmisRuntimeException("Invalid property datatype: " + id, e);
                }
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.enums.PropertyType

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.