mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 00:55:32 +00:00
Better reverse link resoving
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package xmlmodels
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@@ -24,8 +24,13 @@ type Piece struct {
|
||||
AnnotationNote
|
||||
}
|
||||
|
||||
func (p Piece) Name() string {
|
||||
return "piece"
|
||||
}
|
||||
|
||||
func (p Piece) String() string {
|
||||
return fmt.Sprintf("ID: %s\nIssueRefs: %v\nPlaceRefs: %v\nCategoryRefs: %v\nAgentRefs: %v\nWorkRefs: %v\nPieceRefs: %v\nIncipit: %v\nTitle: %v\nAnnotations: %v\nNotes: %v\n", p.ID, p.IssueRefs, p.PlaceRefs, p.CategoryRefs, p.AgentRefs, p.WorkRefs, p.PieceRefs, p.Incipit, p.Title, p.Annotations, p.Notes)
|
||||
data, _ := json.MarshalIndent(p, "", " ")
|
||||
return string(data)
|
||||
}
|
||||
|
||||
func (p Piece) Keys() []string {
|
||||
|
||||
Reference in New Issue
Block a user