Package com.io7m.laurel.filemodel
Interface LFileModelType
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
LFileModel
The interface to a file model.
-
Method Summary
Modifier and TypeMethodDescriptioncaptionAdd(LCaptionName text) Add a caption.com.io7m.jattribute.core.AttributeReadableType<Set<LCaptionID>> captionModify(LCaptionID id, LCaptionName name) Modify a caption.captionRemove(Set<LCaptionID> captions) Delete captions.voidcaptionsCopy(Set<LCaptionID> captions) Move a set of captions to the clipboard.captionsPaste(Set<LImageID> images) Assign the captions in the clipboard to each of the given images, and then clear the clipboard.voidSet the filter for the caption list.categoryAdd(LCategoryName text) Add a category.com.io7m.jattribute.core.AttributeReadableType<SortedMap<LCategoryID, List<LCaption>>> categoryCaptionsAssign(List<LCategoryCaptionsAssignment> categories) Assign the given captions to the given categories.categoryCaptionsUnassign(List<LCategoryCaptionsAssignment> categories) Unassign the given captions from the given categories.Select a category.categorySetNotRequired(Set<LCategoryID> categories) Set categories as not required.categorySetRequired(Set<LCategoryID> categories) Set categories as required.voidclose()compact()Compact the file, deleting the undo/redo log and cleaning up any unused data in the file.events()export(LExportRequest request) Execute an export.voidClear the export events.com.io7m.jattribute.core.AttributeReadableType<List<LFileModelEventType>> globalCaptionAdd(LCaptionName text) Add a global caption.com.io7m.jattribute.core.AttributeReadableType<List<LGlobalCaption>> globalCaptionModify(LCaptionID id, LCaptionName newName) Change the text for a global caption.Lower the order of the given caption (making it higher priority).Increase the order of the given caption (making it lower priority).Remove a global caption.Load an image and add it to the file.imageCaptionsAssign(List<LImageCaptionsAssignment> assignments) Assign captions to an image.imageCaptionsUnassign(List<LImageCaptionsAssignment> assignments) Unassign captions from an image.com.io7m.jattribute.core.AttributeReadableType<Optional<LImageComparison>> com.io7m.jattribute.core.AttributeReadableType<List<LImageWithID>> com.io7m.jattribute.core.AttributeReadableType<List<LImageWithID>> voidimageListFilterSet(String filter) Set the filter for the image list.imagesCompare(LImageID imageA, LImageID imageB) Compare captions on images.imagesDelete(List<LImageID> ids) Delete images.imageSelect(Optional<LImageID> name) Select an image.com.io7m.jattribute.core.AttributeReadableType<Optional<LImageWithID>> imageSourceSet(LImageID image, URI source) Change the source of an image.imageStream(LImageID id) loading()com.io7m.jattribute.core.AttributeReadableType<List<LMetadataValue>> metadataPut(List<LMetadataValue> metadata) Add or update metadata.metadataRemove(List<LMetadataValue> metadata) Remove metadata.redo()Redo the operation on the top of the redo stackcom.io7m.jattribute.core.AttributeReadableType<List<LCommandRecord>> redoText()com.io7m.jattribute.core.AttributeReadableType<LFileModelStatusType> status()undo()Undo the operation on the top of the undo stackcom.io7m.jattribute.core.AttributeReadableType<List<LCommandRecord>> undoText()validate()Execute a validation.com.io7m.jattribute.core.AttributeReadableType<List<LValidationProblemType>>
-
Method Details
-
events
Flow.Publisher<LFileModelEventType> events()- Returns:
- The file model events
-
status
com.io7m.jattribute.core.AttributeReadableType<LFileModelStatusType> status()- Returns:
- An observable status value for the file model
-
globalCaptionAdd
Add a global caption.- Parameters:
text- The caption- Returns:
- The operation in progress
-
globalCaptionRemove
Remove a global caption.- Parameters:
id- The caption- Returns:
- The operation in progress
-
globalCaptionOrderLower
Lower the order of the given caption (making it higher priority).- Parameters:
id- The caption- Returns:
- The operation in progress
-
globalCaptionOrderUpper
Increase the order of the given caption (making it lower priority).- Parameters:
id- The caption- Returns:
- The operation in progress
-
globalCaptionModify
Change the text for a global caption.- Parameters:
id- The captionnewName- The new text- Returns:
- The operation in progress
-
categorySetRequired
Set categories as required.- Parameters:
categories- The categories- Returns:
- The operation in progress
-
categorySetNotRequired
Set categories as not required.- Parameters:
categories- The categories- Returns:
- The operation in progress
-
categoryAdd
Add a category.- Parameters:
text- The category- Returns:
- The operation in progress
-
captionAdd
Add a caption.- Parameters:
text- The caption- Returns:
- The operation in progress
-
captionModify
Modify a caption.- Parameters:
id- The caption IDname- The caption text- Returns:
- The operation in progress
-
captionRemove
Delete captions.- Parameters:
captions- The captions- Returns:
- The operation in progress
-
imageAdd
Load an image and add it to the file.- Parameters:
name- The (unique) namefile- The filesource- The URI source, if any- Returns:
- The operation in progress
-
imagesDelete
Delete images.- Parameters:
ids- The ids- Returns:
- The operation in progress
-
imageCaptionsAssign
Assign captions to an image.- Parameters:
assignments- The assignments- Returns:
- The operation in progress
-
imageCaptionsUnassign
Unassign captions from an image.- Parameters:
assignments- The assignments- Returns:
- The operation in progress
-
imagesCompare
Compare captions on images.- Parameters:
imageA- The left imageimageB- The right image- Returns:
- The operation in progress
-
imageSelect
Select an image.- Parameters:
name- The name- Returns:
- The operation in progress
-
categoryCaptionsAssign
Assign the given captions to the given categories.- Parameters:
categories- The categories/captions- Returns:
- The operation in progress
-
categoryCaptionsUnassign
Unassign the given captions from the given categories.- Parameters:
categories- The categories/captions- Returns:
- The operation in progress
-
categorySelect
Select a category.- Parameters:
id- The id- Returns:
- The operation in progress
-
metadataPut
Add or update metadata.- Parameters:
metadata- The metadata values- Returns:
- The operation in progress
-
metadataRemove
Remove metadata.- Parameters:
metadata- The metadata values- Returns:
- The operation in progress
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
LException
-
metadataList
com.io7m.jattribute.core.AttributeReadableType<List<LMetadataValue>> metadataList()- Returns:
- The current complete list of metadata
-
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
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
- Returns:
- The current complete list of required caption categories
-
captionList
- Returns:
- The current complete list of captions
-
imageCaptionsAssigned
- Returns:
- The list of captions assigned to the current image
-
imageCaptionsUnassigned
- Returns:
- The list of captions not assigned to the current image
-
imageCaptionsUnassignedFiltered
- Returns:
- The filtered list of captions not assigned to the current image
-
captionsUnassignedListFilterSet
Set the filter for the caption list.- Parameters:
filter- The filter
-
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
- Returns:
- The list of captions assigned to the current category
-
categoryCaptionsUnassigned
- Returns:
- The list of captions not assigned to the current category
-
undo
CompletableFuture<?> undo()Undo the operation on the top of the undo stack- Returns:
- The operation in progress
-
redo
CompletableFuture<?> 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
- Returns:
- Text describing the top of the redo stack, if any
-
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
- Returns:
- The list of captions that are on image A, but not on image B
-
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
Move a set of captions to the clipboard.- Parameters:
captions- The captions
-
captionsPaste
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
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
Change the source of an image.- Parameters:
image- The imagesource- The source- Returns:
- The operation in progress
-
loading
CompletableFuture<?> loading()- Returns:
- A future that represents the file model's loading process
-