Skip to content

Commit afc0084

Browse files
imsduSimon Dumas
and
Simon Dumas
authored
Use project reference intead of project uri in metadata (#5281)
* Use project reference intead of project uri in metadata --------- Co-authored-by: Simon Dumas <[email protected]>
1 parent 3cb4d34 commit afc0084

File tree

299 files changed

+649
-1882
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+649
-1882
lines changed

delta/app/src/test/resources/multi-fetch/annotated-source-response.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
"_deprecated": false,
2424
"_incoming": "http://localhost/v1/resources/org/proj1/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fsuccess/incoming",
2525
"_outgoing": "http://localhost/v1/resources/org/proj1/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fsuccess/outgoing",
26-
"_project": "http://localhost/v1/projects/org/proj1",
26+
"_project": "org/proj1",
2727
"_rev": 1,
28-
"_schemaProject": "http://localhost/v1/projects/org/proj1",
2928
"_self": "http://localhost/v1/resources/org/proj1/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fsuccess",
3029
"_updatedAt": "1970-01-01T00:00:00Z",
3130
"_updatedBy": "http://localhost/v1/anonymous"

delta/app/src/test/resources/multi-fetch/compacted-response.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
"_deprecated": false,
2424
"_incoming": "http://localhost/v1/resources/org/proj1/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fsuccess/incoming",
2525
"_outgoing": "http://localhost/v1/resources/org/proj1/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fsuccess/outgoing",
26-
"_project": "http://localhost/v1/projects/org/proj1",
26+
"_project": "org/proj1",
2727
"_rev": 1,
28-
"_schemaProject": "http://localhost/v1/projects/org/proj1",
2928
"_self": "http://localhost/v1/resources/org/proj1/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fsuccess",
3029
"_updatedAt": "1970-01-01T00:00:00Z",
3130
"_updatedBy": "http://localhost/v1/anonymous"

delta/app/src/test/resources/resolvers/resolver-route-metadata-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"_deprecated" : {{deprecated}},
1212
"_incoming" : "{{self}}/incoming",
1313
"_outgoing" : "{{self}}/outgoing",
14-
"_project" : "http://localhost/v1/projects/{{project}}",
14+
"_project" : "{{project}}",
1515
"_rev" : {{rev}},
1616
"_self" : "{{self}}",
1717
"_updatedAt" : "1970-01-01T00:00:00Z",

delta/app/src/test/resources/resolvers/resource-resolved.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
"_deprecated": false,
1515
"_incoming": "{{self}}/incoming",
1616
"_outgoing": "{{self}}/outgoing",
17-
"_project": "http://localhost/v1/projects/org/project",
18-
"_schemaProject": "http://localhost/v1/projects/org/project",
17+
"_project": "org/project",
1918
"_rev": 1,
2019
"_self": "{{self}}",
2120
"_updatedAt": "1970-01-01T00:00:00Z",

delta/app/src/test/resources/resolvers/schema-resolved.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"_deprecated": false,
1717
"_incoming": "{{self}}/incoming",
1818
"_outgoing": "{{self}}/outgoing",
19-
"_project": "http://localhost/v1/projects/org/project",
19+
"_project": "org/project",
2020
"_rev": 1,
2121
"_self": "{{self}}",
2222
"_updatedAt": "1970-01-01T00:00:00Z",

delta/app/src/test/resources/resources/resource-route-metadata-response.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
"_deprecated" : {{deprecated}},
99
"_incoming" : "{{self}}/incoming",
1010
"_outgoing" : "{{self}}/outgoing",
11-
"_project" : "http://localhost/v1/projects/{{project}}",
11+
"_project" : "{{project}}",
1212
"_rev" : {{rev}},
13-
"_schemaProject" : "http://localhost/v1/projects/{{project}}",
1413
"_self" : "{{self}}",
1514
"_updatedAt" : "1970-01-01T00:00:00Z",
1615
"_updatedBy" : "{{updatedBy}}"

delta/app/src/test/resources/schemas/schema-created-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"_deprecated" : false,
1717
"_incoming" : "{{self}}/incoming",
1818
"_outgoing" : "{{self}}/outgoing",
19-
"_project" : "http://localhost/v1/projects/myorg/myproject",
19+
"_project" : "myorg/myproject",
2020
"_rev" : 1,
2121
"_self" : "{{self}}",
2222
"_updatedAt" : "1970-01-01T00:00:00Z",

delta/app/src/test/resources/schemas/schema-payload-with-metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"_deprecated": false,
4343
"_incoming": "http://localhost/v1/schemas/myorg/myproject/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fmyid2/incoming",
4444
"_outgoing": "http://localhost/v1/schemas/myorg/myproject/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2Fmyid2/outgoing",
45-
"_project": "http://localhost/v1/projects/myorg/myproject",
45+
"_project": "myorg/myproject",
4646
"_rev": {{rev}},
4747
"_self": "{{self}}",
4848
"_updatedAt": "1970-01-01T00:00:00Z",

delta/app/src/test/resources/schemas/schema-route-metadata-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"_deprecated" : {{deprecated}},
1212
"_incoming" : "{{self}}/incoming",
1313
"_outgoing" : "{{self}}/outgoing",
14-
"_project" : "http://localhost/v1/projects/{{project}}",
14+
"_project" : "{{project}}",
1515
"_rev" : {{rev}},
1616
"_self" : "{{self}}",
1717
"_updatedAt" : "1970-01-01T00:00:00Z",

delta/app/src/test/resources/schemas/schema-updated-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"_deprecated": true,
1717
"_incoming": "{{self}}/incoming",
1818
"_outgoing": "{{self}}/outgoing",
19-
"_project": "http://localhost/v1/projects/myorg/myproject",
19+
"_project": "myorg/myproject",
2020
"_rev": 6,
2121
"_self": "{{self}}",
2222
"_updatedAt": "1970-01-01T00:00:00Z",

delta/app/src/test/resources/trial/generated-resource.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
"_deprecated": false,
1616
"_incoming": "http://localhost/v1/resources/myorg/myproj/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2FmyId/incoming",
1717
"_outgoing": "http://localhost/v1/resources/myorg/myproj/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2FmyId/outgoing",
18-
"_project": "http://localhost/v1/projects/myorg/myproj",
18+
"_project": "myorg/myproj",
1919
"_rev": 1,
20-
"_schemaProject": "http://localhost/v1/projects/myorg/myproj",
2120
"_self": "http://localhost/v1/resources/myorg/myproj/_/https:%2F%2Fbluebrain.github.io%2Fnexus%2Fvocabulary%2FmyId",
2221
"_updatedAt": "1970-01-01T00:00:00Z",
2322
"_updatedBy": "http://localhost/v1/realms/wonderland/users/alice"

delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/ResolversRoutesSpec.scala

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import ch.epfl.bluebrain.nexus.delta.sdk.identities.IdentitiesDummy
1717
import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller
1818
import ch.epfl.bluebrain.nexus.delta.sdk.implicits._
1919
import ch.epfl.bluebrain.nexus.delta.sdk.jsonld.JsonLdContent
20-
import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceUris
20+
import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceScope
2121
import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions
2222
import ch.epfl.bluebrain.nexus.delta.sdk.projects.FetchContextDummy
2323
import ch.epfl.bluebrain.nexus.delta.sdk.projects.model.ApiMappings
@@ -579,12 +579,12 @@ class ResolversRoutesSpec extends BaseRouteSpec {
579579

580580
val resourceResolved = jsonContentOf(
581581
"resolvers/resource-resolved.json",
582-
"self" -> ResourceUris.resource(project.ref, project.ref, resourceId).accessUri
582+
"self" -> ResourceScope.resource(project.ref, resourceId).accessUri
583583
)
584584

585585
val schemaResolved = jsonContentOf(
586586
"resolvers/schema-resolved.json",
587-
"self" -> ResourceUris.schema(project.ref, schemaId).accessUri
587+
"self" -> ResourceScope.schema(project.ref, schemaId).accessUri
588588
)
589589

590590
"resolve the resources/schemas" should {
@@ -731,6 +731,6 @@ class ResolversRoutesSpec extends BaseRouteSpec {
731731
"createdBy" -> createdBy.asIri,
732732
"updatedBy" -> updatedBy.asIri,
733733
"type" -> resolverType,
734-
"self" -> ResourceUris.resolver(projectRef, id).accessUri
734+
"self" -> ResourceScope.resolver(projectRef, id).accessUri
735735
)
736736
}

delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/ResourcesRoutesSpec.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen
1616
import ch.epfl.bluebrain.nexus.delta.sdk.identities.IdentitiesDummy
1717
import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller
1818
import ch.epfl.bluebrain.nexus.delta.sdk.implicits._
19-
import ch.epfl.bluebrain.nexus.delta.sdk.model.{IdSegmentRef, ResourceUris}
19+
import ch.epfl.bluebrain.nexus.delta.sdk.model.{IdSegmentRef, ResourceScope}
2020
import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions.resources
2121
import ch.epfl.bluebrain.nexus.delta.sdk.projects.FetchContextDummy
2222
import ch.epfl.bluebrain.nexus.delta.sdk.projects.model.ApiMappings
@@ -78,7 +78,7 @@ class ResourcesRoutesSpec extends BaseRouteSpec with ValidateResourceFixture wit
7878
private def payloadWithMetadata(id: String) = jsonContentOf(
7979
"resources/resource-with-metadata.json",
8080
"id" -> (nxv + id),
81-
"self" -> ResourceUris.resource(projectRef, projectRef, nxv + id).accessUri
81+
"self" -> ResourceScope.resource(projectRef, nxv + id).accessUri
8282
)
8383

8484
private val aclCheck = AclSimpleCheck().accepted
@@ -760,7 +760,7 @@ class ResourcesRoutesSpec extends BaseRouteSpec with ValidateResourceFixture wit
760760
"createdBy" -> createdBy.asIri,
761761
"updatedBy" -> updatedBy.asIri,
762762
"schema" -> schema,
763-
"self" -> ResourceUris.resource(project, project, id).accessUri
763+
"self" -> ResourceScope.resource(project, id).accessUri
764764
)
765765

766766
// Metadata for a resource that has been created and updated by the writer user

delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutesSpec.scala

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen
1818
import ch.epfl.bluebrain.nexus.delta.sdk.identities.IdentitiesDummy
1919
import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller
2020
import ch.epfl.bluebrain.nexus.delta.sdk.implicits._
21-
import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceUris
21+
import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceScope
2222
import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions.schemas
2323
import ch.epfl.bluebrain.nexus.delta.sdk.projects.FetchContextDummy
2424
import ch.epfl.bluebrain.nexus.delta.sdk.projects.model.ApiMappings
@@ -294,7 +294,7 @@ class SchemasRoutesSpec extends BaseRouteSpec with IOFromMap with CatsIOValues {
294294
response.asJson shouldEqual jsonContentOf(
295295
"schemas/schema-updated-response.json",
296296
"id" -> "nxv:myid",
297-
"self" -> ResourceUris.schema(projectRef, myId).accessUri
297+
"self" -> ResourceScope.schema(projectRef, myId).accessUri
298298
)
299299
}
300300
}
@@ -316,7 +316,7 @@ class SchemasRoutesSpec extends BaseRouteSpec with IOFromMap with CatsIOValues {
316316
response.asJson shouldEqual jsonContentOf(
317317
"schemas/schema-created-response.json",
318318
"id" -> "nxv:myid2",
319-
"self" -> ResourceUris.schema(projectRef, myId2).accessUri
319+
"self" -> ResourceScope.schema(projectRef, myId2).accessUri
320320
)
321321
response.expectConditionalCacheHeaders
322322
}
@@ -368,7 +368,7 @@ class SchemasRoutesSpec extends BaseRouteSpec with IOFromMap with CatsIOValues {
368368
response.asJson shouldEqual jsonContentOf(
369369
"schemas/schema-payload-with-metadata.json",
370370
"id" -> myId2,
371-
"self" -> ResourceUris.schema(projectRef, myId2).accessUri,
371+
"self" -> ResourceScope.schema(projectRef, myId2).accessUri,
372372
"rev" -> 2
373373
)
374374
}
@@ -386,7 +386,7 @@ class SchemasRoutesSpec extends BaseRouteSpec with IOFromMap with CatsIOValues {
386386
response.asJson shouldEqual jsonContentOf(
387387
"schemas/schema-payload-with-metadata.json",
388388
"id" -> myId2,
389-
"self" -> ResourceUris.schema(projectRef, myId2).accessUri,
389+
"self" -> ResourceScope.schema(projectRef, myId2).accessUri,
390390
"rev" -> 1
391391
)
392392
}
@@ -483,6 +483,6 @@ class SchemasRoutesSpec extends BaseRouteSpec with IOFromMap with CatsIOValues {
483483
"deprecated" -> deprecated,
484484
"createdBy" -> createdBy.asIri,
485485
"updatedBy" -> updatedBy.asIri,
486-
"self" -> ResourceUris.schema(project, id).accessUri
486+
"self" -> ResourceScope.schema(project, id).accessUri
487487
)
488488
}

