java.lang.Object
com.semanticcms.core.model.Node
com.semanticcms.core.model.Page
- All Implemented Interfaces:
Freezable<Node>
,Comparable<Page>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
This matches the table of contents implementation in /semanticcms-section-servlet/toc.inc.jspx and is a result of HTML only having H1 through H6.static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addChildRef
(ChildRef childRef) void
addElement
(Element element) Adds an element to this page.void
addParentRef
(ParentRef parentRef) int
boolean
filterElements
(Class<E> clazz) Gets all elements in the page (including all child elements) that are of the given type, in the order they were declared in the page.freeze()
boolean
boolean
Gets the allowRobots setting.This has no equivalent in https://schema.org/, however we feel it is important to actively review content to ensure its accuracy, even when it has not been modified.Gets all elements in the page (including all child elements), in the order they were declared in the page.Gets the elements indexed by id, in no particular order.Gets which element IDs were generated.getLabel()
The page label is its short title.ThePageRef
that refers to this page.Gets the page-scope web resource registry for this page ornull
if the page has not configured any resources.A short title is used when the context of a page is well established, such as when showing a path to the current location in the site.getSrc()
The PageRef of the editable source for this page, if any.getTitle()
getToc()
Gets the table of contents (toc) setting: null (The default) - Show table of contents depending on number of entries in the table true - Always show table of contents false - Never show table of contents TODO: Move this to Section.int
TODO: Move this to Section.int
hashCode()
void
setAllowChildMismatch
(boolean allowChildMismatch) void
setAllowParentMismatch
(boolean allowParentMismatch) void
setAllowRobots
(Boolean allowRobots) void
setCopyright
(Copyright copyright) void
setDateCreated
(ReadableDateTime dateCreated) void
setDateModified
(ReadableDateTime dateModified) void
setDatePublished
(ReadableDateTime datePublished) void
setDateReviewed
(ReadableDateTime dateReviewed) void
setDescription
(String description) void
setKeywords
(String keywords) void
setPageRef
(PageRef pageRef) void
setRegistry
(Registry registry) Sets the page-scope web resource registry for this page ornull
if the page has not configured any resources.void
setShortTitle
(String shortTitle) void
void
void
void
setTocLevels
(int tocLevels) Methods inherited from class com.semanticcms.core.model.Node
addChildElement, addPageLink, appendLabel, checkNotFrozen, findChildElement, findChildElement, findTopLevelElements, getBody, getChildElements, getPageLinks, getProperty, requireChildElement, requireChildElement, setBody, setProperty, toString
-
Field Details
-
MIN_TOC_LEVELS
public static final int MIN_TOC_LEVELS- See Also:
-
MAX_TOC_LEVELS
public static final int MAX_TOC_LEVELSThis matches the table of contents implementation in /semanticcms-section-servlet/toc.inc.jspx and is a result of HTML only having H1 through H6. H1 is reserved for the page title and headings become H2 through H6.- See Also:
-
DEFAULT_TOC_LEVELS
public static final int DEFAULT_TOC_LEVELS- See Also:
-
-
Constructor Details
-
Page
public Page()
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<Page>
- See Also:
-
freeze
-
getPageRef
ThePageRef
that refers to this page. -
setPageRef
-
getSrc
The PageRef of the editable source for this page, if any. Note: Although atypical, the page source may be in a different book than the page itself. -
setSrc
-
getCopyright
-
setCopyright
-
getAuthors
-
addAuthor
-
getDateCreated
- See Also:
-
setDateCreated
-
getDatePublished
- See Also:
-
setDatePublished
-
getDateModified
-
setDateModified
-
getDateReviewed
This has no equivalent in https://schema.org/, however we feel it is important to actively review content to ensure its accuracy, even when it has not been modified. -
setDateReviewed
-
getTitle
-
setTitle
-
getShortTitle
A short title is used when the context of a page is well established, such as when showing a path to the current location in the site. The short title defaults togetTitle
.- Returns:
- the short page title
- See Also:
-
setShortTitle
-
getDescription
-
setDescription
-
getKeywords
-
setKeywords
-
getAllowRobots
Gets the allowRobots setting.- null (The default) - Inherit setting from parent(s) within the book or book settings if have no parents within the book
- true - Robots allowed
- false - Robots not allowed
-
setAllowRobots
-
getRegistry
Gets the page-scope web resource registry for this page ornull
if the page has not configured any resources. -
setRegistry
Sets the page-scope web resource registry for this page ornull
if the page has not configured any resources. -
getToc
Gets the table of contents (toc) setting:- null (The default) - Show table of contents depending on number of entries in the table
- true - Always show table of contents
- false - Never show table of contents
-
setToc
-
getTocLevels
public int getTocLevels()TODO: Move this to Section. -
setTocLevels
public void setTocLevels(int tocLevels) -
getParentRefs
-
addParentRef
-
getAllowParentMismatch
public boolean getAllowParentMismatch() -
setAllowParentMismatch
public void setAllowParentMismatch(boolean allowParentMismatch) -
getChildRefs
-
addChildRef
-
getAllowChildMismatch
public boolean getAllowChildMismatch() -
setAllowChildMismatch
public void setAllowChildMismatch(boolean allowChildMismatch) -
getElements
Gets all elements in the page (including all child elements), in the order they were declared in the page. -
filterElements
Gets all elements in the page (including all child elements) that are of the given type, in the order they were declared in the page. -
getElementsById
Gets the elements indexed by id, in no particular order. Note, while the page is being created, elements with automatic IDs will not be in this map. However, once frozen, every element will have an ID.- See Also:
-
getGeneratedIds
Gets which element IDs were generated. -
addElement
Adds an element to this page. -
getLabel
The page label is its short title.
-