Class DisplayUserGeneratedContent
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefault constructor (needed for persistence). -
Method Summary
Modifier and TypeMethodDescriptionstatic DisplayUserGeneratedContent
buildFromSolrDoc
(org.apache.solr.common.SolrDocument doc) buildFromSolrDoc.static double[]
convertToDoubleArray
(int[] coordinates) convertToDoubleArray.static int[]
convertToIntArray
(double[] coordinates) convertToIntArray.static String
createJsonFromFeatures
(Object value) static String
generateAddressLabel
(StructElement se, String text) static String
static String
static String
Builds label out of user-generated content metadata.de.intranda.api.annotation.ITypedResource
Getter for the fieldareaString
.Getter for the fielddateUpdated
.getDateUpdatedAsString.Getter for the fielddisplayCoordinates
.Returns thelabel
, if set, otherwisepi
.Alias forgetPage()
getId()
Getter for the fieldid
.getLabel()
Getter for the fieldlabel
.getPage()
Getter for the fieldpage
.getPageUrl
(PageType pageType) getPi()
Getter for the fieldpi
.getTimeUpdatedAsString.getType()
Getter for the fieldtype
.getTypeAsString.Getter for the fieldupdatedBy
.boolean
hasArea()
hasArea.boolean
boolean
isEmpty()
Check if the resource has either a label or an annotation body with a typeboolean
boolean
isOnOtherPage
(PhysicalElement page) boolean
isOnThisPage
(PhysicalElement page) boolean
mayHaveArea.void
setAccessCondition
(String accessCondition) void
setAnnotationBody
(de.intranda.api.annotation.ITypedResource annotationBody) boolean
setAnnotationBody
(String json) void
setAreaString
(String areaString) Setter for the fieldareaString
.void
setCrowdsourcingModuleContent
(boolean crowdsourcingModuleContent) void
setDateUpdated
(LocalDateTime dateUpdated) Setter for the fielddateUpdated
.void
setDisplayCoordinates
(String displayCoordinates) Setter for the fielddisplayCoordinates
.void
setExtendendLabel
(String extendendLabel) void
Setter for the fieldid
.void
Setter for the fieldlabel
.void
Setter for the fieldpage
.void
Setter for the fieldpi
.void
Setter for the fieldtype
.void
setUpdatedBy
(User updatedBy) Setter for the fieldupdatedBy
.
-
Field Details
-
FORMAT
Constantformat
-
-
Constructor Details
-
DisplayUserGeneratedContent
public DisplayUserGeneratedContent()Default constructor (needed for persistence). -
DisplayUserGeneratedContent
-
-
Method Details
-
getId
Getter for the field
id
.- Returns:
- a
Long
object.
-
setId
Setter for the field
id
.- Parameters:
id
- aLong
object.
-
getType
Getter for the field
type
.- Returns:
- the type
-
setType
Setter for the field
type
.- Parameters:
type
- the type to set
-
getPi
Getter for the field
pi
.- Returns:
- the pi
-
setPi
Setter for the field
pi
.- Parameters:
pi
- the pi to set
-
getPage
Getter for the field
page
.- Returns:
- the page
-
setPage
Setter for the field
page
.- Parameters:
page
- the page to set
-
getLabel
Getter for the field
label
.- Returns:
- the label
-
setLabel
Setter for the field
label
.- Parameters:
label
- the label to set
-
getDisplayLabel
Returns thelabel
, if set, otherwisepi
.- Returns:
- a
String
object.
-
getExtendendLabel
- Returns:
- the extendendLabel
-
setExtendendLabel
- Parameters:
extendendLabel
- the extendendLabel to set
-
getUpdatedBy
Getter for the field
updatedBy
.- Returns:
- the updatedBy
-
setUpdatedBy
Setter for the field
updatedBy
.- Parameters:
updatedBy
- the updatedBy to set
-
getDateUpdated
Getter for the field
dateUpdated
.- Returns:
- the dateUpdated
-
getDateUpdatedAsString
getDateUpdatedAsString.
- Returns:
- a
String
object.
-
getTimeUpdatedAsString
getTimeUpdatedAsString.
- Returns:
- a
String
object.
-
setDateUpdated
Setter for the field
dateUpdated
.- Parameters:
dateUpdated
- the dateUpdated to set
-
getAccessCondition
- Returns:
- the accessCondition
-
setAccessCondition
- Parameters:
accessCondition
- the accessCondition to set
-
getAreaString
Getter for the field
areaString
.- Returns:
- the areaString
-
setAreaString
Setter for the field
areaString
.- Parameters:
areaString
- the areaString to set
-
hasArea
public boolean hasArea()hasArea.
- Returns:
- a boolean.
-
mayHaveArea
public boolean mayHaveArea()mayHaveArea.
- Returns:
- a boolean.
-
convertToIntArray
public static int[] convertToIntArray(double[] coordinates) convertToIntArray.
- Parameters:
coordinates
- int[]- Returns:
- int[]
-
convertToDoubleArray
public static double[] convertToDoubleArray(int[] coordinates) convertToDoubleArray.
- Parameters:
coordinates
- int[]- Returns:
- double[]
-
getDisplayCoordinates
Getter for the field
displayCoordinates
.- Returns:
- a
String
object.
-
setDisplayCoordinates
Setter for the field
displayCoordinates
.- Parameters:
displayCoordinates
- aString
object.
-
getDisplayPage
Alias forgetPage()
- Returns:
- a
Integer
object.
-
isEmpty
public boolean isEmpty()Check if the resource has either a label or an annotation body with a type- Returns:
- true if neither label nor annotation body exist
-
getTypeAsString
getTypeAsString.
- Returns:
- a
String
object.
-
getAnnotationBody
public de.intranda.api.annotation.ITypedResource getAnnotationBody()- Returns:
- the annotationBody
-
setAnnotationBody
public void setAnnotationBody(de.intranda.api.annotation.ITypedResource annotationBody) - Parameters:
annotationBody
- the annotationBody to set
-
setAnnotationBody
-
createJsonFromFeatures
-
buildFromSolrDoc
public static DisplayUserGeneratedContent buildFromSolrDoc(org.apache.solr.common.SolrDocument doc) throws IndexUnreachableException buildFromSolrDoc.
- Parameters:
doc
- aSolrDocument
object.- Returns:
- UserGeneratedContent generated from the given Solr document
- Throws:
IndexUnreachableException
- if any.
-
generateUgcLabel
Builds label out of user-generated content metadata.- Parameters:
se
- aStructElement
object.- Returns:
- the generated label
-
generateAddressLabel
- Parameters:
se
-text
-- Returns:
String
-
generateCorporationLabel
- Parameters:
se
-- Returns:
String
-
generatePersonLabel
-
isOnThisPage
-
isOnOtherPage
-
isOnAnyPage
public boolean isOnAnyPage() -
getIconClass
-
getPageUrl
-
getPageUrl
- Parameters:
pageType
-- Returns:
- Generated URL
-
isCrowdsourcingModuleContent
public boolean isCrowdsourcingModuleContent() -
setCrowdsourcingModuleContent
public void setCrowdsourcingModuleContent(boolean crowdsourcingModuleContent)
-