com.aspose.omr

## Class OmrElement

- java.lang.Object
- - com.aspose.omr.BasicElement
  - - com.aspose.omr.OmrElement

- Direct Known Subclasses:
    BarcodeElement, ChoiceBoxElement, GridElement, TextOcrElement

      public abstract class OmrElement
      extends BasicElement

  Represents an abstract OMR element on a sheet.

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `OmrElement(String name, Point2D.Float position, Dimension2D.Float size)` Initializes a new instance of the `OmrElement` class.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<OmrCell>` | `getCells()` Gets a collection of cells in the element.
    `OmrConfig` | `getConfiguration()` Gets element-level configuration for OMR extraction algorithm.
    `boolean` | `isHorizontal()` Gets a value indicating whether values of this element are located horizontally.
    `void` | `isHorizontal(boolean value)` Sets a value indicating whether values of this element are located horizontally.
    `void` | `loadProperties(StringDictionary properties)` Initializes the properties of an element from their string representation.
    `StringDictionary` | `saveProperties()` Converts values of the properties of an element from their string representation.
    `void` | `setConfiguration(OmrConfig value)` Sets element-level configuration for OMR extraction algorithm.

    - ### Methods inherited from class com.aspose.omr.BasicElement

      `extractData, getName, getPosition, getSize, setName, setPosition, setSize`

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

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

- - ### Constructor Detail

    - #### OmrElement

          protected OmrElement(String name,
                    Point2D.Float position,
                    Dimension2D.Float size)

      Initializes a new instance of the `OmrElement` class.

      Parameters:
        `name` - The name of the element.
        `position` - Element position, in millimeters, relative to top left corner of an image
        `size` - Size of the element, in millimeters.

  - ### Method Detail

    - #### getCells

          public List<OmrCell> getCells()

      Gets a collection of cells in the element.

      Returns:
        a collection of cells in the element.

    - #### getConfiguration

          public OmrConfig getConfiguration()

      Gets element-level configuration for OMR extraction algorithm. Overrides page-level configuration if set. If set to `null` (by default), page-level configuration will be used.

      This settings are used during data extraction only and are not saved in the template file.
      Returns:
        element-level configuration for OMR extraction algorithm.

    - #### isHorizontal

          public boolean isHorizontal()

      Gets a value indicating whether values of this element are located horizontally.

      Returns:
        `true` if values of this element are located horizontally; otherwise `false`

    - #### isHorizontal

          public void isHorizontal(boolean value)

      Sets a value indicating whether values of this element are located horizontally.

      Parameters:
        `value` - `true` if values of this element should located horizontally; otherwise `false`

    - #### loadProperties

          public void loadProperties(StringDictionary properties)

      Initializes the properties of an element from their string representation.

      Overrides:
        `loadProperties` in class `BasicElement`
      Parameters:
        `properties` - A collection of properties' values.

    - #### saveProperties

          public StringDictionary saveProperties()

      Converts values of the properties of an element from their string representation.

      Overrides:
        `saveProperties` in class `BasicElement`
      Returns:
        A collection of properties' values.

    - #### setConfiguration

          public void setConfiguration(OmrConfig value)

      Sets element-level configuration for OMR extraction algorithm. Overrides page-level configuration if set. If set to `null` (by default), page-level configuration will be used.

      This settings are used during data extraction only and are not saved in the template file.
      Parameters:
        `value` - element-level configuration for OMR extraction algorithm.

Copyright © 2014. All rights reserved.