dc

package
v0.0.0-...-f9b6ca6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 10

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

Constants

This section is empty.

Variables

View Source
var (
	NsDc = xmp.NewNamespace("dc", "http://purl.org/dc/elements/1.1/", NewModel)
)

Functions

func NewModel

func NewModel(name string) xmp.Model

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 MakeModel

func MakeModel(d *xmp.Document) (*DublinCore, error)

func (DublinCore) Can

func (x DublinCore) Can(nsName string) bool

func (*DublinCore) CanTag

func (x *DublinCore) CanTag(tag string) bool

func (*DublinCore) GetTag

func (x *DublinCore) GetTag(tag string) (string, error)

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

func (*DublinCore) SyncModel

func (x *DublinCore) SyncModel(d *xmp.Document) error

func (DublinCore) SyncToXMP

func (x DublinCore) SyncToXMP(d *xmp.Document) error

type LocaleArray

type LocaleArray []string

Locale

func (LocaleArray) Default

func (x LocaleArray) Default() string

func (LocaleArray) MarshalXMP

func (x LocaleArray) MarshalXMP(e *xmp.Encoder, node *xmp.Node, m xmp.Model) error

func (LocaleArray) Typ

func (x LocaleArray) Typ() xmp.ArrayType

func (*LocaleArray) UnmarshalXMP

func (x *LocaleArray) UnmarshalXMP(d *xmp.Decoder, node *xmp.Node, m xmp.Model) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL