List<NodeProperty> props = new LinkedList<NodeProperty>();
for (Map.Entry<String, Map<String, NodeProperty>> docTypeEntry : searchParams
.getProperties().entrySet()) {
for (Map.Entry<String, NodeProperty> propEntry : docTypeEntry
.getValue().entrySet()) {
NodeProperty prop = propEntry.getValue();
// set node type and property name
prop.setNodeType(docTypeEntry.getKey());
prop.setName(propEntry.getKey());
if (!prop.isAllEmpty()) {
try {
// retrieve property descriptor
NodePropertyDescriptor descriptor = getPropertyDescriptor(
prop.getNodeType(), prop.getName(), locale);
// set additional properties
prop.setConstrained(descriptor.isConstrained());
prop.setMultiple(descriptor.isMultiple());
prop.setType(descriptor.getType());
} catch (RepositoryException e) {
logger.error(
"Error retrieving property descriptor for node type '"
+ prop.getNodeType()
+ "' and property name '"
+ prop.getName() + "'", e);
}
}
props.add(prop);
}