Record Class OpcReferenceBody

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.designer.ai.opc.OpcReferenceBody
Record Components:
opcServer - the OPC connection/server name.
nodeId - the OPC node id or browse path.
nodeClass - the OPC node class or item type, or null to omit it.
hasChildren - whether the selected OPC row was browseable.
dataType - the OPC datatype from browse metadata, or null to omit it.
All Implemented Interfaces:
ReferenceBody, ReferenceBody.TextBody

public record OpcReferenceBody(String opcServer, String nodeId, @Nullable String nodeClass, boolean hasChildren, @Nullable String dataType) extends Record implements ReferenceBody.TextBody
The resolved body of an @opc: prompt reference — the OPC source node the user selected.

The Key: value wire text is derived from these components; a consumer downcasts the reference body to this type and reads the typed accessors rather than parsing the rendered text.

See Also:
  • Constructor Details

    • OpcReferenceBody

      public OpcReferenceBody(String opcServer, String nodeId, @Nullable String nodeClass, boolean hasChildren, @Nullable String dataType)
      Creates an instance of a OpcReferenceBody record class.
      Parameters:
      opcServer - the value for the opcServer record component
      nodeId - the value for the nodeId record component
      nodeClass - the value for the nodeClass record component
      hasChildren - the value for the hasChildren record component
      dataType - the value for the dataType record component
  • Method Details

    • rendered

      public String rendered()
      Specified by:
      rendered in interface ReferenceBody.TextBody
      Returns:
      the exact text the wire format embeds between <reference> tags.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • opcServer

      public String opcServer()
      Returns the value of the opcServer record component.
      Returns:
      the value of the opcServer record component
    • nodeId

      public String nodeId()
      Returns the value of the nodeId record component.
      Returns:
      the value of the nodeId record component
    • nodeClass

      public @Nullable String nodeClass()
      Returns the value of the nodeClass record component.
      Returns:
      the value of the nodeClass record component
    • hasChildren

      public boolean hasChildren()
      Returns the value of the hasChildren record component.
      Returns:
      the value of the hasChildren record component
    • dataType

      public @Nullable String dataType()
      Returns the value of the dataType record component.
      Returns:
      the value of the dataType record component