C# Class TagLib.Xmp.XmpTag

Holds XMP (Extensible Metadata Platform) metadata.
Inheritance: TagLib.Image.ImageTag
显示文件 Open project: rubenv/tripod Class Usage Examples

Public Properties

Property Type Description
ADOBE_X_NS string
CRS_NS string
DC_NS string
EXIF_AUX_NS string
EXIF_NS string
JOB_NS string
MS_PHOTO_NS string
NamespacePrefixes string>.Dictionary
PHOTOSHOP_NS string
RDF_NS string
STDIM_NS string
TIFF_NS string
XAP_BJ_NS string
XAP_MM_NS string
XAP_NS string
XAP_RIGHTS_NS string
XMLNS_NS string
XML_NS string
XMPTG_NS string

Public Methods

Method Description
Clear ( ) : void

Clears the values stored in the current instance.

FindNode ( string ns, string name ) : XmpNode

Finds the node associated with the namespace ns and the name name.

GetCollectionNode ( string ns, string name ) : string[]

The method returns an array of System.String values which are the stored text of the child nodes of the node associated with the namespace ns and the name name.

GetLangAltNode ( string ns, string name ) : string

Searches for a node holding language alternatives. The return value is the value of the default language stored by the node. The node is identified by the namespace ns and the name name. If the default language is not set, an arbitrary one is chosen. It is also tried to return the value a simple text node, if no associated alt-node exists.

GetTextNode ( string ns, string name ) : string

Returns the text of the node associated with the namespace and the name name.

Render ( ) : string

Renders the current instance to an XMP System.String.

SetCollectionNode ( string ns, string name, string values, XmpNodeType type ) : void

Sets a System.String[] as texts to the children of the node associated with the namespace ns and the name name.

SetLangAltNode ( string ns, string name, string value ) : void

Stores a the given value as the default language value for the alt-node associated with the namespace ns and the name name. All other alternatives set, are deleted by this method.

SetTextNode ( string ns, string name, string value ) : void

Creates a new text node associated with the namespace ns and the name name.

XmpTag ( ) : System

Construct a new empty XmpTag.

XmpTag ( string data ) : System

Construct a new XmpTag, using the data parsed from the given string.

Private Methods

Method Description
AddNamespacePrefix ( string prefix, string ns ) : void
CreateAttribute ( XmlDocument doc, string name, string ns ) : XmlAttribute
CreateNode ( XmlDocument doc, string name, string ns ) : XmlNode
CreateTextPropertyWithQualifiers ( XmlNode node, string value ) : XmpNode
EnsureNamespacePrefix ( string ns ) : void

Make sure there's a suitable prefix mapped for the given namespace URI.

Initialize ( ) : void
NewNode ( string ns, string name ) : XmpNode
NewNode ( string ns, string name, XmpNodeType type ) : XmpNode
ParseEmptyPropertyElement ( XmpNode parent, XmlNode node ) : void
ParseLiteralPropertyElement ( XmpNode parent, XmlNode node ) : void
ParseNodeElement ( XmpNode parent, XmlNode node ) : void
ParseNodeElementList ( XmpNode parent, XmlNode xml_parent ) : void
ParsePropertyElement ( XmpNode parent, XmlNode node ) : void
ParseRDF ( XmlNode rdf_node ) : XmpNode
ParseResourcePropertyElement ( XmpNode parent, XmlNode node ) : void
ParseTypeResourcePropertyElement ( XmpNode parent, XmlNode node ) : void
PrepareNamespaces ( ) : void
RemoveNode ( string ns, string name ) : void

Method Details

Clear() public method

Clears the values stored in the current instance.
public Clear ( ) : void
return void

FindNode() public method

Finds the node associated with the namespace ns and the name name.
public FindNode ( string ns, string name ) : XmpNode
ns string /// A with the namespace of the node. ///
name string /// A with the name of the node. ///
return XmpNode

GetCollectionNode() public method

The method returns an array of System.String values which are the stored text of the child nodes of the node associated with the namespace ns and the name name.
public GetCollectionNode ( string ns, string name ) : string[]
ns string /// A with the namespace of the node. ///
name string /// A with the name of the node. ///
return string[]

GetLangAltNode() public method

