All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.simonstl.sax.xlink.XLinkFilter

java.lang.Object
   |
   +----org.ccil.cowan.sax.ParserFilter
           |
           +----com.simonstl.sax.xlink.XLinkFilter

public class XLinkFilter
extends ParserFilter

Variable Index

 o baseURL
 o holdingTank
 o htmlLinkType
 o linkElement
 o localAtts
 o locator
 o markLocation
 o processHTML
 o theLinkSet
 o theParser

Constructor Index

 o XLinkFilter()
zero-argument constructor
 o XLinkFilter(Parser)
one-argument constructor

Method Index

 o createLink(String, String, String, String, String, String)
Create a link, short version.
 o createLink(String, String, String, String, String, String, String, String, String, String, String, String, String, String, boolean, boolean, boolean)
Create a link, long version.
 o createLinkSet()
Create a LinkSet Allows overriding of this method within descendants of XLinkfilter.
 o endElement(String)
 o makeForwardLink(Link, Link)
Create a Forward Link.
 o makeReverseLink(Link, Link)
Create a reverse Link.
 o makeSidewaysLink(Link, Link)
Create a sideways Link.
 o parse(InputSource)
Parse an XML document
 o parse(String)
Parse an XML document from a system identifier (URI).
 o setDocumentLocator(Locator)
 o setHTMLProcessing(boolean)
one-argument setHTMLProcessing turns HTML processing on and off.
 o setHTMLProcessing(boolean, String)
two-argument setHTMLProcessing turns HTML processing on and off, allows more experimentation
 o setLinkSet(LinkSet)
setLinkSet allows the application to register a LinkSet that should receive all the linking information.
 o setLocationMark(boolean)
setLocationMark turns Location marking on and off.
 o startElement(String, AttributeList)

Variables

 o theParser
 protected Parser theParser
 o theLinkSet
 protected LinkSet theLinkSet
 o localAtts
 protected AttributeList localAtts
 o holdingTank
 protected LinkSet holdingTank
 o baseURL
 protected String baseURL
 o locator
 protected Locator locator
 o linkElement
 protected String linkElement
 o processHTML
 protected boolean processHTML
 o htmlLinkType
 protected String htmlLinkType
 o markLocation
 protected boolean markLocation

Constructors

 o XLinkFilter
 public XLinkFilter() throws IllegalAccessException, InstantiationException, ClassNotFoundException
zero-argument constructor

 o XLinkFilter
 public XLinkFilter(Parser parser)
one-argument constructor

Parameters:
parser - - the SAX parser to be used underneath the filter.

Methods

 o setDocumentLocator
 public void setDocumentLocator(Locator locator)
Overrides:
setDocumentLocator in class ParserFilter
 o setHTMLProcessing
 public void setHTMLProcessing(boolean process)
one-argument setHTMLProcessing turns HTML processing on and off. By default, HTML processing is off.

Parameters:
process - boolean value. True turns HTML processing on, false turns it off.
 o setHTMLProcessing
 public void setHTMLProcessing(boolean process,
                               String linkType)
two-argument setHTMLProcessing turns HTML processing on and off, allows more experimentation

Parameters:
process - boolean value. True turns HTML processing on, false turns it off.
linkType - String value. Allows you to change the type of links generated by HTML links. By default, they'll be simple one-way, but extended could be fun as well, allowing two-way links.
 o setLocationMark
 public void setLocationMark(boolean mark)
setLocationMark turns Location marking on and off. By default, marking is off.

Parameters:
process - boolean value. True turns Location marking on, false turns it off. note that you must use the LocationFilter underneath XLinkFilter for this to work!
 o parse
 public void parse(InputSource source) throws SAXException, IOException
Parse an XML document

Parameters:
source - An InputSource to parse.
Overrides:
parse in class ParserFilter
 o parse
 public void parse(String systemId) throws SAXException, IOException
Parse an XML document from a system identifier (URI).

Parameters:
systemId - A string containing a URL to parse.
Overrides:
parse in class ParserFilter
 o setLinkSet
 public void setLinkSet(LinkSet linkset)
setLinkSet allows the application to register a LinkSet that should receive all the linking information. This LinkSet will only be added to. Applications may either pass an empty LinkSet and use the merge() LinkSet method to combine it with another LinkSet or pass this method the 'master' LinkSet, depending on the complexity of the application. For safety, it's definitely best to pass a temporary LinkSet and then merge it if nothing goes horribly wrong.

Parameters:
LinkSet - the link set to use
 o startElement
 public void startElement(String element,
                          AttributeList atts) throws SAXException
Overrides:
startElement in class ParserFilter
 o endElement
 public void endElement(String element) throws SAXException
Overrides:
endElement in class ParserFilter
 o makeForwardLink
 protected Link makeForwardLink(Link firstLink,
                                Link linkNext)
Create a Forward Link. Takes two links.

Parameters:
firstLink - the 'starting' link
linkNext - the 'ending' link
 o makeReverseLink
 protected Link makeReverseLink(Link firstLink,
                                Link linkNext)
Create a reverse Link.

Parameters:
firstLink - the 'starting' link (remember, this will be the target because we're reversing)
linkNext - the 'ending' link
 o makeSidewaysLink
 protected Link makeSidewaysLink(Link firstLink,
                                 Link linkNext)
Create a sideways Link. Takes two links, and combines their destinations.

Parameters:
firstLink - one of the two links to join
linkNext - one of the two links to join.
 o createLink
 protected Link createLink(String originURL,
                           String originLoc,
                           String originContentTitle,
                           String destURL,
                           String destLoc,
                           String destTitle)
Create a link, short version. Allows overriding of this method within descendants of XLinkfilter.

 o createLink
 protected Link createLink(String originURL,
                           String originConnect,
                           String originLoc,
                           String originContentRole,
                           String originContentTitle,
                           String destURL,
                           String destConnect,
                           String destLoc,
                           String destRole,
                           String destTitle,
                           String destShow,
                           String destActuate,
                           String destBehavior,
                           String linkType,
                           boolean inline,
                           boolean direction,
                           boolean linkHTML)
Create a link, long version. Allows overriding of this method within descendants of XLinkfilter.

 o createLinkSet
 protected LinkSet createLinkSet()
Create a LinkSet Allows overriding of this method within descendants of XLinkfilter.


All Packages  Class Hierarchy  This Package  Previous  Next  Index