Documentation ¶
Overview ¶
Package dc implements Dublin Core metadata as defined in XMP Specification Part 1.
Package dc implements Dublin Core metadata as defined in XMP Specification Part 1.
Index ¶
- Variables
- func NewModel(name string) xmp.Model
- type DataType
- type DublinCore
- func (x DublinCore) Can(nsName string) bool
- func (x *DublinCore) CanTag(tag string) bool
- func (x *DublinCore) GetTag(tag string) (string, error)
- func (x DublinCore) Namespaces() xmp.NamespaceList
- func (x *DublinCore) SetTag(tag, value string) error
- func (x *DublinCore) SyncFromXMP(d *xmp.Document) error
- func (x *DublinCore) SyncModel(d *xmp.Document) error
- func (x DublinCore) SyncToXMP(d *xmp.Document) error
- type LocaleArray
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NsDc = xmp.NewNamespace("dc", "http://purl.org/dc/elements/1.1/", NewModel)
)
Functions ¶
Types ¶
type DataType ¶
type DataType string
const ( DataTypeCollection DataType = "Collection" // Collection DataTypeDataset DataType = "Dataset" // Dataset DataTypeEvent DataType = "Event" // Event DataTypeImage DataType = "Image" // Image DataTypeInteractive DataType = "Interactive Resource" // Interactive Resource DataTypeMoving DataType = "Moving" // Moving Image DataTypePhysical DataType = "Physical Object" // Physical Object DataTypeService DataType = "Service" // Service DataTypeSoftware DataType = "Software" // Software DataTypeSound DataType = "Sound" // Sound DataTypeStillImage DataType = "Still Image" // Still Image DataTypeText DataType = "Text" // Text )
type DublinCore ¶
type DublinCore struct { Contributor xmp.StringArray `xmp:"dc:contributor"` Coverage string `xmp:"dc:coverage"` Creator xmp.StringList `xmp:"dc:creator"` Date xmp.DateList `xmp:"dc:date"` Description xmp.AltString `xmp:"dc:description"` Format string `xmp:"dc:format"` Identifier string `xmp:"dc:identifier"` Language LocaleArray `xmp:"dc:language"` Publisher xmp.StringArray `xmp:"dc:publisher"` Relation xmp.StringArray `xmp:"dc:relation"` Rights xmp.AltString `xmp:"dc:rights"` Source string `xmp:"dc:source"` Subject xmp.StringArray `xmp:"dc:subject"` Title xmp.AltString `xmp:"dc:title"` Type xmp.StringArray `xmp:"dc:type"` }
Note: differences from vanilla Dublin Core are - Date is an array instead of a simple string - Kanguage is an array instead of a simple string
func FindModel ¶
func FindModel(d *xmp.Document) *DublinCore
func (DublinCore) Can ¶
func (x DublinCore) Can(nsName string) bool
func (*DublinCore) CanTag ¶
func (x *DublinCore) CanTag(tag string) bool
func (DublinCore) Namespaces ¶
func (x DublinCore) Namespaces() xmp.NamespaceList
func (*DublinCore) SetTag ¶
func (x *DublinCore) SetTag(tag, value string) error
func (*DublinCore) SyncFromXMP ¶
func (x *DublinCore) SyncFromXMP(d *xmp.Document) error
type LocaleArray ¶
type LocaleArray []string
Locale
func (LocaleArray) Default ¶
func (x LocaleArray) Default() string
func (LocaleArray) MarshalXMP ¶
func (LocaleArray) Typ ¶
func (x LocaleArray) Typ() xmp.ArrayType
func (*LocaleArray) UnmarshalXMP ¶
Click to show internal directories.
Click to hide internal directories.