Interface RdfResource

  • All Superinterfaces:
    RdfTerm
    All Known Implementing Classes:
    Resource

    public interface RdfResource
    extends RdfTerm
    Represents an RDF resource, which can either be an absolute IRI or a blank node identifier.

    This interface defines methods for working with RDF resources, which are key components in RDF statements (subject, predicate, or object in RDF triples). An RDF resource can either be an IRI or a blank node.

    • Method Detail

      • value

        java.lang.String value()
        Returns the value of the resource, typically an absolute IRI or blank node identifier.
        Returns:
        the value of the resource as a String
      • isBlank

        boolean isBlank()
        Checks whether this resource is a blank node.

        A blank node is an anonymous resource that does not have an IRI.

        Returns:
        true if this resource is a blank node, false if it is an IRI
      • isIRI

        boolean isIRI()
        Checks whether this resource is an IRI.

        An IRI (Internationalized Resource Identifier) is a globally unique identifier used to refer to a resource.

        Returns:
        true if this resource is an IRI, false if it is a blank node
      • isResource

        default boolean isResource()
        Description copied from interface: RdfTerm
        Indicates whether this term is a resource, which includes absolute IRIs and blank node identifiers.
        Specified by:
        isResource in interface RdfTerm
        Returns:
        true if the term is an RdfResource; false otherwise.