Source Code Cross Referenced for Meta.java in  » Workflow-Engines » pegasus-2.1.0 » org » griphyn » vdl » classes » 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 » Workflow Engines » pegasus 2.1.0 » org.griphyn.vdl.classes 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file or a portion of this file is licensed under the terms of
003:         * the Globus Toolkit Public License, found in file ../GTPL, or at
004:         * http://www.globus.org/toolkit/download/license.html. This notice must
005:         * appear in redistributions of this file, with or without modification.
006:         *
007:         * Redistributions of this Software, with or without modification, must
008:         * reproduce the GTPL in: (1) the Software, or (2) the Documentation or
009:         * some other similar material which is provided with the Software (if
010:         * any).
011:         *
012:         * Copyright 1999-2004 University of Chicago and The University of
013:         * Southern California. All rights reserved.
014:         */
015:
016:        package org.griphyn.vdl.classes;
017:
018:        import org.griphyn.vdl.classes.*;
019:        import java.util.*;
020:        import java.io.IOException;
021:        import java.io.Writer;
022:        import java.io.Serializable;
023:
024:        /**
025:         * This class implements nothing for meta data.
026:         *
027:         * @author Jens-S. Vöckler
028:         * @author Yong Zhao
029:         * @version $Revision: 50 $
030:         */
031:        public class Meta extends VDL implements  Serializable {
032:            /**
033:             * Stores the content of whatever.
034:             */
035:            private String m_content;
036:
037:            /**
038:             * Default ctor. Calls the parent initialization.
039:             */
040:            public Meta() {
041:                super ();
042:                this .m_content = new String();
043:            }
044:
045:            /**
046:             * Ctor to initialize the content while constructing the class.
047:             * This is a convenience ctor.
048:             */
049:            public Meta(String content) {
050:                super ();
051:                this .m_content = content;
052:            }
053:
054:            /**
055:             * Appends text to the current internal state. The text may contain
056:             * other elements which are not quoted or changed in any way.
057:             *
058:             * @param content is the new text to append to the current content. 
059:             * @see #getContent()
060:             */
061:            public void addContent(String content) {
062:                this .m_content += content;
063:            }
064:
065:            /**
066:             * Gets the content state of this object. The text may contain
067:             * other elements which are not quoted or changed in any way.
068:             *
069:             * @return The current state of content. The text may be null.
070:             * @see #setContent(String)
071:             */
072:            public String getContent() {
073:                return this .m_content;
074:            }
075:
076:            /**
077:             * Overwrites the internal state with new content. The supplied content
078:             * will become effectively the active state of the object. Usually, this
079:             * method will be called during SAX assembly of the instance structure.
080:             *
081:             * @param content is the new state to register.
082:             * @see #getContent()
083:             **/
084:            public void setContent(String content) {
085:                this .m_content = content;
086:            }
087:
088:            /**
089:             * Converts the active state into something meant for human consumption.
090:             * This method overwrites the base class default as it can be more 
091:             * efficiently implemented.
092:             *
093:             * @return There is not textual representation of metadata in VDLt.
094:             */
095:            public String toString() {
096:                return new String();
097:            }
098:
099:            /**
100:             * Prints the current content onto the stream. This is a no-op, because
101:             * there is not textual representation of metadata in VDLt.
102:             *
103:             * @param stream is a stream opened and ready for writing. This can also
104:             * be a string stream for efficient output.
105:             * @throws IOException if something happens to the stream.
106:             */
107:            public void toString(Writer stream) throws IOException {
108:                // do nothing
109:            }
110:
111:            /**
112:             * Dump the state of the current element as XML output. The stream
113:             * interface should be able to handle large output efficiently, if you
114:             * use a buffered writer.
115:             *
116:             * @param stream is a stream opened and ready for writing. This can also
117:             * be a string stream for efficient output.
118:             * @param indent is a <code>String</code> of spaces used for pretty
119:             * printing. The initial amount of spaces should be an empty string.
120:             * The parameter is used internally for the recursive traversal.
121:             * @param namespace is the XML schema namespace prefix. If neither
122:             * empty nor null, each element will be prefixed with this prefix,
123:             * and the root element will map the XML namespace. 
124:             * @exception IOException if something fishy happens to the stream.
125:             */
126:            public void toXML(Writer stream, String indent, String namespace)
127:                    throws IOException {
128:                String tag = (namespace != null && namespace.length() > 0) ? namespace
129:                        + ":meta"
130:                        : "meta";
131:
132:                // just one tag
133:                if (indent != null && indent.length() > 0)
134:                    stream.write(indent);
135:                stream.write('<');
136:                stream.write(tag);
137:                if (this .m_content.length() > 0) {
138:                    stream.write('>');
139:                    stream.write(quote(this .m_content, false));
140:                    stream.write("</");
141:                    stream.write(tag);
142:                    stream.write('>');
143:                } else {
144:                    stream.write("/>");
145:                }
146:                if (indent != null)
147:                    stream.write(System.getProperty("line.separator", "\r\n"));
148:            }
149:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.