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


java.lang.Object
   org.apache.xpath.Expression
      org.apache.xpath.objects.XObject

All known Subclasses:   org.apache.xpath.objects.XString,  org.apache.xpath.objects.XBoolean,  org.apache.xpath.axes.NodeSequence,  org.apache.xalan.templates.XUnresolvedVariable,  org.apache.xpath.objects.XNumber,  org.apache.xpath.objects.XRTreeFrag,  org.apache.xalan.templates.XUnresolvedVariableSimple,
XObject
public class XObject extends Expression implements Serializable,Cloneable(Code)
This class represents an XPath object, and is capable of converting the object to various types, such as a string. This class acts as the base class to other XPath type objects, such as XString, and provides polymorphic casting capabilities.


Field Summary
final public static  intCLASS_BOOLEAN
    
final public static  intCLASS_NODESET
    
final public static  intCLASS_NULL
    
final public static  intCLASS_NUMBER
    
final public static  intCLASS_RTREEFRAG
    
final public static  intCLASS_STRING
    
final public static  intCLASS_UNKNOWN
    
final public static  intCLASS_UNRESOLVEDVARIABLE
     Represents an unresolved variable type as an integer.
protected  Objectm_obj
     The java object which this object wraps.
final static  longserialVersionUID
    

Constructor Summary
public  XObject()
     Create an XObject.
public  XObject(Object obj)
     Create an XObject.

Method Summary
public  voidallowDetachToRelease(boolean allowRelease)
     Specify if it's OK for detach to release the iterator for reuse.
public  voidappendToFsb(org.apache.xml.utils.FastStringBuffer fsb)
     Cast result object to a string.
public  booleanbool()
     Cast result object to a boolean.
public  booleanboolWithSideEffects()
     Cast result object to a boolean, but allow side effects, such as the incrementing of an iterator.
public  voidcallVisitors(ExpressionOwner owner, XPathVisitor visitor)
    
public  ObjectcastToType(int t, XPathContext support)
     Cast object to type t.
public static  XObjectcreate(Object val)
     Create the right XObject based on the type of the object passed.
public static  XObjectcreate(Object val, XPathContext xctxt)
     Create the right XObject based on the type of the object passed. This function can make an XObject that exposes DOM Nodes, NodeLists, and NodeIterators to the XSLT stylesheet as node-sets.
Parameters:
  val - The java object which this object will wrap.
Parameters:
  xctxt - The XPath context.
public  booleandeepEquals(Expression expr)
    
public  voiddestruct()
     Forces the object to release it's resources.
public  voiddetach()
     Detaches the DTMIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state.
public  voiddispatchCharactersEvents(org.xml.sax.ContentHandler ch)
     Directly call the characters method on the passed ContentHandler for the string-value.
public  booleanequals(XObject obj2)
     Tell if two objects are functionally equal.
protected  voiderror(String msg)
     Tell the user of an error, and probably throw an exception.
protected  voiderror(String msg, Object[] args)
     Tell the user of an error, and probably throw an exception.
public  XObjectexecute(XPathContext xctxt)
     For support of literal objects in xpaths.
Parameters:
  xctxt - The XPath execution context.
public  voidfixupVariables(java.util.Vector vars, int globalsSize)
     XObjects should not normally need to fix up variables.
public  XObjectgetFresh()
     Get a fresh copy of the object.
public  intgetType()
     Tell what kind of class this is.
public  StringgetTypeString()
     Given a request type, return the equivalent string.
public  booleangreaterThan(XObject obj2)
     Tell if one object is greater than the other.
public  booleangreaterThanOrEqual(XObject obj2)
     Tell if one object is greater than or equal to the other.
public  DTMIteratoriter()
     Cast result object to a nodelist.
public  booleanlessThan(XObject obj2)
     Tell if one object is less than the other.
public  booleanlessThanOrEqual(XObject obj2)
     Tell if one object is less than or equal to the other.
public  NodeSetDTMmutableNodeset()
     Cast result object to a nodelist.
public  NodeListnodelist()
     Cast result object to a nodelist.
public  NodeIteratornodeset()
     Cast result object to a nodelist.
