@Test void getExtraLinkRelations() { final IRI identifier = rdf.createIRI(TRELLIS_DATA_PREFIX + "extras"); final String inbox = "http: final String annotations = "http: final Dataset dataset = rdf.createDataset(); dataset.add(Trellis.PreferUserManaged, identifier, LDP.inbox, rdf.createIRI(inbox)); dataset.add(Trellis.PreferUserManaged, identifier, OA.annotationService, rdf.createIRI(annotations)); assertNull(svc.create(builder(identifier).interactionModel(LDP.RDFSource).container(root).build(), dataset) .toCompletableFuture().join()); svc.get(identifier).thenAccept(res -> assertTrue(res.stream(Trellis.PreferUserManaged).anyMatch(triple -> triple.getSubject().equals(identifier) && triple.getPredicate().equals(LDP.inbox) && triple.getObject().equals(rdf.createIRI(inbox))))).toCompletableFuture().join(); DBResource.findResource(pg.getPostgresDatabase(), identifier, extensions, true).thenAccept(res -> { assertEquals(2L, res.stream(Trellis.PreferUserManaged).count()); assertEquals(1L, res.stream(Trellis.PreferServerManaged).count()); assertEquals(2L, res.getExtraLinkRelations().count()); assertTrue(res.getExtraLinkRelations().anyMatch(rel -> rel.getKey().equals(annotations) && rel.getValue().equals(OA.annotationService.getIRIString()))); assertTrue(res.getExtraLinkRelations().anyMatch(rel -> rel.getKey().equals(inbox) && rel.getValue().equals(LDP.inbox.getIRIString()))); }).toCompletableFuture().join(); }
@Override public Stream<Map.Entry<String,String>> getExtraLinkRelations() { return data.getExtra().entrySet().stream(); }
DBResource implements Resource { @Override public Stream<Map.Entry<String,String>> getExtraLinkRelations() { return data.getExtra().entrySet().stream(); } }
DBResource implements Resource { @Override public Stream<Map.Entry<String,String>> getExtraLinkRelations() { return data.getExtra().entrySet().stream(); } protected  DBResource(final Jdbi jdbi, final IRI identifier, final Map<String, IRI> extensions,
            final boolean includeLdpType, final boolean supportDirectContainment,
            final boolean supportIndirectContainment); }
DBResource implements Resource { @Override public Stream<Map.Entry<String,String>> getExtraLinkRelations() { return data.getExtra().entrySet().stream(); } protected  DBResource(final Jdbi jdbi, final IRI identifier, final Map<String, IRI> extensions,
            final boolean includeLdpType, final boolean supportDirectContainment,
            final boolean supportIndirectContainment); static CompletionStage<Resource> findResource(final DataSource ds, final IRI identifier,
            final Map<String, IRI> extensions, final boolean includeLdpType); static CompletionStage<Resource> findResource(final Jdbi jdbi, final IRI identifier,
            final Map<String, IRI> extensions, final boolean includeLdpType); static CompletionStage<Resource> findResource(final Jdbi jdbi, final IRI identifier,
            final Map<String, IRI> extensions, final boolean includeLdpType, final boolean supportDirectContainment,
            final boolean supportIndirectContainment); boolean isDeleted(); @Override Stream<Quad> stream(); @Override Stream<Quad> stream(final Collection<IRI> graphNames); @Override IRI getIdentifier(); @Override IRI getInteractionModel(); @Override Optional<IRI> getContainer(); @Override Optional<IRI> getMembershipResource(); @Override Optional<IRI> getMemberRelation(); @Override Optional<IRI> getMemberOfRelation(); @Override Optional<IRI> getInsertedContentRelation(); @Override Optional<BinaryMetadata> getBinaryMetadata(); @Override Instant getModified(); @Override boolean hasMetadata(final IRI graphName); @Override Set<IRI> getMetadataGraphNames(); @Override Stream<Map.Entry<String,String>> getExtraLinkRelations(); }
DBResource implements Resource { @Override public Stream<Map.Entry<String,String>> getExtraLinkRelations() { return data.getExtra().entrySet().stream(); } protected  DBResource(final Jdbi jdbi, final IRI identifier, final Map<String, IRI> extensions,
            final boolean includeLdpType, final boolean supportDirectContainment,
            final boolean supportIndirectContainment); static CompletionStage<Resource> findResource(final DataSource ds, final IRI identifier,
            final Map<String, IRI> extensions, final boolean includeLdpType); static CompletionStage<Resource> findResource(final Jdbi jdbi, final IRI identifier,
            final Map<String, IRI> extensions, final boolean includeLdpType); static CompletionStage<Resource> findResource(final Jdbi jdbi, final IRI identifier,
            final Map<String, IRI> extensions, final boolean includeLdpType, final boolean supportDirectContainment,
            final boolean supportIndirectContainment); boolean isDeleted(); @Override Stream<Quad> stream(); @Override Stream<Quad> stream(final Collection<IRI> graphNames); @Override IRI getIdentifier(); @Override IRI getInteractionModel(); @Override Optional<IRI> getContainer(); @Override Optional<IRI> getMembershipResource(); @Override Optional<IRI> getMemberRelation(); @Override Optional<IRI> getMemberOfRelation(); @Override Optional<IRI> getInsertedContentRelation(); @Override Optional<BinaryMetadata> getBinaryMetadata(); @Override Instant getModified(); @Override boolean hasMetadata(final IRI graphName); @Override Set<IRI> getMetadataGraphNames(); @Override Stream<Map.Entry<String,String>> getExtraLinkRelations();  }