Class ElementReference
java.lang.Object
io.goobi.viewer.api.rest.model.ner.ElementReference
REST API model referencing a single named-entity element within a page of a digitized document.
Holds the element's XML ID, bounding-box coordinates, text content, optional URI, and the page order number on which it appears.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ElementReference instance.ElementReference(String id, Rectangle coordinates, String content, String uri) Creates a new ElementReference instance. -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldcontent.Getter for the fieldcoordinates.getCoordinatesAsRect.getId()Getter for the fieldid.intgetPage()Getter for the fieldpage.getUri()voidsetContent(String content) Setter for the fieldcontent.voidsetCoordinates(Rectangle coordinates) Setter for the fieldcoordinates.voidsetPage(int pageNo) Setter for the fieldpage.void
-
Constructor Details
-
ElementReference
public ElementReference()Creates a new ElementReference instance. -
ElementReference
Creates a new ElementReference instance.- Parameters:
id- XML element ID of the referenced NER tokencoordinates- bounding box of the element on the pagecontent- text content of the NER elementuri- Value of the URI attribute
-
-
Method Details
-
getId
Getter for the fieldid.- Returns:
- the identifier of this element reference
-
getCoordinates
Getter for the fieldcoordinates.- Returns:
- the bounding box coordinates of this element as a string
-
getCoordinatesAsRect
getCoordinatesAsRect.- Returns:
- the bounding box of the element on the page as a Rectangle
-
setCoordinates
Setter for the fieldcoordinates.- Parameters:
coordinates- bounding box of the element on the page
-
getContent
Getter for the fieldcontent.- Returns:
- the text content of this NER element
-
setContent
Setter for the fieldcontent.- Parameters:
content- text content of the NER element
-
getUri
-
setUri
-
getPage
public int getPage()Getter for the fieldpage.- Returns:
- the 1-based page order number of the referenced element
-
setPage
public void setPage(int pageNo) Setter for the fieldpage.- Parameters:
pageNo- 1-based page order number of the referenced element
-