mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Better structure of files; introduced XML models
This commit is contained in:
21
xmlmodels/agents.go
Normal file
21
xmlmodels/agents.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package xmlmodels
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type Agent struct {
|
||||
XMLName xml.Name `xml:"akteur"`
|
||||
Names []string `xml:"name"`
|
||||
SortName string `xml:"sortiername"`
|
||||
Life string `xml:"lebensdaten"`
|
||||
GND string `xml:"gnd"`
|
||||
Org bool `xml:"org,attr"`
|
||||
Identifier
|
||||
AnnotationNote
|
||||
}
|
||||
|
||||
func (a Agent) String() string {
|
||||
return fmt.Sprintf("ID: %s\nNames: %v\nSortName: %s\nLife: %s\nGND: %s\nAnnotations: %v\nNotes: %v\n", a.ID, a.Names, a.SortName, a.Life, a.GND, a.Annotations, a.Notes)
|
||||
}
|
||||
Reference in New Issue
Block a user