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

Tag
public class Tag extends Region (Code)
Tag in an HTML page.


Field Summary
final public static  StringA
     Commonly useful tag names. Derived from HTML Elements at Sandia National Labs.
final public static  StringABBREV
    
final public static  StringACRONYM
    
final public static  StringADDRESS
    
final public static  StringAPPLET
    
final public static  StringAREA
    
final public static  StringB
    
final public static  StringBASE
    
final public static  StringBASEFONT
    
final public static  StringBDO
    
final public static  StringBGSOUND
    
final public static  StringBIG
    
final public static  StringBLINK
    
final public static  StringBLOCKQUOTE
    
final public static  StringBODY
    
final public static  StringBR
    
final public static  StringCAPTION
    
final public static  StringCENTER
    
final public static  StringCITE
    
final public static  StringCODE
    
final public static  StringCOL
    
final public static  StringCOLGROUP
    
final public static  StringCOMMENT
    
final public static  StringDD
    
final public static  StringDEL
    
final public static  StringDFN
    
final public static  StringDIR
    
final public static  StringDIV
    
final public static  StringDL
    
final public static  StringDT
    
final public static  StringEM
    
final public static  StringEMBED
    
final public static  StringFONT
    
final public static  StringFORM
    
final public static  StringFRAME
    
final public static  StringFRAMESET
    
final public static  StringH1
    
final public static  StringH2
    
final public static  StringH3
    
final public static  StringH4
    
final public static  StringH5
    
final public static  StringH6
    
final public static  StringHEAD
    
final public static  StringHR
    
final public static  StringHTML
    
final public static  StringI
    
final public static  StringIMG
    
final public static  StringINPUT
    
final public static  StringISINDEX
    
final public static  StringKBD
    
final public static  StringLI
    
final public static  StringLINK
    
final public static  StringLISTING
    
final public static  StringMAP
    
final public static  StringMARQUEE
    
public static  intMAX_LENGTH
     Length of longest tag name.
final public static  StringMENU
    
final public static  StringMETA
    
final public static  StringNEXTID
    
final public static  StringNOBR
    
final public static  StringNOEMBED
    
final public static  StringNOFRAMES
    
final public static  StringOBJECT
    
final public static  StringOL
    
final public static  StringOPTION
    
final public static  StringP
    
final public static  StringPARAM
    
final public static  StringPLAINTEXT
    
final public static  StringPRE
    
final public static  StringSAMP
    
final public static  StringSCRIPT
    
final public static  StringSELECT
    
final public static  StringSMALL
    
final public static  StringSPACER
    
final public static  StringSTRIKE
    
final public static  StringSTRONG
    
final public static  StringSTYLE
    
final public static  StringSUB
    
final public static  StringSUP
    
final public static  StringTABLE
    
final public static  StringTD
    
final public static  StringTEXTAREA
    
final public static  StringTH
    
final public static  StringTITLE
    
final public static  StringTR
    
final public static  StringTT
    
final public static  StringU
    
final public static  StringUL
    
final public static  StringVAR
    
final public static  StringWBR
    
final public static  StringXMP
    
 Elementelement
    
 String[]htmlAttributes
    
 booleanstartTag
    
 StringtagName
    

Constructor Summary
public  Tag(Page page, int start, int end, String tagName, boolean startTag)
     Make a Tag.

Method Summary
public  intcountHTMLAttributes()
     Get number of HTML attributes on this tag.
public  EnumerationenumerateHTMLAttributes()
     Enumerate the HTML attributes found on this tag.
public  ElementgetElement()
     Get element to which this tag is the start or 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  String[]getHTMLAttributes()
     Get all the HTML attributes found on this tag. array of name-value pairs, alternating between names and values.
public  StringgetTagName()
     Get tag name.
public  booleanhasHTMLAttribute(String name)
     Test if tag has an HTML attribute.
