SHACL Shapes
https://meta.linked.archi/archimate4/principle-shapes#
SHACL shapes encoding common enterprise architecture principles as executable constraints. Adapted from 3.2 principle shapes for ArchiMate 4.0 domain-based structure.
SELECT $this
WHERE {
$this a am4:ApplicationComponent .
FILTER NOT EXISTS {
{
?actor am4:assignedTo $this .
{ ?actor a am4:BusinessActor . } UNION { ?actor a am4:Role . }
} UNION {
$this am4:assignedTo ?actor .
{ ?actor a am4:BusinessActor . } UNION { ?actor a am4:Role . }
}
}
}
SELECT $this
WHERE {
$this a am4:ApplicationComponent .
FILTER NOT EXISTS {
$this am4:realizes ?svc .
?svc a am4:Service .
}
}
SELECT $this
WHERE {
$this a am4:Service .
$this rdf:type/rdfs:subClassOf* am4:ApplicationDomainElement .
FILTER NOT EXISTS {
?app am4:realizes $this .
?app a am4:ApplicationComponent .
}
}
SELECT $this ?app1 ?app2
WHERE {
$this a am4:Process .
$this rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
?app1 a am4:ApplicationComponent ;
am4:realizes $this .
?app2 a am4:ApplicationComponent ;
am4:realizes $this .
FILTER(STR(?app1) < STR(?app2))
}
SELECT $this ?app1 ?app2
WHERE {
$this a am4:Function .
$this rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
?app1 a am4:ApplicationComponent ;
am4:realizes $this .
?app2 a am4:ApplicationComponent ;
am4:realizes $this .
FILTER(STR(?app1) < STR(?app2))
}
SELECT $this ?tech
WHERE {
$this a am4:Process .
$this rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
{
?tech am4:serves $this .
} UNION {
?tech am4:realizes $this .
}
?tech rdf:type/rdfs:subClassOf* am4:TechnologyDomainElement .
}
SELECT $this
WHERE {
$this a am4:Process .
$this rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
FILTER NOT EXISTS {
?role am4:assignedTo $this .
{ ?role a am4:BusinessActor . } UNION { ?role a am4:Role . }
}
}
SELECT $this
WHERE {
$this a am4:Service .
$this rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
FILTER NOT EXISTS {
?behavior am4:realizes $this .
?behavior rdf:type/rdfs:subClassOf* am4:BehaviorElement .
?behavior rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
}
}
SELECT $this
WHERE {
$this a am4:Capability .
FILTER NOT EXISTS {
?behavior am4:realizes $this .
?behavior rdf:type/rdfs:subClassOf* am4:BehaviorElement .
?behavior rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
}
}
SELECT $this
WHERE {
$this a am4:Capability .
FILTER NOT EXISTS {
{
$this am4:realizes ?goal .
{ ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
} UNION {
?goal am4:serves $this .
{ ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
} UNION {
$this am4:associatedWith ?goal .
{ ?goal a am4:Goal . } UNION { ?goal a am4:Outcome . }
}
}
}
SELECT $this ?node
WHERE {
$this a am4:ApplicationComponent .
?node am4:assignedTo $this .
?node a am4:Node .
FILTER NOT EXISTS {
?node2 am4:assignedTo $this .
?node2 a am4:Node .
FILTER(?node2 != ?node)
}
}
SELECT $this
WHERE {
$this a am4:DataObject .
FILTER NOT EXISTS {
?app a am4:ApplicationComponent .
{
?app am4:accesses $this .
} UNION {
?app am4:realizes $this .
}
}
}
SELECT $this ?target
WHERE {
$this a am4:ApplicationComponent .
$this am4:serves ?target .
?target a am4:ApplicationComponent .
}
SELECT $this (COUNT(DISTINCT ?node) AS ?nodeCount)
WHERE {
$this a am4:Service .
?app am4:realizes $this .
?app a am4:ApplicationComponent .
?node am4:assignedTo ?app .
?node rdf:type/rdfs:subClassOf* am4:TechnologyDomainElement .
}
GROUP BY $this
HAVING (COUNT(DISTINCT ?node) > 3)
SELECT $this
WHERE {
$this a/rdfs:subClassOf* arch:Element .
FILTER NOT EXISTS {
{ $this ?p ?other . ?other a/rdfs:subClassOf* arch:Element . }
UNION
{ ?other ?p $this . ?other a/rdfs:subClassOf* arch:Element . }
}
}
SELECT $this (COUNT(DISTINCT ?comp) AS ?count) WHERE {
?comp am4:realizes $this .
?comp rdf:type/rdfs:subClassOf* am4:InternalActiveStructureElement .
}
GROUP BY $this
HAVING (COUNT(DISTINCT ?comp) > 1)
SELECT $this ?app1 ?app2
WHERE {
$this a am4:Service .
?app1 a am4:ApplicationComponent ;
am4:realizes $this .
?app2 a am4:ApplicationComponent ;
am4:realizes $this .
FILTER(STR(?app1) < STR(?app2))
}
SELECT $this ?app1 ?app2
WHERE {
$this a am4:Function .
$this rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
?app1 a am4:ApplicationComponent ;
am4:serves $this .
?app2 a am4:ApplicationComponent ;
am4:serves $this .
FILTER(STR(?app1) < STR(?app2))
}
SELECT $this
WHERE {
$this a am4:Requirement .
FILTER NOT EXISTS {
?element am4:realizes $this .
FILTER NOT EXISTS {
?element rdf:type/rdfs:subClassOf* am4:MotivationElement .
}
}
}
SELECT $this ?app1 ?app2
WHERE {
$this a am4:BusinessObject .
?app1 a am4:ApplicationComponent ;
am4:accesses $this .
?app2 a am4:ApplicationComponent ;
am4:accesses $this .
FILTER(STR(?app1) < STR(?app2))
}
SELECT $this ?app1 ?app2
WHERE {
$this a am4:DataObject .
?app1 a am4:ApplicationComponent ;
am4:accesses $this .
?app2 a am4:ApplicationComponent ;
am4:accesses $this .
FILTER(STR(?app1) < STR(?app2))
}
SELECT $this ?app
WHERE {
$this a am4:Service .
$this rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
?app am4:realizes $this .
?app a am4:ApplicationComponent .
FILTER NOT EXISTS {
?app2 am4:realizes $this .
?app2 a am4:ApplicationComponent .
FILTER(?app2 != ?app)
}
}
SELECT $this ?biz
WHERE {
$this a am4:Node .
$this am4:serves ?biz .
?biz rdf:type/rdfs:subClassOf* am4:BusinessDomainElement .
}