/** * Convert a <code>PropertyDateTime</code> to an array of GREG <code>Values</code>. */ public static List<String> toValue(PropertyDateTime propertyData) { List<GregorianCalendar> values = propertyData.getValues(); List<String> result = null; if (values == null) { return result; } for (GregorianCalendar v : values) { // yyyy/mm/dd StringBuffer date = new StringBuffer(); try{ date.append(v.get(Calendar.YEAR)); date.append("/"); date.append(v.get(Calendar.MONTH)); date.append("/"); date.append(v.get(Calendar.DATE)); }catch (Exception e){ e.printStackTrace(); } result.add(date.toString()); } return result; }
protected GregorianCalendar getDateTimeProperty(ObjectData object, String name) { PropertyData<?> property = object.getProperties().getProperties().get(name); if (property instanceof PropertyDateTime) { return ((PropertyDateTime) property).getFirstValue(); } return null; }
List<GregorianCalendar> values = ((PropertyDateTime) source).getValues(); if (values != null) { for (GregorianCalendar value : values) {
protected GregorianCalendar getDateTimeProperty(ObjectData object, String name) { PropertyData<?> property = object.getProperties().getProperties().get(name); if (property instanceof PropertyDateTime) { return ((PropertyDateTime) property).getFirstValue(); } return null; }
result = new CmisPropertyDateTime(); ((CmisPropertyDateTime) result).getValue().addAll( convertCalendar(((PropertyDateTime) property).getValues())); } else if (property instanceof PropertyHtml) { result = new CmisPropertyHtml();
List<GregorianCalendar> values = ((PropertyDateTime) source).getValues(); if (values != null) { for (GregorianCalendar value : values) {
if (isTag(name, TAG_PROPERTY_TYPE_DEAULT_VALUE)) { PropertyDateTime prop = PROPERTY_DATETIME_PARSER.walk(parser); ((PropertyDateTimeDefinitionImpl) target).setDefaultValue(prop.getValues()); return true;
if (isTag(name, TAG_PROPERTY_TYPE_DEAULT_VALUE)) { PropertyDateTime prop = PROPERTY_DATETIME_PARSER.walk(parser); ((PropertyDateTimeDefinitionImpl) target).setDefaultValue(prop.getValues()); return true;