Parameters:
  name - Name of HTML attribute (e.g.
public  booleanisBlockTag()
     Test if tag is a block-level tag.
public  booleanisBodyTag()
     Test if tag belongs in the element.
public  booleanisEndTag()
     Test if tag is an end tag.
public  booleanisFlowTag()
     Test if tag is a flow-level tag.
public  booleanisHeadTag()
     Test if tag belongs in the element.
public  booleanisStartTag()
     Test if tag is a start tag.
public  TagremoveHTMLAttribute(String name)
     Copy this tag, removing an HTML attribute.
Parameters:
  name - Name of HTML attribute (e.g.
public  TagreplaceHTMLAttribute(String name)
     Copy this tag, setting an HTML attribute's value to TRUE.
Parameters:
  name - Name of HTML attribute (e.g.
public  TagreplaceHTMLAttribute(String name, String value)
     Copy this tag, setting an HTML attribute's value.
Parameters:
  name - Name of HTML attribute (e.g.
public static  StringtoHTMLAttributeName(String name)
     Convert a String to an HTML attribute name.
public static  StringtoTagName(String name)
     Convert a String to a tag name.

Field Detail
A
final public static String A(Code)
Commonly useful tag names. Derived from HTML Elements at Sandia National Labs.



ABBREV
final public static String ABBREV(Code)



ACRONYM
final public static String ACRONYM(Code)



ADDRESS
final public static String ADDRESS(Code)



APPLET
final public static String APPLET(Code)



AREA
final public static String AREA(Code)



B
final public static String B(Code)



BASE
final public static String BASE(Code)



BASEFONT
final public static String BASEFONT(Code)



BDO
final public static String BDO(Code)



BGSOUND
final public static String BGSOUND(Code)



BIG
final public static String BIG(Code)



BLINK
final public static String BLINK(Code)



BLOCKQUOTE
final public static String BLOCKQUOTE(Code)



BODY
final public static String BODY(Code)



BR
final public static String BR(Code)



CAPTION
final public static String CAPTION(Code)



CENTER
final public static String CENTER(Code)



CITE
final public static String CITE(Code)



CODE
final public static String CODE(Code)



COL
final public static String COL(Code)



COLGROUP
final public static String COLGROUP(Code)



COMMENT
final public static String COMMENT(Code)



DD
final public static String DD(Code)



DEL
final public static String DEL(Code)



DFN
final public static String DFN(Code)



DIR
final public static String DIR(Code)



DIV
final public static String DIV(Code)



DL
final public static String DL(Code)



DT
final public static String DT(Code)



EM
final public static String EM(Code)



EMBED
final public static String EMBED(Code)



FONT
final public static String FONT(Code)



FORM
final public static String FORM(Code)



FRAME
final public static String FRAME(Code)



FRAMESET
final public static String FRAMESET(Code)



H1
final public static String H1(Code)



H2
final public static String H2(Code)



H3
final public static String H3(Code)



H4
final public static String H4(Code)



H5
final public static String H5(Code)



H6
final public static String H6(Code)



HEAD
final public static String HEAD(Code)



HR
final public static String HR(Code)



HTML
final public static String HTML(Code)



I
final public static String I(Code)



IMG
final public static String IMG(Code)



INPUT
final public static String INPUT(Code)



ISINDEX
final public static String ISINDEX(Code)



KBD
final public static String KBD(Code)



LI
final public static String LI(Code)



LINK
final public static String LINK(Code)



LISTING
final public static String LISTING(Code)



MAP
final public static String MAP(Code)



MARQUEE
final public static String MARQUEE(Code)



MAX_LENGTH
public static int MAX_LENGTH(Code)
Length of longest tag name.



MENU
final public static String MENU(Code)



META
final public static String META(Code)



NEXTID
final public static String NEXTID(Code)



NOBR
final public static String NOBR(Code)



NOEMBED
final public static String NOEMBED(Code)



NOFRAMES
final public static String NOFRAMES(Code)



OBJECT
final public static String OBJECT(Code)



OL
final public static String OL(Code)



OPTION
final public static String OPTION(Code)



P
final public static String P(Code)



PARAM
final public static String PARAM(Code)



PLAINTEXT
final public static String PLAINTEXT(Code)



PRE
final public static String PRE(Code)



SAMP
final public static String SAMP(Code)



SCRIPT
final public static String SCRIPT(Code)



SELECT
final public static String SELECT(Code)



SMALL
final public static String SMALL(Code)



SPACER
final public static String SPACER(Code)



STRIKE
final public static String STRIKE(Code)



STRONG
final public static String STRONG(Code)



STYLE
final public static String STYLE(Code)



SUB
final public static String SUB(Code)



SUP
final public static String SUP(Code)



TABLE
final public static String TABLE(Code)



TD
final public static String TD(Code)



TEXTAREA
final public static String TEXTAREA(Code)



TH
final public static String TH(Code)



TITLE
final public static String TITLE(Code)



TR
final public static String TR(Code)



TT
final public static String TT(Code)



U
final public static String U(Code)



UL
final public static String UL(Code)



VAR
final public static String VAR(Code)



WBR
final public static String WBR(Code)



XMP
final public static String XMP(Code)



element
Element element(Code)



htmlAttributes
String[] htmlAttributes(Code)



startTag
boolean startTag(Code)



tagName
String tagName(Code)




Constructor Detail
Tag
public Tag(Page page, int start, int end, String tagName, boolean startTag)(Code)
Make a Tag.
Parameters:
  page - Page containing tag
Parameters:
  start - Starting offset of tag in page
Parameters:
  end - Ending offset of tag
Parameters:
  tagName - Name of tag (like "p")
Parameters:
  startTag - true for start tags (like "<p>"), false for end tags ("</p>")




Method Detail
countHTMLAttributes
public int countHTMLAttributes()(Code)
Get number of HTML attributes on this tag. number of HTML attributes



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



getElement
public Element getElement()(Code)
Get element to which this tag is the start or end tag. element, or null if tag has no element.



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.



getHTMLAttributes
public String[] getHTMLAttributes()(Code)
Get all the HTML attributes found on this tag. array of name-value pairs, alternating between names and values. Thus array[0] is a name, array[1] is a value,array[2] is a name, etc.



getTagName
public String getTagName()(Code)
Get tag name. tag name (like "p"), in lower-case, String.intern()'ed form.



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



isBlockTag
public boolean isBlockTag()(Code)
Test if tag is a block-level tag. Equivalent to !isFlowTag(). true if and only if tag is a block-level tag (like "<P>")



isBodyTag
public boolean isBodyTag()(Code)
Test if tag belongs in the element. true if and only if tag is a BODY-level tag (like "<A>")



isEndTag
public boolean isEndTag()(Code)
Test if tag is an end tag. Equivalent to !isStartTag(). true if and only if tag is a start tag (like "</P>")



isFlowTag
public boolean isFlowTag()(Code)
Test if tag is a flow-level tag. Equivalent to !isBlockTag(). true if and only if tag is a block-level tag (like "<A>")



isHeadTag
public boolean isHeadTag()(Code)
Test if tag belongs in the element. true if and only if tag is a HEAD-level tag (like "<TITLE>")



isStartTag
public boolean isStartTag()(Code)
Test if tag is a start tag. Equivalent to !isEndTag(). true if and only if tag is a start tag (like "<P>")



removeHTMLAttribute
public Tag removeHTMLAttribute(String name)(Code)
Copy this tag, removing an HTML attribute.
Parameters:
  name - Name of HTML attribute (e.g. "HREF"). Doesn't have to beconverted with toHTMLAttributeName(). copy of this tag with named attribute removed. The copy is a region of a fresh page containing only the tag.



replaceHTMLAttribute
public Tag replaceHTMLAttribute(String name)(Code)
Copy this tag, setting an HTML attribute's value to TRUE.
Parameters:
  name - Name of HTML attribute (e.g. "HREF"). Doesn't have to beconverted with toHTMLAttributeName(). copy of this tag with named attribute set to TRUE. The copy is a region of a fresh page containing only the tag.



replaceHTMLAttribute
public Tag replaceHTMLAttribute(String name, String value)(Code)
Copy this tag, setting an HTML attribute's value.
Parameters:
  name - Name of HTML attribute (e.g. "HREF"). Doesn't have to beconverted with toHTMLAttributeName().
Parameters:
  value - New value for the attribute copy of this tag with named attribute set to value. The copy is a region of a fresh page containing only the tag.



toHTMLAttributeName
public static String toHTMLAttributeName(String name)(Code)
Convert a String to an HTML attribute name. Attribute names are lower-case, intern()'ed Strings. Thus you can compare attribute names with ==.
Parameters:
  name - Name to convert (e.g., "HREF") tag name (e.g. "href"), in lower-case, String.intern()'ed form.



toTagName
public static String toTagName(String name)(Code)
Convert a String to a tag name. Tag names are lower-case, intern()'ed Strings. Thus you can compare tag names with ==, as in: getTagName() == Tag.IMG.
Parameters:
  name - Name to convert (e.g., "P") tag name (e.g. "p"), in lower-case, String.intern()'ed form.



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.