Main Page Packages Class Hierarchy Compound List File List Compound Members

# documenttypegetentities Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| documenttypegetentities (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

The "getEntities()" method is a NamedNodeMap that contains the general entities for this document.

Retrieve the Document Type for this document and create a NamedNodeMap of all its entities. The entire map is traversed and the names of the entities are retrieved. There should be 5 entities. Duplicates should be ignored.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1788794630

Definition at line 45 of file documenttypegetentities.java.

## Constructor & Destructor Documentation

documenttypegetentities::documenttypegetentities | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 47 of file documenttypegetentities.java.
    00048  {
    00049       super(factory);
    00050
    00051    }

## Member Function Documentation

String documenttypegetentities::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 81 of file documenttypegetentities.java.
    00081                                 {
    00082       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documenttypegetentities";
    00083    }

void documenttypegetentities::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 84 of file documenttypegetentities.java. References DOMTestCase::doMain().
    00084                                           {
    00085         DOMTestCase.doMain(documenttypegetentities.class,args);
    00086    }

void documenttypegetentities::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 53 of file documenttypegetentities.java. References DOMTestCase::assertEquals(), DOMTestCase::assertSize(), and DOMTest::load().
    00053                                                     {
    00054       Document doc;
    00055       DocumentType docType;
    00056       NamedNodeMap entityList;
    00057       String name;
    00058       Collection expectedResult = new ArrayList();
    00059       expectedResult.add("ent1");
    00060       expectedResult.add("ent2");
    00061       expectedResult.add("ent3");
    00062       expectedResult.add("ent4");
    00063       expectedResult.add("ent5");
    00064
    00065       Collection nameList = new ArrayList();
    00066
    00067       Node entity;
    00068       doc = load("staff");
    00069       docType = doc.getDoctype();
    00070       entityList = docType.getEntities();
    00071       assertSize("entitySize",5,entityList);
    00072       for(int _index = 0; _index < entityList.getLength();_index++) {
    00073       entity = ( Node ) entityList.item(_index);
    00074            name = entity.getNodeName();
    00075       nameList.add(name);
    00076
    00077         }
    00078       assertEquals("entityNames",expectedResult,nameList);
    00079
    00080    }

The documentation for this class was generated from the following file:

- documenttypegetentities.java