using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Xml;
namespace Reynsoft.PhotoInfo
{
/// <summary>
/// The metadata class
/// </summary>
public class PhotoshopMetadata : PhotoMetadata
{
/// <summary>
/// Private constructor to enforce the factory pattern.
/// </summary>
/// <param name="node"></param>
/// <param name="doc"></param>
private PhotoshopMetadata(XmlNode node, XmlDocument doc): base(node, doc)
{
}
/// <summary>
/// The public factory method.
/// </summary>
/// <param name="node"></param>
/// <param name="doc"></param>
/// <returns></returns>
public static PhotoshopMetadata CreateNewPhotoshopMetadata(XmlNode node, XmlDocument doc)
{
if (node == null)
{
XmlNode emptyNode = CreateEmptyNode("xmlns:photoshop", "http://ns.adobe.com/photoshop/1.0/", doc);
return new PhotoshopMetadata(emptyNode, doc);
}
else
{
return new PhotoshopMetadata(node, doc);
}
}
#region Generated property definitions
private string m_AuthorsPosition = null;
/// <summary>
/// By-line title.
/// </summary>
public string AuthorsPosition
{
get
{
return m_AuthorsPosition;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_AuthorsPosition)
{
m_AuthorsPosition = adjustedValue;
ElementUpdated("AuthorsPosition", "photoshop:AuthorsPosition", "Text", adjustedValue);
}
}
}
private string m_CaptionWriter = null;
/// <summary>
/// Writer/editor.
/// </summary>
public string CaptionWriter
{
get
{
return m_CaptionWriter;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_CaptionWriter)
{
m_CaptionWriter = adjustedValue;
ElementUpdated("CaptionWriter", "photoshop:CaptionWriter", "ProperName", adjustedValue);
}
}
}
private string m_Category = null;
/// <summary>
/// Category. Limited to 3 7-bit ASCII characters.
/// </summary>
public string Category
{
get
{
return m_Category;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_Category)
{
m_Category = adjustedValue;
ElementUpdated("Category", "photoshop:Category", "Text", adjustedValue);
}
}
}
private string m_City = null;
/// <summary>
/// City.
/// </summary>
public string City
{
get
{
return m_City;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_City)
{
m_City = adjustedValue;
ElementUpdated("City", "photoshop:City", "Text", adjustedValue);
}
}
}
private string m_Country = null;
/// <summary>
/// Country/primary location.
/// </summary>
public string Country
{
get
{
return m_Country;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_Country)
{
m_Country = adjustedValue;
ElementUpdated("Country", "photoshop:Country", "Text", adjustedValue);
}
}
}
private string m_Credit = null;
/// <summary>
/// Credit.
/// </summary>
public string Credit
{
get
{
return m_Credit;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_Credit)
{
m_Credit = adjustedValue;
ElementUpdated("Credit", "photoshop:Credit", "Text", adjustedValue);
}
}
}
private string m_DateCreated = null;
/// <summary>
/// The date the intellectual content of the document was
/// created (rather than the creation date of the physical
/// representation), following IIM conventions. For example, a
/// photo taken during the American Civil War would have a
/// creation date during that epoch (1861-1865) rather than the
/// date the photo was digitized for archiving.
/// </summary>
public string DateCreated
{
get
{
return m_DateCreated;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_DateCreated)
{
m_DateCreated = adjustedValue;
ElementUpdated("DateCreated", "photoshop:DateCreated", "Date", adjustedValue);
}
}
}
private string m_Headline = null;
/// <summary>
/// Headline.
/// </summary>
public string Headline
{
get
{
return m_Headline;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_Headline)
{
m_Headline = adjustedValue;
ElementUpdated("Headline", "photoshop:Headline", "Text", adjustedValue);
}
}
}
private string m_Instructions = null;
/// <summary>
/// Special instructions.
/// </summary>
public string Instructions
{
get
{
return m_Instructions;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_Instructions)
{
m_Instructions = adjustedValue;
ElementUpdated("Instructions", "photoshop:Instructions", "Text", adjustedValue);
}
}
}
private string m_Source = null;
/// <summary>
/// Source.
/// </summary>
public string Source
{
get
{
return m_Source;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_Source)
{
m_Source = adjustedValue;
ElementUpdated("Source", "photoshop:Source", "Text", adjustedValue);
}
}
}
private string m_State = null;
/// <summary>
/// Province/state.
/// </summary>
public string State
{
get
{
return m_State;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_State)
{
m_State = adjustedValue;
ElementUpdated("State", "photoshop:State", "Text", adjustedValue);
}
}
}
private string m_SupplementalCategories = null;
/// <summary>
/// Supplemental category.
/// </summary>
public string SupplementalCategories
{
get
{
return m_SupplementalCategories;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_SupplementalCategories)
{
m_SupplementalCategories = adjustedValue;
ElementUpdated("SupplementalCategories", "photoshop:SupplementalCategories", "bag Text", adjustedValue);
}
}
}
private string m_TransmissionReference = null;
/// <summary>
/// Original transmission reference.
/// </summary>
public string TransmissionReference
{
get
{
return m_TransmissionReference;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_TransmissionReference)
{
m_TransmissionReference = adjustedValue;
ElementUpdated("TransmissionReference", "photoshop:TransmissionReference", "Text", adjustedValue);
}
}
}
private string m_Urgency = null;
/// <summary>
/// Urgency. Valid range is 1-8.
/// </summary>
public string Urgency
{
get
{
return m_Urgency;
}
set
{
string adjustedValue = AdjustedValue(value);
if (adjustedValue != m_Urgency)
{
m_Urgency = adjustedValue;
ElementUpdated("Urgency", "photoshop:Urgency", "Integer", adjustedValue);
}
}
}
#endregion
#region Generated function to initialize properties
/// <summary>
/// Generated function to initialize properties
/// </summary>
public override void LoadInitialData()
{
this.m_AuthorsPosition = GetInitialValue("photoshop:AuthorsPosition", "Text");
NotifyPropertyChanged("AuthorsPosition");
this.m_CaptionWriter = GetInitialValue("photoshop:CaptionWriter", "ProperName");
NotifyPropertyChanged("CaptionWriter");
this.m_Category = GetInitialValue("photoshop:Category", "Text");
NotifyPropertyChanged("Category");
this.m_City = GetInitialValue("photoshop:City", "Text");
NotifyPropertyChanged("City");
this.m_Country = GetInitialValue("photoshop:Country", "Text");
NotifyPropertyChanged("Country");
this.m_Credit = GetInitialValue("photoshop:Credit", "Text");
NotifyPropertyChanged("Credit");
this.m_DateCreated = GetInitialValue("photoshop:DateCreated", "Date");
NotifyPropertyChanged("DateCreated");
this.m_Headline = GetInitialValue("photoshop:Headline", "Text");
NotifyPropertyChanged("Headline");
this.m_Instructions = GetInitialValue("photoshop:Instructions", "Text");
NotifyPropertyChanged("Instructions");
this.m_Source = GetInitialValue("photoshop:Source", "Text");
NotifyPropertyChanged("Source");
this.m_State = GetInitialValue("photoshop:State", "Text");
NotifyPropertyChanged("State");
this.m_SupplementalCategories = GetInitialValue("photoshop:SupplementalCategories", "bag Text");
NotifyPropertyChanged("SupplementalCategories");
this.m_TransmissionReference = GetInitialValue("photoshop:TransmissionReference", "Text");
NotifyPropertyChanged("TransmissionReference");
this.m_Urgency = GetInitialValue("photoshop:Urgency", "Integer");
NotifyPropertyChanged("Urgency");
}
#endregion
}
}