1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
18 using System
.Collections
;
28 public class DocumentNode
30 private NodeType nodeType
;
31 private String fileName
;
33 private DocumentMeta meta
;
34 private XmlDocument xmldoc
;
35 private Folder parentFolder
;
36 private ArrayList breadCrumbs
= new ArrayList();
38 public DocumentNode(String path
, String fileName
, XmlDocument doc
, DocumentMeta meta
)
41 this.fileName
= fileName
;
46 if (fileName
.ToLower() == "navigation.xml")
48 nodeType
= NodeType
.Navigation
;
50 else if (fileName
.ToLower() == "index.xml")
52 nodeType
= NodeType
.Index
;
56 nodeType
= NodeType
.Ordinary
;
60 public Folder ParentFolder
62 get { return parentFolder; }
63 set { parentFolder = value; }
66 public NodeType NodeType
68 get { return nodeType; }
71 public string Filename
73 get { return fileName; }
76 public string TargetFilename
78 get { return System.IO.Path.GetFileNameWithoutExtension(fileName) + ".html"; }
86 public XmlDocument XmlDoc
88 get { return xmldoc; }
91 public ArrayList BreadCrumbs
93 get { return breadCrumbs; }
96 public DocumentMeta Meta