Source Code Cross Referenced for Project.java in  » Source-Control » sourcejammer » org » sourcejammer » project » view » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Source Control » sourcejammer » org.sourcejammer.project.view 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Copyright (C) 2001, 2002 Robert MacGrogan
003:         *
004:         *  This library is free software; you can redistribute it and/or
005:         *  modify it under the terms of the GNU Lesser General Public
006:         *  License as published by the Free Software Foundation; either
007:         *  version 2.1 of the License, or (at your option) any later version.
008:         *
009:         *  This library is distributed in the hope that it will be useful,
010:         *  but WITHOUT ANY WARRANTY; without even the implied warranty of
011:         *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012:         *  Lesser General Public License for more details.
013:         *
014:         *  You should have received a copy of the GNU Lesser General Public
015:         *  License along with this library; if not, write to the Free Software
016:         *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
017:         *
018:         *
019:         * $Archive: SourceJammer$
020:         * $FileName: Project.java$
021:         * $FileID: 4346$
022:         *
023:         * Last change:
024:         * $AuthorName: Rob MacGrogan$
025:         * $Date: 8/13/03 12:02 AM$
026:         * $Comment: In buildChildrenFromStrings(), add this project's
027:         *          unique to parent property in generated NodeInfo objects.$
028:         *
029:         * $KeyWordsOff: $
030:         */
031:
032:        package org.sourcejammer.project.view;
033:
034:        import org.sourcejammer.project.NodeList;
035:        import org.sourcejammer.project.NodeIterator;
036:        import org.sourcejammer.util.AppConfig;
037:        import org.sourcejammer.xml.soap.NodeInfoSerializer;
038:        import org.sourcejammer.project.NodeExistsException;
039:        import org.sourcejammer.project.Node;
040:
041:        /**
042:         * Title:        SourceJammer v 0.1.0
043:         * Description:
044:         * Copyright:    Copyright (c) 2001
045:         * Company:
046:         * @author Robert MacGrogan
047:         * @version $Revision: 1.3 $
048:         */
049:
050:        /**
051:         * Represents of view of a project within the project hierarchy.
052:         */
053:        public class Project extends ViewNode {
054:
055:            NodeList moChildren = null;
056:            private String[] childrenLightweight = null;
057:
058:            public Project() {
059:            }
060:
061:            /**
062:             * Set child nodes using an array of NodeInfo objects. This is necesary
063:             * for current version of Apache SOAP.
064:             *
065:             * @exception NodeExistsException if the array contains one or more nodes
066:             *    with the same nodeName.
067:             */
068:            public void setChildNodeArray(String[] nodes) {
069:                childrenLightweight = nodes;
070:            }
071:
072:            public void buildChildrenFromStrings() throws NodeExistsException {
073:                moChildren = new NodeList();
074:                for (int i = 0; i < childrenLightweight.length; i++) {
075:                    NodeInfo nd = NodeInfoSerializer
076:                            .stringToNodeInfo(childrenLightweight[i]);
077:                    nd.setParentID(getUniqueID());
078:                    moChildren.addNode(nd);
079:                }
080:            }
081:
082:            public String[] getChildNodeArray() {
083:                return childrenLightweight;
084:            }
085:
086:            /**
087:             * Make sure this is a NodeList of NodeInfo objects.
088:             */
089:            public void useChildNodeList(NodeList children) {
090:                moChildren = children;
091:            }
092:
093:            public NodeList childList() {
094:                return moChildren;
095:            }
096:
097:            public NodeIterator childNodes() {
098:                return moChildren.getIterator();
099:            }
100:
101:            public int childCount() {
102:                return moChildren.size();
103:            }
104:
105:            public String toString() {
106:                StringBuffer str = new StringBuffer();
107:                str.append("Contents of ").append(getNodeName())
108:                        .append(":\r\n");
109:                NodeIterator iterator = moChildren.getIterator();
110:                iterator = org.sourcejammer.util.StringUtil
111:                        .sortNodeIterator(iterator);
112:                while (iterator.hasMoreNodes()) {
113:                    NodeInfo ndInfo = (NodeInfo) iterator.getNextNode();
114:                    str.append("    ").append(ndInfo.toString()).append("\r\n");
115:                }
116:                return str.toString();
117:            }
118:
119:            /**
120:             * For testing.
121:             */
122:            /*
123:             public static void main(String args[]){
124:             try {
125:             Project prj = new Project();
126:             NodeName name1 = new NodeName();
127:             name1.setName("org");
128:             NodeName name2 = new NodeName();
129:             name2.setName("sourcejammer");
130:             name2.setParent(name1);
131:             NodeName name3 = new NodeName();
132:             name3.setName("project");
133:             name3.setParent(name2);
134:             prj.setNodeNameObj(name3);
135:
136:             NodeList children = new NodeList();
137:
138:             NodeInfo ndController = new NodeInfo();
139:             ndController.setNodeName("controller");
140:             ndController.setCreatedDate(new java.util.Date());
141:             ndController.setNodeType(AppConfig.NodeTypes.PROJECT);
142:             children.addNode(ndController);
143:
144:             NodeInfo ndModel = new NodeInfo();
145:             ndModel.setNodeName("model");
146:             ndModel.setCreatedDate(new java.util.Date());
147:             ndModel.setNodeType(AppConfig.NodeTypes.PROJECT);
148:             children.addNode(ndModel);
149:
150:             NodeInfo ndView = new NodeInfo();
151:             ndView.setNodeName("view");
152:             ndView.setCreatedDate(new java.util.Date());
153:             ndView.setNodeType(AppConfig.NodeTypes.PROJECT);
154:             children.addNode(ndView);
155:
156:             NodeInfo ndArch = new NodeInfo();
157:             ndArch.setNodeName("ArchiveInfo.java");
158:             ndArch.setNodeType(AppConfig.NodeTypes.FILE);
159:             ndArch.setCreatedDate(new java.util.Date());
160:             ndArch.setCheckedOut(false);
161:             ndArch.setFileType(AppConfig.FileTypes.BINARY);
162:             children.addNode(ndArch);
163:
164:             NodeInfo ndNode = new NodeInfo();
165:             ndNode.setNodeName("Node.java");
166:             ndNode.setNodeType(AppConfig.NodeTypes.FILE);
167:             ndNode.setCreatedDate(new java.util.Date());
168:             ndNode.setCheckedOut(true);
169:             ndNode.setFileType(AppConfig.FileTypes.BINARY);
170:             children.addNode(ndNode);
171:
172:             NodeInfo ndNodeIt = new NodeInfo();
173:             ndNodeIt.setNodeName("NodeIterator.java");
174:             ndNodeIt.setNodeType(AppConfig.NodeTypes.FILE);
175:             ndNodeIt.setCreatedDate(new java.util.Date());
176:             ndNodeIt.setCheckedOut(false);
177:             ndNodeIt.setFileType(AppConfig.FileTypes.TEXT);
178:             children.addNode(ndNodeIt);
179:
180:             prj.setChildNodeList(children);
181:
182:             System.out.println(prj.toString());
183:             }
184:             catch (Exception ex){
185:             ex.printStackTrace();
186:             }
187:             }
188:             */
189:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.