Package org.apache.chemistry.opencmis.commons.impl.dataobjects

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


            GregorianCalendar value) {
        if (!checkAddProperty(props, typeId, filter, id)) {
            return;
        }

        props.addProperty(new PropertyDateTimeImpl(id, value));
    }
View Full Code Here


            switch (propDef.getPropertyType()) {
            case BOOLEAN:
                props.addProperty(new PropertyBooleanImpl(propDef.getId(), (List<Boolean>) defaultValue));
                break;
            case DATETIME:
                props.addProperty(new PropertyDateTimeImpl(propDef.getId(), (List<GregorianCalendar>) defaultValue));
                break;
            case DECIMAL:
                props.addProperty(new PropertyDecimalImpl(propDef.getId(), (List<BigDecimal>) defaultValue));
                break;
            case HTML:
View Full Code Here

                    ((CmisPropertyDecimal) property).getValue());
        } else if (property instanceof CmisPropertyBoolean) {
            result = new PropertyBooleanImpl(property.getPropertyDefinitionId(),
                    ((CmisPropertyBoolean) property).getValue());
        } else if (property instanceof CmisPropertyDateTime) {
            result = new PropertyDateTimeImpl(property.getPropertyDefinitionId(),
                    convertXMLCalendar(((CmisPropertyDateTime) property).getValue()));
        } else if (property instanceof CmisPropertyHtml) {
            result = new PropertyHtmlImpl(property.getPropertyDefinitionId(), ((CmisPropertyHtml) property).getValue());
        } else if (property instanceof CmisPropertyUri) {
            result = new PropertyUriImpl(property.getPropertyDefinitionId(), ((CmisPropertyUri) property).getValue());
View Full Code Here

                    calValues.add(cal);
                }
            } catch (NumberFormatException e) {
                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an datetime value!");
            }
            propertyData = new PropertyDateTimeImpl(propDef.getId(), calValues);
            break;
        case HTML:
            propertyData = new PropertyHtmlImpl(propDef.getId(), strValues);
            break;
        case URI:
View Full Code Here

                    calValues.add(cal);
                }
            } catch (NumberFormatException e) {
                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an datetime value!");
            }
            propertyData = new PropertyDateTimeImpl(propDef.getId(), calValues);
            break;
        case HTML:
            propertyData = new PropertyHtmlImpl(propDef.getId(), strValues);
            break;
        case URI:
View Full Code Here

    private static PropertyData<?> getEmptyValue(PropertyDefinition<?> propDef) {
        if (propDef.getPropertyType().equals(PropertyType.BOOLEAN))
            return new PropertyBooleanImpl(propDef.getId(), (Boolean) null);
        else if (propDef.getPropertyType().equals(PropertyType.DATETIME))
            return new PropertyDateTimeImpl(propDef.getId(), (GregorianCalendar) null);
        else if (propDef.getPropertyType().equals(PropertyType.DECIMAL))
            return new PropertyDecimalImpl(propDef.getId(), (BigDecimal) null);
        else if (propDef.getPropertyType().equals(PropertyType.HTML))
            return new PropertyHtmlImpl(propDef.getId(), (String) null);
        else if (propDef.getPropertyType().equals(PropertyType.ID))
View Full Code Here

                        }
                        ((PropertyDecimalImpl) property).setValues(propertyValues);
                    }
                    break;
                case DATETIME:
                    property = new PropertyDateTimeImpl();
                    {
                        List<GregorianCalendar> propertyValues = null;
                        if (values != null) {
                            propertyValues = new ArrayList<GregorianCalendar>();
                            for (Object obj : values) {
View Full Code Here

                    ((CmisPropertyDecimal) property).getValue());
        } else if (property instanceof CmisPropertyBoolean) {
            result = new PropertyBooleanImpl(property.getPropertyDefinitionId(),
                    ((CmisPropertyBoolean) property).getValue());
        } else if (property instanceof CmisPropertyDateTime) {
            result = new PropertyDateTimeImpl(property.getPropertyDefinitionId(),
                    convertXMLCalendar(((CmisPropertyDateTime) property).getValue()));
        } else if (property instanceof CmisPropertyHtml) {
            result = new PropertyHtmlImpl(property.getPropertyDefinitionId(), ((CmisPropertyHtml) property).getValue());
        } else if (property instanceof CmisPropertyUri) {
            result = new PropertyUriImpl(property.getPropertyDefinitionId(), ((CmisPropertyUri) property).getValue());
View Full Code Here

    private static PropertyData<?> getEmptyValue(PropertyDefinition<?> propDef) {
        if (propDef.getPropertyType().equals(PropertyType.BOOLEAN))
            return new PropertyBooleanImpl(propDef.getId(), (Boolean) null);
        else if (propDef.getPropertyType().equals(PropertyType.DATETIME))
            return new PropertyDateTimeImpl(propDef.getId(), (GregorianCalendar) null);
        else if (propDef.getPropertyType().equals(PropertyType.DECIMAL))
            return new PropertyDecimalImpl(propDef.getId(), (BigDecimal) null);
        else if (propDef.getPropertyType().equals(PropertyType.HTML))
            return new PropertyHtmlImpl(propDef.getId(), (String) null);
        else if (propDef.getPropertyType().equals(PropertyType.ID))
View Full Code Here

        if (prop instanceof PropertyBooleanImpl) {
            PropertyBooleanImpl clone = new PropertyBooleanImpl();
            clone.setValues(((PropertyBooleanImpl)prop).getValues());
            ad = clone;
        } else if (prop instanceof PropertyDateTimeImpl) {
            PropertyDateTimeImpl clone = new PropertyDateTimeImpl();
            clone.setValues(((PropertyDateTimeImpl)prop).getValues());
            ad = clone;
        } else if (prop instanceof PropertyDecimalImpl) {
            PropertyDecimalImpl clone = new PropertyDecimalImpl();
            clone.setValues(((PropertyDecimalImpl)prop).getValues());
            ad = clone;
        } else if (prop instanceof PropertyHtmlImpl) {
            PropertyHtmlImpl clone = new PropertyHtmlImpl();
            clone.setValues(((PropertyHtmlImpl)prop).getValues());
            ad = clone;
        } else if (prop instanceof PropertyIdImpl) {
            PropertyIdImpl clone = new PropertyIdImpl();
            clone.setValues(((PropertyIdImpl)prop).getValues());
            ad = clone;
        } else if (prop instanceof PropertyIntegerImpl) {
            PropertyIntegerImpl clone = new PropertyIntegerImpl();
            clone.setValues(((PropertyIntegerImpl)prop).getValues());
            ad = clone;
        } else if (prop instanceof PropertyStringImpl) {
            PropertyStringImpl clone = new PropertyStringImpl();
            clone.setValues(((PropertyStringImpl)prop).getValues());
            ad = clone;
        } else if (prop instanceof PropertyUriImpl) {
            PropertyUriImpl clone = new PropertyUriImpl();
            clone.setValues(((PropertyUriImpl)prop).getValues());
            ad = clone;
        } else {
            throw new RuntimeException("Unknown property type: " + prop.getClass());
        }
       
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertyDateTimeImpl

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.