mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Search Index Build
This commit is contained in:
@@ -5,6 +5,10 @@ import (
|
||||
"encoding/xml"
|
||||
)
|
||||
|
||||
const (
|
||||
PLACE_TYPE = "place"
|
||||
)
|
||||
|
||||
type Place struct {
|
||||
XMLName xml.Name `xml:"ort"`
|
||||
Names []string `xml:"name"`
|
||||
@@ -22,3 +26,20 @@ func (p Place) String() string {
|
||||
data, _ := json.MarshalIndent(p, "", " ")
|
||||
return string(data)
|
||||
}
|
||||
|
||||
func (p Place) Readable(_ *Library) map[string]interface{} {
|
||||
ret := map[string]interface{}{
|
||||
"ID": p.ID,
|
||||
"Names": p.Names,
|
||||
}
|
||||
|
||||
for k, v := range p.AnnotationNote.Readable() {
|
||||
ret[k] = v
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func (p Place) Type() string {
|
||||
return PLACE_TYPE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user