Searches for a node holding language alternatives. The return value is the value of the default language stored by the node. The node is identified by the namespace ns and the name name. If the default language is not set, an arbitrary one is chosen. It is also tried to return the value a simple text node, if no associated alt-node exists.
public GetLangAltNode ( string ns, string name ) : string
ns string /// A with the namespace of the node. ///
name string /// A with the name of the node. ///
return string

GetTextNode() public method

Returns the text of the node associated with the namespace and the name name.
public GetTextNode ( string ns, string name ) : string
ns string /// A with the namespace of the node. ///
name string /// A with the name of the node. ///
return string

Render() public method

Renders the current instance to an XMP System.String.
public Render ( ) : string
return string

SetCollectionNode() public method

Sets a System.String[] as texts to the children of the node associated with the namespace ns and the name name.
public SetCollectionNode ( string ns, string name, string values, XmpNodeType type ) : void
ns string /// A with the namespace of the node. ///
name string /// A with the name of the node. ///
values string /// A with the values to set for the children. ///
type XmpNodeType /// A with the type of the parent node. ///
return void

SetLangAltNode() public method

Stores a the given value as the default language value for the alt-node associated with the namespace ns and the name name. All other alternatives set, are deleted by this method.
public SetLangAltNode ( string ns, string name, string value ) : void
ns string /// A with the namespace of the node. ///
name string /// A with the name of the node. ///
value string /// A with the value for the default language /// to set. If is given, a possibly existing node /// will be deleted. ///
return void

SetTextNode() public method

Creates a new text node associated with the namespace ns and the name name.
public SetTextNode ( string ns, string name, string value ) : void
ns string /// A with the namespace of the node. ///
name string /// A with the name of the node. ///
value string /// A with the value for the new node. /// If is given, a possibly existing node will /// be deleted. ///
return void

XmpTag() public method

Construct a new empty XmpTag.
public XmpTag ( ) : System
return System

XmpTag() public method

Construct a new XmpTag, using the data parsed from the given string.
public XmpTag ( string data ) : System
data string /// A containing an XMP packet. This should be a valid /// XMP block. ///
return System

Property Details

ADOBE_X_NS public_oe static_oe property

Adobe namespace
public static string ADOBE_X_NS
return string

CRS_NS public_oe static_oe property

Camera Raw Settings namespace
public static string CRS_NS
return string

DC_NS public_oe static_oe property

Dublin Core namespace
public static string DC_NS
return string

EXIF_AUX_NS public_oe static_oe property

Exif aux namespace
public static string EXIF_AUX_NS
return string

EXIF_NS public_oe static_oe property

Exif namespace
public static string EXIF_NS
return string

JOB_NS public_oe static_oe property

JOB namespace
public static string JOB_NS
return string

MS_PHOTO_NS public_oe static_oe property

Microsoft Photo namespace
public static string MS_PHOTO_NS
return string

NamespacePrefixes public_oe static_oe property

Mapping between full namespaces and their short prefix. Needs to be public for the unit test generator.
public static Dictionary NamespacePrefixes
return string>.Dictionary

PHOTOSHOP_NS public_oe static_oe property

Photoshop namespace
public static string PHOTOSHOP_NS
return string

RDF_NS public_oe static_oe property

RDF namespace
public static string RDF_NS
return string

STDIM_NS public_oe static_oe property

STDIM namespace
public static string STDIM_NS
return string

TIFF_NS public_oe static_oe property

TIFF namespace
public static string TIFF_NS
return string

XAP_BJ_NS public_oe static_oe property

XAP bj namespace
public static string XAP_BJ_NS
return string

XAP_MM_NS public_oe static_oe property

XAP mm namespace
public static string XAP_MM_NS
return string

XAP_NS public_oe static_oe property

XAP (XMP's previous name) namespace
public static string XAP_NS
return string

XAP_RIGHTS_NS public_oe static_oe property

XAP rights namespace
public static string XAP_RIGHTS_NS
return string

XMLNS_NS public_oe static_oe property

XMLNS namespace
public static string XMLNS_NS
return string

XML_NS public_oe static_oe property

XML namespace
public static string XML_NS
return string

XMPTG_NS public_oe static_oe property

XMP TPg (XMP Paged-Text) namespace
public static string XMPTG_NS
return string