- java.lang.Object
-
- com.semanticcms.core.model.ElementRef
-
- All Implemented Interfaces:
Comparable<ElementRef>
public class ElementRef extends Object implements Comparable<ElementRef>
An element reference contains a book, a path, and an element id. Any path to a directory must end with a slash (/).TODO: Support parameters to a page, child, link, ... Parameters provided in path/page?, param.* attributes, and nested tags - matching/extending AO taglib.
-
-
Constructor Summary
Constructors Constructor Description ElementRef(PageRef pageRef, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendServletPath(Appendable out)
Appends the combination of the book, the path, and element anchor that refers to the element resource within the web application.int
compareTo(ElementRef o)
Orders by page then id.boolean
equals(Object obj)
String
getId()
The id of the element within the page.PageRef
getPageRef()
The reference to the page this element is part of.String
getServletPath()
Gets the combination of the book, the path, and element anchor that refers to the element resource within the web application.int
hashCode()
String
toString()
-
-
-
Method Detail
-
getPageRef
public PageRef getPageRef()
The reference to the page this element is part of.
-
getId
public String getId()
The id of the element within the page.
-
compareTo
public int compareTo(ElementRef o)
Orders by page then id.- Specified by:
compareTo
in interfaceComparable<ElementRef>
- See Also:
PageRef.compareTo(com.semanticcms.core.model.PageRef)
-
getServletPath
public String getServletPath()
Gets the combination of the book, the path, and element anchor that refers to the element resource within the web application.The element anchor is not URL-encoded - Unicode characters are verbatim.
- See Also:
appendServletPath(java.lang.Appendable)
-
appendServletPath
public void appendServletPath(Appendable out) throws IOException
Appends the combination of the book, the path, and element anchor that refers to the element resource within the web application.The element anchor is not URL-encoded - Unicode characters are verbatim.
- Throws:
IOException
- See Also:
getServletPath()
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
getServletPath()
-
-