Class DisplayUserGeneratedContent
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor (needed for persistence). -
Method Summary
Modifier and TypeMethodDescriptionstatic DisplayUserGeneratedContentbuildFromSolrDoc(org.apache.solr.common.SolrDocument doc) buildFromSolrDoc.static double[]convertToDoubleArray(int[] coordinates) convertToDoubleArray.static int[]convertToIntArray(double[] coordinates) convertToIntArray.static StringcreateJsonFromFeatures(Object value) static StringgenerateAddressLabel(StructElement se, String text) static Stringstatic Stringstatic StringBuilds label out of user-generated content metadata.de.intranda.api.annotation.ITypedResourceGetter for the fieldareaString.Getter for the fielddateUpdated.getDateUpdatedAsString.Getter for the fielddisplayCoordinates.Returns thelabel, if set, otherwisepi.Alias forgetPage()Deprecated.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.booleanhasArea()hasArea.booleanbooleanisEmpty()Check if the resource has either a label or an annotation body with a typebooleanbooleanisOnOtherPage(PhysicalElement page) booleanisOnThisPage(PhysicalElement page) booleanmayHaveArea.voidsetAccessCondition(String accessCondition) voidsetAnnotationBody(de.intranda.api.annotation.ITypedResource annotationBody) booleansetAnnotationBody(String json) voidsetAreaString(String areaString) Setter for the fieldareaString.voidsetCrowdsourcingModuleContent(boolean crowdsourcingModuleContent) voidsetDateUpdated(LocalDateTime dateUpdated) Setter for the fielddateUpdated.voidsetDisplayCoordinates(String displayCoordinates) Setter for the fielddisplayCoordinates.voidsetExtendendLabel(String extendendLabel) voidSetter for the fieldid.voidSetter for the fieldlabel.voidSetter for the fieldpage.voidSetter for the fieldpi.voidSetter for the fieldtype.voidsetUpdatedBy(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
Longobject.
-
setId
Setter for the field
id.- Parameters:
id- aLongobject.
-
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
Stringobject.
-
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
Stringobject.
-
getTimeUpdatedAsString
getTimeUpdatedAsString.
- Returns:
- a
Stringobject.
-
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
Stringobject.
-
setDisplayCoordinates
Setter for the field
displayCoordinates.- Parameters:
displayCoordinates- aStringobject.
-
getDisplayPage
Alias forgetPage()- Returns:
- a
Integerobject.
-
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
Stringobject.
-
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- aSolrDocumentobject.- Returns:
- UserGeneratedContent generated from the given Solr document
- Throws:
IndexUnreachableException- if any.
-
generateUgcLabel
Builds label out of user-generated content metadata.- Parameters:
se- aStructElementobject.- Returns:
- the generated label
-
generateAddressLabel
- Parameters:
se-text-- Returns:
String
-
generateCorporationLabel
- Parameters:
se-- Returns:
String
-
generatePersonLabel
-
isOnThisPage
-
isOnOtherPage
-
isOnAnyPage
public boolean isOnAnyPage() -
getIconName
-
getIconClass
Deprecated.usegetIconName()and Tabler icons instead of Font Awesome.- Returns:
String
-
getPageUrl
-
getPageUrl
- Parameters:
pageType-- Returns:
- Generated URL
-
isCrowdsourcingModuleContent
public boolean isCrowdsourcingModuleContent() -
setCrowdsourcingModuleContent
public void setCrowdsourcingModuleContent(boolean crowdsourcingModuleContent)
-
getIconName()and Tabler icons instead of Font Awesome.