Class DocumentReference
java.lang.Object
io.goobi.viewer.api.rest.model.ner.DocumentReference
REST API model representing a digitized document identified by its persistent identifier (PI), together with the NER tag groups
found across its pages.
Page ranges are kept in sorted order and are accessible both as a whole list and by individual page order number.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new DocumentReference instance.DocumentReference(String piTopStruct) Creates a new DocumentReference instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPageRange(TagGroup range) addPageRange.voidaddPageRanges(Collection<TagGroup> ranges) addPageRanges.booleangetPageRange(int startPage) getPageRange.Getter for the fieldpageRanges.getPi()Getter for the fieldpi.intgetRangeSize.inthashCode()voidsetPageRanges(List<TagGroup> ranges) Setter for the fieldpageRanges.
-
Constructor Details
-
DocumentReference
public DocumentReference()Creates a new DocumentReference instance. -
DocumentReference
Creates a new DocumentReference instance.- Parameters:
piTopStruct- persistent identifier of the top-level structure
-
-
Method Details
-
getPi
Getter for the fieldpi.- Returns:
- the persistent identifier (PI) of the top-level structure element
-
setPageRanges
Setter for the fieldpageRanges.- Parameters:
ranges- sorted list of tag groups to set
-
addPageRange
addPageRange.- Parameters:
range- tag group representing a page range to add
-
addPageRanges
addPageRanges.- Parameters:
ranges- collection of tag groups to add
-
getPageRanges
Getter for the fieldpageRanges.- Returns:
- a list of tag groups, one per page range in this document reference
-
getPageRange
getPageRange.- Parameters:
startPage- page order number to look up in ranges- Returns:
- the TagGroup whose range contains the given start page, or null if none found
-
getRangeSize
public int getRangeSize()getRangeSize.- Returns:
- a int.
-
hashCode
public int hashCode() -
equals
-