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
-
baseURL
-
-
holdingTank
-
-
htmlLinkType
-
-
linkElement
-
-
localAtts
-
-
locator
-
-
markLocation
-
-
processHTML
-
-
theLinkSet
-
-
theParser
-
-
XLinkFilter()
- zero-argument constructor
-
XLinkFilter(Parser)
- one-argument constructor
-
createLink(String, String, String, String, String, String)
- Create a link, short version.
-
createLink(String, String, String, String, String, String, String, String, String, String, String, String, String, String, boolean, boolean, boolean)
- Create a link, long version.
-
createLinkSet()
- Create a LinkSet Allows overriding of this method within descendants of XLinkfilter.
-
endElement(String)
-
-
makeForwardLink(Link, Link)
- Create a Forward Link.
-
makeReverseLink(Link, Link)
- Create a reverse Link.
-
makeSidewaysLink(Link, Link)
- Create a sideways Link.
-
parse(InputSource)
- Parse an XML document
-
parse(String)
- Parse an XML document from a system identifier (URI).
-
setDocumentLocator(Locator)
-
-
setHTMLProcessing(boolean)
- one-argument setHTMLProcessing turns HTML processing on and off.
-
setHTMLProcessing(boolean, String)
- two-argument setHTMLProcessing turns HTML processing on and off, allows more experimentation
-
setLinkSet(LinkSet)
- setLinkSet allows the application to register a LinkSet that
should receive all the linking information.
-
setLocationMark(boolean)
- setLocationMark turns Location marking on and off.
-
startElement(String, AttributeList)
-
theParser
protected Parser theParser
theLinkSet
protected LinkSet theLinkSet
localAtts
protected AttributeList localAtts
holdingTank
protected LinkSet holdingTank
baseURL
protected String baseURL
locator
protected Locator locator
linkElement
protected String linkElement
processHTML
protected boolean processHTML
htmlLinkType
protected String htmlLinkType
markLocation
protected boolean markLocation
XLinkFilter
public XLinkFilter() throws IllegalAccessException, InstantiationException, ClassNotFoundException
- zero-argument constructor
XLinkFilter
public XLinkFilter(Parser parser)
- one-argument constructor
- Parameters:
- parser - - the SAX parser to be used underneath the filter.
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Overrides:
- setDocumentLocator in class ParserFilter
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.
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.
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!
parse
public void parse(InputSource source) throws SAXException, IOException
- Parse an XML document
- Parameters:
- source - An InputSource to parse.
- Overrides:
- parse in class ParserFilter
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
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
startElement
public void startElement(String element,
AttributeList atts) throws SAXException
- Overrides:
- startElement in class ParserFilter
endElement
public void endElement(String element) throws SAXException
- Overrides:
- endElement in class ParserFilter
makeForwardLink
protected Link makeForwardLink(Link firstLink,
Link linkNext)
- Create a Forward Link. Takes two links.
- Parameters:
- firstLink - the 'starting' link
- linkNext - the 'ending' link
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
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.
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.
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.
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