Search Index Build

This commit is contained in:
Simon Martens
2025-02-17 21:42:20 +01:00
parent d109f7a040
commit fd2fa157b2
18 changed files with 611 additions and 16 deletions

View File

@@ -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
}