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


java.lang.Object
   org.apache.xml.dtm.DTMManager

All known Subclasses:   org.apache.xml.dtm.ref.DTMManagerDefault,  org.apache.xpath.XPathContext,
DTMManager
abstract public class DTMManager (Code)
A DTMManager instance can be used to create DTM and DTMIterator objects, and manage the DTM objects in the system.

The system property that determines which Factory implementation to create is named "org.apache.xml.utils.DTMFactory". This property names a concrete subclass of the DTMFactory abstract class. If the property is not defined, a platform default is be used.

An instance of this class must be safe to use across thread instances. It is expected that a client will create a single instance of a DTMManager to use across multiple threads. This will allow sharing of DTMs across multiple processes.

Note: this class is incomplete right now. It will be pretty much modeled after javax.xml.transform.TransformerFactory in terms of its factory support.

State: In progress!!



Field Summary
final public static  intIDENT_DTM_DEFAULT
     When this bitmask is ANDed with a DTM node handle number, the result is the DTM's document identity number.
final public static  intIDENT_DTM_NODE_BITS
     This value, set at compile time, controls how many bits of the DTM node identifier numbers are used to identify a node within a document, and thus sets the maximum number of nodes per document.
final public static  intIDENT_MAX_DTMS
     This is the maximum number of DTMs available.
final public static  intIDENT_NODE_DEFAULT
     When this bitmask is ANDed with a DTM node handle number, the result is the low bits of the node's index number within that DTM.
public  booleanm_incremental
    
public  booleanm_source_location
    
protected  XMLStringFactorym_xsf
     Factory for creating XMLString objects.

Constructor Summary
protected  DTMManager()
     Default constructor is protected on purpose.

Method Summary
abstract public  DTMIteratorcreateDTMIterator(Object xpathCompiler, int pos)
     Create a new DTMIterator based on an XPath UnionExpr.
Parameters:
  xpathCompiler - ??? Somehow we need to pass in a subpart of theexpression.
abstract public  DTMIteratorcreateDTMIterator(String xpathString, PrefixResolver presolver)
     Create a new DTMIterator based on an XPath UnionExpr.
Parameters:
  xpathString - Must be a valid string expressing aUnionExpr.
Parameters:
  presolver - An object that can resolve prefixes to namespace URLs.
abstract public  DTMIteratorcreateDTMIterator(int whatToShow, DTMFilter filter, boolean entityReferenceExpansion)
     Create a new DTMIterator based only on a whatToShow and a DTMFilter.
abstract public  DTMIteratorcreateDTMIterator(int node)
     Create a new DTMIterator that holds exactly one node.
Parameters:
  node - The node handle that the DTMIterator will iterate to.
abstract public  DTMcreateDocumentFragment()
     Creates a DTM representing an empty DocumentFragment object.
abstract public  DTMgetDTM(javax.xml.transform.Source source, boolean unique, DTMWSFilter whiteSpaceFilter, boolean incremental, boolean doIndexing)
     Get an instance of a DTM, loaded with the content from the specified source.
abstract public  DTMgetDTM(int nodeHandle)
     Get the instance of DTM that "owns" a node handle.
Parameters:
  nodeHandle - the nodeHandle.
abstract public  intgetDTMHandleFromNode(org.w3c.dom.Node node)
     Given a W3C DOM node, try and return a DTM handle. Note: calling this may be non-optimal.
Parameters:
  node - Non-null reference to a DOM node.
abstract public  intgetDTMIdentity(DTM dtm)
    
public  intgetDTMIdentityMask()
    
public  booleangetIncremental()
    
public  intgetNodeIdentityMask()
    
public  booleangetSource_location()
     Get a flag indicating whether the transformation phase should keep track of line and column numbers for the input source document.
public  XMLStringFactorygetXMLStringFactory()
     Get the XMLStringFactory used for the DTMs.
public static  DTMManagernewInstance(XMLStringFactory xsf)
     Obtain a new instance of a DTMManager. This static method creates a new factory instance This method uses the following ordered lookup procedure to determine the DTMManager implementation class to load:
  • Use the org.apache.xml.dtm.DTMManager system property.
  • Use the JAVA_HOME(the parent directory where jdk is installed)/lib/xalan.properties for a property file that contains the name of the implementation class keyed on the same value as the system property defined above.
  • Use the Services API (as detailed in the JAR specification), if available, to determine the classname.
