Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Philosophy

The Ariane Mapping DSL is developed to provide a fast and simple Map query language based on the Ariane: you just need to define the starting point(s), the target point(s) and the path (optional).

The Mapping DSL grammar is very simple : this is a mix of JSON, SQL and a little of Neo4J cypher to define the path. Basically it looks like that :

Code Block
themeRDark
{
   'startingPoint1': 'SQL LIKE DEFINITION'[,
   'startingPoint2': 'SQL LIKE DEFINITION'[,
...
   ]
   ]
}
-[{
   'traversalPoint1': 'SQL LIKE DEFINITION'[,
   'traversalPoint2': 'SQL LIKE DEFINITION'[,
...     
   ] | path: 'CYPHER PATH TRAVERSAL LIKE'
}]-
{
   'endPoint1': 'SQL LIKE DEFINITIONS'[,
   'endPoint2': 'SQL LIKE DEFINITIONS'[,
...
   ]
   ]
}

 

Points are defined through SQL like syntax and with the mapping object models : you can play with container, node, endpoints ... repository to define the points you need for your map.

Path definition is not mandatory but recommended on some complex graph path traversal path as by default Ariane will check all potentials path between / through the points you defined and it could take lot of computing time ... 

Currently the Ariane Mapping DSL is converted into Neo4J Cypher query and then executed against the Neo4j GraphDB. 

Some examples

From a specific source container to a specific target container

Ariane Mapping DSL
Code Block
themeRDark
{'startContainer': 'FROM container WHERE startContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*"'}
--
{'endContainer': 'FROM container WHERE endContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*"'}
Neo4j cypher DSL 
Code Block
themeRDark
collapsetrue
//Source Block
MATCH (startContainer:container)-[:owns]->startContainerContainerPrimaryAdminGate
WHERE
startContainer.MappingGraphVertexType = "container" AND
startContainerContainerPrimaryAdminGate.MappingGraphVertexID = startContainer.containerPrimaryAdminGate AND
(startContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*")
WITH startContainer


//Target Block
MATCH (endContainer:container)-[:owns]->endContainerContainerPrimaryAdminGate
WHERE
endContainer.MappingGraphVertexType = "container" AND
endContainerContainerPrimaryAdminGate.MappingGraphVertexID = endContainer.containerPrimaryAdminGate AND
(endContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*")
WITH startContainer, endContainer


//Path
MATCH path = startContainer -[:owns|link*]- endContainer
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

 

From a specific source node to a specific target node

Ariane Mapping DSL
Code Block
themeRDark
{'startNode': 'FROM node WHERE startNode.nodeName="APP6969.tibrvrdl03prd01"'}
--
{'endNode': 'FROM node WHERE endNode.nodeName="APP6969.tibrvrdl05prd01"'}
Neo4J Cypher DSL
Code Block
themeRDark
collapsetrue
//SourceStarting Block
MATCH (startNode:node)
WHERE
startNode.MappingGraphVertexType = "node" AND
(startNode.nodeName = "APP6969.tibrvrdl03prd01")
WITH startNode
 
//TargetEnding Block
MATCH (endNode:node)
WHERE
endNode.MappingGraphVertexType = "node" AND
(endNode.nodeName = "APP6969.tibrvrdl05prd01")
WITH startNode, endNode
 
//Path 
MATCH path = startNode -[:owns|link*]- endNode
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;
From a specific source endpoint to a specific target endpoint
Ariane Mapping DSL
Code Block
themeRDark
{'startEP': 'FROM endpoint WHERE startEP.endpointURL="multicast-udp-tibrv://tibrvrdl03prd01.lab01.dev.dekatonshivr.echinopsii.net/;239.69.69.69:6969"'}
--
{'endEP': 'FROM endpoint WHERE endEP.endpointURL="multicast-udp-tibrv://tibrvrdl05prd01.lab01.dev.dekatonshivr.echinopsii.net/;239.69.69.69:6969"'}
Neo4J Cypher DSL
Code Block
themeRDark
collapsetrue
//SourceStarting Block
MATCH (startEP:endpoint)
WHERE
startEP.MappingGraphVertexType = "endpoint" AND
(startEP.endpointURL = "multicast-udp-tibrv://tibrvrdl03prd01.lab01.dev.dekatonshivr.echinopsii.net/;239.69.69.69:6969")
WITH startEP
 
//TargetEnding Block
MATCH (endEP:endpoint)
WHERE
endEP.MappingGraphVertexType = "endpoint" AND
(endEP.endpointURL = "multicast-udp-tibrv://tibrvrdl05prd01.lab01.dev.dekatonshivr.echinopsii.net/;239.69.69.69:6969")
WITH startEP, endEP
 
//Path
MATCH path = startEP -[:owns|link*]- endEP
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

Mix source / destination types

Ariane Mapping DSL
Code Block
themeRDark
{'startContainer': 'FROM container WHERE startContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*"'}
--
{'endEP': 'FROM endpoint WHERE endEP.endpointURL="multicast-udp-tibrv://tibrvrdl05prd01.lab01.dev.dekatonshivr.echinopsii.net/;239.69.69.69:6969"'}
Neo4J Cypher DSL
Code Block
themeRDark
collapsetrue
//SourceStarting Block
MATCH (startContainer:container)-[:owns]->startContainerContainerPrimaryAdminGate
WHERE
startContainer.MappingGraphVertexType = "container" AND
startContainerContainerPrimaryAdminGate.MappingGraphVertexID = startContainer.containerPrimaryAdminGate AND
(startContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*")
WITH startContainer
 
//TargetEnding Block
MATCH (endEP:endpoint)
WHERE
endEP.MappingGraphVertexType = "endpoint" AND
(endEP.endpointURL = "multicast-udp-tibrv://tibrvrdl05prd01.lab01.dev.dekatonshivr.echinopsii.net/;239.69.69.69:6969")
WITH startContainer, endEP
 
//Path
MATCH path = startContainer -[:owns|link*]- endEP
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

 

Multi sources to one target 1

Ariane Mapping DSL
Code Block
themeRDark
{'startContainers': 'FROM container WHERE  startContainers.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*" OR startContainers.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*"'}
--
{'endContainer': 'FROM container WHERE endContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdwprd01.*"'}
Neo4j Cypher DSL
Code Block
themeRDark
collapsetrue
// SourceStarting Block
MATCH (startContainers:container)-[:owns]->startContainersContainerPrimaryAdminGate
WHERE
startContainers.MappingGraphVertexType = "container" AND
startContainersContainerPrimaryAdminGate.MappingGraphVertexID = startContainers.containerPrimaryAdminGate AND
(startContainersContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*" or startContainersContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*")
WITH startContainers
 
// TargetEnding Block
MATCH (endContainer:container)-[:owns]->endContainerContainerPrimaryAdminGate
WHERE
endContainer.MappingGraphVertexType = "container" AND
endContainerContainerPrimaryAdminGate.MappingGraphVertexID = endContainer.containerPrimaryAdminGate AND
(endContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdwprd01.*")
WITH startContainers, endContainer


// Path
MATCH path = startContainers -[:owns|link*]- endContainer
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

 

Multi sources to one target 2

Ariane Mapping DSL
Code Block
themeRDark
{
	'startContainer': 'FROM container WHERE startContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*"',
	'startNode': 'FROM node WHERE startNode.nodeName="APP6969.tibrvrdl03prd01"'
}
--
{'endContainer': 'FROM container WHERE endContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdwprd01.*"'}
Neo4j Cypher DSL
Code Block
themeRDark
collapsetrue
// SourceStarting Block - Line 1
MATCH (startContainer:container)-[:owns]->startContainerContainerPrimaryAdminGate
WHERE
startContainer.MappingGraphVertexType = "container" AND
startContainerContainerPrimaryAdminGate.MappingGraphVertexID = startContainer.containerPrimaryAdminGate AND
(startContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*")
WITH startContainer
 
// SourceStarting Block - Line 2
MATCH (startNode:node)
WHERE
startNode.MappingGraphVertexType = "node" AND
(startNode.nodeName = "APP6969.tibrvrdl03prd01")
WITH startContainer, startNode


// SourceStarting Block - Union
MATCH startUnion
WHERE
startUnion.MappingGraphVertexID = startContainer.MappingGraphVertexID OR
startUnion.MappingGraphVertexID = startNode.MappingGraphVertexID
WITH startUnion
 
// TargetEnding Block
MATCH (endContainer:container)-[:owns]->endContainerContainerPrimaryAdminGate
WHERE
endContainer.MappingGraphVertexType = "container" AND
endContainerContainerPrimaryAdminGate.MappingGraphVertexID = endContainer.containerPrimaryAdminGate AND
(endContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdwprd01.*")
WITH startUnion, endContainer
 
// Path
MATCH path = startUnion -[:owns|link*]- endContainer
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

One source to multi targets

Ariane Mapping DSL
Code Block
themeRDark
{'startContainer': 'FROM container WHERE startContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdwprd01.*"'}
--
{
	'endContainer': 'FROM container WHERE endContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*"',
	'endNode': 'FROM node WHERE endNode.nodeName="APP6969.tibrvrdl03prd01"'
}
Neo4j Cypher DSL
Code Block
themeRDark
collapsetrue
// SourceStarting Block
MATCH (startContainer:container)-[:owns]->startContainerContainerPrimaryAdminGate
WHERE
startContainer.MappingGraphVertexType = "container" AND
startContainerContainerPrimaryAdminGate.MappingGraphVertexID = startContainer.containerPrimaryAdminGate AND
(startContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdwprd01.*")
WITH startContainer


// TargetEnding Block - Line 1
MATCH (endContainer:container)-[:owns]->endContainerContainerPrimaryAdminGate
WHERE
endContainer.MappingGraphVertexType = "container" AND
endContainerContainerPrimaryAdminGate.MappingGraphVertexID = endContainer.containerPrimaryAdminGate AND
(endContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*")
WITH startContainer, endContainer


// TargetEnding Block - Line 2
MATCH (endNode:node)
WHERE
endNode.MappingGraphVertexType = "node" AND
(endNode.nodeName = "APP6969.tibrvrdl03prd01")
WITH startContainer, endContainer, endNode


// TargetEnding Block - Union
MATCH endUnion
WHERE
endUnion.MappingGraphVertexID = endContainer.MappingGraphVertexID OR
endUnion.MappingGraphVertexID = endNode.MappingGraphVertexID
WITH startContainer, endUnion


// Path
MATCH path = startContainer -[:owns|link*]- endUnion
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

From a specific source container to a specific target container through a specific point

Ariane Mapping DSL
Code Block
themeRDark
{'startContainer': 'FROM container WHERE startContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*"'}
-{'moulticast': 'FROM transport WHERE moulticast.transportName=".*;239.69.69.69.*"'}-
{'endContainer': 'FROM container WHERE endContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*"'}
Neo4j Cypher DSL
Code Block
themeRDark
collapsetrue
//SourceStarting Block
MATCH (startContainer:container)-[:owns]->startContainerContainerPrimaryAdminGate
WHERE
startContainer.MappingGraphVertexType = "container" AND
startContainerContainerPrimaryAdminGate.MappingGraphVertexID = startContainer.containerPrimaryAdminGate AND
(startContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*")
WITH startContainer


//TargetEnding Block
MATCH (endContainer:container)-[:owns]->endContainerContainerPrimaryAdminGate
WHERE
endContainer.MappingGraphVertexType = "container" AND
endContainerContainerPrimaryAdminGate.MappingGraphVertexID = endContainer.containerPrimaryAdminGate AND
(endContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*")
WITH startContainer, endContainer


//Path Block
MATCH (moulticast:transport)
WHERE
moulticast.MappingGraphVertexType = "transport" AND
(moulticast.transportName =~ ".*239.69.69.69.*")
WITH startContainer, endContainer, moulticast


//Path
MATCH path = startContainer -[:owns|link*]- moulticast -[:owns|link*]- endContainer
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

From a specific source container to a specific target container through specific points 

Ariane Mapping DSL
Code Block
themeRDark
{'startContainer': 'FROM container WHERE startContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*"'}
-
{
    'moulticast': 'FROM transport WHERE moulticast.transportName =~ ".*239.69.69.69.*"',
    'ptEP': 'FROM endpoint WHERE ptEP.endpointURL =~ ".*tibrvrdmprd01.*"'
}
-
{'endContainer': 'FROM container WHERE endContainer.containerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*"'}
Neo4J Cypher DSL
Code Block
themeRDark
collapsetrue
// SourceStarting Block
MATCH (startContainer:container)-[:owns]->startContainerContainerPrimaryAdminGate
WHERE
startContainer.MappingGraphVertexType = "container" AND
startContainerContainerPrimaryAdminGate.MappingGraphVertexID = startContainer.containerPrimaryAdminGate AND
(startContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl03prd01.*")
WITH startContainer


// TargetEnding Block
MATCH (endContainer:container)-[:owns]->endContainerContainerPrimaryAdminGate
WHERE
endContainer.MappingGraphVertexType = "container" AND
endContainerContainerPrimaryAdminGate.MappingGraphVertexID = endContainer.containerPrimaryAdminGate AND
(endContainerContainerPrimaryAdminGate.nodeName =~ ".*tibrvrdl05prd01.*")
WITH startContainer, endContainer


// Path Block - First Line
MATCH (moulticast:transport)
WHERE
moulticast.MappingGraphVertexType = "transport" AND
(moulticast.transportName =~ ".*239.69.69.69.*")
WITH startContainer, endContainer, moulticast


// Path Block - Second Line
MATCH (ptEP:endpoint)
WHERE
ptEP.MappingGraphVertexType = "endpoint" AND
(ptEP.endpointURL =~ ".*tibrvrdmprd01.*")
WITH startContainer, endContainer, moulticast, ptEP


// Path Block - Union
MATCH ptUnion
WHERE
ptUnion.MappingGraphVertexID = moulticast.MappingGraphVertexID OR
ptUnion.MappingGraphVertexID = ptEP.MappingGraphVertexID
WITH startContainer, endContainer, ptUnion


// Path 
MATCH path = startContainer -[:owns|link*]- ptUnion -[:owns|link*]- endContainer
WHERE
ALL(n in nodes(path) where 1=length(filter(m in nodes(path) WHERE m=n)))
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;

Full path tuning

Depending on the graph your you're requesting you will need to define a precise path from your source to your target and you can do that by specifying the path value in the path block with Neo4J Cypher path description.

Ariane Mapping DSL
Code Block
themeRDark
{
    'middleOfficeService': 'FROM container WHERE middleOfficeService.containerPrimaryAdminGate.nodeName =~ "rbqcliadmingate.mo01" '
}
-
{ 
	'rbqNode1EP2': 'FROM endpoint WHERE rbqNode1EP2.endpointURL =~ ".*MiddleOfficeService.*" OR rbqNode1EP2.endpointURL =~ ".*RPC/BOQ.*" OR rbqNode1EP2.endpointURL =~ ".*RPC/RIQ.*"',
	'rbqNode2EP1': 'FROM endpoint WHERE rbqNode2EP1.endpointURL =~ ".*MiddleOfficeService.*" OR rbqNode2EP1.endpointURL =~ ".*BOQ/BOQ.*" OR rbqNode2EP1.endpointURL =~ ".*RIQ/RIQ.*"',
	'path': ' -[:owns*]-> startContainerEP <-[:link]-> rbqNode1EP1 <-[:owns]- rbqNode1 -[:owns]-> rbqNode1EP2 -[:link]- rbqNode2EP1 <-[:owns]- rbqNode2 -[:owns]-> rbqNode2EP2 <-[:link]-> endContainerEP <-[:owns*]- '
} 
-
{
    'riskService': 'FROM container WHERE riskService.containerPrimaryAdminGate.nodeName =~ "rbqcliadmingate.risk01" ',
    'backOfficeService': 'FROM container WHERE backOfficeService.containerPrimaryAdminGate.nodeName =~ "rbqcliadmingate.bo01" '
} 

 

Neo4J Cypher DSL
Code Block
themeRDark
collapsetrue
// SourceStarting Block
MATCH (middleOfficeService:container)-[:owns]->middleOfficeServiceContainerPrimaryAdminGate
WHERE
middleOfficeService.MappingGraphVertexType = "container" AND
middleOfficeServiceContainerPrimaryAdminGate.MappingGraphVertexID = middleOfficeService.containerPrimaryAdminGate AND
(middleOfficeServiceContainerPrimaryAdminGate.nodeName =~ "rbqcliadmingate.mo01")
WITH middleOfficeService

// TargetEnding Block - Line 1
MATCH (riskService:container)-[:owns]->riskServiceContainerPrimaryAdminGate
WHERE
riskService.MappingGraphVertexType = "container" AND
riskServiceContainerPrimaryAdminGate.MappingGraphVertexID = riskService.containerPrimaryAdminGate AND
(riskServiceContainerPrimaryAdminGate.nodeName =~ "rbqcliadmingate.risk01")
WITH middleOfficeService, riskService

// TargetEnding Block - Line 2
MATCH (backOfficeService:container)-[:owns]->backOfficeServiceContainerPrimaryAdminGate
WHERE
backOfficeService.MappingGraphVertexType = "container" AND
backOfficeServiceContainerPrimaryAdminGate.MappingGraphVertexID = backOfficeService.containerPrimaryAdminGate AND
(backOfficeServiceContainerPrimaryAdminGate.nodeName =~ "rbqcliadmingate.bo01")
WITH middleOfficeService, riskService, backOfficeService


// TargetEnding Block - Union
MATCH endUnion
WHERE
endUnion.MappingGraphVertexID = riskService.MappingGraphVertexID OR
endUnion.MappingGraphVertexID = backOfficeService.MappingGraphVertexID
WITH middleOfficeService, endUnion


// Path Block - Line 1
MATCH (rbqNode1EP2:endpoint)
WHERE
rbqNode1EP2.MappingGraphVertexType = "endpoint" AND
(rbqNode1EP2.endpointURL =~ ".*MiddleOfficeService.*" or rbqNode1EP2.endpointURL =~ ".*RPC/BOQ.*" or rbqNode1EP2.endpointURL =~ ".*RPC/RIQ.*")
WITH middleOfficeService, endUnion, rbqNode1EP2

// Path Block - Line 2
MATCH (rbqNode2EP1:endpoint)
WHERE
rbqNode2EP1.MappingGraphVertexType = "endpoint" AND
(rbqNode2EP1.endpointURL =~ ".*MiddleOfficeService.*" or rbqNode2EP1.endpointURL =~ ".*BOQ/BOQ.*" or rbqNode2EP1.endpointURL =~ ".*RIQ/RIQ.*")
WITH middleOfficeService, endUnion, rbqNode1EP2, rbqNode2EP1


// Path
MATCH path = middleOfficeService -[:owns*]-> startContainerEP <-[:link]-> rbqNode1EP1 <-[:owns]- rbqNode1 -[:owns]-> rbqNode1EP2 -[:link]- rbqNode2EP1 <-[:owns]- rbqNode2 -[:owns]-> rbqNode2EP2 <-[:link]-> endContainerEP <-[:owns*]- endUnion
RETURN DISTINCT
EXTRACT(co in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "container")| co.MappingGraphVertexID) as CID,
EXTRACT(no in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "node")| no.MappingGraphVertexID) as NID,
EXTRACT(e in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "endpoint")| e.MappingGraphVertexID) as EID,
EXTRACT(t in FILTER( n in nodes(path) WHERE n.MappingGraphVertexType = "transport")| t.MappingGraphVertexID) as TID,
EXTRACT(l in FILTER( r in relationships(path) WHERE type(r) = "link")| l.MappingGraphEdgeID) as LID;