Documentation ¶
Overview ¶
Package xmp implements the Extensible Metadata Platform (XMP) defined in ISO 16684-1:2011(E).
Index ¶
- Constants
- Variables
- func ConvertFilter(value string) reflect.Value
- func DumpStats()
- func GetLocaleField(v Model, lang string, name string) (string, error)
- func GetModelPath(v Model, path Path) (string, error)
- func GetNativeField(v Model, name string) (string, error)
- func Marshal(d *Document) ([]byte, error)
- func MarshalArray(e *Encoder, node *Node, typ ArrayType, items interface{}) error
- func MarshalIndent(d *Document, prefix, indent string) ([]byte, error)
- func Max(x, y int) int
- func Max64(x, y int64) int64
- func Min(x, y int) int
- func Min64(x, y int64) int64
- func NewName(local string) xml.Name
- func Register(ns *Namespace, groups ...NamespaceGroup)
- func ScanPackets(r io.Reader) ([][]byte, error)
- func SetAgent(org, software, version, extra string)
- func SetLocaleField(v Model, lang string, name, value string) error
- func SetLogLevel(l LogLevelType)
- func SetLogger(v Logger)
- func SetModelPath(v Model, path Path, value string, flags SyncFlags) error
- func SetNativeField(v Model, name, value string) error
- func ToRawString(t interface{}) (string, error)
- func ToString(t interface{}) string
- func Unmarshal(data []byte, d *Document) error
- func UnmarshalArray(d *Decoder, node *Node, typ ArrayType, out interface{}) error
- type AgentName
- type AltItem
- type AltString
- func (a *AltString) Add(lang string, value string)
- func (a *AltString) AddDefault(lang string, value string)
- func (a *AltString) AddUnique(lang string, value string) bool
- func (a AltString) Default() string
- func (a *AltString) EnsureDefault()
- func (a AltString) Get(lang string) string
- func (a AltString) Index(lang string) int
- func (x AltString) IsZero() bool
- func (x AltString) MarshalXMP(e *Encoder, node *Node, m Model) error
- func (a *AltString) RemoveLang(lang string)
- func (a *AltString) Set(lang string, value string)
- func (a AltString) Typ() ArrayType
- func (x *AltString) UnmarshalXMP(d *Decoder, node *Node, m Model) error
- type AltStringArray
- type Array
- type ArrayType
- type Attr
- type AttrList
- type Bool
- type ConverterFunc
- type Date
- type DateList
- type Decoder
- type Document
- func (d *Document) AddModel(v Model) (*Node, error)
- func (d *Document) Close()
- func (d *Document) Dump()
- func (d *Document) DumpNamespaces()
- func (d *Document) FilterNamespaces(keep NamespaceList) bool
- func (d *Document) FindModel(ns *Namespace) Model
- func (d *Document) FindNode(ns *Namespace) *Node
- func (d Document) FindNs(name, uri string) *Namespace
- func (d *Document) GetPath(path Path) (string, error)
- func (d Document) IsDirty() bool
- func (d *Document) ListPaths() (PathValueList, error)
- func (d *Document) MakeModel(ns *Namespace) (Model, error)
- func (d *Document) MarshalJSON() ([]byte, error)
- func (d *Document) Merge(b *Document, flags SyncFlags) error
- func (d *Document) Namespaces() NamespaceList
- func (d *Document) Nodes() NodeList
- func (d *Document) RemoveNamespace(ns *Namespace) bool
- func (d *Document) RemoveNamespaceByName(n string) bool
- func (d *Document) RemoveNamespaces(remove NamespaceList) bool
- func (d *Document) SetDirty()
- func (d *Document) SetPath(desc PathValue) error
- func (d *Document) Sync(sPath, dPath Path, flags SyncFlags, v Model, f ConverterFunc) error
- func (d *Document) SyncModels() error
- func (d *Document) SyncMulti(desc SyncDescList, m Model) error
- func (d *Document) UnmarshalJSON(data []byte) error
- type DocumentArray
- type Duration
- func (d Duration) Duration() time.Duration
- func (d Duration) MarshalText() ([]byte, error)
- func (d Duration) RoundToDays() int
- func (d Duration) RoundToHours() int64
- func (d Duration) RoundToMillisecond() int64
- func (d Duration) RoundToMinutes() int64
- func (d Duration) RoundToSeconds() int64
- func (d Duration) String() string
- func (d Duration) Truncate(r time.Duration) Duration
- func (d *Duration) UnmarshalJSON(data []byte) error
- func (d *Duration) UnmarshalText(data []byte) error
- type Encoder
- type Extension
- func (x *Extension) FindNodeByName(name string) *Node
- func (x *Extension) IsZero() bool
- func (x *Extension) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (x Extension) MarshalXMP(e *Encoder, node *Node, m Model) error
- func (x *Extension) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (x *Extension) UnmarshalXMP(d *Decoder, src *Node, m Model) error
- func (x *Extension) UnmarshalXMPAttr(d *Decoder, a Attr) error
- type ExtensionArray
- type Filter
- type GPSCoord
- type GUID
- type GUIDList
- type IntArray
- type IntList
- type LogLevelType
- type LogType
- func (x LogType) Debug(v ...interface{})
- func (x LogType) Debugf(s string, v ...interface{})
- func (x LogType) Error(v ...interface{})
- func (x LogType) Errorf(s string, v ...interface{})
- func (x LogType) Info(v ...interface{})
- func (x LogType) Infof(s string, v ...interface{})
- func (x LogType) Warn(v ...interface{})
- func (x LogType) Warnf(s string, v ...interface{})
- type Logger
- type Marshaler
- type MarshalerAttr
- type Model
- type ModelFactory
- type NamedExtensionArray
- type Namespace
- func (n Namespace) Expand(local string) string
- func (n Namespace) GetAttr() Attr
- func (n Namespace) GetName() string
- func (n Namespace) GetURI() string
- func (n Namespace) MatchAttrName(name string) bool
- func (n Namespace) MatchXMLName(name xml.Name) bool
- func (n Namespace) NewModel() Model
- func (n Namespace) RootName() xml.Name
- func (n Namespace) Split(name string) string
- func (n Namespace) XMLName(local string) xml.Name
- type NamespaceGroup
- type NamespaceGroupList
- type NamespaceList
- type Node
- func (n *Node) AddAttr(attr Attr)
- func (n *Node) AddNode(x *Node) *Node
- func (n *Node) AddStringAttr(name, value string)
- func (n *Node) AppendNode(x *Node) *Node
- func (n Node) ArrayType() ArrayType
- func (n *Node) Clear()
- func (n *Node) Close()
- func (n Node) Dump(d int)
- func (n *Node) FullName() string
- func (n *Node) GetAttr(ns, name string) []Attr
- func (n *Node) GetPath(path Path) (string, error)
- func (n Node) IsArray() bool
- func (n *Node) IsZero() bool
- func (n *Node) ListPaths(path Path) (PathValueList, error)
- func (n *Node) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (n *Node) Name() string
- func (n *Node) Namespace() string
- func (n *Node) Namespaces(d *Document) NamespaceList
- func (n *Node) RemoveNode(x *Node) *Node
- func (n *Node) SetPath(path Path, value string, flags SyncFlags) error
- func (n *Node) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- type NodeList
- type NullBool
- type NullFloat
- type NullFloat64
- type NullInt
- type NullString
- type Path
- func (x Path) AppendIndex(i int) Path
- func (x Path) AppendIndexString(s string) Path
- func (x Path) Fields() []string
- func (x Path) IsXmpPath() bool
- func (x Path) Len() int
- func (x Path) MatchNamespace(ns *Namespace) bool
- func (x Path) Namespace(d *Document) (*Namespace, error)
- func (x Path) NamespacePrefix() string
- func (x Path) PeekNamespacePrefix() string
- func (x Path) Pop() (string, Path)
- func (x Path) PopFront() (string, Path)
- func (x Path) Push(segment ...string) Path
- func (x Path) String() string
- func (x *Path) UnmarshalText(data []byte) error
- type PathValue
- type PathValueList
- type Rational
- type RationalArray
- type Registry
- func (r *Registry) GetGroupNamespaces(group NamespaceGroup) (NamespaceList, error)
- func (r *Registry) GetNamespace(prefix string) (*Namespace, error)
- func (r *Registry) GetPrefix(uri string) string
- func (r *Registry) Namespaces() NamespaceList
- func (r *Registry) Prefixes() []string
- func (r *Registry) RegisterNamespace(ns *Namespace, groups NamespaceGroupList)
- func (r *Registry) Short(uri, name string) string
- type SplitInt
- type StringArray
- func (x *StringArray) Add(v string) error
- func (x *StringArray) AddUnique(v string) error
- func (x *StringArray) Contains(v string) bool
- func (x *StringArray) Index(val string) int
- func (x StringArray) IsZero() bool
- func (x StringArray) MarshalText() ([]byte, error)
- func (x StringArray) MarshalXMP(e *Encoder, node *Node, m Model) error
- func (x *StringArray) Remove(v string)
- func (x StringArray) Typ() ArrayType
- func (x *StringArray) UnmarshalText(data []byte) error
- func (x *StringArray) UnmarshalXMP(d *Decoder, node *Node, m Model) error
- type StringList
- func (x *StringList) Add(v string) error
- func (x *StringList) AddUnique(v string) error
- func (x *StringList) Contains(v string) bool
- func (x *StringList) Index(val string) int
- func (x StringList) IsZero() bool
- func (x StringList) MarshalText() ([]byte, error)
- func (x StringList) MarshalXMP(e *Encoder, node *Node, m Model) error
- func (x *StringList) Remove(v string)
- func (x StringList) Typ() ArrayType
- func (x *StringList) UnmarshalText(data []byte) error
- func (x *StringList) UnmarshalXMP(d *Decoder, node *Node, m Model) error
- type SyncDesc
- type SyncDescList
- type SyncFlags
- type Tag
- type TagList
- type Time
- type UnknownNamespaceError
- type Unmarshaler
- type UnmarshalerAttr
- type Uri
- type UriArray
- type UriList
- type Url
- type UrlArray
- type UrlList
- type Version
- type Zero
Constants ¶
const ( Xpacket = 1 << iota Xpadding )
const ( CREATE SyncFlags = 1 << iota // create when not exist, nothing when exist or source is empty REPLACE // replace when dest exist, nothing when missing or source is empty DELETE // clear dest when source value is empty APPEND // list-only: append non-empty source value UNIQUE // list-only: append non-empty unique source value NOFAIL // don't fail when state+op+flags don't match DEFAULT = CREATE | REPLACE | DELETE | UNIQUE MERGE = CREATE | UNIQUE | NOFAIL EXTEND = CREATE | REPLACE | UNIQUE | NOFAIL ADD = CREATE | UNIQUE | NOFAIL )
const XMP_TOOLKIT_VERSION = "Go XMP SDK 1.0"
Variables ¶
var EEmptyValue = errors.New("empty value")
var EmptyName = xml.Name{}
var ErrOverflow = errors.New("xmp: document exceeds size limit")
Functions ¶
func ConvertFilter ¶
converter function for Gorilla schema; will become unnecessary once https://github.com/gorilla/schema/issues/57 is fixed
register with decoder.RegisterConverter(Filter(""), ConvertFilter)
func MarshalArray ¶
func Register ¶
func Register(ns *Namespace, groups ...NamespaceGroup)
func SetLogLevel ¶
func SetLogLevel(l LogLevelType)
func SetNativeField ¶
func ToRawString ¶
Types ¶
type AltItem ¶
type AltItem struct { Value string `xmp:",chardata" json:"value"` Lang string `xmp:"xml:lang" json:"lang"` IsDefault bool `xmp:"-" json:"isDefault"` }
Note: when changing these tags, also update json.go for proper marshal/demarshal
func (*AltItem) UnmarshalText ¶
type AltString ¶
type AltString []AltItem
func NewAltString ¶
func NewAltString(items ...interface{}) AltString
func (*AltString) AddDefault ¶
func (*AltString) EnsureDefault ¶
func (a *AltString) EnsureDefault()
make sure there is exactly one a default and it's the first item
func (*AltString) RemoveLang ¶
type AltStringArray ¶
type AltStringArray []*AltString
func NewAltStringArray ¶
func NewAltStringArray(items ...*AltString) AltStringArray
func (*AltStringArray) Add ¶
func (x *AltStringArray) Add(v *AltString) error
func (AltStringArray) IsZero ¶
func (x AltStringArray) IsZero() bool
func (AltStringArray) MarshalXMP ¶
func (x AltStringArray) MarshalXMP(e *Encoder, node *Node, m Model) error
func (AltStringArray) Typ ¶
func (x AltStringArray) Typ() ArrayType
func (*AltStringArray) UnmarshalXMP ¶
func (x *AltStringArray) UnmarshalXMP(d *Decoder, node *Node, m Model) error
type Bool ¶
type Bool bool
8.2.1.1 Boolean
func (Bool) MarshalJSON ¶
func (Bool) MarshalText ¶
func (*Bool) UnmarshalText ¶
type ConverterFunc ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) DecodeElement ¶
func (*Decoder) SetVersion ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func (*Document) DumpNamespaces ¶
func (d *Document) DumpNamespaces()
func (*Document) FilterNamespaces ¶
func (d *Document) FilterNamespaces(keep NamespaceList) bool
will keep document nodes matching the list and delete all others. returns true if any namespace was removed.
func (*Document) ListPaths ¶
func (d *Document) ListPaths() (PathValueList, error)
func (*Document) MarshalJSON ¶
func (*Document) Namespaces ¶
func (d *Document) Namespaces() NamespaceList
func (*Document) RemoveNamespace ¶
func (*Document) RemoveNamespaceByName ¶
func (*Document) RemoveNamespaces ¶
func (d *Document) RemoveNamespaces(remove NamespaceList) bool
will delete all document nodes matching the list
func (*Document) SyncModels ¶
cross-model sync, must be explicitly called to merge across models
func (*Document) SyncMulti ¶
func (d *Document) SyncMulti(desc SyncDescList, m Model) error
Model is optional and exists for performance reasons to avoid lookups when a sync destination is a specific model only (useful to implement SyncFromXMP() in models)
func (*Document) UnmarshalJSON ¶
The difference to regular JSON decoding is that we must take care of unknown properties that Go's JSON decoder simply ignores. In our XMP model we capture everything unknown in child nodes. Note: due to internal namespace lookups we cannot use node attributes, because attribute unmarshal will fail for all unknown namespaces.
type DocumentArray ¶
type DocumentArray []*Document
func (DocumentArray) MarshalXMP ¶
func (x DocumentArray) MarshalXMP(e *Encoder, node *Node, m Model) error
func (DocumentArray) Typ ¶
func (x DocumentArray) Typ() ArrayType
func (*DocumentArray) UnmarshalXMP ¶
func (x *DocumentArray) UnmarshalXMP(d *Decoder, node *Node, m Model) error
type Duration ¶
Duration
func ParseDuration ¶
func (Duration) MarshalText ¶
func (Duration) RoundToDays ¶
func (Duration) RoundToHours ¶
func (Duration) RoundToMillisecond ¶
func (Duration) RoundToMinutes ¶
func (Duration) RoundToSeconds ¶
func (*Duration) UnmarshalJSON ¶
func (*Duration) UnmarshalText ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func (*Encoder) EncodeElement ¶
func (*Encoder) SetMaxSize ¶
type Extension ¶
type Extension Node
Raw nodes are used to keep custom data models inside a container. This is used by extension nodes in the Adobe UMC SDK, but may be used in private models as well.
func (*Extension) FindNodeByName ¶
func (*Extension) MarshalXML ¶
func (*Extension) UnmarshalXML ¶
func (*Extension) UnmarshalXMP ¶
type ExtensionArray ¶
type ExtensionArray []*Extension
used for xmpMM:Pantry bags
<xmpMM:Pantry>
<rdf:Bag> <rdf:li> <rdf:Description>...</rdf:Description> </rdf:li> </rdf:Bag>
</xmpMM:Pantry>
func (ExtensionArray) MarshalXMP ¶
func (x ExtensionArray) MarshalXMP(e *Encoder, node *Node, m Model) error
func (ExtensionArray) Typ ¶
func (x ExtensionArray) Typ() ArrayType
func (*ExtensionArray) UnmarshalXMP ¶
func (x *ExtensionArray) UnmarshalXMP(d *Decoder, node *Node, m Model) error
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func NewFilter ¶
func NewFilter(include, exclude NamespaceList) *Filter
func ParseFilter ¶
func ParseFilterStrict ¶
func (*Filter) UnmarshalText ¶
type GPSCoord ¶
type GPSCoord string
GPS Coordinates
“DDD,MM,SSk” or “DDD,MM.mmk”
DDD is a number of degrees MM is a number of minutes SS is a number of seconds mm is a fraction of minutes k is a single character N, S, E, or W indicating a direction (north, south, east, west)
type GUID ¶
type GUID string
8.2.2.3 GUID (a simple non-Uri identifier)
func (GUID) MarshalText ¶
func (*GUID) UnmarshalText ¶
type LogLevelType ¶
type LogLevelType int
const ( LogLevelInvalid LogLevelType = iota LogLevelDebug LogLevelInfo LogLevelWarning LogLevelError )
func (LogLevelType) Prefix ¶
func (l LogLevelType) Prefix() string
type Logger ¶
type MarshalerAttr ¶
type Model ¶
type Model interface { Can(nsName string) bool Namespaces() NamespaceList SyncFromXMP(d *Document) error SyncToXMP(d *Document) error SyncModel(d *Document) error CanTag(tag string) bool GetTag(tag string) (string, error) SetTag(tag, value string) error }
interface for data models
type ModelFactory ¶
type NamedExtensionArray ¶
type NamedExtensionArray []*Extension
Generates the following XMP/JSON structures from an array instead of xmp:<rdf:Bag> / json:[]
<iXML:extension>
<PRIVATE-NAME-1 rdf:parseType="Resource"> <PRIVATE-FIELD/> </PRIVATE-NAME-1> <PRIVATE-NAME-2 rdf:parseType="Resource"> <PRIVATE-FIELD/> </PRIVATE-NAME-2>
</iXML:extension>
iXML:extension: { "PRIVATE-NAME-1": { "PRIVATE-FIELD": "", }, "PRIVATE-NAME-2": { "PRIVATE-FIELD": "", } }
func (*NamedExtensionArray) FindNodeByName ¶
func (x *NamedExtensionArray) FindNodeByName(name string) *Node
func (NamedExtensionArray) MarshalXMP ¶
func (x NamedExtensionArray) MarshalXMP(e *Encoder, node *Node, m Model) error
func (NamedExtensionArray) Typ ¶
func (x NamedExtensionArray) Typ() ArrayType
func (*NamedExtensionArray) UnmarshalXMP ¶
func (x *NamedExtensionArray) UnmarshalXMP(d *Decoder, node *Node, m Model) error
type Namespace ¶
type Namespace struct { Name string URI string Factory ModelFactory }
func GetNamespace ¶
func NewNamespace ¶
func NewNamespace(name, uri string, factory ModelFactory) *Namespace
func (Namespace) MatchAttrName ¶
type NamespaceGroup ¶
type NamespaceGroup string
Namespace Groups
const ( NoMetadata NamespaceGroup = "" XmpMetadata NamespaceGroup = "xmp" ImageMetadata NamespaceGroup = "image" MusicMetadata NamespaceGroup = "music" MovieMetadata NamespaceGroup = "movie" SoundMetadata NamespaceGroup = "sound" CameraMetadata NamespaceGroup = "camera" VfxMetadata NamespaceGroup = "vfx" RightsMetadata NamespaceGroup = "rights" )
func ParseNamespaceGroup ¶
func ParseNamespaceGroup(s string) NamespaceGroup
func (NamespaceGroup) Contains ¶
func (g NamespaceGroup) Contains(ns *Namespace) bool
func (NamespaceGroup) Namespaces ¶
func (g NamespaceGroup) Namespaces() NamespaceList
type NamespaceGroupList ¶
type NamespaceGroupList []NamespaceGroup
func (NamespaceGroupList) Contains ¶
func (l NamespaceGroupList) Contains(ns *Namespace) bool
type NamespaceList ¶
type NamespaceList []*Namespace
func GetGroupNamespaces ¶
func GetGroupNamespaces(group NamespaceGroup) (NamespaceList, error)
func (NamespaceList) Contains ¶
func (l NamespaceList) Contains(ns *Namespace) bool
func (NamespaceList) ContainsName ¶
func (l NamespaceList) ContainsName(n string) bool
func (*NamespaceList) RemoveDups ¶
func (l *NamespaceList) RemoveDups() NamespaceList
type Node ¶
type Node struct { XMLName xml.Name // node name and namespace Attr AttrList // captures all unbound attributes and XMP qualifiers Model Model // XmpCore, DublinCore, etc Value string Nodes NodeList // child nodes }
func (*Node) AddStringAttr ¶
keep list of attributes unique, overwrite value when names equal
func (*Node) MarshalXML ¶
func (*Node) Namespaces ¶
func (n *Node) Namespaces(d *Document) NamespaceList
func (*Node) RemoveNode ¶
func (*Node) UnmarshalXML ¶
type NodeList ¶
type NodeList []*Node
func (*NodeList) AppendNode ¶
func (*NodeList) FindNodeByName ¶
func (*NodeList) RemoveNode ¶
type NullBool ¶
type NullBool bool
Bool
func ParseNullBool ¶
func (NullBool) MarshalJSON ¶
func (NullBool) MarshalText ¶
func (*NullBool) UnmarshalJSON ¶
func (*NullBool) UnmarshalText ¶
type NullFloat ¶
type NullFloat float32
Float32
func ParseNullFloat ¶
func (NullFloat) MarshalJSON ¶
JSON does not define NaN, +Inf and -Inf
func (NullFloat) MarshalText ¶
func (*NullFloat) UnmarshalJSON ¶
func (*NullFloat) UnmarshalText ¶
type NullFloat64 ¶
type NullFloat64 float64
Float64
func ParseNullFloat64 ¶
func ParseNullFloat64(d string) (NullFloat64, error)
func (NullFloat64) Float64 ¶
func (f NullFloat64) Float64() float64
func (NullFloat64) MarshalJSON ¶
func (f NullFloat64) MarshalJSON() ([]byte, error)
JSON does not define NaN, +Inf and -Inf
func (NullFloat64) MarshalText ¶
func (f NullFloat64) MarshalText() ([]byte, error)
func (*NullFloat64) UnmarshalJSON ¶
func (f *NullFloat64) UnmarshalJSON(data []byte) error
func (*NullFloat64) UnmarshalText ¶
func (f *NullFloat64) UnmarshalText(data []byte) error
func (NullFloat64) Value ¶
func (f NullFloat64) Value() float64
type NullInt ¶
type NullInt int
Int
func ParseNullInt ¶
func (NullInt) MarshalJSON ¶
func (NullInt) MarshalText ¶
func (*NullInt) UnmarshalJSON ¶
func (*NullInt) UnmarshalText ¶
type NullString ¶
type NullString string
String
func ParseNullString ¶
func ParseNullString(s string) (NullString, error)
func (NullString) MarshalText ¶
func (s NullString) MarshalText() ([]byte, error)
func (NullString) String ¶
func (s NullString) String() string
func (*NullString) UnmarshalText ¶
func (s *NullString) UnmarshalText(data []byte) error
func (NullString) Value ¶
func (s NullString) Value() string
type Path ¶
type Path string
func (Path) AppendIndex ¶
func (Path) AppendIndexString ¶
func (Path) MatchNamespace ¶
func (Path) NamespacePrefix ¶
func (Path) PeekNamespacePrefix ¶
func (*Path) UnmarshalText ¶
type PathValueList ¶
type PathValueList []PathValue
func ListModelPaths ¶
func ListModelPaths(v Model) (PathValueList, error)
func (*PathValueList) Add ¶
func (x *PathValueList) Add(p Path, v string)
func (PathValueList) Diff ¶
func (x PathValueList) Diff(y PathValueList) PathValueList
func (PathValueList) Find ¶
func (x PathValueList) Find(p Path) *PathValue
type Rational ¶
Rational "n/m"
func FloatToRational ¶
Beware: primitive conversion algorithm
func (Rational) MarshalText ¶
func (*Rational) UnmarshalText ¶
type RationalArray ¶
type RationalArray []Rational
func NewRationalArray ¶
func NewRationalArray(items ...Rational) RationalArray
func (RationalArray) MarshalXMP ¶
func (a RationalArray) MarshalXMP(e *Encoder, node *Node, m Model) error
func (RationalArray) Typ ¶
func (a RationalArray) Typ() ArrayType
func (*RationalArray) UnmarshalXMP ¶
func (a *RationalArray) UnmarshalXMP(d *Decoder, node *Node, m Model) error
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) GetGroupNamespaces ¶
func (r *Registry) GetGroupNamespaces(group NamespaceGroup) (NamespaceList, error)
func (*Registry) Namespaces ¶
func (r *Registry) Namespaces() NamespaceList
func (*Registry) RegisterNamespace ¶
func (r *Registry) RegisterNamespace(ns *Namespace, groups NamespaceGroupList)
type SplitInt ¶
type SplitInt uint32
32bit Integer split byte-wise (06:13:14:61)
func (*SplitInt) UnmarshalText ¶
type StringArray ¶
type StringArray []string
Unordered String Arrays
func NewStringArray ¶
func NewStringArray(items ...string) StringArray
func (*StringArray) Add ¶
func (x *StringArray) Add(v string) error
func (*StringArray) AddUnique ¶
func (x *StringArray) AddUnique(v string) error
func (*StringArray) Contains ¶
func (x *StringArray) Contains(v string) bool
func (*StringArray) Index ¶
func (x *StringArray) Index(val string) int
func (StringArray) IsZero ¶
func (x StringArray) IsZero() bool
func (StringArray) MarshalText ¶
func (x StringArray) MarshalText() ([]byte, error)
func (StringArray) MarshalXMP ¶
func (x StringArray) MarshalXMP(e *Encoder, node *Node, m Model) error
func (*StringArray) Remove ¶
func (x *StringArray) Remove(v string)
func (StringArray) Typ ¶
func (x StringArray) Typ() ArrayType
func (*StringArray) UnmarshalText ¶
func (x *StringArray) UnmarshalText(data []byte) error
func (*StringArray) UnmarshalXMP ¶
func (x *StringArray) UnmarshalXMP(d *Decoder, node *Node, m Model) error
type StringList ¶
type StringList []string
Ordered String Arrays
func NewStringList ¶
func NewStringList(items ...string) StringList
func (*StringList) Add ¶
func (x *StringList) Add(v string) error
func (*StringList) AddUnique ¶
func (x *StringList) AddUnique(v string) error
func (*StringList) Contains ¶
func (x *StringList) Contains(v string) bool
func (*StringList) Index ¶
func (x *StringList) Index(val string) int
func (StringList) IsZero ¶
func (x StringList) IsZero() bool
func (StringList) MarshalText ¶
func (x StringList) MarshalText() ([]byte, error)
func (StringList) MarshalXMP ¶
func (x StringList) MarshalXMP(e *Encoder, node *Node, m Model) error
func (*StringList) Remove ¶
func (x *StringList) Remove(v string)
func (StringList) Typ ¶
func (x StringList) Typ() ArrayType
func (*StringList) UnmarshalText ¶
func (x *StringList) UnmarshalText(data []byte) error
func (*StringList) UnmarshalXMP ¶
func (x *StringList) UnmarshalXMP(d *Decoder, node *Node, m Model) error
type SyncDesc ¶
type SyncDesc struct { Source Path Dest Path Flags SyncFlags Convert ConverterFunc }
type SyncDescList ¶
type SyncDescList []*SyncDesc
type SyncFlags ¶
type SyncFlags int
func ParseSyncFlag ¶
func ParseSyncFlags ¶
func (*SyncFlags) UnmarshalText ¶
type UnknownNamespaceError ¶
func (*UnknownNamespaceError) Error ¶
func (e *UnknownNamespaceError) Error() string
type Unmarshaler ¶
type UnmarshalerAttr ¶
type Uri ¶
type Uri string
8.2.2.10 Uri (Note: special handling as rdf:resource attribute without node content)