Interface LFileModelType

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
LFileModel

public interface LFileModelType extends AutoCloseable
The interface to a file model.
  • Method Details

    • events

      Returns:
      The file model events
    • status

      com.io7m.jattribute.core.AttributeReadableType<LFileModelStatusType> status()
      Returns:
      An observable status value for the file model
    • globalCaptionAdd

      CompletableFuture<?> globalCaptionAdd(LCaptionName text)
      Add a global caption.
      Parameters:
      text - The caption
      Returns:
      The operation in progress
    • globalCaptionRemove

      CompletableFuture<?> globalCaptionRemove(LCaptionID id)
      Remove a global caption.
      Parameters:
      id - The caption
      Returns:
      The operation in progress
    • globalCaptionOrderLower

      CompletableFuture<?> globalCaptionOrderLower(LCaptionID id)
      Lower the order of the given caption (making it higher priority).
      Parameters:
      id - The caption
      Returns:
      The operation in progress
    • globalCaptionOrderUpper

      CompletableFuture<?> globalCaptionOrderUpper(LCaptionID id)
      Increase the order of the given caption (making it lower priority).
      Parameters:
      id - The caption
      Returns:
      The operation in progress
    • globalCaptionModify

      CompletableFuture<?> globalCaptionModify(LCaptionID id, LCaptionName newName)
      Change the text for a global caption.
      Parameters:
      id - The caption
      newName - The new text
      Returns:
      The operation in progress
    • categorySetRequired

      CompletableFuture<?> categorySetRequired(Set<LCategoryID> categories)
      Set categories as required.
      Parameters:
      categories - The categories
      Returns:
      The operation in progress
    • categorySetNotRequired

      CompletableFuture<?> categorySetNotRequired(Set<LCategoryID> categories)
      Set categories as not required.
      Parameters:
      categories - The categories
      Returns:
      The operation in progress
    • categoryAdd

      CompletableFuture<?> categoryAdd(LCategoryName text)
      Add a category.
      Parameters:
      text - The category
      Returns:
      The operation in progress
    • captionAdd

      CompletableFuture<?> captionAdd(LCaptionName text)
      Add a caption.
      Parameters:
      text - The caption
      Returns:
      The operation in progress
    • captionModify

      CompletableFuture<?> captionModify(LCaptionID id, LCaptionName name)
      Modify a caption.
      Parameters:
      id - The caption ID
      name - The caption text
      Returns:
      The operation in progress
    • captionRemove

      CompletableFuture<?> captionRemove(Set<LCaptionID> captions)
      Delete captions.
      Parameters:
      captions - The captions
      Returns:
      The operation in progress
    • imageAdd

      CompletableFuture<?> imageAdd(String name, Path file, Optional<URI> source)
      Load an image and add it to the file.
      Parameters:
      name - The (unique) name
      file - The file
      source - The URI source, if any
      Returns:
      The operation in progress
    • imagesDelete

      CompletableFuture<?> imagesDelete(List<LImageID> ids)
      Delete images.
      Parameters:
      ids - The ids
      Returns:
      The operation in progress
    • imageCaptionsAssign

      CompletableFuture<?> imageCaptionsAssign(List<LImageCaptionsAssignment> assignments)
      Assign captions to an image.
      Parameters:
      assignments - The assignments
      Returns:
      The operation in progress
    • imageCaptionsUnassign

      CompletableFuture<?> imageCaptionsUnassign(List<LImageCaptionsAssignment> assignments)
      Unassign captions from an image.
      Parameters:
      assignments - The assignments
      Returns:
      The operation in progress
    • imagesCompare

      CompletableFuture<?> imagesCompare(LImageID imageA, LImageID imageB)
      Compare captions on images.
      Parameters:
      imageA - The left image
      imageB - The right image
      Returns:
      The operation in progress
    • imageSelect

      CompletableFuture<?> imageSelect(Optional<LImageID> name)
      Select an image.
      Parameters:
      name - The name
      Returns:
      The operation in progress
    • categoryCaptionsAssign

      CompletableFuture<?> categoryCaptionsAssign(List<LCategoryCaptionsAssignment> categories)
      Assign the given captions to the given categories.
      Parameters:
      categories - The categories/captions
      Returns:
      The operation in progress
    • categoryCaptionsUnassign

      CompletableFuture<?> categoryCaptionsUnassign(List<LCategoryCaptionsAssignment> categories)
      Unassign the given captions from the given categories.
      Parameters:
      categories - The categories/captions
      Returns:
      The operation in progress
    • categorySelect

      CompletableFuture<?> categorySelect(Optional<LCategoryID> id)
      Select a category.
      Parameters:
      id - The id
      Returns:
      The operation in progress
    • metadataPut

      CompletableFuture<?> metadataPut(List<LMetadataValue> metadata)
      Add or update metadata.
      Parameters:
      metadata - The metadata values
      Returns:
      The operation in progress
    • metadataRemove

      CompletableFuture<?> metadataRemove(List<LMetadataValue> metadata)
      Remove metadata.
      Parameters:
      metadata - The metadata values
      Returns:
      The operation in progress
    • close

      void close() throws LException
      Specified by:
      close in interface AutoCloseable
      Throws:
      LException
    • metadataList

      com.io7m.jattribute.core.AttributeReadableType<List<LMetadataValue>> metadataList()
      Returns:
      The current complete list of metadata
    • categorySelected

      com.io7m.jattribute.core.AttributeReadableType<Optional<LCategory>> categorySelected()
      Returns:
      The currently selected category
    • imageSelected

      com.io7m.jattribute.core.AttributeReadableType<Optional<LImageWithID>> imageSelected()
      Returns:
      The currently selected image
    • imageList

      com.io7m.jattribute.core.AttributeReadableType<List<LImageWithID>> imageList()
      Returns:
      The current complete list of images
    • imageListFilterSet

      void imageListFilterSet(String filter)
      Set the filter for the image list.
      Parameters:
      filter - The filter
    • imageListFiltered

      com.io7m.jattribute.core.AttributeReadableType<List<LImageWithID>> imageListFiltered()
      Returns:
      The current complete list of images with a search filter applied
    • categoriesRequired

      com.io7m.jattribute.core.AttributeReadableType<List<LCategory>> categoriesRequired()
      Returns:
      The current complete list of required caption categories
    • captionList

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> captionList()
      Returns:
      The current complete list of captions
    • imageCaptionsAssigned

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> imageCaptionsAssigned()
      Returns:
      The list of captions assigned to the current image
    • imageCaptionsUnassigned

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> imageCaptionsUnassigned()
      Returns:
      The list of captions not assigned to the current image
    • imageCaptionsUnassignedFiltered

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> imageCaptionsUnassignedFiltered()
      Returns:
      The filtered list of captions not assigned to the current image
    • captionsUnassignedListFilterSet

      void captionsUnassignedListFilterSet(String filter)
      Set the filter for the caption list.
      Parameters:
      filter - The filter
    • undoText

      com.io7m.jattribute.core.AttributeReadableType<Optional<String>> undoText()
      Returns:
      Text describing the top of the undo stack, if any
    • undoStack

      com.io7m.jattribute.core.AttributeReadableType<List<LCommandRecord>> undoStack()
      Returns:
      The undo stack
    • redoStack

      com.io7m.jattribute.core.AttributeReadableType<List<LCommandRecord>> redoStack()
      Returns:
      The redo stack
    • categoryCaptionsAssigned

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> categoryCaptionsAssigned()
      Returns:
      The list of captions assigned to the current category
    • categoryCaptionsUnassigned

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> categoryCaptionsUnassigned()
      Returns:
      The list of captions not assigned to the current category
    • undo

      Undo the operation on the top of the undo stack
      Returns:
      The operation in progress
    • redo

      Redo the operation on the top of the redo stack
      Returns:
      The operation in progress
    • compact

      CompletableFuture<?> compact()
      Compact the file, deleting the undo/redo log and cleaning up any unused data in the file.
      Returns:
      The operation in progress
    • redoText

      com.io7m.jattribute.core.AttributeReadableType<Optional<String>> redoText()
      Returns:
      Text describing the top of the redo stack, if any
    • categoryList

      com.io7m.jattribute.core.AttributeReadableType<List<LCategory>> categoryList()
      Returns:
      The current complete list of categories
    • categoryCaptions

      com.io7m.jattribute.core.AttributeReadableType<SortedMap<LCategoryID,List<LCaption>>> categoryCaptions()
      Returns:
      The captions for every available category
    • imageStream

      Parameters:
      id - The image ID
      Returns:
      The image data stream
    • globalCaptionList

      com.io7m.jattribute.core.AttributeReadableType<List<LGlobalCaption>> globalCaptionList()
      Returns:
      The current complete list of global captions
    • imageComparisonA

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> imageComparisonA()
      Returns:
      The list of captions that are on image A, but not on image B
    • imageComparisonB

      com.io7m.jattribute.core.AttributeReadableType<List<LCaption>> imageComparisonB()
      Returns:
      The list of captions that are on image B, but not on image A
    • imageComparison

      com.io7m.jattribute.core.AttributeReadableType<Optional<LImageComparison>> imageComparison()
      Returns:
      The current image comparison
    • captionClipboard

      com.io7m.jattribute.core.AttributeReadableType<Set<LCaptionID>> captionClipboard()
      Returns:
      The current caption clipboard
    • captionsCopy

      void captionsCopy(Set<LCaptionID> captions)
      Move a set of captions to the clipboard.
      Parameters:
      captions - The captions
    • captionsPaste

      CompletableFuture<?> captionsPaste(Set<LImageID> images)
      Assign the captions in the clipboard to each of the given images, and then clear the clipboard.
      Parameters:
      images - The images
      Returns:
      The operation in progress
    • validate

      CompletableFuture<?> validate()
      Execute a validation.
      Returns:
      The operation in progress
    • validationProblems

      com.io7m.jattribute.core.AttributeReadableType<List<LValidationProblemType>> validationProblems()
      Returns:
      The list of validation problems
    • export

      CompletableFuture<?> export(LExportRequest request)
      Execute an export.
      Parameters:
      request - The export request
      Returns:
      The operation in progress
    • exportEvents

      com.io7m.jattribute.core.AttributeReadableType<List<LFileModelEventType>> exportEvents()
      Returns:
      The export events
    • exportClear

      void exportClear()
      Clear the export events.
    • imageSourceSet

      CompletableFuture<?> imageSourceSet(LImageID image, URI source)
      Change the source of an image.
      Parameters:
      image - The image
      source - The source
      Returns:
      The operation in progress
    • loading

      CompletableFuture<?> loading()
      Returns:
      A future that represents the file model's loading process