Java Doc for Element.java in  » Web-Crawler » WebSPHINX » websphinx » 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 » Web Crawler » WebSPHINX » websphinx 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   websphinx.Region
      websphinx.Element

All known Subclasses:   websphinx.Link,
Element
public class Element extends Region (Code)
Element in an HTML page. An element runs from a start tag (like <ul>) to its matching end tag (</ul>), inclusive. An element may have an optional end tag (like <p>), in which case the element runs up to (but not including) the tag that implicitly closes it. For example:
<p>Paragraph 1<p>Paragraph 2
contains two elements,
<p>Paragraph 1
and
<p>Paragraph 2
.


Field Summary
protected  Elementchild
    
protected  TagendTag
    
protected  Elementparent
    
protected  Elementsibling
    
protected  TagstartTag
    

Constructor Summary
public  Element(Tag startTag, Tag endTag)
     Make an Element from a start tag and end tag.
public  Element(Tag startTag, int end)
     Make an Element from a start tag and an end position.

Method Summary
public  EnumerationenumerateHTMLAttributes()
     Enumerate the HTML attributes found on this tag.
public  ElementgetChild()
     Get element's first child. first element contained by this element, or null if no children.
public  TaggetEndTag()
     Get end tag.
public  StringgetHTMLAttribute(String name)
     Get an HTML attribute's value.
Parameters:
  name - Name of HTML attribute (e.g.
public  StringgetHTMLAttribute(String name, String defaultValue)
     Get an HTML attribute's value, with a default value if it doesn't exist.
Parameters:
  name - Name of HTML attribute (e.g.
public  ElementgetNext()
     Return next element in an inorder walk of the tree, assuming this element and its children have been visited.
public  ElementgetParent()
     Get element's parent.
public  ElementgetSibling()
     Get element's next sibling.
public  TaggetStartTag()
     Get start tag.
public  StringgetTagName()
     Get tag name.
public  booleanhasHTMLAttribute(String name)
     Test if tag has an HTML attribute.
Parameters:
  name - Name of HTML attribute (e.g.

Field Detail
child
protected Element child(Code)



endTag
protected Tag endTag(Code)



parent
protected Element parent(Code)



sibling
protected Element sibling(Code)



startTag
protected Tag startTag(Code)




Constructor Detail
Element
public Element(Tag startTag, Tag endTag)(Code)
Make an Element from a start tag and end tag. The tags must be on the same Page.
Parameters:
  startTag - Start tag of element
Parameters:
  endTag - End tag of element (may be null)



Element
public Element(Tag startTag, int end)(Code)
Make an Element from a start tag and an end position. Used when the end tag has been omitted (like <p>, frequently).
Parameters:
  startTag - Start tag of element
Parameters:
  end - Ending offset of element




Method Detail
enumerateHTMLAttributes
public Enumeration enumerateHTMLAttributes()(Code)
Enumerate the HTML attributes found on this tag. enumeration of the attribute names found on this tag.



getChild
public Element getChild()(Code)
Get element's first child. first element contained by this element, or null if no children.



getEndTag
public Tag getEndTag()(Code)
Get end tag. end tag of element, or null if element has no end tag.



getHTMLAttribute
public String getHTMLAttribute(String name)(Code)
Get an HTML attribute's value.
Parameters:
  name - Name of HTML attribute (e.g. "HREF"). Doesn't have to beconverted with toHTMLAttributeName(). value of attribute if it exists, TRUE if the attribute exists but has no value, or null if tag lacks the attribute.



getHTMLAttribute
public String getHTMLAttribute(String name, String defaultValue)(Code)
Get an HTML attribute's value, with a default value if it doesn't exist.
Parameters:
  name - Name of HTML attribute (e.g. "HREF"). Doesn't have to beconverted with toHTMLAttributeName().
Parameters:
  defaultValue - default value to return if the attribute doesn't exist value of attribute if it exists, TRUE if the attribute exists but has no value, or defaultValue if tag lacks the attribute.



getNext
public Element getNext()(Code)
Return next element in an inorder walk of the tree, assuming this element and its children have been visited. next element



getParent
public Element getParent()(Code)
Get element's parent. element that contains this element, or null if at top-level.



getSibling
public Element getSibling()(Code)
Get element's next sibling. element that follows this element, or null if at end of parent's children.



getStartTag
public Tag getStartTag()(Code)
Get start tag. start tag of element



getTagName
public String getTagName()(Code)
Get tag name. tag name (like "p"), in lower-case, String.intern()'ed form.Thus you can compare tag names with ==, as in: getTagName() == Tag.IMG.



hasHTMLAttribute
public boolean hasHTMLAttribute(String name)(Code)
Test if tag has an HTML attribute.
Parameters:
  name - Name of HTML attribute (e.g. "HREF"). Doesn't have to beconverted with toHTMLAttributeName(). true if tag has the attribute, false if not



Fields inherited from websphinx.Region
final static int INITIAL_SIZE(Code)(Java Doc)
final public static String TRUE(Code)(Java Doc)
protected int end(Code)(Java Doc)
protected Hashtable names(Code)(Java Doc)
protected Page source(Code)(Java Doc)
protected int start(Code)(Java Doc)

Methods inherited from websphinx.Region
public Enumeration enumerateObjectLabels()(Code)(Java Doc)
public static int findEnd(Region[] regions, int p)(Code)(Java Doc)
public static int findStart(Region[] regions, int p)(Code)(Java Doc)
public int getEnd()(Code)(Java Doc)
public Region getField(String name)(Code)(Java Doc)
public Region[] getFields(String name)(Code)(Java Doc)
public String getLabel(String name)(Code)(Java Doc)
public String getLabel(String name, String defaultValue)(Code)(Java Doc)
public int getLength()(Code)(Java Doc)
public Number getNumericLabel(String name, Number defaultValue)(Code)(Java Doc)
public Object getObjectLabel(String name)(Code)(Java Doc)
public String getObjectLabels()(Code)(Java Doc)
public Element getRootElement()(Code)(Java Doc)
public Page getSource()(Code)(Java Doc)
public int getStart()(Code)(Java Doc)
public boolean hasAllLabels(String expr)(Code)(Java Doc)
public boolean hasAllLabels(String[] labels)(Code)(Java Doc)
public boolean hasAnyLabels(String expr)(Code)(Java Doc)
public boolean hasAnyLabels(String[] labels)(Code)(Java Doc)
public boolean hasLabel(String name)(Code)(Java Doc)
public void removeLabel(String name)(Code)(Java Doc)
public void setField(String name, Region region)(Code)(Java Doc)
public void setFields(String name, Region[] regions)(Code)(Java Doc)
public void setLabel(String name, String value)(Code)(Java Doc)
public void setLabel(String name)(Code)(Java Doc)
public void setObjectLabel(String name, Object value)(Code)(Java Doc)
public Region span(Region r)(Code)(Java Doc)
public String toHTML()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public String toTags()(Code)(Java Doc)
public String toText()(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.