Class SimpleExpression

  • All Implemented Interfaces:
    Serializable

    public class SimpleExpression
    extends Expression
    implements Serializable
    Expression type which represents a simple operator based expression on a property and some number of arguments.

    Example: (<property> <operator> [<argument> [<argument> ...]])

    Java class for SimpleExpression complex type.

    The following schema fragment specifies the expected content contained within this class.

     <complexType name="SimpleExpression">
       <complexContent>
         <extension base="{}Expression">
           <sequence>
             <element name="argument" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
           </sequence>
           <attribute name="operator" use="required" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
           <attribute name="property" use="required" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
         </extension>
       </complexContent>
     </complexType>
     
    See Also:
    Serialized Form
    • Constructor Detail

      • SimpleExpression

        public SimpleExpression()
    • Method Detail

      • getArguments

        public List<String> getArguments()
        The arguments for this simple expression. These values will be uninterpreted Strings.

        Gets the value of the arguments property.

        This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the arguments property.

        For example, to add a new item, do as follows:

            getArguments().add(newItem);
         

        Objects of the following type(s) are allowed in the list String

      • getOperator

        public String getOperator()
        The operator for this simple expression. This will be the value of the id property from the relevant operator.
        Returns:
        possible object is String
      • setOperator

        public void setOperator​(String value)
        Sets the value of the operator property.
        Parameters:
        value - allowed object is String
      • getProperty

        public String getProperty()
        The object property for this simple expression. This will be a relative XPath expression (presumed to be rooted within the query object type) which addresses the relevant property.

        Example:

             // Object Type
             <xs:complexType name="Order">
                 <xs:sequence>
                     <xs:element name="item">
                         <xs:complexType>
                             <xs:sequence>
                                 <xs:element name="description"/>
                             </xs:sequence>
                             <xs:attribute name="price"/>
                         </xs:complexType>
                     </xs:element>
                     <xs:element name="userName"/>
                 </xs:sequence>
                 <xs:attribute name="id"/>
             </xs:complexType>
         
             // property names for addressable properties:
             Order.userName         -> "userName"
             Order.id               -> "[@id]"
             Order.item.description -> "item/description"
             Order.item.price       -> "item[@price]"                                
                                         
        Returns:
        possible object is String
      • setProperty

        public void setProperty​(String value)
        Sets the value of the property property.
        Parameters:
        value - allowed object is String
      • copy

        public SimpleExpression copy()
        Deep copies the fields of the this model into a new instance of this class and returns it.
        Overrides:
        copy in class Expression
      • copy

        public SimpleExpression copy​(boolean isDeep)
        Copies the fields of the this model (optionally deeply) into a new instance of this class and returns it.
        Specified by:
        copy in class Expression
      • copy

        protected SimpleExpression copy​(SimpleExpression nobj,
                                        boolean isDeep)
        Copies the fields of the this model (optionally deeply) into the given instance and returns it.
      • withArguments

        public SimpleExpression withArguments​(String... newValues)
        Adds the given newValues to the current arguments property List and returns this instance.
      • withArguments

        public SimpleExpression withArguments​(Collection<? extends String> newValues)
        Adds the given newValues to the current arguments property List and returns this instance.
      • withOperator

        public SimpleExpression withOperator​(String newValue)
        Sets the operator property to the given newValue and returns this instance.
      • withProperty

        public SimpleExpression withProperty​(String newValue)
        Sets the property property to the given newValue and returns this instance.