delta/plugins/archive/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/model/ArchiveState.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import cats.data.NonEmptySet
44
import ch.epfl.bluebrain.nexus.delta.plugins.archive.model
55
import ch.epfl.bluebrain.nexus.delta.rdf.IriOrBNode.Iri
66
import ch.epfl.bluebrain.nexus.delta.rdf.instances._
7-
import ch.epfl.bluebrain.nexus.delta.sdk.model.{ResourceF, ResourceRepresentation, ResourceUris}
7+
import ch.epfl.bluebrain.nexus.delta.sdk.model.{ResourceF, ResourceRepresentation, ResourceScope}
88
import ch.epfl.bluebrain.nexus.delta.sourcing.Serializer
99
import ch.epfl.bluebrain.nexus.delta.sourcing.model.Identity.Subject
1010
import ch.epfl.bluebrain.nexus.delta.sourcing.model.{ProjectRef, ResourceRef}
@@ -46,7 +46,7 @@ final case class ArchiveState(
4646
def toResource(ttl: FiniteDuration): ArchiveResource =
4747
ResourceF(
4848
id = id,
49-
uris = ResourceUris.ephemeral("archives", project, id),
49+
scope = ResourceScope.ephemeral("archives", project, id),
5050
rev = this.rev,
5151
types = this.types,
5252
deprecated = this.deprecated,

delta/plugins/archive/src/main/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/routes/ArchiveRoutes.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ArchiveRoutes(
8383

8484
private def emitCreatedArchive(io: IO[ArchiveResource]): Route =
8585
Zip.checkHeader {
86-
case true => emitRedirect(SeeOther, io.map(_.uris.accessUri).attemptNarrow[ArchiveRejection])
86+
case true => emitRedirect(SeeOther, io.map(_.scope.accessUri).attemptNarrow[ArchiveRejection])
8787
case false => emitMetadata(Created, io)
8888
}
8989

delta/plugins/archive/src/test/resources/responses/archive-metadata-response.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"_createdBy" : "{{createdBy}}",
1111
"_deprecated" : {{deprecated}},
1212
"_expiresInSeconds": {{expiresInSeconds}},
13-
"_project" : "http://localhost/v1/projects/{{project}}",
13+
"_project" : "{{project}}",
1414
"_rev" : {{rev}},
1515
"_self" : "{{self}}",
1616
"_updatedAt" : "1970-01-01T00:00:00Z",

delta/plugins/archive/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/ArchiveRoutesSpec.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import ch.epfl.bluebrain.nexus.delta.sdk.identities.IdentitiesDummy
3636
import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller
3737
import ch.epfl.bluebrain.nexus.delta.sdk.implicits._
3838
import ch.epfl.bluebrain.nexus.delta.sdk.jsonld.JsonLdContent
39-
import ch.epfl.bluebrain.nexus.delta.sdk.model.{ResourceF, ResourceUris}
39+
import ch.epfl.bluebrain.nexus.delta.sdk.model.{ResourceF, ResourceScope}
4040
import ch.epfl.bluebrain.nexus.delta.sdk.permissions.Permissions
4141
import ch.epfl.bluebrain.nexus.delta.sdk.permissions.model.Permission
4242
import ch.epfl.bluebrain.nexus.delta.sdk.projects.FetchContextDummy
@@ -176,7 +176,7 @@ class ArchiveRoutesSpec extends BaseRouteSpec with StorageFixtures with ArchiveH
176176
"deprecated" -> deprecated,
177177
"createdBy" -> createdBy.asIri,
178178
"updatedBy" -> updatedBy.asIri,
179-
"self" -> ResourceUris.ephemeral("archives", project, id).accessUri,
179+
"self" -> ResourceScope.ephemeral("archives", project, id).accessUri,
180180
"expiresInSeconds" -> expiresInSeconds.toString
181181
)
182182

delta/plugins/archive/src/test/scala/ch/epfl/bluebrain/nexus/delta/plugins/archive/ArchivesSpec.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import ch.epfl.bluebrain.nexus.delta.rdf.Vocabulary.{nxv, schema}
1212
import ch.epfl.bluebrain.nexus.delta.sdk.generators.ProjectGen
1313
import ch.epfl.bluebrain.nexus.delta.sdk.identities.model.Caller
1414
import ch.epfl.bluebrain.nexus.delta.sdk.implicits._
15-
import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceUris.EphemeralResourceInProjectUris
15+
import ch.epfl.bluebrain.nexus.delta.sdk.model.ResourceScope.EphemeralResourceF
1616
import ch.epfl.bluebrain.nexus.delta.sdk.projects.FetchContextDummy
1717
import ch.epfl.bluebrain.nexus.delta.sdk.projects.model.ApiMappings
1818
import ch.epfl.bluebrain.nexus.delta.sourcing.config.EphemeralLogConfig
@@ -95,7 +95,7 @@ class ArchivesSpec extends CatsEffectSpec with DoobieScalaTestFixture with Remot
9595

9696
val id = resource.id
9797
val encodedId = URLEncoder.encode(id.toString, StandardCharsets.UTF_8)
98-
resource.uris shouldEqual EphemeralResourceInProjectUris(
98+
resource.scope shouldEqual EphemeralResourceF(
9999
project.ref,
100100
s"archives/${project.ref}/$encodedId"
101101
)
@@ -195,7 +195,7 @@ class ArchivesSpec extends CatsEffectSpec with DoobieScalaTestFixture with Remot
195195
val resource = archives.fetch(id, project.ref).accepted
196196
val encodedId = URLEncoder.encode(id.toString, StandardCharsets.UTF_8)
197197
resource.id shouldEqual id
198-
resource.uris shouldEqual EphemeralResourceInProjectUris(
198+
resource.scope shouldEqual EphemeralResourceF(
199199
project.ref,
200200
s"archives/${project.ref}/$encodedId"
201201
)

delta/plugins/blazegraph/src/main/resources/blazegraph/incoming.txt

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
prefix nxv: <https://bluebrain.github.io/nexus/vocabulary/>
22

3-
SELECT ?total ?s ?paths ?types ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
3+
SELECT ?total ?s ?paths ?types ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
44

55
WITH {
6-
SELECT ?s ((GROUP_CONCAT(?p)) as ?paths) ?types ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy {
7-
SELECT ?s ?p (GROUP_CONCAT(DISTINCT ?type) AS ?types) ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy (count(?mid) as ?pos) WHERE {
6+
SELECT ?s ((GROUP_CONCAT(?p)) as ?paths) ?types ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy {
7+
SELECT ?s ?p (GROUP_CONCAT(DISTINCT ?type) AS ?types) ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy (count(?mid) as ?pos) WHERE {
88
GRAPH ?g1 {
99
?s nxv:self ?_self .
1010
?s nxv:constrainedBy ?_constrainedBy .
@@ -22,11 +22,8 @@ WITH {
2222
?s rdf:type ?type .
2323
?s (!<>)* <{id}>
2424
}
25-
OPTIONAL {
26-
GRAPH ?g1 { ?s nxv:schemaProject ?_schemaProject . }
27-
}
28-
} GROUP BY ?x ?p ?y ?s ?types ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy ORDER BY ?pos
29-
} GROUP BY ?s ?types ?paths ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
25+
} GROUP BY ?x ?p ?y ?s ?types ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy ORDER BY ?pos
26+
} GROUP BY ?s ?types ?paths ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
3027
} AS %resultSet
3128

3229
WHERE {

delta/plugins/blazegraph/src/main/resources/blazegraph/outgoing_include_external.txt

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
prefix nxv: <https://bluebrain.github.io/nexus/vocabulary/>
22

3-
SELECT ?total ?s ?paths ?types ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
3+
SELECT ?total ?s ?paths ?types ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
44

55
WITH {
6-
SELECT ?s ((GROUP_CONCAT(?p)) as ?paths) ?types ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy {
7-
SELECT ?s ?p (GROUP_CONCAT(DISTINCT ?type) AS ?types) ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy (count(?mid) as ?pos) WHERE {
6+
SELECT ?s ((GROUP_CONCAT(?p)) as ?paths) ?types ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy {
7+
SELECT ?s ?p (GROUP_CONCAT(DISTINCT ?type) AS ?types) ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy (count(?mid) as ?pos) WHERE {
88
GRAPH <{id}> {
99
<{id}> (!<>)* ?mid .
1010
?mid (!<>)* ?x .
1111
?x ?p ?y .
1212
?y (!<>)* ?s .
13-
FILTER(isIri(?s) && ?p NOT IN (nxv:updatedBy, nxv:createdBy, nxv:constrainedBy, nxv:project, nxv:schemaProject, rdf:type, nxv:self, nxv:incoming, nxv:outgoing) && NOT EXISTS {?ss rdf:type ?s})
13+
FILTER(isIri(?s) && ?p NOT IN (nxv:updatedBy, nxv:createdBy, nxv:constrainedBy, rdf:type, nxv:self, nxv:incoming, nxv:outgoing) && NOT EXISTS {?ss rdf:type ?s})
1414
}
1515
OPTIONAL {
1616
GRAPH ?g2 {
1717
?s nxv:self ?_self .
1818
?s nxv:constrainedBy ?_constrainedBy .
19-
?s nxv:schemaProject ?_schemaProject .
2019
?s nxv:project ?_project .
2120
?s nxv:rev ?_rev .
2221
?s nxv:deprecated ?_deprecated .
@@ -31,8 +30,8 @@ WITH {
3130
OPTIONAL {
3231
GRAPH <{id}> { ?s rdf:type ?type }
3332
}
34-
} GROUP BY ?x ?p ?y ?s ?types ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy ORDER BY ?pos
35-
} GROUP BY ?s ?types ?paths ?_self ?_constrainedBy ?_schemaProject ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
33+
} GROUP BY ?x ?p ?y ?s ?types ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy ORDER BY ?pos
34+
} GROUP BY ?s ?types ?paths ?_self ?_constrainedBy ?_project ?_rev ?_deprecated ?_createdAt ?_createdBy ?_updatedAt ?_updatedBy
3635
} AS %resultSet
3736

3837
WHERE {

0 commit comments

Comments
 (0)