Interface MappedResource<T1,T2,A1,A2>

All Superinterfaces:
Resource<T1>
All Known Implementing Classes:
MappedDOMResource

public interface MappedResource<T1,T2,A1,A2> extends Resource<T1>
A MappedResource is a Resource, for which there is a derivation or mapping generated by some derivation mechanism, e.g., XSLT. The resource is the preimage, while the mapped image is accessible via getImage().

Type parameters:

T1, T2: parsed content types of the preimage and image resources. E.g., XdmNode for DOMResources.

A1, A2: content parts of the preimage and image. E.g., XdmNode for DOMResources.

P1, P2: Point in preimage and image.

In a DOMResource, the parsed content type Tx and part type Ax will be the same. But this is not the case in general.

  • Method Details

    • getImage

      Resource<T2> getImage()
      Returns the image.
    • getCorrespondingInImage

      List<A2> getCorrespondingInImage(A1 preimagePart)
      For a given part in the preimage, this returns the corresponding part in the image. Since the image may contain multiple copies of the same part of the preimage, a list of parts is returned.
    • getCorrespondingInPreimage

      Optional<A1> getCorrespondingInPreimage(A2 imagePart)
      For a given part in the image, this returns the corresponding part in the preimage.