Java Doc for NodeList.java in  » Template-Engine » Velocity » org » apache » velocity » anakia » 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 » Template Engine » Velocity » org.apache.velocity.anakia 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.velocity.anakia.NodeList

NodeList
public class NodeList implements List,Cloneable(Code)
Provides a class for wrapping a list of JDOM objects primarily for use in template engines and other kinds of text transformation tools. It has a NodeList.toString() method that will output the XML serialized form of the nodes it contains - again focusing on template engine usage, as well as the NodeList.selectNodes(String) method that helps selecting a different set of nodes starting from the nodes in this list. The class also implements the java.util.List interface by simply delegating calls to the contained list (the NodeList.subList(int,int) method is implemented by delegating to the contained list and wrapping the returned sublist into a NodeList).
author:
   Attila Szegedi
version:
   $Id: NodeList.java 463298 2006-10-12 16:10:32Z henning $



Constructor Summary
public  NodeList()
     Creates an empty node list.
public  NodeList(Document document)
     Creates a node list that holds a single Document node.
public  NodeList(Element element)
     Creates a node list that holds a single Element node.
public  NodeList(List nodes)
     Creates a node list that holds a list of nodes.
Parameters:
  nodes - the list of nodes this template should hold.
public  NodeList(List nodes, boolean copy)
     Creates a node list that holds a list of nodes.
Parameters:
  nodes - the list of nodes this template should hold.
Parameters:
  copy - if true, the created template will copy the passed nodeslist, so changes to the passed list will not affect the model.

Method Summary
public  booleanadd(Object o)
    
public  voidadd(int index, Object o)
    
public  booleanaddAll(Collection c)
    
public  booleanaddAll(int index, Collection c)
    
public  voidclear()
    
public  Objectclone()
     Returns a NodeList that contains the same nodes as this node list.
public  booleancontains(Object o)
    
public  booleancontainsAll(Collection c)
    
public  booleanequals(Object o)
     Tests for equality with another object.
public  Objectget(int index)
    
public  ListgetList()
     Retrieves the underlying list used to store the nodes.
public  inthashCode()
     Returns the hash code of the contained list.
public  intindexOf(Object o)
    
public  booleanisEmpty()
    
public  Iteratoriterator()
    
public  intlastIndexOf(Object o)
    
public  ListIteratorlistIterator()
    
public  ListIteratorlistIterator(int index)
    
public  Objectremove(int index)
    
public  booleanremove(Object o)
    
public  booleanremoveAll(Collection c)
    
public  booleanretainAll(Collection c)
    
public  NodeListselectNodes(String xpathString)
     Applies an XPath expression to the node list and returns the resulting node list.
public  Objectset(int index, Object o)
    
public  intsize()
    
public  ListsubList(int fromIndex, int toIndex)
    
public  Object[]toArray()
    
public  Object[]toArray(Object[] a)
    
public  StringtoString()
     This method returns the string resulting from concatenation of string representations of its nodes.


Constructor Detail
NodeList
public NodeList()(Code)
Creates an empty node list.



NodeList
public NodeList(Document document)(Code)
Creates a node list that holds a single Document node.
Parameters:
  document -



NodeList
public NodeList(Element element)(Code)
Creates a node list that holds a single Element node.
Parameters:
  element -



NodeList
public NodeList(List nodes)(Code)
Creates a node list that holds a list of nodes.
Parameters:
  nodes - the list of nodes this template should hold. The createdtemplate will copy the passed nodes list, so changes to the passed listwill not affect the model.



NodeList
public NodeList(List nodes, boolean copy)(Code)
Creates a node list that holds a list of nodes.
Parameters:
  nodes - the list of nodes this template should hold.
Parameters:
  copy - if true, the created template will copy the passed nodeslist, so changes to the passed list will not affect the model. If false,the model will reference the passed list and will sense changes in it,altough no operations on the list will be synchronized.




Method Detail
add
public boolean add(Object o)(Code)

See Also:   java.util.List.add(java.lang.Object)



