Class ComponentRelation

java.lang.Object
com.oss.metadata.ComponentRelation

public class ComponentRelation extends Object
The ComponentRelation class is used to define component relations of the ASN.1 component relation constraint. Each OpenType has a component relation. The component relation references another field and an information object set. It is used to determine the value at the time of automatic encoding and decoding. So for example,
    Procedure ::= SEQUENCE {
         opcode INTEGER,
         parameter SEQUENCE {
           parameterId PARAMETER.&id ({KNOWN-PARAMETERS}),
           value PARAMETER.&Type ({KNOWN-PARAMETERS}{@.parameterId})
         }
   }
PARAMETER.&Type is an OpenType, KNOWN-PARAMETERS is an information object set, and {@.parameterId} is a component relation.
Since:
ASN.1/Java 2.1
  • Method Details

    • isOuterElement

      public boolean isOuterElement()
      Returns whether the constraint references a field in an outer enclosing type
      Returns:
      true if the constraint references a field in an outer enclosing type
    • getInfoFieldIndex

      public int getInfoFieldIndex()
      Returns field index in the Fields array of the information object of the information object set.
      Returns:
      field index in the Fields array of the information object of the information object set
    • getFieldInfo

      public FieldInfo getFieldInfo() throws MetadataException
      Return information for the referenced field.
      Returns:
      FieldInfo of the referenced field
      Throws:
      MetadataException - if attempt to resolve the weak reference fails: class could not be found or typeInfo was not available.
    • getFieldInfo

      public FieldInfo getFieldInfo(Object context) throws MetadataException
      Return information for the referenced field.
      Parameters:
      context - project environment
      Returns:
      FieldInfo of the referenced field
      Throws:
      MetadataException - if attempt to resolve the weak reference fails: class could not be found or typeInfo was not available.