Java Doc for NamespaceMappings.java in  » XML » xalan » org » apache » xml » serializer » 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 » xalan » org.apache.xml.serializer 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xml.serializer.NamespaceMappings

NamespaceMappings
public class NamespaceMappings (Code)
This class keeps track of the currently defined namespaces. Conceptually the prefix/uri/depth triplets are pushed on a stack pushed on a stack. The depth indicates the nesting depth of the element for which the mapping was made.

For example:

 
 
 
 
 
 
 
 
 
When the element is encounted the prefix "p1" associated with uri "def" is pushed on the stack with depth 1. When the first is encountered "p2" and "ghi" are pushed with depth 2. When the is encountered "p3" and "jkl" are pushed with depth 3. When occurs the popNamespaces(3) will pop "p3"/"jkl" off the stack. Of course popNamespaces(2) would pop anything with depth 2 or greater. So prefix/uri pairs are pushed and poped off the stack as elements are processed. At any given moment of processing the currently visible prefixes are on the stack and a prefix can be found given a uri, or a uri can be found given a prefix. This class is public only because it is used by Xalan. It is not a public API

Inner Class :class MappingRecord


Constructor Summary
public  NamespaceMappings()
    

Method Summary
public  Objectclone()
     This method makes a clone of this object.
public  StringgenerateNextPrefix()
    
 MappingRecordgetMappingFromPrefix(String prefix)
    
 MappingRecordgetMappingFromURI(String uri)
    
public  StringlookupNamespace(String prefix)
     Use a namespace prefix to lookup a namespace URI.
public  StringlookupPrefix(String uri)
     Given a namespace uri, and the namespaces mappings for the current element, return the current prefix for that uri.
 booleanpopNamespace(String prefix)
    
 voidpopNamespaces(int elemDepth, ContentHandler saxHandler)
     Pop, or undeclare all namespace definitions that are currently declared at the given element depth, or deepter.
Parameters:
  elemDepth - the element depth for which mappings declared at thisdepth or deeper will no longer be valid
Parameters:
  saxHandler - The ContentHandler to notify of any endPrefixMapping()calls.
 booleanpushNamespace(String prefix, String uri, int elemDepth)
     Declare a mapping of a prefix to namespace URI at the given element depth.
final  voidreset()
    


Constructor Detail
NamespaceMappings
public NamespaceMappings()(Code)
Default constructor
See Also:   java.lang.Object.Object




Method Detail
clone
public Object clone() throws CloneNotSupportedException(Code)
This method makes a clone of this object.



generateNextPrefix
public String generateNextPrefix()(Code)
Generate a new namespace prefix ( ns0, ns1 ...) not used before String a new namespace prefix ( ns0, ns1, ns2 ...)



getMappingFromPrefix
MappingRecord getMappingFromPrefix(String prefix)(Code)



getMappingFromURI
MappingRecord getMappingFromURI(String uri)(Code)



lookupNamespace
public String lookupNamespace(String prefix)(Code)
Use a namespace prefix to lookup a namespace URI.
Parameters:
  prefix - String the prefix of the namespace the URI corresponding to the prefix



lookupPrefix
public String lookupPrefix(String uri)(Code)
Given a namespace uri, and the namespaces mappings for the current element, return the current prefix for that uri.
Parameters:
  uri - the namespace URI to be search for an existing prefix that maps to the given URI, null if no prefixmaps to the given namespace URI.



popNamespace
boolean popNamespace(String prefix)(Code)
Undeclare the namespace that is currently pointed to by a given prefix



popNamespaces
void popNamespaces(int elemDepth, ContentHandler saxHandler)(Code)
Pop, or undeclare all namespace definitions that are currently declared at the given element depth, or deepter.
Parameters:
  elemDepth - the element depth for which mappings declared at thisdepth or deeper will no longer be valid
Parameters:
  saxHandler - The ContentHandler to notify of any endPrefixMapping()calls. This parameter can be null.



pushNamespace
boolean pushNamespace(String prefix, String uri, int elemDepth)(Code)
Declare a mapping of a prefix to namespace URI at the given element depth.
Parameters:
  prefix - a String with the prefix for a qualified name
Parameters:
  uri - a String with the uri to which the prefix is to map
Parameters:
  elemDepth - the depth of current declaration



reset
final void reset()(Code)



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.