Java Doc for Region.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

All known Subclasses:   websphinx.Page,  websphinx.Element,  websphinx.Text,  websphinx.Tag,  websphinx.searchengine.SearchEngineResult,
Region
public class Region (Code)
Region of an HTML page.


Field Summary
final static  intINITIAL_SIZE
    
final public static  StringTRUE
     Default value for labels set with setLabel (name).
protected  intend
    
protected  Hashtablenames
    
protected  Pagesource
    
protected  intstart
    

Constructor Summary
public  Region(Page page, int start, int end)
     Makes a Region.
public  Region(Region region)
     Makes a Region by copying another region's parameters.

Method Summary
public  EnumerationenumerateObjectLabels()
     Enumerate the labels of the region.
public static  intfindEnd(Region[] regions, int p)
     Finds a region that ends at or after a given position.
public static  intfindStart(Region[] regions, int p)
     Finds a region that starts at or after a given position.
public  intgetEnd()
     Gets offset after end of region.
public  RegiongetField(String name)
     Get a named subregion.
public  Region[]getFields(String name)
     Get a set of named subregions.
public  StringgetLabel(String name)
     Get a label's value.
public  StringgetLabel(String name, String defaultValue)
     Get a label's value.
public  intgetLength()
     Gets length of the region.
public  NumbergetNumericLabel(String name, Number defaultValue)
     Get a label's value as a number.
public  ObjectgetObjectLabel(String name)
     Get an object-valued label.
public  StringgetObjectLabels()
     Get a String containing the labels of the region.
public  ElementgetRootElement()
     Get the root HTML element of the region.
public  PagegetSource()
     Gets page containing the region.
public  intgetStart()
     Gets starting offset of region in page content.
public  booleanhasAllLabels(String expr)
     Test if all of several labels are set.
public  booleanhasAllLabels(String[] labels)
     Test if all of several labels are set.
public  booleanhasAnyLabels(String expr)
     Test if one or more of several labels are set.
public  booleanhasAnyLabels(String[] labels)
     Test if one or more of several labels are set.
public  booleanhasLabel(String name)
     Test if a label is set.
public  voidremoveLabel(String name)
     Remove a label.
public  voidsetField(String name, Region region)
     Name a subregion (by setting a label to point to it).
public  voidsetFields(String name, Region[] regions)
     Name a set of subregions (by pointing a label to them).
public  voidsetLabel(String name, String value)
     Set a string-valued label.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)
Parameters:
  value - value set for label.
public  voidsetLabel(String name)
     Set a label on the region.
public  voidsetObjectLabel(String name, Object value)
     Set an object-valued label.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)
Parameters:
  value - value set for label.
public  Regionspan(Region r)
     Makes a new Region containing two regions.
Parameters:
  r - end of spanning region region from the beginning of this region to the end of r.
public  StringtoHTML()
     Converts the region to HTML, e.g.
public  StringtoString()
     Gets region as raw content.
public  StringtoTags()
     Converts the region to HTML tags with no text, e.g.
public  StringtoText()
     Converts the region to tagless text, e.g.

Field Detail
INITIAL_SIZE
final static int INITIAL_SIZE(Code)



TRUE
final public static String TRUE(Code)
Default value for labels set with setLabel (name). Value of TRUE is "true".



end
protected int end(Code)



names
protected Hashtable names(Code)



source
protected Page source(Code)



start
protected int start(Code)




Constructor Detail
Region
public Region(Page page, int start, int end)(Code)
Makes a Region.
Parameters:
  page - Page containing region
Parameters:
  start - Starting offset of region in page content
Parameters:
  end - Ending offset of region in page



Region
public Region(Region region)(Code)
Makes a Region by copying another region's parameters.
Parameters:
  region - Region to copy




Method Detail
enumerateObjectLabels
public Enumeration enumerateObjectLabels()(Code)
Enumerate the labels of the region. enumeration producing label names



findEnd
public static int findEnd(Region[] regions, int p)(Code)
Finds a region that ends at or after a given position.
Parameters:
  regions - array of regions sorted by ending offset
Parameters:
  p - Desired ending offset index k into regions such that:
  1. forall j<k: regions[j].end < p
  2. regions[k].end >= p



findStart
public static int findStart(Region[] regions, int p)(Code)
Finds a region that starts at or after a given position.
Parameters:
  regions - array of regions sorted by starting offset
Parameters:
  p - Desired starting offset index k into regions such that:
  1. forall j<k: regions[j].start < p
  2. regions[k].start >= p



getEnd
public int getEnd()(Code)
Gets offset after end of region. zero-based offset just after the end of the region.