add
public void add(int index, Object o)(Code)

See Also:   java.util.List.add(intjava.lang.Object)



addAll
public boolean addAll(Collection c)(Code)

See Also:   java.util.List.addAll(java.util.Collection)



addAll
public boolean addAll(int index, Collection c)(Code)

See Also:   java.util.List.addAll(intjava.util.Collection)



clear
public void clear()(Code)

See Also:   java.util.List.clear



clone
public Object clone() throws CloneNotSupportedException(Code)
Returns a NodeList that contains the same nodes as this node list. A clone of this list.
throws:
  CloneNotSupportedException - if the contained list's class doesnot have an accessible no-arg constructor.



contains
public boolean contains(Object o)(Code)

See Also:   java.util.List.contains(java.lang.Object)



containsAll
public boolean containsAll(Collection c)(Code)

See Also:   java.util.List.containsAll(java.util.Collection)



equals
public boolean equals(Object o)(Code)
Tests for equality with another object.
Parameters:
  o - the object to test for equality true if the other object is also a NodeList and their containedList objects evaluate as equals.



get
public Object get(int index)(Code)

See Also:   java.util.List.get(int)



getList
public List getList()(Code)
Retrieves the underlying list used to store the nodes. Note however, that you can fully use the underlying list through the List interface of this class itself. You would probably access the underlying list only for synchronization purposes. The internal node List.



hashCode
public int hashCode()(Code)
Returns the hash code of the contained list. The hashcode of the list.



indexOf
public int indexOf(Object o)(Code)

See Also:   java.util.List.indexOf(java.lang.Object)



isEmpty
public boolean isEmpty()(Code)

See Also:   java.util.List.isEmpty



iterator
public Iterator iterator()(Code)

See Also:   java.util.List.iterator



lastIndexOf
public int lastIndexOf(Object o)(Code)

See Also:   java.util.List.lastIndexOf(java.lang.Object)



listIterator
public ListIterator listIterator()(Code)

See Also:   java.util.List.listIterator



listIterator
public ListIterator listIterator(int index)(Code)

See Also:   java.util.List.listIterator(int)



remove
public Object remove(int index)(Code)

See Also:   java.util.List.remove(int)



remove
public boolean remove(Object o)(Code)

See Also:   java.util.List.remove(java.lang.Object)



removeAll
public boolean removeAll(Collection c)(Code)

See Also:   java.util.List.removeAll(java.util.Collection)



retainAll
public boolean retainAll(Collection c)(Code)

See Also:   java.util.List.retainAll(java.util.Collection)



selectNodes
public NodeList selectNodes(String xpathString)(Code)
Applies an XPath expression to the node list and returns the resulting node list. In order for this method to work, your application must have access to werken.xpath library classes. The implementation does cache the parsed format of XPath expressions in a weak hash map, keyed by the string representation of the XPath expression. As the string object passed as the argument is usually kept in the parsed template, this ensures that each XPath expression is parsed only once during the lifetime of the template that first invoked it.
Parameters:
  xpathString - the XPath expression you wish to apply a NodeList representing the nodes that are the result ofapplication of the XPath to the current node list. It can be empty.



set
public Object set(int index, Object o)(Code)

See Also:   java.util.List.set(intjava.lang.Object)



size
public int size()(Code)

See Also:   java.util.List.size



subList
public List subList(int fromIndex, int toIndex)(Code)

See Also:   java.util.List.subList(intint)



toArray
public Object[] toArray()(Code)

See Also:   java.util.List.toArray



toArray
public Object[] toArray(Object[] a)(Code)

See Also:   java.util.List.toArray(java.lang.Object[])



toString
public String toString()(Code)
This method returns the string resulting from concatenation of string representations of its nodes. Each node is rendered using its XML serialization format. This greatly simplifies creating XML-transformation templates, as to output a node contained in variable x as XML fragment, you simply write ${x} in the template (or whatever your template engine uses as its expression syntax). The Nodelist as printable object.



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.