abstract public  booleanrelease(DTM dtm, boolean shouldHardDelete)
     Release a DTM either to a lru pool, or completely remove reference. DTMs without system IDs are always hard deleted. State: experimental.
Parameters:
  dtm - The DTM to be released.
Parameters:
  shouldHardDelete - True if the DTM should be removed no matter what.
public  voidsetIncremental(boolean incremental)
    
public  voidsetSource_location(boolean sourceLocation)
     Set a flag indicating whether the transformation phase should keep track of line and column numbers for the input source document.
public  voidsetXMLStringFactory(XMLStringFactory xsf)
     Set the XMLStringFactory used for the DTMs.

Field Detail
IDENT_DTM_DEFAULT
final public static int IDENT_DTM_DEFAULT(Code)
When this bitmask is ANDed with a DTM node handle number, the result is the DTM's document identity number.



IDENT_DTM_NODE_BITS
final public static int IDENT_DTM_NODE_BITS(Code)
This value, set at compile time, controls how many bits of the DTM node identifier numbers are used to identify a node within a document, and thus sets the maximum number of nodes per document. The remaining bits are used to identify the DTM document which contains this node. If you change IDENT_DTM_NODE_BITS, be sure to rebuild _ALL_ the files which use it... including the IDKey testcases. (FuncGenerateKey currently uses the node identifier directly and thus is affected when this changes. The IDKEY results will still be _correct_ (presuming no other breakage), but simple equality comparison against the previous "golden" files will probably complain.)



IDENT_MAX_DTMS
final public static int IDENT_MAX_DTMS(Code)
This is the maximum number of DTMs available. The highest DTM is one less than this.



IDENT_NODE_DEFAULT
final public static int IDENT_NODE_DEFAULT(Code)
When this bitmask is ANDed with a DTM node handle number, the result is the low bits of the node's index number within that DTM. To obtain the high bits, add the DTM ID portion's offset as assigned in the DTM Manager.



m_incremental
public boolean m_incremental(Code)



m_source_location
public boolean m_source_location(Code)



m_xsf
protected XMLStringFactory m_xsf(Code)
Factory for creating XMLString objects. %TBD% Make this set by the caller.




Constructor Detail
DTMManager
protected DTMManager()(Code)
Default constructor is protected on purpose.




Method Detail
createDTMIterator
abstract public DTMIterator createDTMIterator(Object xpathCompiler, int pos)(Code)
Create a new DTMIterator based on an XPath UnionExpr.
Parameters:
  xpathCompiler - ??? Somehow we need to pass in a subpart of theexpression. I hate to do this with strings, since the larger expressionhas already been parsed.
Parameters:
  pos - The position in the expression. The newly created DTMIterator.



createDTMIterator
abstract public DTMIterator createDTMIterator(String xpathString, PrefixResolver presolver)(Code)
Create a new DTMIterator based on an XPath UnionExpr.
Parameters:
  xpathString - Must be a valid string expressing aUnionExpr.
Parameters:
  presolver - An object that can resolve prefixes to namespace URLs. The newly created DTMIterator.



createDTMIterator
abstract public DTMIterator createDTMIterator(int whatToShow, DTMFilter filter, boolean entityReferenceExpansion)(Code)
Create a new DTMIterator based only on a whatToShow and a DTMFilter. The traversal semantics are defined as the descendant access.

Note that DTMIterators may not be an exact match to DOM NodeIterators. They are initialized and used in much the same way as a NodeIterator, but their response to document mutation is not currently defined.
Parameters:
  whatToShow - This flag specifies which node types may appear inthe logical view of the tree presented by the iterator. See thedescription of NodeFilter for the set of possibleSHOW_ values.These flags can be combined usingOR.
Parameters:
  filter - The NodeFilter to be used with thisDTMFilter, or null to indicate no filter.
Parameters:
  entityReferenceExpansion - The value of this flag determineswhether entity reference nodes are expanded. The newly created DTMIterator.




createDTMIterator
abstract public DTMIterator createDTMIterator(int node)(Code)
Create a new DTMIterator that holds exactly one node.
Parameters:
  node - The node handle that the DTMIterator will iterate to. The newly created DTMIterator.



createDocumentFragment
abstract public DTM createDocumentFragment()(Code)
Creates a DTM representing an empty DocumentFragment object. a non-null DTM reference.



