Class StructuredObject


  • public class StructuredObject
    extends Object
    Represents a single Structured Object. Note that there are multiple levels of validation for EntityJSON. There is a generic Structured Object schema which all Structured Objects must conform to. There is an EntityJSON schema which describes a single JSON object where each element is a Structured Object. This is the object which is submitted with a single message and is simply a collection of named objects which the message may refer to. There are individual schemas for specific Structured Object types, but there is no requirement for such a schema to exist. Message originators are allowed to emit messages containing objects which conform only to the generic Structured Object schema which, aside from the mandatory fields of all Structured objects (type ID and type version) and the constraint that if an id attribute is present that it must be an array of (idType, idValue) tuples, may contain any valid JSON.
    Author:
    Bruce Skingle
    • Method Detail

      • getContext

        public IEntityJsonInstanceContext getContext()
        Return the parse context from which this object was created, which includes error reports if the input was invalid in some way.
        Returns:
        The parse context from which this object was created.
      • getType

        public String getType()
        Returns:
        The type of this object.
      • getVersion

        public String getVersion()
        Returns:
        The Type Version of this object, guaranteed to be a string of the form [0-9]+.[0-9]+
      • getMajorVersion

        public int getMajorVersion()
        Returns:
        The first (major) element of the type version.
      • getMinorVersion

        public int getMinorVersion()
        Returns:
        The second (minor) element of the type version.
      • getIdList

        public List<StructuredObjectId> getIdList()
        Returns:
        The immutable list of ID objects for this object.