Interface ValueContext

    • Method Detail

      • getHome

        AdaptationHome getHome()
        Returns the current dataspace or snapshot.

        For a user service data context object that is not a record or a dataset, always returns the reference dataspace.

      • getNode

        SchemaNode getNode()
        Returns the current data model node of this context. When a path-based access is performed, any relative path is resolved with respect to this node.
        See Also:
        getValue(Path)
      • getValue

        Object getValue​(Path aPath)
                 throws PathAccessException
        Returns the value of the specified node.

        The resolution of the value is done according to the following rules:

        1. If the specified node is a function, always returns the evaluation of the function.
        2. If the target node specifies a specific osd:inheritance inheritance property, returns the locally defined value if a local value is defined (or "overwritten"/null); if no local value is defined, looks up the first locally defined value, according to the osd:inheritance properties.
        3. Otherwise, the default inheritance mechanism is used: if the value is locally defined, it is returned (it can be null); otherwise, looks up the first locally defined value according to the built-in child-to-parent relationship of datasets; if no locally defined value is found, the data model default value is returned (null is returned if the data model does not define a default value).
        Access and mapping rules

        The access and mapping rules between XML Schema and Java are described in the chapter Mapping to Java.

        Throws:
        PathAccessException - if aPath does not refer to an existing node in the underlying type tree structure, or the specified node is above a terminal node.
        See Also:
        Adaptation, Adaptation.get(Path)
      • getAdaptationInstance

        Adaptation getAdaptationInstance()
        Returns the current dataset.

        If this context is on a table record, returns the current dataset that contains the table. Never returns null if current value is from a dataset or record. Returns null for user service data context objects that are not a record or a dataset.

        Important: this instance can belong to a technical snapshot if used in a validation context. Method ValueContextForValidation.getFunctionalDataspace() can be used to retrieve the functional dataspace that contains the original instance.

        See Also:
        getAdaptationTable()
      • getAdaptationTable

        AdaptationTable getAdaptationTable()
        If this context is for a table record, returns the table that contains it; returns null if this is for a dataset or a user service data context object that are not a record.

        Important: this table can belong to a technical snapshot if used in a validation context. Method ValueContextForValidation.getFunctionalDataspace() can be used to retrieve the functional dataspace that contains the original table.

        See Also:
        Adaptation.getContainerTable()