getField
public Region getField(String name)(Code)
Get a named subregion.
Parameters:
  name - label name (case-sensitive, whitespace permitted) the named region, or null if label not set to a region



getFields
public Region[] getFields(String name)(Code)
Get a set of named subregions. Note that subregions named with setField() cannot be retrieved with getFields(); use getField() instead.
Parameters:
  name - label name (case-sensitive, whitespace permitted) the named subregions, or null if label not set to a set of subregions



getLabel
public String getLabel(String name)(Code)
Get a label's value.
Parameters:
  name - name of label (case-sensitive, whitespace permitted) value of label, or null if label not set



getLabel
public String getLabel(String name, String defaultValue)(Code)
Get a label's value. If the label is not set, return defaultValue.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)
Parameters:
  defaultValue - default value that should be returned if label is not set value of label, or defaultValue if not set



getLength
public int getLength()(Code)
Gets length of the region. Equivalent to getEnd() - getStart(). length of the HTML region in bytes.



getNumericLabel
public Number getNumericLabel(String name, Number defaultValue)(Code)
Get a label's value as a number. Returns the first number (integral or floating point) that can be parsed from the label's value, skipping an arbitrary amount of junk.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)
Parameters:
  defaultValue - default value that should be returned if label is not set numeric value of label, or defaultValue if not set or no number is found



getObjectLabel
public Object getObjectLabel(String name)(Code)
Get an object-valued label.
Parameters:
  name - name of label (case-sensitive, whitespace permitted) Object value set for label, or null if label not set



getObjectLabels
public String getObjectLabels()(Code)
Get a String containing the labels of the region. string containing the label names, separated by spaces



getRootElement
public Element getRootElement()(Code)
Get the root HTML element of the region. first HTML element whose start tag iscompletely in the region.



getSource
public Page getSource()(Code)
Gets page containing the region. page containing the region



getStart
public int getStart()(Code)
Gets starting offset of region in page content. zero-based offset where region begins in page content



hasAllLabels
public boolean hasAllLabels(String expr)(Code)
Test if all of several labels are set.
Parameters:
  expr - a list of label names separated by spaces true if region has at least one of the labels in expr



hasAllLabels
public boolean hasAllLabels(String[] labels)(Code)
Test if all of several labels are set.
Parameters:
  labels - an array of label names true if region has all of the labels



hasAnyLabels
public boolean hasAnyLabels(String expr)(Code)
Test if one or more of several labels are set.
Parameters:
  expr - a list of label names separated by spaces true if region has at least one of the labels in expr



hasAnyLabels
public boolean hasAnyLabels(String[] labels)(Code)
Test if one or more of several labels are set.
Parameters:
  labels - an array of label names true if region has at least one of the labels



hasLabel
public boolean hasLabel(String name)(Code)
Test if a label is set.
Parameters:
  name - name of label (case-sensitive, whitespace permitted) true if label is set, otherwise false



removeLabel
public void removeLabel(String name)(Code)
Remove a label.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)



setField
public void setField(String name, Region region)(Code)
Name a subregion (by setting a label to point to it).
Parameters:
  name - label name (case-sensitive, whitespace permitted)
Parameters:
  region - subregion to name



setFields
public void setFields(String name, Region[] regions)(Code)
Name a set of subregions (by pointing a label to them).
Parameters:
  name - label name (case-sensitive, whitespace permitted)
Parameters:
  regions - list of subregions



setLabel
public void setLabel(String name, String value)(Code)
Set a string-valued label.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)
Parameters:
  value - value set for label. If null, the label is removed.



setLabel
public void setLabel(String name)(Code)
Set a label on the region. The value of the label defaults to TRUE.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)



setObjectLabel
public void setObjectLabel(String name, Object value)(Code)
Set an object-valued label.
Parameters:
  name - name of label (case-sensitive, whitespace permitted)
Parameters:
  value - value set for label. If null, the label is removed.



span
public Region span(Region r)(Code)
Makes a new Region containing two regions.
Parameters:
  r - end of spanning region region from the beginning of this region to the end of r. Both regions must havethe same source, and r must end after this region starts.



toHTML
public String toHTML()(Code)
Converts the region to HTML, e.g. "<tag><tag><tag>text text</tag>" If the region does not contain HTML, then this function quotes all the <, >, & characters found in the page content, and wraps the result in
 and 
. a string consisting of the HTML content contained by this region.



toString
public String toString()(Code)
Gets region as raw content. string representation of the region



toTags
public String toTags()(Code)
Converts the region to HTML tags with no text, e.g. "<tag><tag></tag>". a string consisting of the tags in the page contained by this region



toText
public String toText()(Code)
Converts the region to tagless text, e.g. "text text". a string consisting of the text in the page contained by this region



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.