public  booleannotEquals(XObject obj2)
     Tell if two objects are functionally not equal.
public  doublenum()
     Cast result object to a number.
public  doublenumWithSideEffects()
     Cast result object to a number, but allow side effects, such as the incrementing of an iterator.
public  Objectobject()
     Return a java object that's closest to the representation that should be handed to an extension.
public  voidreset()
     Reset for fresh reuse.
public  intrtf(XPathContext support)
     Cast result object to a result tree fragment.
public  intrtf()
     For functions to override.
public  DocumentFragmentrtree(XPathContext support)
     Cast result object to a result tree fragment.
public  DocumentFragmentrtree()
     For functions to override.
public  Stringstr()
     Cast result object to a string.
public  StringtoString()
    
public  XMLStringxstr()
     Cast result object to a string.

Field Detail
CLASS_BOOLEAN
final public static int CLASS_BOOLEAN(Code)
Constant for BOOLEAN object type



CLASS_NODESET
final public static int CLASS_NODESET(Code)
Constant for NODESET object type



CLASS_NULL
final public static int CLASS_NULL(Code)
Constant for NULL object type



CLASS_NUMBER
final public static int CLASS_NUMBER(Code)
Constant for NUMBER object type



CLASS_RTREEFRAG
final public static int CLASS_RTREEFRAG(Code)
Constant for RESULT TREE FRAGMENT object type



CLASS_STRING
final public static int CLASS_STRING(Code)
Constant for STRING object type



CLASS_UNKNOWN
final public static int CLASS_UNKNOWN(Code)
Constant for UNKNOWN object type



CLASS_UNRESOLVEDVARIABLE
final public static int CLASS_UNRESOLVEDVARIABLE(Code)
Represents an unresolved variable type as an integer.



m_obj
protected Object m_obj(Code)
The java object which this object wraps.



serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
XObject
public XObject()(Code)
Create an XObject.



XObject
public XObject(Object obj)(Code)
Create an XObject.
Parameters:
  obj - Can be any object, should be a specific typefor derived classes, or null.




Method Detail
allowDetachToRelease
public void allowDetachToRelease(boolean allowRelease)(Code)
Specify if it's OK for detach to release the iterator for reuse. This function should be called with a value of false for objects that are stored in variables. Calling this with a value of false on a XNodeSet will cause the nodeset to be cached.
Parameters:
  allowRelease - true if it is OK for detach to release this iteratorfor pooling.



appendToFsb
public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb)(Code)
Cast result object to a string. NEEDSDOC @param fsb The string this wraps or the empty string if null



bool
public boolean bool() throws javax.xml.transform.TransformerException(Code)
Cast result object to a boolean. Always issues an error. false
throws:
  javax.xml.transform.TransformerException -



boolWithSideEffects
public boolean boolWithSideEffects() throws javax.xml.transform.TransformerException(Code)
Cast result object to a boolean, but allow side effects, such as the incrementing of an iterator. True if there is a next node in the nodeset



callVisitors
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)(Code)

See Also:   org.apache.xpath.XPathVisitable.callVisitors(ExpressionOwnerXPathVisitor)



castToType
public Object castToType(int t, XPathContext support) throws javax.xml.transform.TransformerException(Code)
Cast object to type t.
Parameters:
  t - Type of object to cast this to
Parameters:
  support - XPath context to use for the conversion This object as the given type t
throws:
  javax.xml.transform.TransformerException -



create
public static XObject create(Object val)(Code)
Create the right XObject based on the type of the object passed. This function can not make an XObject that exposes DOM Nodes, NodeLists, and NodeIterators to the XSLT stylesheet as node-sets.
Parameters:
  val - The java object which this object will wrap. the right XObject based on the type of the object passed.



create
public static XObject create(Object val, XPathContext xctxt)(Code)
Create the right XObject based on the type of the object passed. This function can make an XObject that exposes DOM Nodes, NodeLists, and NodeIterators to the XSLT stylesheet as node-sets.
Parameters:
  val - The java object which this object will wrap.
Parameters:
  xctxt - The XPath context. the right XObject based on the type of the object passed.



