Class Resource

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean blankNode  
      (package private) java.lang.String key  
      (package private) java.lang.String value  
    • Constructor Summary

      Constructors 
      Constructor Description
      Resource​(java.lang.String value, boolean isBlankNode, java.lang.String key)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Resource createBlankNode​(java.lang.String value)  
      (package private) static Resource createBlankNode​(java.lang.String value, java.lang.String key)  
      static Resource createIRI​(java.lang.String value)  
      (package private) static Resource createIRI​(java.lang.String value, java.lang.String key)  
      boolean equals​(java.lang.Object obj)
      Compares this RDF term to the specified object.
      int hashCode()
      Returns a hash code value for this RDF term.
      boolean isBlank()
      Checks whether this resource is a blank node.
      boolean isIRI()
      Checks whether this resource is an IRI.
      (package private) static java.lang.String key​(java.lang.String value, boolean blankNode)  
      java.lang.String toString()
      Returns a string representation of this RDF term.
      java.lang.String value()
      Returns the value of the resource, typically an absolute IRI or blank node identifier.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • value

        final java.lang.String value
      • blankNode

        final boolean blankNode
      • key

        java.lang.String key
    • Constructor Detail

      • Resource

        Resource​(java.lang.String value,
                 boolean isBlankNode,
                 java.lang.String key)
    • Method Detail

      • createBlankNode

        public static Resource createBlankNode​(java.lang.String value)
      • createBlankNode

        static Resource createBlankNode​(java.lang.String value,
                                        java.lang.String key)
      • createIRI

        public static Resource createIRI​(java.lang.String value)
      • createIRI

        static Resource createIRI​(java.lang.String value,
                                  java.lang.String key)
      • isBlank

        public boolean isBlank()
        Description copied from interface: RdfResource
        Checks whether this resource is a blank node.

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

        Specified by:
        isBlank in interface RdfResource
        Returns:
        true if this resource is a blank node, false if it is an IRI
      • isIRI

        public boolean isIRI()
        Description copied from interface: RdfResource
        Checks whether this resource is an IRI.

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

        Specified by:
        isIRI in interface RdfResource
        Returns:
        true if this resource is an IRI, false if it is a blank node
      • value

        public java.lang.String value()
        Description copied from interface: RdfResource
        Returns the value of the resource, typically an absolute IRI or blank node identifier.
        Specified by:
        value in interface RdfResource
        Returns:
        the value of the resource as a String
      • hashCode

        public int hashCode()
        Description copied from interface: RdfTerm
        Returns a hash code value for this RDF term.
        Specified by:
        hashCode in interface RdfTerm
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        a hash code consistent with RdfTerm.equals(Object).
      • equals

        public boolean equals​(java.lang.Object obj)
        Description copied from interface: RdfTerm
        Compares this RDF term to the specified object. Implementations must override this method to provide equality checks appropriate to the term type.
        Specified by:
        equals in interface RdfTerm
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object to compare with this term.
        Returns:
        true if the specified object is equal to this term; false otherwise.
      • toString

        public java.lang.String toString()
        Description copied from interface: RdfTerm
        Returns a string representation of this RDF term.
        Specified by:
        toString in interface RdfTerm
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string describing this RDF term.
      • key

        static final java.lang.String key​(java.lang.String value,
                                          boolean blankNode)