DimDom v0.8.2

org.alltimeflashdreamer.dimdom
Class AbstractXHTMLSiteData

java.lang.Object
  |
  +--org.alltimeflashdreamer.dimdom.AbstractXHTMLSiteData
All Implemented Interfaces:
XHTMLSiteData
Direct Known Subclasses:
SimpleSiteData

public abstract class AbstractXHTMLSiteData
extends Object
implements XHTMLSiteData

Title: AbstractXHTMLSiteData
Description: This is the superclass of each DOM processor using DimDom's own processing mechanism. This means that it works together tightly with the DimDomNodeImpl class which has a set of package protected methods, visible for e.g. this class.


Field Summary
protected  Vector vDimDomNodeImpls
          the ordered list of DimDomNodeImpl objects
 
Constructor Summary
AbstractXHTMLSiteData()
           
 
Method Summary
 String getIdentifier()
          Returns a string that describes the XHTML source.
 DimDomNode getNextDimDomNode()
          Returns the next implementing object of the DimDomNode interface, to allow the DimDom engine to process the next node (or the next clone of a micro-template node).
 String getString()
          Returns the source string to be parsed.
 String getTemplateFileName()
          Returns the file name of the template file to be parsed.
 URL getURL()
          Returns the source URL to parse from.
abstract  String getXHTMLDocumentClassName()
          (is abstract to be implemented by the extending class)
protected  boolean hasMoreDimDomNodeImpls()
          Returns whether there are more DimDomNode implementing instances in the pipeline or not.
protected  boolean isFileSource()
          Returns whether the input source is (currently) a file or not.
protected  boolean isStringSource()
          Returns whether the input source is (currently) just a string or not.
protected  boolean isURLSource()
          Returns whether the input source is (currently) an URL or not.
 void setString(String sInput)
          Sets the internal string value and unsets the others.
 void setTemplateFilename(String sTemplateFilename)
          Sets the internal template file name value and the others.
 void setURL(URL url)
          Sets the internal URL value and unsets the others.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vDimDomNodeImpls

protected Vector vDimDomNodeImpls
the ordered list of DimDomNodeImpl objects
Constructor Detail

AbstractXHTMLSiteData

public AbstractXHTMLSiteData()
Method Detail

getIdentifier

public String getIdentifier()
Returns a string that describes the XHTML source. This string must identify the source, not the instance of this class! The extending class must verify that one of the possible sources is set and not null, else a NullPointerException will be thrown.
Specified by:
getIdentifier in interface XHTMLSiteData
Returns:
the class' identifier, to allow DimDom to recognize it again

getXHTMLDocumentClassName

public abstract String getXHTMLDocumentClassName()
(is abstract to be implemented by the extending class)
Specified by:
getXHTMLDocumentClassName in interface XHTMLSiteData
Returns:
the name of the available template processor class; for SimpleSiteData, this is "org.alltimeflashdreamer.dimdom.SimpleXHTMLDocument"

getNextDimDomNode

public DimDomNode getNextDimDomNode()
Returns the next implementing object of the DimDomNode interface, to allow the DimDom engine to process the next node (or the next clone of a micro-template node). Don't use this method if you want to create a new DimDomNodeImpl, i.e. if you want to add a DimDom command object to be processed by calling this method!
Specified by:
getNextDimDomNode in interface XHTMLSiteData
Returns:
the next DimDomNodeImpl instance or null

getString

public String getString()
Returns the source string to be parsed.
Specified by:
getString in interface XHTMLSiteData
Returns:
the string set in setString or null

getTemplateFileName

public String getTemplateFileName()
Returns the file name of the template file to be parsed.
Specified by:
getTemplateFileName in interface XHTMLSiteData
Returns:
the file name set in setTemplateFilename or null

getURL

public URL getURL()
Returns the source URL to parse from.
Specified by:
getURL in interface XHTMLSiteData
Returns:
the URL set in setURL or null

setTemplateFilename

public void setTemplateFilename(String sTemplateFilename)
Sets the internal template file name value and the others.
Parameters:
sTemplateFilename - the name of the template file to be parsed

setURL

public void setURL(URL url)
Sets the internal URL value and unsets the others.
Parameters:
url - the URL of the URL to be parsed

setString

public void setString(String sInput)
Sets the internal string value and unsets the others.
Parameters:
sInput - the string to be parsed

isFileSource

protected boolean isFileSource()
Returns whether the input source is (currently) a file or not.
Returns:
is the template a file or not?

isStringSource

protected boolean isStringSource()
Returns whether the input source is (currently) just a string or not.
Returns:
is the template a string or not?

isURLSource

protected boolean isURLSource()
Returns whether the input source is (currently) an URL or not.
Returns:
is the template an URL or not?

hasMoreDimDomNodeImpls

protected boolean hasMoreDimDomNodeImpls()
Returns whether there are more DimDomNode implementing instances in the pipeline or not.
Returns:
are there more nodes to process?

Copyright (c) 2001/02 by Florian Steinsiepe