Class ProjectionMapping

    • Constructor Summary

      Constructors 
      Constructor Description
      ProjectionMapping​(IDocument masterDocument, String fragmentsCategory, IDocument slaveDocument, String segmentsCategory)
      Creates a new mapping between the given parent document and the given projection document.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IRegion getCoverage()
      Returns the minimal region of the original document that completely comprises all of the image document or null if there is no such region.
      IRegion[] getExactCoverage​(IRegion originRegion)
      Returns the maximal sub-regions of the given origin region which are completely covered.
      int getImageLength()
      Returns the length of the image document.
      void projectionChanged()
      Notifies this projection mapping that there was a projection change.
      int toClosestImageLine​(int originLine)
      Returns the line of the image document whose corresponding line in the original document is closest to the given line in the original document.
      IRegion toClosestImageRegion​(IRegion originRegion)
      Returns the minimal region of the image document that completely comprises the given region of the original document.
      IRegion toExactImageRegion​(IRegion originRegion)
      Adheres to originRegion=toOriginRegion(toExactImageRegion(originRegion)), if toExactImageRegion(originRegion) !
      IRegion[] toExactImageRegions​(IRegion originRegion)
      Returns the segments of the image document that exactly correspond to the given region of the original document.
      IRegion[] toExactOriginRegions​(IRegion imageRegion)
      Returns the fragments of the original document that exactly correspond to the given region of the image document.
      int toImageLine​(int originLine)
      Returns the line of the image document that corresponds to the given line of the original document or -1 if there is no such line.
      int toImageOffset​(int originOffset)
      Returns the offset in the image document that corresponds to the given offset in the original document or -1 if there is no such offset
      IRegion toImageRegion​(IRegion originRegion)
      Returns the minimal region of the image document that completely comprises the given region of the original document or null if there is no such region.
      int toOriginLine​(int imageLine)
      Returns the line of the original document that corresponds to the given line of the image document or -1 if there is no such line.
      IRegion toOriginLines​(int imageLine)
      Returns the range of lines of the original document that corresponds to the given line of the image document or null if there are no such lines.
      int toOriginOffset​(int imageOffset)
      Returns the offset in the original document that corresponds to the given offset in the image document or -1 if there is no such offset
      IRegion toOriginRegion​(IRegion imageRegion)
      Returns the minimal region of the original document that completely comprises the given region of the image document or null if there is no such region.
    • Constructor Detail

      • ProjectionMapping

        public ProjectionMapping​(IDocument masterDocument,
                                 String fragmentsCategory,
                                 IDocument slaveDocument,
                                 String segmentsCategory)
        Creates a new mapping between the given parent document and the given projection document.
        Parameters:
        masterDocument - the master document
        fragmentsCategory - the position category of the parent document used to manage the projected regions
        slaveDocument - the slave document
        segmentsCategory - the position category of the projection document used to manage the fragments