}
public static Property getProperty(CMSObject node,
org.apache.chemistry.opencmis.client.api.Property<?> cmisProperty) {
Property property = new Property();
property.setLocalname(cmisProperty.getLocalName());
// property.setType(convertPropertyType(cmisProperty.getType()));
property.setContainerObjectRef(node.getUniqueRef());
property.setSourceObjectTypeRef(node.getObjectTypeRef());
property.setPropertyDefinition(getPropertyDefinition(cmisProperty.getDefinition()));
if (cmisProperty.getValues() != null) {
for (Object value : cmisProperty.getValues()) {
if (value == null) {
continue;
}
if (cmisProperty.getType() == PropertyType.DATETIME) {
Calendar cal = (Calendar) value;
property.getValue().add(XML_DATETIME_FORMAT.format(cal.getTime()));
} else {
property.getValue().add(value.toString());
}
}
}
return property;
}