deepEquals
public boolean deepEquals(Expression expr)(Code)

See Also:   Expression.deepEquals(Expression)



destruct
public void destruct()(Code)
Forces the object to release it's resources. This is more harsh than detach().



detach
public void detach()(Code)
Detaches the DTMIterator from the set which it iterated over, releasing any computational resources and placing the iterator in the INVALID state. After detach has been invoked, calls to nextNode or previousNode will raise a runtime exception.



dispatchCharactersEvents
public void dispatchCharactersEvents(org.xml.sax.ContentHandler ch) throws org.xml.sax.SAXException(Code)
Directly call the characters method on the passed ContentHandler for the string-value. Multiple calls to the ContentHandler's characters methods may well occur for a single call to this method.
Parameters:
  ch - A non-null reference to a ContentHandler.
throws:
  org.xml.sax.SAXException -



equals
public boolean equals(XObject obj2)(Code)
Tell if two objects are functionally equal.
Parameters:
  obj2 - Object to compare this to True if this object is equal to the given object
throws:
  javax.xml.transform.TransformerException -



error
protected void error(String msg) throws javax.xml.transform.TransformerException(Code)
Tell the user of an error, and probably throw an exception.
Parameters:
  msg - Error message to issue
throws:
  javax.xml.transform.TransformerException -



error
protected void error(String msg, Object[] args) throws javax.xml.transform.TransformerException(Code)
Tell the user of an error, and probably throw an exception.
Parameters:
  msg - Error message to issue
Parameters:
  args - Arguments to use in the message
throws:
  javax.xml.transform.TransformerException -



execute
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException(Code)
For support of literal objects in xpaths.
Parameters:
  xctxt - The XPath execution context. This object.
throws:
  javax.xml.transform.TransformerException -



fixupVariables
public void fixupVariables(java.util.Vector vars, int globalsSize)(Code)
XObjects should not normally need to fix up variables.



getFresh
public XObject getFresh()(Code)
Get a fresh copy of the object. For use with variables. This object, unless overridden by subclass.



getType
public int getType()(Code)
Tell what kind of class this is. CLASS_UNKNOWN



getTypeString
public String getTypeString()(Code)
Given a request type, return the equivalent string. For diagnostic purposes. type string "#UNKNOWN" + object class name



greaterThan
public boolean greaterThan(XObject obj2) throws javax.xml.transform.TransformerException(Code)
Tell if one object is greater than the other.
Parameters:
  obj2 - Object to compare this to True if this object is greater than the given object
throws:
  javax.xml.transform.TransformerException -



greaterThanOrEqual
public boolean greaterThanOrEqual(XObject obj2) throws javax.xml.transform.TransformerException(Code)
Tell if one object is greater than or equal to the other.
Parameters:
  obj2 - Object to compare this to True if this object is greater than or equal to the given object
throws:
  javax.xml.transform.TransformerException -



iter
public DTMIterator iter() throws javax.xml.transform.TransformerException(Code)
Cast result object to a nodelist. Always issues an error. null
throws:
  javax.xml.transform.TransformerException -



lessThan
public boolean lessThan(XObject obj2) throws javax.xml.transform.TransformerException(Code)
Tell if one object is less than the other.
Parameters:
  obj2 - Object to compare this to True if this object is less than the given object
throws:
  javax.xml.transform.TransformerException -



lessThanOrEqual
public boolean lessThanOrEqual(XObject obj2) throws javax.xml.transform.TransformerException(Code)
Tell if one object is less than or equal to the other.
Parameters:
  obj2 - Object to compare this to True if this object is less than or equal to the given object
throws:
  javax.xml.transform.TransformerException -



mutableNodeset
public NodeSetDTM mutableNodeset() throws javax.xml.transform.TransformerException(Code)
Cast result object to a nodelist. Always issues an error. The object as a NodeSetDTM.
throws:
  javax.xml.transform.TransformerException -



nodelist
public NodeList nodelist() throws javax.xml.transform.TransformerException(Code)
Cast result object to a nodelist. Always issues an error. null
throws:
  javax.xml.transform.TransformerException -



