Hi,
Juan José Vázquez Delgado schrieb:
> Hi,
>
>> var prop = valueMap.get("theName", Packages.javax.jcr.Property);
>> if (prop != null) {
>> ....
>> }
>
> This only applies to JCR based resources, isn´t it?. AFAIK, there is
> no a standard way to retrieve the type and multivalue feature from
> non-JCR based resources.. Am I right?.
Yes, it is ok for this method to return null if a value exists which may
not be converted to a JCR Property instance. Therefore the null check.
For non-JCR properties, I would say (in Java speak) something like this
might work:
boolean isMulti = false;
Class type = null;
Object value = map.get("theName");
if (value == null) {
...
} else {
type = value.getClass();
if (type.isArray()) {
isMulti = true;
type = type.getComponentType();
}
Regards
Felix