Java Doc for XGrammarWriter.java in » Web-Server » Rimfaxe-Web-Server » org » apache » xerces » domx » 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
»
Web Server
»
Rimfaxe Web Server
»
org.apache.xerces.domx
Source Cross Reference
Class Diagram
Java Document (Java Doc)
java.lang
.Object
org.apache.xerces.domx
.XGrammarWriter
XGrammarWriter
public
class XGrammarWriter
(Code)
This program allows you to print the grammar of a document either in XML Schema format or the standard DTD format.
Inner Class :final
public
static class OutputFormat
Field Summary
final
protected
static
String
CONTENT_MODEL_ELEMENT_NAMES
Content model element names.
final
protected
static OutputFormat
DEFAULT_OUTPUT_FORMAT
Default output format.
protected
boolean
canonical
Canonical output.
protected
String
encoding
Encoding.
protected
OutputFormat
format
Output format.
protected
int
indent
Indent level.
protected
PrintWriter
out
Output writer.
protected
boolean
verbose
Verbose.
Constructor Summary
public
XGrammarWriter
()
Default constructor.
public
XGrammarWriter
(
PrintWriter
writer)
Constructs a grammar writer with the specified print writer.
public
XGrammarWriter
(
OutputStream
stream)
Constructs a grammar writer with the specified writer.
public
XGrammarWriter
(
Writer
writer,
String
encoding)
Constructs a grammar writer with the specified writer.
Method Summary
protected
boolean
containsMoreThanOneChildOfType
(
Element
node,
String
names)
Returns true if the specified element has more than one child with any of the given names.
protected
Node
getFirstChildOfType
(
Node
node, short type)
Returns the first child of the given node type.
protected
Node
getNextSiblingOfType
(
Node
node, short type)
Returns the next sibling of the given node type.
public
OutputFormat
getOutputFormat
()
Returns the output format.
protected
boolean
isBasicAttributeType
(
String
type)
Returns true if the attribute type is basic.
protected
boolean
isBasicOccurrenceCount
(
String
minOccurs,
String
maxOccurs)
Returns true if the occurrence count is basic.
public
boolean
isCanonical
()
Returns true if the output is canonical.
protected
boolean
isEmpty
(
Element
element)
Returns true if the element is "empty".
public
boolean
isVerbose
()
Returns true if the output is verbose.
public
static void
main
(
String
argv)
Main program.
protected
String
normalize
(
String
s)
Normalizes the given string.
protected
int
parseInt
(
String
s, int defaultValue)
Parses a string and returns the integer value.
public
void
printAttribute
(
Attr
attribute)
Prints an attribute.
public
void
printAttributeDecl
(
String
elemName,
Element
attribute)
Prints a DTD attribute declaration.
public
void
printCloseElement
(
Element
element)
Prints a close element.
public
void
printComment
(
Element
comment)
Prints a comment.
public
void
printElement
(
Element
element)
Prints the given element.
public
void
printElementDecl
(
Element
element)
Prints a DTD element declaration.
public
void
printElementDeclContentModel
(
Element
archetype)
Prints a DTD element declaration content model.
public
void
printElementDeclContentModelChildren
(
Element
archetype)
Prints a DTD element declaration children content model.
public
void
printElementDeclContentModelMixed
(
Element
archetype)
Prints a DTD element declaration mixed content model.
public
void
printEmptyElement
(
Element
element)
Prints an empty element.
public
void
printEntityDecl
(
Element
entity)
Prints a DTD entity declaration.
public
void
printGrammar
(
String
systemId,
DocumentType
doctype)
Prints the given grammar with the specified output format.
public
void
printIndent
(int level)
Prints an indent level.
public
void
printNotationDecl
(
Element
notation)
Prints a DTD notation declaration.
public
void
printOpenElement
(
Element
element)
Prints an open element.
protected
void
printOpenElement
(
Element
element, boolean empty)
Prints an open or empty element.
public
void
printText
(
Text
text)
Prints text.
public
void
setCanonical
(boolean canonical)
Sets whether the output is canonical.
public
void
setOutputFormat
(OutputFormat format)
Sets the output format.
public
void
setVerbose
(boolean verbose)
Sets whether the output is verbose.
Field Detail
CONTENT_MODEL_ELEMENT_NAMES
final
protected
static
String
CONTENT_MODEL_ELEMENT_NAMES
(Code)
Content model element names.
DEFAULT_OUTPUT_FORMAT
final
protected
static OutputFormat DEFAULT_OUTPUT_FORMAT
(Code)
Default output format.
canonical
protected
boolean canonical
(Code)
Canonical output.
encoding
protected
String
encoding
(Code)
Encoding.
format
protected
OutputFormat format
(Code)
Output format.
indent
protected
int indent
(Code)
Indent level.
out
protected
PrintWriter
out
(Code)
Output writer.
verbose
protected
boolean verbose
(Code)
Verbose.
Constructor Detail
XGrammarWriter
public
XGrammarWriter()
(Code)
Default constructor.
XGrammarWriter
public
XGrammarWriter(
PrintWriter
writer)
(Code)
Constructs a grammar writer with the specified print writer.
XGrammarWriter
public
XGrammarWriter(
OutputStream
stream)
(Code)
Constructs a grammar writer with the specified writer.
XGrammarWriter
public
XGrammarWriter(
Writer
writer,
String
encoding)
(Code)
Constructs a grammar writer with the specified writer.
Method Detail
containsMoreThanOneChildOfType
protected
boolean containsMoreThanOneChildOfType(
Element
node,
String
names)
(Code)
Returns true if the specified element has more than one child with any of the given names.
getFirstChildOfType
protected
Node
getFirstChildOfType(
Node
node, short type)
(Code)
Returns the first child of the given node type.
getNextSiblingOfType
protected
Node
getNextSiblingOfType(
Node
node, short type)
(Code)
Returns the next sibling of the given node type.
getOutputFormat
public
OutputFormat getOutputFormat()
(Code)
Returns the output format.
isBasicAttributeType
protected
boolean isBasicAttributeType(
String
type)
(Code)
Returns true if the attribute type is basic.
isBasicOccurrenceCount
protected
boolean isBasicOccurrenceCount(
String
minOccurs,
String
maxOccurs)
(Code)
Returns true if the occurrence count is basic.
isCanonical
public
boolean isCanonical()
(Code)
Returns true if the output is canonical.
isEmpty
protected
boolean isEmpty(
Element
element)
(Code)
Returns true if the element is "empty". In other words, if it does not contain element or text node children.
isVerbose
public
boolean isVerbose()
(Code)
Returns true if the output is verbose.
main
public
static void main(
String
argv)
(Code)
Main program.
normalize
protected
String
normalize(
String
s)
(Code)
Normalizes the given string.
parseInt
protected
int parseInt(
String
s, int defaultValue)
(Code)
Parses a string and returns the integer value.
printAttribute
public
void printAttribute(
Attr
attribute)
(Code)
Prints an attribute.
printAttributeDecl
public
void printAttributeDecl(
String
elemName,
Element
attribute)
(Code)
Prints a DTD attribute declaration.
printCloseElement
public
void printCloseElement(
Element
element)
(Code)
Prints a close element.
printComment
public
void printComment(
Element
comment)
(Code)
Prints a comment.
printElement
public
void printElement(
Element
element)
(Code)
Prints the given element.
printElementDecl
public
void printElementDecl(
Element
element)
(Code)
Prints a DTD element declaration.
printElementDeclContentModel
public
void printElementDeclContentModel(
Element
archetype)
(Code)
Prints a DTD element declaration content model.
printElementDeclContentModelChildren
public
void printElementDeclContentModelChildren(
Element
archetype)
(Code)
Prints a DTD element declaration children content model.
printElementDeclContentModelMixed
public
void printElementDeclContentModelMixed(
Element
archetype)
(Code)
Prints a DTD element declaration mixed content model.
printEmptyElement
public
void printEmptyElement(
Element
element)
(Code)
Prints an empty element.
printEntityDecl
public
void printEntityDecl(
Element
entity)
(Code)
Prints a DTD entity declaration.
printGrammar
public
void printGrammar(
String
systemId,
DocumentType
doctype)
(Code)
Prints the given grammar with the specified output format.
printIndent
public
void printIndent(int level)
(Code)
Prints an indent level.
printNotationDecl
public
void printNotationDecl(
Element
notation)
(Code)
Prints a DTD notation declaration.
printOpenElement
public
void printOpenElement(
Element
element)
(Code)
Prints an open element.
printOpenElement
protected
void printOpenElement(
Element
element, boolean empty)
(Code)
Prints an open or empty element.
printText
public
void printText(
Text
text)
(Code)
Prints text.
setCanonical
public
void setCanonical(boolean canonical)
(Code)
Sets whether the output is canonical.
setOutputFormat
public
void setOutputFormat(OutputFormat format)
(Code)
Sets the output format.
setVerbose
public
void setVerbose(boolean verbose)
(Code)
Sets whether the output is verbose.
Methods inherited from
java.lang.Object
native
protected
Object
clone() throws
CloneNotSupportedException
(Code)
(Java Doc)
public
boolean equals(
Object
obj)
(Code)
(Java Doc)
protected
void finalize() throws
Throwable
(Code)
(Java Doc)
final native
public
Class
> getClass()
(Code)
(Java Doc)
native
public
int hashCode()
(Code)
(Java Doc)
final native
public
void notify()
(Code)
(Java Doc)
final native
public
void notifyAll()
(Code)
(Java Doc)
public
String
toString()
(Code)
(Java Doc)
final native
public
void wait(long timeout) throws
InterruptedException
(Code)
(Java Doc)
final
public
void wait(long timeout, int nanos) throws
InterruptedException
(Code)
(Java Doc)
final
public
void wait() throws
InterruptedException
(Code)
(Java Doc)
www.java2java.com
|
Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.