edu.northwestern.at.morphadorner

## Class StripAllWordElementsFilter

- java.lang.Object
- - org.xml.sax.helpers.XMLFilterImpl
  - - edu.northwestern.at.utils.xml.ExtendedXMLFilterImpl
    - - edu.northwestern.at.morphadorner.StripAllWordElementsFilter

- All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

      public class StripAllWordElementsFilter
      extends ExtendedXMLFilterImpl

  Filter to strip word elements from adorned file.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `divCount` Div count.
    `protected int` | `lineCount` Line within div count.
    `protected boolean` | `processingWorC` True if processing w or c element.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StripAllWordElementsFilter(org.xml.sax.XMLReader reader)` Create filter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `characters(char[] ch, int start, int length)` Handle character data.
    `void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)` Handle end of an element.
    `void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)` Handle start of an XML element.

    - ### Methods inherited from class edu.northwestern.at.utils.xml.ExtendedXMLFilterImpl

      `removeAttribute, setAttributeValue, setAttributeValue, setAttributeValue`

    - ### Methods inherited from class org.xml.sax.helpers.XMLFilterImpl

      `endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### divCount

          protected int divCount

      Div count.

    - #### lineCount

          protected int lineCount

      Line within div count.

    - #### processingWorC

          protected boolean processingWorC

      True if processing w or c element.

  - ### Constructor Detail

    - #### StripAllWordElementsFilter

          public StripAllWordElementsFilter(org.xml.sax.XMLReader reader)

      Create filter.
      Parameters:
        `reader` - XML input reader to which filter applies.

  - ### Method Detail

    - #### startElement

          public void startElement(java.lang.String uri,
                          java.lang.String localName,
                          java.lang.String qName,
                          org.xml.sax.Attributes atts)
                            throws org.xml.sax.SAXException

      Handle start of an XML element.
      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `org.xml.sax.helpers.XMLFilterImpl`
      Parameters:
        `uri` - The XML element's URI.
        `localName` - The XML element's local name.
        `qName` - The XML element's qname.
        `atts` - The XML element's attributes.
      Throws:
        `org.xml.sax.SAXException`

    - #### characters

          public void characters(char[] ch,
                        int start,
                        int length)
                          throws org.xml.sax.SAXException

      Handle character data.
      Specified by:
        `characters` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `characters` in class `org.xml.sax.helpers.XMLFilterImpl`
      Parameters:
        `ch` - Array of characters.
        `start` - The starting position in the array.
        `length` - The number of characters.
      Throws:
        `org.xml.sax.SAXException` - If there is an error.

    - #### endElement

          public void endElement(java.lang.String uri,
                        java.lang.String localName,
                        java.lang.String qName)
                          throws org.xml.sax.SAXException

      Handle end of an element.
      Specified by:
        `endElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endElement` in class `org.xml.sax.helpers.XMLFilterImpl`
      Parameters:
        `uri` - The XML element's URI.
        `localName` - The XML element's local name.
        `qName` - The XML element's qname.
      Throws:
        `org.xml.sax.SAXException`