mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Finalized resolver
This commit is contained in:
@@ -2,18 +2,16 @@ package xmlmodels
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
type Reference struct {
|
||||
Ref string `xml:"ref,attr"`
|
||||
Category string `xml:"kat,attr"`
|
||||
Unsicher bool `xml:"unsicher,attr"`
|
||||
Value
|
||||
}
|
||||
|
||||
type AgentRef struct {
|
||||
XMLName xml.Name `xml:"akteur"`
|
||||
Reference
|
||||
}
|
||||
|
||||
func (ar AgentRef) Name() string {
|
||||
var x Agent
|
||||
return x.Name()
|
||||
}
|
||||
|
||||
type IssueRef struct {
|
||||
XMLName xml.Name `xml:"stueck"`
|
||||
Nr int `xml:"nr,attr"`
|
||||
@@ -24,24 +22,49 @@ type IssueRef struct {
|
||||
Reference // Nicht im Schema
|
||||
}
|
||||
|
||||
func (ir IssueRef) Name() string {
|
||||
var x Issue
|
||||
return x.Name()
|
||||
}
|
||||
|
||||
type PlaceRef struct {
|
||||
XMLName xml.Name `xml:"ort"`
|
||||
Reference
|
||||
}
|
||||
|
||||
func (pr PlaceRef) Name() string {
|
||||
var x Place
|
||||
return x.Name()
|
||||
}
|
||||
|
||||
type CategoryRef struct {
|
||||
XMLName xml.Name `xml:"kategorie"`
|
||||
Reference
|
||||
}
|
||||
|
||||
func (cr CategoryRef) Name() string {
|
||||
var x Category
|
||||
return x.Name()
|
||||
}
|
||||
|
||||
type WorkRef struct {
|
||||
XMLName xml.Name `xml:"werk"`
|
||||
Page string `xml:"s,attr"`
|
||||
Reference
|
||||
}
|
||||
|
||||
func (wr WorkRef) Name() string {
|
||||
var x Work
|
||||
return x.Name()
|
||||
}
|
||||
|
||||
type PieceRef struct {
|
||||
XMLName xml.Name `xml:"beitrag"`
|
||||
Page string `xml:"s,attr"`
|
||||
Reference
|
||||
}
|
||||
|
||||
func (pr PieceRef) Name() string {
|
||||
var x Piece
|
||||
return x.Name()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user