Class JcrLabeledResource

  • All Implemented Interfaces:
    LabeledResource

    public class JcrLabeledResource
    extends java.lang.Object
    implements LabeledResource
    Implements a labeled resource that reads the values from jcr properties.
    • Constructor Summary

      Constructors 
      Constructor Description
      JcrLabeledResource​(Node node)
      Creates a new JcrLabeledResource and initializes its field from the properties of the given node or it's jcr:content child node.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()
      Returns the description of this resource.
      java.lang.String getName()
      Returns the name of this resource.
      java.lang.String getPath()
      Returns the path of this resource
      java.lang.String getTitle()
      Returns the tile of this resource.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JcrLabeledResource

        public JcrLabeledResource​(Node node)
                           throws RepositoryException
        Creates a new JcrLabeledResource and initializes its field from the properties of the given node or it's jcr:content child node.
        Parameters:
        node - the node
        Throws:
        RepositoryException - if an error during repository access occurs.
    • Method Detail

      • getPath

        public java.lang.String getPath()
        Returns the path of this resource
        Specified by:
        getPath in interface LabeledResource
        Returns:
        the path of the underlying node
      • getName

        public java.lang.String getName()
        Returns the name of this resource. this is usually the last segment of it's path.
        Specified by:
        getName in interface LabeledResource
        Returns:
        the name of the underlying node
      • getTitle

        public java.lang.String getTitle()
        Returns the tile of this resource.
        Specified by:
        getTitle in interface LabeledResource
        Returns:
        the value of the jcr:title property of the underlying node or of it's jcr:content child node if it exists. null otherwise.
      • getDescription

        public java.lang.String getDescription()
        Returns the description of this resource.
        Specified by:
        getDescription in interface LabeledResource
        Returns:
        the value of the jcr:description property of the underlying node or of it's jcr:content child node if it exists. null otherwise.