summaryrefslogtreecommitdiffstats
path: root/aai-traversal/src/main/resources
diff options
context:
space:
mode:
Diffstat (limited to 'aai-traversal/src/main/resources')
-rw-r--r--aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g455
-rw-r--r--aai-traversal/src/main/resources/etc/appprops/aaiconfig.properties8
-rw-r--r--aai-traversal/src/main/resources/retired.properties2
3 files changed, 33 insertions, 32 deletions
diff --git a/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4 b/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4
index cf34571..78162f5 100644
--- a/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4
+++ b/aai-traversal/src/main/resources/antlr4/org/onap/aai/AAIDsl.g4
@@ -1,29 +1,41 @@
/**
- * Define a grammar called AAIDsl
+ * Define a parser grammar called AAIDsl
*/
grammar AAIDsl;
+aaiquery: startStatement limit?;
-aaiquery: dslStatement;
+startStatement: (vertex ) (traversal)* ;
+nestedStatement: (vertex|unionVertex ) (traversal)* ;
-dslStatement: (singleNodeStep ) (traverseStep )* limitStep*;
+vertex: label store? (filter)?;
-unionQueryStep: LBRACKET dslStatement ( COMMA (dslStatement))* RBRACKET;
+traversal: (edge (vertex|unionVertex));
-traverseStep: (TRAVERSE ( singleNodeStep | unionQueryStep));
+filter: (propertyFilter)* whereFilter?;
+propertyFilter: (not? '(' key (',' (key | num))* ')');
-singleNodeStep: NODE STORE? (filterStep | filterTraverseStep)*;
+whereFilter: (not? '(' edge nestedStatement ')' );
-filterStep: NOT? (LPAREN KEY (COMMA (KEY | NODE))* RPAREN);
-filterTraverseStep: (LPAREN traverseStep* RPAREN);
+unionVertex: '[' ( (edgeFilter)* nestedStatement ( comma ( (edgeFilter)* nestedStatement))*) ']';
-limitStep: LIMIT NODE;
+comma: ',';
+edge: TRAVERSE (edgeFilter)*;
+edgeFilter: '(' key (',' key )* ')';
-LIMIT: 'LIMIT';
-NODE: ID;
+num: NUM;
+limit: LIMIT num;
+label: (ID | NUM )+;
+key: KEY;
-KEY: ['] (ID | ' ')* ['] ;
+store: STORE;
+not: NOT;
+LIMIT: 'LIMIT'|'limit';
+NUM: (DIGIT)+;
+
+/*NODE: (ID | NUM )+;*/
+KEY : '\'' ( ~['\r\n] )*? '\'';
AND: [&];
@@ -33,29 +45,18 @@ OR: [|];
TRAVERSE: [>] ;
-LPAREN: [(];
-
-RPAREN: [)];
-
-COMMA: [,] ;
-
EQUAL: [=];
-LBRACKET: [[];
-
-RBRACKET: [\]];
-
NOT: [!];
-VALUE: [DIGIT]+;
-
fragment LOWERCASE : [a-z] ;
fragment UPPERCASE : [A-Z] ;
fragment DIGIT : [0-9] ;
+fragment ESC : '\\' . ;
+fragment ID_SPECIALS: [-:_];
+
ID
- : ( LOWERCASE | UPPERCASE | DIGIT) ( LOWERCASE | UPPERCASE | DIGIT | '-' | '.' | '_' | '/')*
+ : ( LOWERCASE | UPPERCASE | DIGIT | ID_SPECIALS)
;
WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines
-
-
diff --git a/aai-traversal/src/main/resources/etc/appprops/aaiconfig.properties b/aai-traversal/src/main/resources/etc/appprops/aaiconfig.properties
index a07e985..b94c3b1 100644
--- a/aai-traversal/src/main/resources/etc/appprops/aaiconfig.properties
+++ b/aai-traversal/src/main/resources/etc/appprops/aaiconfig.properties
@@ -31,23 +31,23 @@ aai.transaction.logging.get=true
aai.transaction.logging.post=true
aai.server.url.base=https://localhost:8443/aai/
-aai.server.url=https://localhost:8443/aai/v15/
+aai.server.url=https://localhost:8443/aai/v16/
aai.global.callback.url=https://localhost:8443/aai/
-aai.notification.current.version=v15
+aai.notification.current.version=v16
aai.notificationEvent.default.status=UNPROCESSED
aai.notificationEvent.default.eventType=AAI-EVENT
aai.notificationEvent.default.domain=devINT1
aai.notificationEvent.default.sourceName=aai
aai.notificationEvent.default.sequenceNumber=0
aai.notificationEvent.default.severity=NORMAL
-aai.notificationEvent.default.version=v15
+aai.notificationEvent.default.version=v16
# This one lets us enable/disable resource-version checking on updates/deletes
aai.resourceversion.enableflag=true
# This will specify how deep the stack trace should be logged
aai.logging.maxStackTraceEntries=10
-aai.default.api.version=v15
+aai.default.api.version=v16
# Used by Model-processing code
aai.model.query.resultset.maxcount=50
diff --git a/aai-traversal/src/main/resources/retired.properties b/aai-traversal/src/main/resources/retired.properties
index 2261713..2be5d88 100644
--- a/aai-traversal/src/main/resources/retired.properties
+++ b/aai-traversal/src/main/resources/retired.properties
@@ -1,5 +1,5 @@
# Retired properties
retired.api.pattern.list=\
- ^/aai/v[2-7]+/.*$\
+ ^/aai/v[2-9]+/.*$\
retired.api.all.versions= \ No newline at end of file