nodeset
public NodeIterator nodeset() throws javax.xml.transform.TransformerException(Code)
Cast result object to a nodelist. Always issues an error. null
throws:
  javax.xml.transform.TransformerException -



notEquals
public boolean notEquals(XObject obj2) throws javax.xml.transform.TransformerException(Code)
Tell if two objects are functionally not equal.
Parameters:
  obj2 - Object to compare this to True if this object is not equal to the given object
throws:
  javax.xml.transform.TransformerException -



num
public double num() throws javax.xml.transform.TransformerException(Code)
Cast result object to a number. Always issues an error. 0.0
throws:
  javax.xml.transform.TransformerException -



numWithSideEffects
public double numWithSideEffects() throws javax.xml.transform.TransformerException(Code)
Cast result object to a number, but allow side effects, such as the incrementing of an iterator. numeric value of the string conversion from the next node in the NodeSetDTM, or NAN if no node was found



object
public Object object()(Code)
Return a java object that's closest to the representation that should be handed to an extension. The object that this class wraps



reset
public void reset()(Code)
Reset for fresh reuse.



rtf
public int rtf(XPathContext support)(Code)
Cast result object to a result tree fragment.
Parameters:
  support - XPath context to use for the conversion the objec as a result tree fragment.



rtf
public int rtf()(Code)
For functions to override. null



rtree
public DocumentFragment rtree(XPathContext support)(Code)
Cast result object to a result tree fragment.
Parameters:
  support - XPath context to use for the conversion the objec as a result tree fragment.



rtree
public DocumentFragment rtree()(Code)
For functions to override. null



str
public String str()(Code)
Cast result object to a string. The object as a string



toString
public String toString()(Code)
Return the string representation of the object the string representation of the object



xstr
public XMLString xstr()(Code)
Cast result object to a string. The string this wraps or the empty string if null



Methods inherited from org.apache.xpath.Expression
public DTMIterator asIterator(XPathContext xctxt, int contextNode) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public DTMIterator asIteratorRaw(XPathContext xctxt, int contextNode) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public int asNode(XPathContext xctxt) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public void assertion(boolean b, java.lang.String msg)(Code)(Java Doc)
public boolean bool(XPathContext xctxt) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public boolean canTraverseOutsideSubtree()(Code)(Java Doc)
abstract public boolean deepEquals(Expression expr)(Code)(Java Doc)
public void error(XPathContext xctxt, String msg, Object[] args) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public XObject execute(XPathContext xctxt, int currentNode) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public XObject execute(XPathContext xctxt, int currentNode, DTM dtm, int expType) throws javax.xml.transform.TransformerException(Code)(Java Doc)
abstract public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public XObject execute(XPathContext xctxt, boolean destructiveOK) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public void executeCharsToContentHandler(XPathContext xctxt, ContentHandler handler) throws javax.xml.transform.TransformerException, org.xml.sax.SAXException(Code)(Java Doc)
public void exprAddChild(ExpressionNode n, int i)(Code)(Java Doc)
public ExpressionNode exprGetChild(int i)(Code)(Java Doc)
public int exprGetNumChildren()(Code)(Java Doc)
public ExpressionNode exprGetParent()(Code)(Java Doc)
public void exprSetParent(ExpressionNode n)(Code)(Java Doc)
abstract public void fixupVariables(java.util.Vector vars, int globalsSize)(Code)(Java Doc)
public int getColumnNumber()(Code)(Java Doc)
public ExpressionNode getExpressionOwner()(Code)(Java Doc)
public int getLineNumber()(Code)(Java Doc)
public String getPublicId()(Code)(Java Doc)
public String getSystemId()(Code)(Java Doc)
public boolean isNodesetExpr()(Code)(Java Doc)
final protected boolean isSameClass(Expression expr)(Code)(Java Doc)
public boolean isStableNumber()(Code)(Java Doc)
public double num(XPathContext xctxt) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public void warn(XPathContext xctxt, String msg, Object[] args) throws javax.xml.transform.TransformerException(Code)(Java Doc)
public XMLString xstr(XPathContext xctxt) throws javax.xml.transform.TransformerException(Code)(Java Doc)

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.