XmlDeclHandler (JHOVE Documentation)
Date: 2013-09-08

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove.module.xml
Class XmlDeclHandler

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.xml.XmlDeclHandler

All Implemented Interfaces:
  org.xml.sax.ext.DeclHandler

    public class XmlDeclHandler

extends java.lang.Object
implements org.xml.sax.ext.DeclHandler

This implementation of DeclHandler takes care of collecting entity declarations.

Author:
  Gary McGath

Constructor Summary
`XmlDeclHandler()`

Method Summary
`void` | `attributeDecl(java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.String arg4)` Report an attribute type declaration.
`void` | `elementDecl(java.lang.String arg0, java.lang.String arg1)` Report an element type declaration.
`void` | `externalEntityDecl(java.lang.String name, java.lang.String publicID, java.lang.String systemID)` Adds external entity declarations to the entity declarations list in the form of a String[3], with element 0 being the name, element 1 the public ID, and 2 the system ID.
`java.util.List<java.lang.String[]>` | `getExternalEntityDeclarations()` Returns list of entity declarations.
`java.util.List<java.lang.String[]>` | `getInternalEntityDeclarations()` Returns list of entity declarations.
`void` | `internalEntityDecl(java.lang.String name, java.lang.String value)` Adds internal entity declarations to the entity declarations list in the form of a String[2], with element 0 being the name and element 1 being the value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XmlDeclHandler

    public XmlDeclHandler()

Method Detail

### elementDecl

    public void elementDecl(java.lang.String arg0,
                            java.lang.String arg1)
                     throws org.xml.sax.SAXException

  Report an element type declaration. Does nothing.

  Specified by:
    `elementDecl` in interface `org.xml.sax.ext.DeclHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DeclHandler.elementDecl(java.lang.String, java.lang.String)`

### internalEntityDecl

    public void internalEntityDecl(java.lang.String name,
                                   java.lang.String value)
                            throws org.xml.sax.SAXException

  Adds internal entity declarations to the entity declarations list in the form of a String[2], with element 0 being the name and element 1 being the value.

  Specified by:
    `internalEntityDecl` in interface `org.xml.sax.ext.DeclHandler`
  Throws:
    `org.xml.sax.SAXException`

### externalEntityDecl

    public void externalEntityDecl(java.lang.String name,
                                   java.lang.String publicID,
                                   java.lang.String systemID)
                            throws org.xml.sax.SAXException

  Adds external entity declarations to the entity declarations list in the form of a String[3], with element 0 being the name, element 1 the public ID, and 2 the system ID.

  Specified by:
    `externalEntityDecl` in interface `org.xml.sax.ext.DeclHandler`
  Throws:
    `org.xml.sax.SAXException`

### attributeDecl

    public void attributeDecl(java.lang.String arg0,
                              java.lang.String arg1,
                              java.lang.String arg2,
                              java.lang.String arg3,
                              java.lang.String arg4)
                       throws org.xml.sax.SAXException

  Report an attribute type declaration. Does nothing.

  Specified by:
    `attributeDecl` in interface `org.xml.sax.ext.DeclHandler`
  Throws:
    `org.xml.sax.SAXException`
  See Also:
    `DeclHandler.attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)`

### getInternalEntityDeclarations

    public java.util.List<java.lang.String[]> getInternalEntityDeclarations()

  Returns list of entity declarations. Each list is an array String[2], giving the name and value respectively.

### getExternalEntityDeclarations

    public java.util.List<java.lang.String[]> getExternalEntityDeclarations()

  Returns list of entity declarations. Each list is an array String[3], giving the name, public ID, and system ID respectively.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD