com.sun.tdk.specdiff.assertdiff

## Class DocumentModel

- java.lang.Object
- - com.sun.tdk.specdiff.assertdiff.DocumentModel

-     public class DocumentModel
      extends java.lang.Object

  Class representing a document as list of assertions

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocumentModel(java.util.List<AssertModel> list, java.lang.String srcFileName)` Constructs the model from the given list.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dump(java.io.PrintStream out, java.lang.String header)` Utility method to dump the model down to the stream.
    `AbstractAssert` | `getAbstractAssert(java.lang.String assertID)`
    `java.util.List<java.lang.String>` | `getAssertIDs()`
    `java.util.List<java.lang.String>` | `getAssertIDs(java.lang.String ctx)`
    `AssertModel` | `getAssertModel(java.lang.String assertID)`
    `java.lang.String` | `getContext(java.lang.String assertID)`
    `java.util.List<AssertModel>` | `getValidDuplicates()`
    `boolean` | `hasAssertID(java.lang.String assertID)`

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

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

- - ### Constructor Detail

    - #### DocumentModel

          public DocumentModel(java.util.List<AssertModel> list,
                               java.lang.String srcFileName)

      Constructs the model from the given list. Assertions are hashed to increase the performance.
      Parameters:
        `list` - assertions the document comprises
        `srcFileName` - source file name the document is obtained from.

  - ### Method Detail

    - #### getAssertIDs

          public java.util.List<java.lang.String> getAssertIDs()

      Returns:
        All assertion ids of this document

    - #### getAssertIDs

          public java.util.List<java.lang.String> getAssertIDs(java.lang.String ctx)

      Parameters:
        `ctx` - contextID id
      Returns:
        assertions that belong to the given contextID id

    - #### hasAssertID

          public boolean hasAssertID(java.lang.String assertID)

      Returns:
        true, if document contains assertion with the given ID.

    - #### getAssertModel

          public AssertModel getAssertModel(java.lang.String assertID)

      Parameters:
        `assertID` - id
      Returns:
        AssertModel associated with the given id

    - #### getContext

          public java.lang.String getContext(java.lang.String assertID)

      Parameters:
        `assertID` - id
      Returns:
        contextID for given assertID, or null if not found

    - #### getValidDuplicates

          public java.util.List<AssertModel> getValidDuplicates()

      Returns:

    - #### getAbstractAssert

          public AbstractAssert getAbstractAssert(java.lang.String assertID)

      Parameters:
        `assertID` - id
      Returns:
        AbstractAssert object associated with the given id

    - #### dump

          public void dump(java.io.PrintStream out,
                           java.lang.String header)

      Utility method to dump the model down to the stream. Used for debugging process if any.
      Parameters:
        `out` - - stream to use
        `header` - - the leading text to be printed first