Java Doc for XMLWriterNamespaceBase.java in  » XML » jibx-1.1.5 » org » jibx » runtime » impl » 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 » XML » jibx 1.1.5 » org.jibx.runtime.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jibx.runtime.impl.XMLWriterNamespaceBase

All known Subclasses:   org.jibx.runtime.impl.XMLWriterBase,  org.jibx.runtime.impl.StAXWriter,  org.jibx.extras.JDOMWriter,
XMLWriterNamespaceBase
abstract public class XMLWriterNamespaceBase implements IXMLWriter(Code)
Base implementation of XML writer interface namespace handling. This tracks only the namespace declarations and the element nesting depth. It can be used as a base class for all forms of output.
author:
   Dennis M. Sosnoski
version:
   1.0


Field Summary
protected  String[]m_prefixes
     Prefixes currently defined for namespaces.
protected  String[]m_uris
     URIs for namespaces.

Constructor Summary
public  XMLWriterNamespaceBase(String[] uris)
     Constructor.
public  XMLWriterNamespaceBase(XMLWriterNamespaceBase base, String[] uris)
     Copy constructor.

Method Summary
protected  voiddecrementNesting()
     Decrement the current nesting depth.
abstract protected  voiddefineNamespace(int index, String prefix)
     Report to subclass that namespace has been defined.
final public  String[][]getExtensionNamespaces()
     Get extension namespace URIs added to those in mapping.
final public  intgetNamespaceCount()
     Get the number of namespaces currently defined.
final public  StringgetNamespacePrefix(int index)
     Get current prefix defined for namespace.
final public  StringgetNamespaceUri(int index)
     Get URI for namespace.
final public  String[]getNamespaces()
     Get namespace URIs for mapping.
final public  intgetNestingDepth()
     Get the current element nesting depth.
final public  intgetPrefixIndex(String prefix)
     Get index of namespace mapped to prefix.
protected static  String[][]growArray(String[][] base, String[] items)
     Grow array of array of strings.
protected  voidincrementNesting()
     Increment the current nesting depth.
public  int[]openNamespaces(int[] nums, String[] prefs)
     Open the specified namespaces.
public  voidpopExtensionNamespaces()
     Remove extension namespace URIs.
public  voidpushExtensionNamespaces(String[] uris)
     Append extension namespace URIs to those in mapping.
public  voidreset()
     Reset to initial state for reuse.
protected static  String[][]shrinkArray(String[][] base)
     Shrink array of array of strings.
abstract protected  voidundefineNamespace(int index)
     Report to subclass that namespace has been undefined.

Field Detail
m_prefixes
protected String[] m_prefixes(Code)
Prefixes currently defined for namespaces.



m_uris
protected String[] m_uris(Code)
URIs for namespaces.




Constructor Detail
XMLWriterNamespaceBase
public XMLWriterNamespaceBase(String[] uris)(Code)
Constructor.
Parameters:
  uris - ordered array of URIs for namespaces used in document (mustbe constant; the value in position 0 must always be the empty string "",and the value in position 1 must always be the XML namespace"http://www.w3.org/XML/1998/namespace")



XMLWriterNamespaceBase
public XMLWriterNamespaceBase(XMLWriterNamespaceBase base, String[] uris)(Code)
Copy constructor. This initializes the extension namespace information from an existing instance.
Parameters:
  base - existing instance
Parameters:
  uris - ordered array of URIs for namespaces used in document




Method Detail
decrementNesting
protected void decrementNesting()(Code)
Decrement the current nesting depth. Subclasses need to call this method whenever an element end tag is written.



defineNamespace
abstract protected void defineNamespace(int index, String prefix) throws IOException(Code)
Report to subclass that namespace has been defined.
Parameters:
  index - namespace URI index number
Parameters:
  prefix - prefix used for namespace
throws:
  IOException - if error writing to document



getExtensionNamespaces
final public String[][] getExtensionNamespaces()(Code)
Get extension namespace URIs added to those in mapping. This gets the current set of extension definitions. The returned arrays must not be modified. array of arrays of extension namespaces (null ifnone)



getNamespaceCount
final public int getNamespaceCount()(Code)
Get the number of namespaces currently defined. This is equivalent to the index of the next extension namespace added. namespace count



getNamespacePrefix
final public String getNamespacePrefix(int index)(Code)
Get current prefix defined for namespace.
Parameters:
  index - namespace URI index number current prefix text, or null if the namespace is notcurrently mapped



getNamespaceUri
final public String getNamespaceUri(int index)(Code)
Get URI for namespace.
Parameters:
  index - namespace URI index number namespace URI text, or null if the namespace indexis invalid



getNamespaces
final public String[] getNamespaces()(Code)
Get namespace URIs for mapping. This gets the full ordered array of namespaces known in the binding used for this marshalling, where the index number of each namespace URI is the namespace index used to lookup the prefix when marshalling a name in that namespace. The returned array must not be modified. array of namespaces



getNestingDepth
final public int getNestingDepth()(Code)
Get the current element nesting depth. Elements are only counted in the depth returned when they're officially open - after the start tag has been output and before the end tag has been output. number of nested elements at current point in output



getPrefixIndex
final public int getPrefixIndex(String prefix)(Code)
Get index of namespace mapped to prefix. This can be an expensive operation with time proportional to the number of namespaces defined, so it should be used with care.
Parameters:
  prefix - text to match (non-null, use "" for defaultprefix) index namespace URI index number mapped to prefix



growArray
protected static String[][] growArray(String[][] base, String[] items)(Code)
Grow array of array of strings.
Parameters:
  base - array to be grown (null is treated as zerolength)
Parameters:
  items - array of strings to be added at end of base array array with added array of items



incrementNesting
protected void incrementNesting()(Code)
Increment the current nesting depth. Subclasses need to call this method whenever an element start tag is written.



openNamespaces
public int[] openNamespaces(int[] nums, String[] prefs) throws IOException(Code)
Open the specified namespaces. Previously active namespace declarations are not duplicated.
Parameters:
  nums - array of namespace indexes defined by this element (mustbe constant, reference is kept until end of element)
Parameters:
  prefs - array of namespace prefixes mapped by this element (nonull values, use "" for default namespace declaration) array of indexes for namespaces not previously active (the onesactually needing to be declared, in the case of text output)
throws:
  IOException - on error writing to document



popExtensionNamespaces
public void popExtensionNamespaces()(Code)
Remove extension namespace URIs. This removes the last set of extension namespaces pushed using XMLWriterNamespaceBase.pushExtensionNamespaces .



pushExtensionNamespaces
public void pushExtensionNamespaces(String[] uris)(Code)
Append extension namespace URIs to those in mapping.
Parameters:
  uris - namespace URIs to extend those in mapping



reset
public void reset()(Code)
Reset to initial state for reuse. Subclasses overriding this method need to call this base class implementation during their processing.



shrinkArray
protected static String[][] shrinkArray(String[][] base)(Code)
Shrink array of array of strings.
Parameters:
  base - array to be shrunk array with last set of items eliminated (null ifempty)



undefineNamespace
abstract protected void undefineNamespace(int index)(Code)
Report to subclass that namespace has been undefined.
Parameters:
  index - namespace URI index number



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.