result.append("/");
writeModuleNameAndIdentifier(result, identityValue);
- if (identityValue.getPredicates() != null) {
+ if (identityValue.getPredicates() != null && !identityValue.getPredicates().isEmpty()) {
for (Predicate predicate : identityValue.getPredicates()) {
IdentityValue identityValuePredicate = predicate.getName();
result.append("[");
- writeModuleNameAndIdentifier(result, identityValuePredicate);
- result.append("=\"");
+ if (identityValuePredicate == null) {
+ result.append(".");
+ } else {
+ writeModuleNameAndIdentifier(result, identityValuePredicate);
+ }
+ result.append("='");
result.append(predicate.getValue());
- result.append("\"");
+ result.append("'");
result.append("]");
}
}
List<Predicate> predicates = keyValuesToPredicateList(((NodeIdentifierWithPredicates) pathArgument)
.getKeyValues());
identityValue.setPredicates(predicates);
+ } else if (pathArgument instanceof NodeWithValue && identityValue != null) {
+ List<Predicate> predicates = new ArrayList<>();
+ String value = String.valueOf(((NodeWithValue) pathArgument).getValue());
+ predicates.add(new Predicate(null, value));
+ identityValue.setPredicates(predicates);
}
identityValuesDTO.add(identityValue);
}