Documentation ¶
Overview ¶
Package xmpmm implements the XMP Media Management namespace as defined by XMP Specification Part 2.
Package xmpmm implements the XMP Media Management namespace as defined by XMP Specification Part 2.
Index ¶
- Variables
- func NewModel(name string) xmp.Model
- type ActionType
- type ResourceEvent
- type ResourceEventArray
- type ResourceRef
- type ResourceRefArray
- func (x *ResourceRefArray) DeleteIndex(idx int)
- func (x ResourceRefArray) Index(did xmp.GUID) int
- func (x ResourceRefArray) MarshalXMP(e *xmp.Encoder, node *xmp.Node, m xmp.Model) error
- func (x ResourceRefArray) Typ() xmp.ArrayType
- func (x *ResourceRefArray) UnmarshalXMP(d *xmp.Decoder, node *xmp.Node, m xmp.Model) error
- type StVersion
- type StVersionArray
- type XmpMM
- func (x *XmpMM) AddHistory(e *ResourceEvent)
- func (x *XmpMM) AddPantry(d *xmp.Document)
- func (x *XmpMM) AddVersion(v *StVersion)
- func (x *XmpMM) AppendVersionHistory(action ActionType, modifier, changed string, date xmp.Date)
- func (x XmpMM) Can(nsName string) bool
- func (x *XmpMM) CanTag(tag string) bool
- func (x *XmpMM) GetLastEvent() *ResourceEvent
- func (x *XmpMM) GetLastVersion() *StVersion
- func (x *XmpMM) GetLastVersionId() string
- func (x *XmpMM) GetPreviousVersion() *StVersion
- func (x *XmpMM) GetPreviousVersionId() string
- func (x *XmpMM) GetTag(tag string) (string, error)
- func (x XmpMM) Namespaces() xmp.NamespaceList
- func (x *XmpMM) SelfResourceRef(version string) *ResourceRef
- func (x *XmpMM) SetPreviousVersionId(version string)
- func (x *XmpMM) SetTag(tag, value string) error
- func (x *XmpMM) SyncFromXMP(d *xmp.Document) error
- func (x *XmpMM) SyncModel(d *xmp.Document) error
- func (x XmpMM) SyncToXMP(d *xmp.Document) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NsXmpMM = xmp.NewNamespace("xmpMM", "http://ns.adobe.com/xap/1.0/mm/", NewModel)
)
Functions ¶
Types ¶
type ActionType ¶
type ActionType string
const ( ActionConverted ActionType = "converted" ActionCopied ActionType = "copied" ActionCreated ActionType = "created" ActionCropped ActionType = "cropped" ActionEdited ActionType = "edited" ActionFiltered ActionType = "filtered" ActionFormatted ActionType = "formatted" ActionVersionUpdated ActionType = "version_updated" ActionPrinted ActionType = "printed" ActionPublished ActionType = "published" ActionManaged ActionType = "managed" ActionProduced ActionType = "produced" ActionResized ActionType = "resized" ActionSaved ActionType = "saved" // more types not in XMP standard ActionAdded ActionType = "media_added" ActionRemoved ActionType = "media_removed" ActionForked ActionType = "forked" ActionMerged ActionType = "merged" )
type ResourceEvent ¶
type ResourceEvent struct { Action ActionType `xmp:"stEvt:action,attr"` Changed xmpdm.PartList `xmp:"stEvt:changed,attr"` InstanceID xmp.GUID `xmp:"stEvt:instanceID,attr"` Parameters string `xmp:"stEvt:parameters,attr"` SoftwareAgent xmp.AgentName `xmp:"stEvt:softwareAgent,attr"` When xmp.Date `xmp:"stEvt:when,attr"` }
1.2.4 ResourceEvent
type ResourceEventArray ¶
type ResourceEventArray []*ResourceEvent
func (ResourceEventArray) MarshalXMP ¶
func (ResourceEventArray) Typ ¶
func (x ResourceEventArray) Typ() xmp.ArrayType
func (*ResourceEventArray) UnmarshalXMP ¶
type ResourceRef ¶
type ResourceRef struct { AlternatePaths xmp.UriArray `xmp:"stRef:alternatePaths"` OriginalDocumentID xmp.GUID `xmp:"stRef:originalDocumentID,attr"` DocumentID xmp.GUID `xmp:"stRef:documentID,attr"` FilePath xmp.Uri `xmp:"stRef:filePath,attr"` FromPart *xmpdm.Part `xmp:"stRef:fromPart,attr"` InstanceID xmp.GUID `xmp:"stRef:instanceID,attr"` LastModifyDate xmp.Date `xmp:"stRef:lastModifyDate,attr"` Manager xmp.AgentName `xmp:"stRef:manager,attr"` ManagerVariant string `xmp:"stRef:managerVariant,attr"` ManageTo xmp.Uri `xmp:"stRef:manageTo,attr"` ManageUI xmp.Uri `xmp:"stRef:manageUI,attr"` MaskMarkers xmpdm.MaskType `xmp:"stRef:maskMarkers,attr"` PartMapping string `xmp:"stRef:partMapping,attr"` RenditionClass xmpdm.RenditionClass `xmp:"stRef:renditionClass,attr"` RenditionParams string `xmp:"stRef:renditionParams,attr"` ToPart *xmpdm.Part `xmp:"stRef:toPart,attr"` VersionID string `xmp:"stRef:versionID,attr"` }
Part 1: 8.2.2.9 ResourceRef + Part 2: 1.2.4.1 ResourceRef
func (ResourceRef) IsZero ¶
func (x ResourceRef) IsZero() bool
func (ResourceRef) MarshalXMP ¶
type ResourceRefArray ¶
type ResourceRefArray []*ResourceRef
func (*ResourceRefArray) DeleteIndex ¶
func (x *ResourceRefArray) DeleteIndex(idx int)
func (ResourceRefArray) MarshalXMP ¶
func (ResourceRefArray) Typ ¶
func (x ResourceRefArray) Typ() xmp.ArrayType
func (*ResourceRefArray) UnmarshalXMP ¶
type StVersion ¶
type StVersion struct { Comments string `xmp:"stVer:comments,attr"` Event ResourceEvent `xmp:"stVer:event"` Modifier string `xmp:"stVer:modifier,attr"` ModifyDate xmp.Date `xmp:"stVer:modifyDate,attr"` Version string `xmp:"stVer:version,attr"` }
Part 2: 1.2.4.2 Version
type StVersionArray ¶
type StVersionArray []*StVersion
func (StVersionArray) MarshalXMP ¶
func (StVersionArray) Typ ¶
func (x StVersionArray) Typ() xmp.ArrayType
func (*StVersionArray) UnmarshalXMP ¶
type XmpMM ¶
type XmpMM struct { DerivedFrom *ResourceRef `xmp:"xmpMM:DerivedFrom"` DocumentID xmp.GUID `xmp:"xmpMM:DocumentID"` History ResourceEventArray `xmp:"xmpMM:History"` Ingredients ResourceRefArray `xmp:"xmpMM:Ingredients"` InstanceID xmp.GUID `xmp:"xmpMM:InstanceID"` ManagedFrom *ResourceRef `xmp:"xmpMM:ManagedFrom"` Manager xmp.AgentName `xmp:"xmpMM:Manager"` ManageTo xmp.Uri `xmp:"xmpMM:ManageTo"` ManageUI xmp.Uri `xmp:"xmpMM:ManageUI"` ManagerVariant string `xmp:"xmpMM:ManagerVariant"` OriginalDocumentID xmp.GUID `xmp:"xmpMM:OriginalDocumentID"` Pantry xmp.ExtensionArray `xmp:"xmpMM:Pantry,omitempty"` RenditionClass xmpdm.RenditionClass `xmp:"xmpMM:RenditionClass"` RenditionParams string `xmp:"xmpMM:RenditionParams"` VersionID string `xmp:"xmpMM:VersionID"` Versions StVersionArray `xmp:"xmpMM:Versions"` }
func (*XmpMM) AddHistory ¶
func (x *XmpMM) AddHistory(e *ResourceEvent)
func (*XmpMM) AddVersion ¶
func (*XmpMM) AppendVersionHistory ¶
func (x *XmpMM) AppendVersionHistory(action ActionType, modifier, changed string, date xmp.Date)
assumes InstanceID and VersionID are changed outside
func (*XmpMM) GetLastEvent ¶
func (x *XmpMM) GetLastEvent() *ResourceEvent
func (*XmpMM) GetLastVersion ¶
func (*XmpMM) GetLastVersionId ¶
func (*XmpMM) GetPreviousVersion ¶
func (*XmpMM) GetPreviousVersionId ¶
func (XmpMM) Namespaces ¶
func (x XmpMM) Namespaces() xmp.NamespaceList
func (*XmpMM) SelfResourceRef ¶
func (x *XmpMM) SelfResourceRef(version string) *ResourceRef
func (*XmpMM) SetPreviousVersionId ¶
Click to show internal directories.
Click to hide internal directories.