Class ResourceNode


  • public class ResourceNode
    extends Object
    A helper model class for representing a resource. Describes the resource by name and the content as a JsonObject.
    Author:
    https://github.com/ljucam [Mario Ljuca]
    • Constructor Detail

      • ResourceNode

        public ResourceNode​(String nodeName,
                            Object object,
                            String eTag,
                            String path)
        Creates an instance of a ResourceNode.
        Parameters:
        nodeName - - name of the resource
        object - - JsonObject, JsonArray or an Exception
        eTag - - eTag of the request leading to this resource
        path - - the request path
      • ResourceNode

        public ResourceNode​(String nodeName,
                            Object object,
                            String eTag)
        Creates an instance of a ResourceNode.
        Parameters:
        nodeName - - name of the resource
        object - - JsonObject, JsonArray or an Exception
        eTag - - eTag of the request leading to this resource
      • ResourceNode

        public ResourceNode​(String nodeName,
                            Object object)
        Creates an instance of a ResourceNode.
        Parameters:
        nodeName - - name of the resource
        object - - JsonObject, JsonArray or an Exception
    • Method Detail

      • geteTag

        public String geteTag()
        Returns the eTag for this resource or a collection of all eTags from this resource and their children.
        Returns:
        String
      • getNodeName

        public String getNodeName()
        Returns the name of this resource.
        Returns:
        String
      • getObject

        public Object getObject()
        Returns a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception. The object can be null!
        Returns:
        Object
      • getPath

        public String getPath()
        Returns the path for the request.
        Returns:
        String
      • setObject

        public void setObject​(Object object)
        Sets a JsonObject, a JsonArray, a list with ResourceNodes, a byte array or an Exception. The object can be null!
        Parameters:
        object - object