summaryrefslogtreecommitdiffstats
path: root/aai-traversal
diff options
context:
space:
mode:
Diffstat (limited to 'aai-traversal')
-rw-r--r--aai-traversal/pom.xml2
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/dsl/DslQueryBuilder.java9
2 files changed, 6 insertions, 5 deletions
diff --git a/aai-traversal/pom.xml b/aai-traversal/pom.xml
index 7581a03..5544ae7 100644
--- a/aai-traversal/pom.xml
+++ b/aai-traversal/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.aai.traversal</groupId>
<artifactId>traversal</artifactId>
- <version>1.13.5-SNAPSHOT</version>
+ <version>1.14.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.aai.traversal</groupId>
<artifactId>aai-traversal</artifactId>
diff --git a/aai-traversal/src/main/java/org/onap/aai/rest/dsl/DslQueryBuilder.java b/aai-traversal/src/main/java/org/onap/aai/rest/dsl/DslQueryBuilder.java
index a953fcb..524321f 100644
--- a/aai-traversal/src/main/java/org/onap/aai/rest/dsl/DslQueryBuilder.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/dsl/DslQueryBuilder.java
@@ -88,7 +88,7 @@ public class DslQueryBuilder {
if (selectCounter <= 0) {
return this.end();
} else {
- query.append(".select('stepMain').fold().dedup()");
+ query.append(".select(Pop.mixed,'stepMain').fold().dedup()");
}
return this;
}
@@ -244,14 +244,15 @@ public class DslQueryBuilder {
}
+ private static final Pattern AAI_NODE_TYPE_PATTERN = Pattern.compile("aai-node-type");
+
public DslQueryBuilder select(long selectCounter, List<String> keys) {
/*
* TODO : isNot should look at the vertex properties and include everything except the
* notKeys
*/
- Pattern p = Pattern.compile("aai-node-type");
- Matcher m = p.matcher(query);
+ Matcher m = AAI_NODE_TYPE_PATTERN.matcher(query);
int count = 0;
while (m.find()) {
count++;
@@ -260,7 +261,7 @@ public class DslQueryBuilder {
if (selectCounter == count || keys == null) {
String selectStep = "step" + selectCounter;
// String keysArray = String.join(",", keys);
- query.append(".as('").append(selectStep).append("')").append(".as('stepMain').select('")
+ query.append(".as('").append(selectStep).append("')").append(".as('stepMain').select(Pop.mixed,'")
.append(selectStep).append("')");
}
return this;