org.apache.uima.resource.metadata.impl

## Class PropertyXmlInfo

- java.lang.Object
- - org.apache.uima.resource.metadata.impl.PropertyXmlInfo

-     public class PropertyXmlInfo
      extends Object

  A simple class containing information on how to render a property in XML.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `String` | `arrayElementTagName` Only used for properties with array values, this determines the tag name of each array element.
    `boolean` | `omitIfNull` If true, this property should be omitted from the XML entirely if its value is null.
    `String` | `propertyName` Name of the property (must correspond to a property on this bean according to the JavaBeans spec).
    `String` | `xmlElementName` Name if the XML element that represents this property in XML.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertyXmlInfo(String aPropName)` Creates a new, default PropertyXmlInfo.
    `PropertyXmlInfo(String aPropName, boolean aOmitIfNull)` Creates a new PropertyXmlInfo.
    `PropertyXmlInfo(String aPropName, String aXmlName)` Creates a new PropertyXmlInfo.
    `PropertyXmlInfo(String aPropName, String aXmlName, boolean aOmitIfNull)` Creates a new PropertyXmlInfo.
    `PropertyXmlInfo(String aPropName, String aXmlElementName, boolean aOmitIfNull, String aArrayElementTagName)` Creates a new PropertyXmlInfo.

  - ### Method Summary

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

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

- - ### Field Detail

    - #### propertyName

          public String propertyName

      Name of the property (must correspond to a property on this bean according to the JavaBeans spec).

    - #### xmlElementName

          public String xmlElementName

      Name if the XML element that represents this property in XML. Defaults to the same value as `propertyName`.

      If this is `null`, it indicates that this property is not represented by its own element tag in the XML. Instead, the value of the property determines the XML tag that is generated.

    - #### omitIfNull

          public boolean omitIfNull

      If true, this property should be omitted from the XML entirely if its value is null. Defaults to true.

    - #### arrayElementTagName

          public String arrayElementTagName

      Only used for properties with array values, this determines the tag name of each array element. As with `aXmlName`, this may be null, which will cause each array element to have a tag determined by its class.

  - ### Constructor Detail

    - #### PropertyXmlInfo

          public PropertyXmlInfo(String aPropName)

      Creates a new, default PropertyXmlInfo. The XML name is assumed to be the same as the property name, omitIfNull is true, and arrayElementTagName is null.
      Parameters:
        `aPropName` - name of the property

    - #### PropertyXmlInfo

          public PropertyXmlInfo(String aPropName,
                                 boolean aOmitIfNull)

      Creates a new PropertyXmlInfo.
      Parameters:
        `aPropName` - name of the property
        `aOmitIfNull` - if true, this property should be omitted entirely from the XML if its value is null

    - #### PropertyXmlInfo

          public PropertyXmlInfo(String aPropName,
                                 String aXmlName)

      Creates a new PropertyXmlInfo.
      Parameters:
        `aPropName` - name of the property
        `aXmlName` - name of xml element that represents this property (may be null - see `xmlElementName`).

    - #### PropertyXmlInfo

          public PropertyXmlInfo(String aPropName,
                                 String aXmlName,
                                 boolean aOmitIfNull)

      Creates a new PropertyXmlInfo.
      Parameters:
        `aPropName` - name of the property
        `aXmlName` - name of xml element that represents this property (may be null - see `xmlElementName`.
        `aOmitIfNull` - if true, this property should be omitted entirely from the XML if its value is null

    - #### PropertyXmlInfo

          public PropertyXmlInfo(String aPropName,
                                 String aXmlElementName,
                                 boolean aOmitIfNull,
                                 String aArrayElementTagName)

      Creates a new PropertyXmlInfo.
      Parameters:
        `aPropName` - name of the property
        `aXmlElementName` - name of xml element that represents this property (may be null - see `xmlElementName`.
        `aOmitIfNull` - if true, this property should be omitted entirely from the XML if its value is null
        `aArrayElementTagName` - only used for properties with array values, this determines the tag name of each array element. As with `aXmlName`, this may be null, which will cause each array element to have a tag determined by its class.

Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.