Iterator entries = props.entrySet().iterator();
while (entries.hasNext())
{
Entry entry = (Entry)entries.next();
QName qname = (QName)entry.getKey();
JCRName jcrName =
property.getSession().getLocationFactory().createJCRName(
new InternalQName(qname.getNamespace(), qname.getName()));
PropertyDefinitionDatas pds =
parent.getSession().getWorkspace().getNodeTypesHolder().getPropertyDefinitions(
jcrName.getInternalName(), ((NodeData)parent.getData()).getPrimaryTypeName(),
((NodeData)parent.getData()).getMixinTypeNames());
if (pds.getDefinition(true) != null)
{
Value[] values = {createValue(entry.getValue(), property.getSession().getValueFactory())};
parent.setProperty(jcrName.getAsString(), values);
}
else
{
parent.setProperty(jcrName.getAsString(), createValue(entry.getValue(), property.getSession()
.getValueFactory()));
}
}
return false;