SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
ContentClasses/Elements/ISiteMap.cs
Go to the documentation of this file.
1 ï»¿// SmartAPI - .Net programmatic access to RedDot servers
2 //
3 // Copyright (C) 2013 erminas GbR
4 //
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free Software Foundation,
7 // either version 3 of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 // See the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program.
14 // If not, see <http://www.gnu.org/licenses/>.
15 
16 using System.Xml;
17 using erminas.SmartAPI.CMS.Converter;
18 using erminas.SmartAPI.CMS.Project.Folder;
19 
20 namespace erminas.SmartAPI.CMS.Project.ContentClasses.Elements
21 {
22  public interface ISiteMap : IContentClassElement
23  {
24  string EndOfColumn { get; set; }
25 
26  string EndOfLine { get; set; }
27 
28  string EndOfTable { get; set; }
29 
30  SiteMapFormat Format { get; set; }
31 
32  bool IsSyntaxConformingToXHtml { get; set; }
33  int? MaxErrorCount { get; set; }
34  int? MaxSearchDepth { get; set; }
35  int? NestingLevel { get; set; }
36 
37  string StartOfColumn { get; set; }
38 
39  string StartOfLine { get; set; }
40 
41  string StartOfTable { get; set; }
42  IFile XslStyleSheet { get; set; }
43  }
44 
45  internal class SiteMap : ContentClassElement, ISiteMap
46  {
47  internal SiteMap(IContentClass contentClass, XmlElement xmlElement) : base(contentClass, xmlElement)
48  {
49  }
50 
51  public override ContentClassCategory Category
52  {
53  get { return ContentClassCategory.Structural; }
54  }
55 
56  [RedDot("eltcolclose")]
57  public string EndOfColumn
58  {
59  get { return GetAttributeValue<string>(); }
60  set { SetAttributeValue(value); }
61  }
62 
63  [RedDot("eltrowclose")]
64  public string EndOfLine
65  {
66  get { return GetAttributeValue<string>(); }
67  set { SetAttributeValue(value); }
68  }
69 
70  [RedDot("elttableclose")]
71  public string EndOfTable
72  {
73  get { return GetAttributeValue<string>(); }
74  set { SetAttributeValue(value); }
75  }
76 
77  [RedDot("eltformat", ConverterType = typeof (EnumConverter<SiteMapFormat>))]
78  public SiteMapFormat Format
79  {
80  get { return GetAttributeValue<SiteMapFormat>(); }
81  set { SetAttributeValue(value); }
82  }
83 
84  [RedDot("eltxhtmlcompliant")]
85  public bool IsSyntaxConformingToXHtml
86  {
87  get { return GetAttributeValue<bool>(); }
88  set { SetAttributeValue(value); }
89  }
90 
91  [RedDot("eltdropouts")]
92  public int? MaxErrorCount
93  {
94  get { return GetAttributeValue<int?>(); }
95  set { SetAttributeValue(value); }
96  }
97 
98  [RedDot("eltsearchdepth")]
99  public int? MaxSearchDepth
100  {
101  get { return GetAttributeValue<int?>(); }
102  set { SetAttributeValue(value); }
103  }
104 
105  [RedDot("eltdepth")]
106  public int? NestingLevel
107  {
108  get { return GetAttributeValue<int?>(); }
109  set { SetAttributeValue(value); }
110  }
111 
112  [RedDot("eltcolopen")]
113  public string StartOfColumn
114  {
115  get { return GetAttributeValue<string>(); }
116  set { SetAttributeValue(value); }
117  }
118 
119  [RedDot("eltrowopen")]
120  public string StartOfLine
121  {
122  get { return GetAttributeValue<string>(); }
123  set { SetAttributeValue(value); }
124  }
125 
126  [RedDot("elttableopen")]
127  public string StartOfTable
128  {
129  get { return GetAttributeValue<string>(); }
130  set { SetAttributeValue(value); }
131  }
132 
133  [RedDot("__xslstylesheet", ConverterType = typeof (XslFileConverter))]
134  public IFile XslStyleSheet
135  {
136  get { return GetAttributeValue<IFile>(); }
137  set { SetAttributeValue(value); }
138  }
139  }
140 
141  public enum SiteMapFormat
142  {
143  HTMLCode = 0,
144  XMLStructure = 1,
145  }
146 }