getDTM
abstract public DTM getDTM(javax.xml.transform.Source source, boolean unique, DTMWSFilter whiteSpaceFilter, boolean incremental, boolean doIndexing)(Code)
Get an instance of a DTM, loaded with the content from the specified source. If the unique flag is true, a new instance will always be returned. Otherwise it is up to the DTMManager to return a new instance or an instance that it already created and may be being used by someone else. (More parameters may eventually need to be added for error handling and entity resolution, and to better control selection of implementations.)
Parameters:
  source - the specification of the source object, which may be null,in which case it is assumed that node construction will takeby some other means.
Parameters:
  unique - true if the returned DTM must be unique, probably because itis going to be mutated.
Parameters:
  whiteSpaceFilter - Enables filtering of whitespace nodes, and maybe null.
Parameters:
  incremental - true if the DTM should be built incrementally, ifpossible.
Parameters:
  doIndexing - true if the caller considers it worth it to use indexing schemes. a non-null DTM reference.



getDTM
abstract public DTM getDTM(int nodeHandle)(Code)
Get the instance of DTM that "owns" a node handle.
Parameters:
  nodeHandle - the nodeHandle. a non-null DTM reference.



getDTMHandleFromNode
abstract public int getDTMHandleFromNode(org.w3c.dom.Node node)(Code)
Given a W3C DOM node, try and return a DTM handle. Note: calling this may be non-optimal.
Parameters:
  node - Non-null reference to a DOM node. a valid DTM handle.



getDTMIdentity
abstract public int getDTMIdentity(DTM dtm)(Code)
%TBD% Doc NEEDSDOC @param dtm NEEDSDOC ($objectName$) @return



getDTMIdentityMask
public int getDTMIdentityMask()(Code)
%TBD% Doc NEEDSDOC ($objectName$) @return



getIncremental
public boolean getIncremental()(Code)
Get a flag indicating whether an incremental transform is desired incremental boolean.



getNodeIdentityMask
public int getNodeIdentityMask()(Code)
%TBD% Doc NEEDSDOC ($objectName$) @return



getSource_location
public boolean getSource_location()(Code)
Get a flag indicating whether the transformation phase should keep track of line and column numbers for the input source document. source location boolean



getXMLStringFactory
public XMLStringFactory getXMLStringFactory()(Code)
Get the XMLStringFactory used for the DTMs. a valid XMLStringFactory object, or null if it hasn't been set yet.



newInstance
public static DTMManager newInstance(XMLStringFactory xsf) throws DTMConfigurationException(Code)
Obtain a new instance of a DTMManager. This static method creates a new factory instance This method uses the following ordered lookup procedure to determine the DTMManager implementation class to load:
  • Use the org.apache.xml.dtm.DTMManager system property.
  • Use the JAVA_HOME(the parent directory where jdk is installed)/lib/xalan.properties for a property file that contains the name of the implementation class keyed on the same value as the system property defined above.
  • Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/org.apache.xml.dtm.DTMManager in jars available to the runtime.
  • Use the default DTMManager classname, which is org.apache.xml.dtm.ref.DTMManagerDefault.
Once an application has obtained a reference to a DTMManager it can use the factory to configure and obtain parser instances. new DTMManager instance, never null.
throws:
  DTMConfigurationException - if the implementation is not available or cannot be instantiated.



release
abstract public boolean release(DTM dtm, boolean shouldHardDelete)(Code)
Release a DTM either to a lru pool, or completely remove reference. DTMs without system IDs are always hard deleted. State: experimental.
Parameters:
  dtm - The DTM to be released.
Parameters:
  shouldHardDelete - True if the DTM should be removed no matter what. true if the DTM was removed, false if it was put back in a lru pool.



setIncremental
public void setIncremental(boolean incremental)(Code)
Set a flag indicating whether an incremental transform is desired This flag should have the same value as the FEATURE_INCREMENTAL feature which is set by the TransformerFactory.setAttribut() method before a DTMManager is created
Parameters:
  incremental - boolean to use to set m_incremental.



setSource_location
public void setSource_location(boolean sourceLocation)(Code)
Set a flag indicating whether the transformation phase should keep track of line and column numbers for the input source document. This flag should have the same value as the FEATURE_SOURCE_LOCATION feature which is set by the TransformerFactory.setAttribut() method before a DTMManager is created
Parameters:
  sourceLocation - boolean to use to set m_source_location



setXMLStringFactory
public void setXMLStringFactory(XMLStringFactory xsf)(Code)
Set the XMLStringFactory used for the DTMs.
Parameters:
  xsf - a valid XMLStringFactory object, should not be null.



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.