Class RdfClientResource


  • public class RdfClientResource
    extends ClientResource
    Linked client resource. In addition to regular client resources, this class offers additional method aware of links exposed by RDF, making it natural to navigate the Web of data.
    • Field Detail

      • links

        private Graph links
        The links cache.
    • Constructor Detail

      • RdfClientResource

        public RdfClientResource​(Context context,
                                 Method method,
                                 Reference reference)
        Constructor.
        Parameters:
        context - The context.
        method - The method to call.
        reference - The target reference.
      • RdfClientResource

        public RdfClientResource​(Context context,
                                 Method method,
                                 java.lang.String uri)
        Constructor.
        Parameters:
        context - The context.
        method - The method to call.
        uri - The target URI.
      • RdfClientResource

        public RdfClientResource​(Context context,
                                 Method method,
                                 java.net.URI uri)
        Constructor.
        Parameters:
        context - The context.
        method - The method to call.
        uri - The target URI.
      • RdfClientResource

        public RdfClientResource​(Context context,
                                 Reference reference)
        Constructor.
        Parameters:
        context - The context.
        reference - The target reference.
      • RdfClientResource

        public RdfClientResource​(Context context,
                                 Request request,
                                 Response response)
        Constructor.
        Parameters:
        context - The current context.
        request - The handled request.
        response - The handled response.
      • RdfClientResource

        public RdfClientResource​(Context context,
                                 java.lang.String uri)
        Constructor.
        Parameters:
        context - The context.
        uri - The target URI.
      • RdfClientResource

        public RdfClientResource​(Context context,
                                 java.net.URI uri)
        Constructor.
        Parameters:
        context - The context.
        uri - The target URI.
      • RdfClientResource

        public RdfClientResource​(Method method,
                                 Reference reference)
        Constructor.
        Parameters:
        method - The method to call.
        reference - The target reference.
      • RdfClientResource

        public RdfClientResource​(Method method,
                                 java.lang.String uri)
        Constructor.
        Parameters:
        method - The method to call.
        uri - The target URI.
      • RdfClientResource

        public RdfClientResource​(Method method,
                                 java.net.URI uri)
        Constructor.
        Parameters:
        method - The method to call.
        uri - The target URI.
      • RdfClientResource

        public RdfClientResource​(Reference reference)
        Constructor.
        Parameters:
        reference - The target reference.
      • RdfClientResource

        public RdfClientResource​(Request request,
                                 Response response)
        Constructor.
        Parameters:
        request - The handled request.
        response - The handled response.
      • RdfClientResource

        public RdfClientResource​(java.lang.String uri)
        Constructor.
        Parameters:
        uri - The target URI.
      • RdfClientResource

        public RdfClientResource​(java.net.URI uri)
        Constructor.
        Parameters:
        uri - The target URI.
    • Method Detail

      • getLinked

        public java.util.Set<RdfClientResource> getLinked()
        Returns all the linked resources, based on the RDF representation exposed.
        Returns:
        All the linked resources.
        See Also:
        getLinks()
      • getLinked

        public java.util.Set<RdfClientResource> getLinked​(java.util.Collection<Reference> typeRefs)
        Returns the linked resources, based on the RDF representation exposed. The type of links to follow can be restricted.
        Parameters:
        typeRefs - The set of types references of the links to select or null.
        Returns:
        All the linked resources.
        See Also:
        getLinks()
      • getLinked

        public java.util.Set<RdfClientResource> getLinked​(Reference typeRef)
        Returns the linked resources, based on the RDF representation exposed. The type of links to follow can be restricted.
        Parameters:
        typeRef - The type reference of the links to select or null.
        Returns:
        All the linked resources.
        See Also:
        getLinks()
      • getLinks

        public Graph getLinks()
        Returns the links exposed by this resource.
        Returns:
        The links exposed by this resource.
      • getLiterals

        public java.util.Set<Couple<Reference,​Literal>> getLiterals()
        Returns all the linked literals, based on the RDF representation exposed.
        Returns:
        All the linked literals.
        See Also:
        getLinks()
      • getLiterals

        public java.util.Set<Literal> getLiterals​(Reference typeRef)
        Returns the linked literals, based on the RDF representation exposed. The type of links to follow can be restricted.
        Parameters:
        typeRef - The type reference of the links to select or null.
        Returns:
        All the linked literals.
        See Also:
        getLiterals()
      • refresh

        public void refresh()
        Refreshes the links cache.