public abstract class Node extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<Node> |
childs |
File |
file |
protected SiteGenerator |
globalContext |
protected boolean |
isPageFile |
| Constructor and Description |
|---|
Node(SiteGenerator globalContext,
File file,
boolean isPageFile) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addChild(Node child) |
protected void |
clearChildList() |
protected void |
createChildList() |
void |
generateOrUpdateDiskFile(ContextProperties parentContext)
Update the the information asociated to this node.
|
protected List<Node> |
getChildList() |
protected int |
getChildListSize() |
String |
getContent(ContextProperties parentContext) |
ContextProperties |
getContext() |
abstract String |
getFileName() |
protected abstract long |
getLastModified()
The last time of the file disk information need to generate pages has been modified.
|
protected long |
getLastUpdated() |
abstract String |
getRelativePath()
IF the file is ..
|
String |
getRelativePath(String defaultValue) |
protected abstract String |
getStringToParse()
Use this method to get the string to parse of this node.
|
protected boolean |
isPage()
This node representas a page that have to be sored into the file system after compilation
|
String |
toString() |
protected String |
updateContent()
This updates the node content, the string that represents this node
and its childs.
|
protected final SiteGenerator globalContext
public final File file
protected final boolean isPageFile
public Node(SiteGenerator globalContext, File file, boolean isPageFile) throws FileNotFoundException
FileNotFoundExceptionpublic String getContent(ContextProperties parentContext) throws FileNotFoundException
FileNotFoundExceptionpublic abstract String getFileName()
public abstract String getRelativePath() throws FileNotFoundException
FileNotFoundExceptionpublic void generateOrUpdateDiskFile(ContextProperties parentContext) throws IOException
FileNotFoundExceptionIOExceptionprotected void createChildList()
protected int getChildListSize()
protected void clearChildList()
protected void addChild(Node child)
protected long getLastUpdated()
protected String updateContent() throws FileNotFoundException
IOExceptionFileNotFoundExceptionprotected abstract String getStringToParse()
list - protected boolean isPage()
protected abstract long getLastModified()
public ContextProperties getContext()
Copyright © 2014 ginere solutions. All Rights Reserved.