Class XMLField

  • All Implemented Interfaces:
    Field

    public final class XMLField
    extends java.lang.Object
    implements Field
    Specifies the configuration used for an XML field.
    Since:
    2.3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLField​(java.lang.String xmlPath)
      Used to create a XML field with specified path.
      XMLField​(java.lang.String xmlPath, FieldAttribute fieldAttribute)
      Used to create an XML field with the specified path and FieldAttribute enumeration.
      XMLField​(java.lang.String xmlPath, java.lang.String name, java.lang.String label)
      Used to create an XML field with the specified path, name and label.
      XMLField​(java.lang.String xmlPath, java.lang.String name, java.lang.String label, int index)
      Used to create an XML field with the specified path, name, label and index.
      XMLField​(java.lang.String xmlPath, java.lang.String name, java.lang.String label, int index, FieldAttribute fieldAttribute)
      Used to create an XML field with the specified path, name, label, index and FieldAttribute enumeration.
      XMLField​(java.lang.String xmlPath, java.lang.String name, java.lang.String label, FieldAttribute fieldAttribute)
      Used to create an XML field with the specified path, name, label and FieldAttribute enumeration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      FieldAttribute getFieldAttribute()
      Returns the specified FieldAttribute for this XML field.
      int getIndex()
      Returns the specified field index.
      java.lang.String getLabel()
      Returns the specified field label.
      java.lang.String getName()
      Returns the specified field name.
      java.lang.String getXMLPath()
      Returns the specified field path.
      int hashCode()  
      void setLabel​(java.lang.String label)
      Sets a label to this field.
      void setName​(java.lang.String name)
      Sets a name to this field.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLField

        public XMLField​(java.lang.String xmlPath)
                 throws DataExchangeException
        Used to create a XML field with specified path. If field path is null or empty, an exception will be thrown.
        Throws:
        DataExchangeException
      • XMLField

        public XMLField​(java.lang.String xmlPath,
                        java.lang.String name,
                        java.lang.String label)
                 throws DataExchangeException
        Used to create an XML field with the specified path, name and label. If the field path is null or empty, an exception will be thrown.
        Throws:
        DataExchangeException
      • XMLField

        public XMLField​(java.lang.String xmlPath,
                        java.lang.String name,
                        java.lang.String label,
                        FieldAttribute fieldAttribute)
                 throws DataExchangeException
        Used to create an XML field with the specified path, name, label and FieldAttribute enumeration. If the FieldAttribute enumeration is not a NO_SOURCE_FIELD, the field path must not be null or empty. Otherwise, an exception will be thrown.
        Throws:
        DataExchangeException
        Since:
        2.4.0
      • XMLField

        public XMLField​(java.lang.String xmlPath,
                        java.lang.String name,
                        java.lang.String label,
                        int index)
                 throws DataExchangeException
        Used to create an XML field with the specified path, name, label and index. If the field path is null or empty, an exception will be thrown.
        Throws:
        DataExchangeException
      • XMLField

        public XMLField​(java.lang.String xmlPath,
                        java.lang.String name,
                        java.lang.String label,
                        int index,
                        FieldAttribute fieldAttribute)
                 throws DataExchangeException
        Used to create an XML field with the specified path, name, label, index and FieldAttribute enumeration. If the FieldAttribute enumeration is not a NO_SOURCE_FIELD, the field path must not be null or empty. Otherwise, an exception will be thrown.
        Throws:
        DataExchangeException
        Since:
        2.4.0
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the specified field name.
        Specified by:
        getName in interface Field
      • setName

        public void setName​(java.lang.String name)
        Sets a name to this field.
      • getLabel

        public java.lang.String getLabel()
        Returns the specified field label.
        Specified by:
        getLabel in interface Field
      • setLabel

        public void setLabel​(java.lang.String label)
        Sets a label to this field.
      • getXMLPath

        public java.lang.String getXMLPath()
        Returns the specified field path.
      • getIndex

        public int getIndex()
        Returns the specified field index.
        Specified by:
        getIndex in interface Field
      • 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