com.ihr.xbrl.mapper

## Class Section

- java.lang.Object
- - com.ihr.xbrl.mapper.Section

-     public class Section
      extends java.lang.Object

  Starting with mapper version 3 (2011) there is the possibility to create mapping sections.

  Mapping sections are groups of facts that belongs to a section this allows for the following features:

  - It is possible to classify facts to the section they belong
  - It is possible to divide the target DTS into multiple sections
  - It is possible to define rules to let drivers decide if the section will be added or not to the target instance (only drivers on facts within the section will be asked to include that section)
  Author:
    Ignacio

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Section(java.lang.String id, java.util.Collection<java.lang.String> files)` Instantiates a new section.
    `Section(java.lang.String id, java.lang.String file)` Instantiates a new section.
    `Section(java.lang.String id, java.lang.String[] files)` Instantiates a new section.
    `Section(net.sf.saxon.s9api.XdmNode node)` Instantiates a new section.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addFact(Fact d)` Adds the fact.
    `void` | `addFilesTo(XBRLInstance instance)` Adds referenced files to the instance document.
    `boolean` | `equals(java.lang.Object obj)`
    `org.jdom.Element` | `generateNode(boolean relativize, java.net.URI base)` Generate node.
    `Anchor` | `getAnchor()` Gets the anchor.
    `java.lang.String` | `getDocumentation()` Gets the documentation.
    `java.util.Iterator<java.lang.String>` | `getFiles()` Gets the files.
    `java.lang.String` | `getId()` Returns the section identifier.
    `java.lang.String` | `getRuleIdentifier()` Gets the rule identifier.
    `int` | `hashCode()`
    `boolean` | `hasRule()` Returns true if this section has a rule.
    `void` | `setAnchor(Anchor anchor)` Sets this section anchor .
    `void` | `setAnchor(java.lang.String sectionLink, javax.xml.namespace.QName sectionElement)` Sets the anchor.
    `void` | `setDocumentation(java.lang.String documentation)` Sets the documentation.
    `void` | `setId(java.lang.String id)` Sets the id of this section. if null, the section id is reset to the next automatically generated section id as the section id must exist.
    `void` | `setRuleIdentifier(java.lang.String ruleIdentifier)` Sets the rule identifier.

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

      `getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Section

          public Section(net.sf.saxon.s9api.XdmNode node)
                  throws MapConfigurationFileException

      Instantiates a new section.
      Parameters:
        `node` - the node
      Throws:
        `MapConfigurationFileException` - the map configuration file exception

    - #### Section

          public Section(java.lang.String id,
                 java.lang.String file)

      Instantiates a new section.
      Parameters:
        `id` - the id
        `file` - the file

    - #### Section

          public Section(java.lang.String id,
                 java.lang.String[] files)

      Instantiates a new section.
      Parameters:
        `id` - the id
        `files` - the files

    - #### Section

          public Section(java.lang.String id,
                 java.util.Collection<java.lang.String> files)

      Instantiates a new section.
      Parameters:
        `id` - the id
        `files` - the files

  - ### Method Detail

    - #### getId

          public java.lang.String getId()

      Returns the section identifier.
      Returns:
        the id

    - #### addFact

          public void addFact(Fact d)

      Adds the fact.
      Parameters:
        `d` - the d

    - #### generateNode

          public org.jdom.Element generateNode(boolean relativize,
                                      java.net.URI base)
                                        throws XBRLSerializationException

      Generate node.
      Parameters:
        `relativize` - the relativize
        `base` - the base
      Returns:
        the element
      Throws:
        `XBRLSerializationException` - the XBRL serialization exception

    - #### hasRule

          public boolean hasRule()

      Returns true if this section has a rule. Returns false otherwise.
      Returns:
        boolean value

    - #### getRuleIdentifier

          public java.lang.String getRuleIdentifier()

      Gets the rule identifier.
      Returns:
        the ruleIdentifier

    - #### setRuleIdentifier

          public void setRuleIdentifier(java.lang.String ruleIdentifier)

      Sets the rule identifier.
      Parameters:
        `ruleIdentifier` - the ruleIdentifier to set

    - #### addFilesTo

          public void addFilesTo(XBRLInstance instance)
                          throws MapException

      Adds referenced files to the instance document.
      Parameters:
        `instance` - the instance
      Throws:
        `MapException` - the map exception

    - #### setId

          public void setId(java.lang.String id)

      Sets the id of this section. if null, the section id is reset to the next automatically generated section id as the section id must exist.
      Parameters:
        `id` - the id to set

    - #### getDocumentation

          public java.lang.String getDocumentation()

      Gets the documentation.
      Returns:
        the documentation

    - #### setDocumentation

          public void setDocumentation(java.lang.String documentation)

      Sets the documentation.
      Parameters:
        `documentation` - the new documentation

    - #### setAnchor

          public void setAnchor(java.lang.String sectionLink,
                       javax.xml.namespace.QName sectionElement)

      Sets the anchor.
      Parameters:
        `sectionLink` - the section link
        `sectionElement` - the section element

    - #### setAnchor

          public void setAnchor(Anchor anchor)

      Sets this section anchor .
      Parameters:
        `anchor` - the new anchor

    - #### getAnchor

          public Anchor getAnchor()

      Gets the anchor.
      Returns:
        the anchor

    - #### getFiles

          public java.util.Iterator<java.lang.String> getFiles()

      Gets the files.
      Returns:
        the vURL

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`