Skip to content

Commit

Permalink
Merge pull request #31 from zazuko/link-strategy
Browse files Browse the repository at this point in the history
Link strategy
  • Loading branch information
BenjaminHofstetter authored Nov 12, 2024
2 parents 9793563 + dfbabe6 commit 4af74e2
Show file tree
Hide file tree
Showing 26 changed files with 1,299 additions and 288 deletions.
32 changes: 32 additions & 0 deletions doc/06_aggregate/aggregate_debug.sparqlbook
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"kind": 2,
"language": "sparql",
"value": "# [endpoint=https://test.lindas.admin.ch/query]\n \n\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n PREFIX blueprint: <https://flux.described.at/> \n\n CONSTRUCT {\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink> blueprint:result <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> .\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> a blueprint:CompositionLinkResult .\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> blueprint:result ?result .\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> rdfs:label \"Publisher\" .\n ?result ?resultP ?resultO .\n ?element_1 ?connectionPointP ?connectionPointO .\n ?result blueprint:target ?element_1 .\n \n } WHERE {\n {\n # first path element - form link\n <https://register.ld.admin.ch/staatskalender/organization/10008671> a <http://schema.org/GovernmentOrganization> .\n <https://register.ld.admin.ch/staatskalender/organization/10008671> ^<https://schema.ld.admin.ch/datamngt#hasOwnerOrganization>/<https://schema.ld.admin.ch/datamngt#containsDataset> ?result .\n ?result a <https://schema.ld.admin.ch/datamngt#DatasetRoot> .\n \n VALUES ?resultP {\n rdf:type\n rdfs:label\n }\n ?result ?resultP ?resultO .\n \n }\n }",
"metadata": {}
},
{
"kind": 2,
"language": "sparql",
"value": "# [endpoint=https://test.lindas.admin.ch/query]\n\n PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n PREFIX blueprint: <https://flux.described.at/> \n\n CONSTRUCT {\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink> blueprint:result <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> .\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> a blueprint:CompositionLinkResult .\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> blueprint:result ?result .\n <https://ld.flux.zazuko.com/DatasetRoottoGovernmentOrganizationTreeLink/0> rdfs:label \"Publsied by\" .\n ?result ?resultP ?resultO .\n ?element_0_0 ?connectionPointP ?connectionPointO .\n ?result blueprint:source ?element_0_0 . \n } WHERE {\n \n <https://health.ld.admin.ch/fsvo/TV_DegreeOfSeverity> a <https://schema.ld.admin.ch/datamngt#DatasetRoot> .\n <https://health.ld.admin.ch/fsvo/TV_DegreeOfSeverity> ^<https://schema.ld.admin.ch/datamngt#containsDataset>/<https://schema.ld.admin.ch/datamngt#hasOwnerOrganization> ?element_0_1 .\n ?element_0_1 a <http://schema.org/GovernmentOrganization> .\n \n }",
"metadata": {}
},
{
"kind": 2,
"language": "sparql",
"value": "PREFIX sh: <http://www.w3.org/ns/shacl#>\nPREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX bp: <https://flux.described.at/>\nPREFIX data: <https://ld.flux.zazuko.com/blueprint/app/>\nPREFIX oci: <https://oci.described.at/>\nPREFIX k8s: <https://k8s.described.at/>\n\nCONSTRUCT {\n ?shape sh:group ?aggregate .\n ?shape sh:targetClass ?type .\n\n ?outgoingLinks ?linkP ?linkO .\n ?propertyShape ?propertyP ?propertyO .\n ?path sh:inversePath ?inversePath .\n\n ?inShape sh:group ?inAggregate .\n ?inShape sh:targetClass ?type.\n\n ?incomingLinks ?linkP ?linkO .\n \n} \nWHERE {\n {\n # outgoing links\n {\n SELECT ?outgoingLinks ?aggregate ?shape ?type WHERE {\n BIND (k8s:Deployment AS ?type)\n ?shape sh:targetClass ?type .\n ?shape sh:group ?aggregate . \n ?aggregate rdf:type/rdfs:subClassOf* bp:Aggregate.\n ?outgoingLinks sh:targetClass ?aggregate .\n ?outgoingLinks a bp:AggregateLink .\n }\n }\n VALUES ?linkP { \n sh:targetClass\n sh:property\n bp:target\n rdfs:label\n }\n ?outgoingLinks ?linkP ?linkO .\n } UNION {\n # outgoing links sh:property\n {\n SELECT ?outgoingLinks WHERE {\n BIND (k8s:Deployment AS ?type)\n ?shape sh:targetClass ?type .\n ?shape sh:group ?aggregate . \n ?aggregate rdf:type/rdfs:subClassOf* bp:Aggregate.\n ?outgoingLinks sh:targetClass ?aggregate .\n ?outgoingLinks a bp:AggregateLink .\n }\n }\n \n ?outgoingLinks sh:property ?propertyShape . \n\n VALUES ?propertyP { \n sh:targetClass\n sh:path\n sh:class\n sh:name\n }\n ?propertyShape ?propertyP ?propertyO .\n OPTIONAL {\n ?propertyShape sh:path ?path .\n ?path sh:inversePath ?inversePath .\n\n }\n } UNION {\n # incoming links\n {\n SELECT ?incomingLinks ?inAggregate ?inShape ?type WHERE {\n BIND (k8s:Deployment AS ?type)\n ?inShape sh:targetClass ?type .\n ?inShape sh:group ?inAggregate . \n ?inAggregate rdf:type/rdfs:subClassOf* bp:Aggregate.\n ?incomingLinks bp:target ?inAggregate .\n ?incomingLinks a bp:AggregateLink .\n }\n }\n VALUES ?linkP { \n sh:targetClass\n sh:property\n bp:target\n rdfs:label\n }\n ?incomingLinks ?linkP ?linkO .\n } UNION {\n # incoming links sh:property\n {\n SELECT ?incomingLinks WHERE {\n BIND (k8s:Deployment AS ?type)\n ?shape sh:targetClass ?type .\n ?shape sh:group ?aggregate . \n ?aggregate rdf:type/rdfs:subClassOf* bp:Aggregate.\n ?incomingLinks bp:target ?aggregate .\n ?incomingLinks a bp:AggregateLink .\n }\n }\n ?incomingLinks sh:property ?propertyShape .\n VALUES ?propertyP { \n sh:targetClass\n sh:path\n sh:class\n sh:name\n }\n ?propertyShape ?propertyP ?propertyO .\n OPTIONAL {\n ?propertyShape sh:path ?path .\n ?path sh:inversePath ?inversePath .\n\n }\n }\n}\n\n\n\n",
"metadata": {}
},
{
"kind": 1,
"language": "markdown",
"value": "# Bidiractional Link with Two Connectors\n",
"metadata": {}
},
{
"kind": 2,
"language": "sparql",
"value": "\n PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> \n PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \n PREFIX blueprint: <https://flux.described.at/> \n \n CONSTRUCT {\n <https://ld.flux.zazuko.com/blueprint/app/BusinessObjectToDatabaseSchemaLink> blueprint:result <https://ld.flux.zazuko.com/blueprint/app/BusinessObjectToDatabaseSchemaLink/0> .\n <https://ld.flux.zazuko.com/blueprint/app/BusinessObjectToDatabaseSchemaLink/0> a blueprint:CompositionLinkResult .\n <https://ld.flux.zazuko.com/blueprint/app/BusinessObjectToDatabaseSchemaLink/0> blueprint:result ?result .\n <https://ld.flux.zazuko.com/blueprint/app/BusinessObjectToDatabaseSchemaLink/0> rdfs:label \"Sotred Business Objects\" .\n ?result ?resultP ?resultO .\n ?element_0_2 ?connectionPointP ?connectionPointO .\n ?element_0_2 a blueprint:ConnectionPoint .\n ?result blueprint:source ?element_0_2 . \n ?element_0_2 blueprint:target ?element_0_3 . \n ?element_0_3 ?connectionPointP ?connectionPointODest .\n ?element_0_3 a blueprint:ConnectionPoint .\n } WHERE {\n \n <http://data.table.org/wiski-db> a <http://schema.table.org/DatabaseSchema> .\n <http://data.table.org/wiski-db> <http://schema.table.org/hasTable> ?element_0_1 .\n \n\n ?element_0_1 <http://schema.table.org/column> ?element_0_2 .\n ?element_0_2 a <http://schema.table.org/Column> .\n VALUES ?connectionPointP {\n rdfs:label\n rdf:type\n }\n ?element_0_2 ?connectionPointP ?connectionPointO .\n \n\n ?element_0_2 ^<http://example.org/ea/assignment> ?element_0_3 .\n ?element_0_3 a <http://example.org/ea/Attribute> .\n ?element_0_3 ?connectionPointP ?connectionPointODest .\n \n\n ?element_0_3 ^<http://example.org/ea/assignment> ?result .\n ?result a <http://example.org/ea/BusinessObject> .\n VALUES ?resultP {\n rdf:type\n rdfs:label\n }\n ?result ?resultP ?resultO .\n \n }",
"metadata": {}
}
]
Loading

0 comments on commit 4af74e2

Please sign in to comment.