Class RdfPubClientAbstract

java.lang.Object
org.linkedopenactors.rdfpub.client.RdfPubClientAbstract
All Implemented Interfaces:
RdfPubClientAnonymous
Direct Known Subclasses:
RdfPubClientAnonymousDefault, RdfPubClientDefault

public abstract class RdfPubClientAbstract extends Object implements RdfPubClientAnonymous
Default implementation of RdfPubClient.
Author:
SofwareEngineering Hauschel
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.springframework.http.MediaType
     
    protected org.springframework.web.reactive.function.client.WebClient
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RdfPubClientAbstract(org.eclipse.rdf4j.model.IRI rdfPubServerActorIri, org.springframework.web.reactive.function.client.WebClient webClient)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.eclipse.rdf4j.repository.sparql.SPARQLRepository
    getSparqlRepository(org.eclipse.rdf4j.model.IRI sparqlEndpoint)
     
    protected org.eclipse.rdf4j.repository.sparql.SPARQLRepository
    getSparqlRepository(org.eclipse.rdf4j.model.IRI sparqlEndpoint, String authToken)
     
    org.eclipse.rdf4j.model.Model
    getStatementsPublic(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts)
     
    protected Optional<org.eclipse.rdf4j.model.Model>
    httpGetApString(org.eclipse.rdf4j.model.IRI idOfTheResourceToRead)
     
    protected Optional<org.eclipse.rdf4j.model.Model>
    httpGetApString(org.eclipse.rdf4j.model.IRI idOfTheResourceToRead, String authToken)
     
    Optional<org.eclipse.rdf4j.model.Model>
    read(org.eclipse.rdf4j.model.IRI idOfTheResourceToRead)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MEDIA_TYPE_JSON_LD

      protected static final org.springframework.http.MediaType MEDIA_TYPE_JSON_LD
    • webClient

      protected org.springframework.web.reactive.function.client.WebClient webClient
  • Constructor Details

    • RdfPubClientAbstract

      public RdfPubClientAbstract(org.eclipse.rdf4j.model.IRI rdfPubServerActorIri, org.springframework.web.reactive.function.client.WebClient webClient)
      Parameters:
      rdfPubServerActorIri - The iri/url of the server actor. Used to get the public sparql endpoint
      webClient - The webclient to use for http communication.
  • Method Details

    • read

      public Optional<org.eclipse.rdf4j.model.Model> read(org.eclipse.rdf4j.model.IRI idOfTheResourceToRead)
      Specified by:
      read in interface RdfPubClientAnonymous
    • httpGetApString

      protected Optional<org.eclipse.rdf4j.model.Model> httpGetApString(org.eclipse.rdf4j.model.IRI idOfTheResourceToRead)
    • httpGetApString

      protected Optional<org.eclipse.rdf4j.model.Model> httpGetApString(org.eclipse.rdf4j.model.IRI idOfTheResourceToRead, String authToken)
    • getSparqlRepository

      protected org.eclipse.rdf4j.repository.sparql.SPARQLRepository getSparqlRepository(org.eclipse.rdf4j.model.IRI sparqlEndpoint)
    • getSparqlRepository

      protected org.eclipse.rdf4j.repository.sparql.SPARQLRepository getSparqlRepository(org.eclipse.rdf4j.model.IRI sparqlEndpoint, String authToken)
    • getStatementsPublic

      public org.eclipse.rdf4j.model.Model getStatementsPublic(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts)
      Specified by:
      getStatementsPublic in interface RdfPubClientAnonymous