18 using erminas.SmartAPI.Exceptions;
19 using erminas.SmartAPI.Utils;
21 namespace erminas.SmartAPI.CMS.Project.Folder
31 public string Album {
get;
private set; }
32 public string Artist {
get;
private set; }
33 public string Colordepth {
get;
private set; }
34 public string Comment {
get;
private set; }
35 public string DocAuthor {
get;
private set; }
36 public string DocCreatedWith {
get;
private set; }
37 public string DocCreationDate {
get;
private set; }
38 public string DocModificationDate {
get;
private set; }
39 public int DocNumberOfPages {
get;
private set; }
40 public string DocOriginalAuthor {
get;
private set; }
41 public string DocTitle {
get;
private set; }
42 public DateTime EntryDate {
get;
private set; }
43 public string Filesize {
get;
private set; }
44 public IFolder Folder {
get;
private set; }
45 public string Genre {
get;
private set; }
46 public string Height {
get;
private set; }
47 public string Keywords {
get;
private set; }
48 public string LastEditor {
get;
private set; }
49 public DateTime ModificationDate {
get;
private set; }
50 public string OriginalAuthor {
get;
private set; }
51 public string Title {
get;
private set; }
52 public string Width {
get;
private set; }
53 public string Year {
get;
private set; }
74 private void LoadXml(XmlElement xmlElement)
76 if (xmlElement == null)
82 if (xmlElement.GetAttributeValue(
"ext01") != null)
84 OriginalAuthor = xmlElement.GetAttributeValue(
"ext01");
87 if (xmlElement.GetAttributeValue(
"ext02") != null)
89 EntryDate = xmlElement.GetOADate(
"ext02").GetValueOrDefault();
92 if (xmlElement.GetAttributeValue(
"ext03") != null)
94 LastEditor = xmlElement.GetAttributeValue(
"ext03");
97 if (xmlElement.GetAttributeValue(
"ext04") != null)
99 ModificationDate = xmlElement.GetOADate(
"ext04").GetValueOrDefault();
102 if (xmlElement.GetAttributeValue(
"ext05") != null)
104 Height = xmlElement.GetAttributeValue(
"ext05") +
" Pixel";
107 if (xmlElement.GetAttributeValue(
"ext06") != null)
109 Width = xmlElement.GetAttributeValue(
"ext06") +
" Pixel";
112 if (xmlElement.GetAttributeValue(
"ext07") != null)
114 Colordepth = xmlElement.GetAttributeValue(
"ext07") +
" Bit";
117 if (xmlElement.GetAttributeValue(
"ext08") != null)
119 Filesize = xmlElement.GetAttributeValue(
"ext08") +
" Byte";
122 if (xmlElement.GetAttributeValue(
"ext09") != null)
124 Title = xmlElement.GetAttributeValue(
"ext09");
127 if (xmlElement.GetAttributeValue(
"ext10") != null)
129 Artist = xmlElement.GetAttributeValue(
"ext10");
132 if (xmlElement.GetAttributeValue(
"ext11") != null)
134 Album = xmlElement.GetAttributeValue(
"ext11");
137 if (xmlElement.GetAttributeValue(
"ext12") != null)
139 Year = xmlElement.GetAttributeValue(
"ext12");
142 if (xmlElement.GetAttributeValue(
"ext13") != null)
144 Comment = xmlElement.GetAttributeValue(
"ext13");
147 if (xmlElement.GetAttributeValue(
"ext14") != null)
149 Genre = xmlElement.GetAttributeValue(
"ext14");
152 if (xmlElement.GetAttributeValue(
"ext4124") != null)
154 DocTitle = xmlElement.GetAttributeValue(
"ext4124");
157 if (xmlElement.GetAttributeValue(
"ext4125") != null)
159 Keywords = xmlElement.GetAttributeValue(
"ext4125");
162 if (xmlElement.GetAttributeValue(
"ext4126") != null)
164 DocAuthor = xmlElement.GetAttributeValue(
"ext4126");
167 if (xmlElement.GetAttributeValue(
"ext4127") != null)
169 DocOriginalAuthor = xmlElement.GetAttributeValue(
"ext4127");
172 if (xmlElement.GetAttributeValue(
"ext4128") != null)
174 DocCreatedWith = xmlElement.GetAttributeValue(
"ext4128");
177 if (xmlElement.GetAttributeValue(
"ext4129") != null)
179 DocCreationDate = xmlElement.GetAttributeValue(
"ext4129");
182 if (xmlElement.GetAttributeValue(
"ext4130") != null)
184 DocModificationDate = xmlElement.GetAttributeValue(
"ext4130");
187 if (xmlElement.GetAttributeValue(
"ext4131") != null)
189 DocNumberOfPages =
int.Parse(xmlElement.GetAttributeValue(
"ext4131"));
191 }
catch (Exception e)
194 throw new FileDataException(Folder.Project.Session.ServerLogin,
"Couldn't read file data..", e);