summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
aefdbf9)
Change-Id: Ia8853c00798674251b39941a675e9c359aa68a00
Signed-off-by: Martin Sunal <msunal@cisco.com>
result.append("/");
writeModuleNameAndIdentifier(result, identityValue);
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("[");
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(predicate.getValue());
List<Predicate> predicates = keyValuesToPredicateList(((NodeIdentifierWithPredicates) pathArgument)
.getKeyValues());
identityValue.setPredicates(predicates);
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);
}
}
identityValuesDTO.add(identityValue);
}