|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscone.netobjects.TableRecord
scone.netobjects.HtmlNode
public class HtmlNode
a HtmlNode
represents a Html document.
use the static methods provided by this HtmlNodeCache to obtain HtmlNode objects.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
protected static DBTableAdapter |
dbTable
|
protected java.util.Vector |
inclusions
|
protected LinkVector |
incomingLinks
|
protected NetNode |
node
|
protected LinkVector |
outgoingLinks
|
Fields inherited from class scone.netobjects.TableRecord |
---|
ctei, date, fieldValues, hasChanged, hasRecordInDB, persistent |
Constructor Summary | |
---|---|
protected |
HtmlNode(NetNode node)
creates a new HtmlNode (a NetNode that represents a Html document) |
Method Summary | |
---|---|
void |
access()
sets lastAccess to now and increments accessCounter if the node is visted for the first time, the method sets firstAccess |
java.lang.String |
getAbstract()
returns the abstract of the document. |
int |
getAccessCounter()
Returns the times the node has been accessed by any scone-user |
java.lang.String |
getAccessStatus()
Returns the status of the node, for example 200 or 404 if -1 is returned, the node has not yet been visited |
java.lang.String |
getAuthor()
returns the author of the document |
java.lang.String |
getBodyText()
returns the bodyText of the document (any words which are not inside tags) |
java.lang.String |
getDescription()
returns the description of the document |
java.lang.String |
getExtension()
|
java.lang.String |
getFile()
|
java.lang.String |
getFingerprint()
returns the fingerprint of the document |
long |
getFirstAccess()
Returns the date of the first access of this node. |
java.lang.String |
getHost()
|
java.util.Vector |
getIncludedObjects()
Returns the Inclusions defined in this document. |
LinkVector |
getIncomingLinks()
Returns the Links from other documents to this one. |
java.lang.Object |
getKey(int KeyNo)
returns the key of this object which can be used in Hashtable objects |
java.lang.String |
getLanguage()
returns the language of the document |
long |
getLastAccess()
Returns the date of the last access of this node. |
long |
getLastModified()
Returns the date of the last modification of the node (at the server) |
java.lang.String |
getMimeType()
Returns the mimeType of the node, for example text/html |
NetNode |
getNode()
returns the NetNode where this document is stored |
java.lang.String |
getNodeId()
returns the id of the NetNode where this document is stored |
java.lang.String |
getNumberOfExternalLinks()
returns the number of links to documents stored on other servers |
java.lang.String |
getNumberOfImages()
returns the number of images on the document |
java.lang.String |
getNumberOfLinks()
returns the number of links defined in the document |
java.lang.String |
getNumberOfParagraphs()
returns the number paragraphs "<P>" of the document |
java.lang.String |
getNumberOfWords()
returns the number of words of the document |
LinkVector |
getOutgoingLinks()
Returns the Links defined in this document. |
java.lang.String |
getPath()
|
java.lang.String |
getPort()
|
java.lang.String |
getProtocol()
|
java.lang.String |
getQuery()
|
java.lang.String |
getRef()
|
java.lang.String |
getSize()
Returns the size of the node in bytes |
java.lang.String |
getSourceCode()
returns the source code of the document |
java.lang.String |
getSpaceOfImages()
returns the space of the page occupied by images |
SimpleUri |
getSUri()
Returns the parsed URI of the node |
java.lang.String |
getTitle()
returns the title of the document |
java.lang.String |
getUri()
Returns the URI of the node |
protected void |
incAccessCounter()
Increases the accessCounter. |
boolean |
isAnimation()
Returns if the page has animated graphics. |
boolean |
isCommercial()
Returns if the document is commercial (with Ads etc). |
boolean |
isCompletelyDownloaded()
Returns if the page was completely downloaded. |
boolean |
isForms()
Returns if the page has form tags. |
boolean |
isFrames()
Returns if the page has frames. |
boolean |
isJavaScript()
Returns if the page uses JavaScript. |
boolean |
isPlugins()
Returns if the page needs a plugin. |
boolean |
isSound()
Returns if the page "has" sound. |
void |
setAbstract(java.lang.String abs)
sets the abstract of the document: Fist lines... |
protected void |
setAccessCounter(int v)
Sets the accesCounter to the specified value. |
void |
setAccessStatus(java.lang.String v)
Sets the status of the node, if the status has been -1 and is now changed, firstAccess is set |
void |
setAnimation(boolean b)
Set to true, if the page has animated Graphics, movies, flash etc. |
void |
setAuthor(java.lang.String author)
sets the author of the document |
void |
setBodyText(java.lang.String bodyText)
sets the bodyText of the document (any words which are not inside tags) |
void |
setCommercial(boolean b)
Set to true, if the page has ads. |
void |
setCompletelyDownloaded(boolean b)
Set to true, if the page was completely downloaded. |
void |
setDescription(java.lang.String des)
sets the dexcription of the document |
void |
setFingerprint(java.lang.String fingerprint)
sets the fingerprint of the document |
void |
setForms(boolean b)
Set to true, if the page has form tags, i.e. it includes forms. |
void |
setFrames(boolean b)
Set to true, if the page has a frameset and frame tags. |
void |
setJavaScript(boolean b)
Set to true, if the page uses JavaScript. |
void |
setLanguage(java.lang.String lang)
sets the language of the document |
protected void |
setLastAccess(long v)
Sets the date of the last access (the current access!) |
void |
setLastModified(long time)
Sets the date of the last modification of the node (at the server) |
void |
setMimeType(java.lang.String v)
Sets the mimeType of the node |
void |
setNumberOfExternalLinks(java.lang.String v)
sets the number of links to documents stored on different servers |
void |
setNumberOfImages(java.lang.String v)
sets the number of images on the document |
void |
setNumberOfLinks(java.lang.String links)
sets the number of links defined in the document |
void |
setNumberOfParagraphs(java.lang.String p)
sets the number paragraphs "<P>" of the document |
void |
setNumberOfWords(java.lang.String v)
sets the number of words of the document |
void |
setPlugins(boolean b)
Set to true, if the page needs a plugin. |
void |
setSize(java.lang.String size)
Sets the size of this node in bytes. |
void |
setSound(boolean b)
Set to true, if the page has background sound. |
void |
setSourceCode(java.lang.String sourceCode)
sets the source code of the document |
void |
setSpaceOfImages(java.lang.String v)
sets the space of the page occupied by images |
void |
setTitle(java.lang.String title)
sets the title of the document |
void |
store()
store this object in the database |
java.lang.String |
toDocString()
|
java.lang.String |
toHostString()
|
java.lang.String |
toString()
|
Methods inherited from class scone.netobjects.TableRecord |
---|
isPersistent, now, setCacheTableEntryInterface, setChanged, setPersistent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected static DBTableAdapter dbTable
protected NetNode node
protected LinkVector outgoingLinks
protected LinkVector incomingLinks
protected java.util.Vector inclusions
Constructor Detail |
---|
protected HtmlNode(NetNode node)
node
- the NetNodeMethod Detail |
---|
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- the title of the documentpublic java.lang.String getAuthor()
public void setAuthor(java.lang.String author)
author
- the author of the documentpublic java.lang.String getDescription()
public void setDescription(java.lang.String des)
des
- the description of the documentpublic java.lang.String getAbstract()
public void setAbstract(java.lang.String abs)
des
- the abstract of the documentpublic java.lang.String getLanguage()
public void setLanguage(java.lang.String lang)
lang
- the language of the documentpublic java.lang.String getBodyText()
public void setBodyText(java.lang.String bodyText)
body
- the body of the documentpublic java.lang.String getSourceCode()
public void setSourceCode(java.lang.String sourceCode)
body
- the sourceCode of the documentpublic java.lang.String getFingerprint()
public void setFingerprint(java.lang.String fingerprint)
fingerprint
- Fhe fingerprint of the documentpublic java.lang.String getNumberOfLinks()
public void setNumberOfLinks(java.lang.String links)
links
- the number of links in the documentpublic java.lang.String getNumberOfExternalLinks()
public void setNumberOfExternalLinks(java.lang.String v)
v
- the number of links to external documentspublic java.lang.String getNumberOfImages()
public void setNumberOfImages(java.lang.String v)
v
- the number of images on the documentpublic java.lang.String getSpaceOfImages()
public void setSpaceOfImages(java.lang.String v)
v
- the sapce used by the images of the documentpublic java.lang.String getNumberOfWords()
public void setNumberOfWords(java.lang.String v)
v
- the number of words of the documentpublic java.lang.String getNumberOfParagraphs()
public void setNumberOfParagraphs(java.lang.String p)
p
- the number of paragraphspublic NetNode getNode()
NetNode
where this document is stored
public java.lang.String getNodeId()
NetNode
where this document is stored
public void store()
public java.lang.Object getKey(int KeyNo)
getKey
in interface Cacheable
getKey
in class TableRecord
KeyNo
- the number of the key to be generated
public java.lang.String toString()
toString
in class java.lang.Object
public LinkVector getOutgoingLinks()
public LinkVector getIncomingLinks()
public java.util.Vector getIncludedObjects()
public void access()
lastAccess
to now and increments accessCounter
firstAccess
public java.lang.String getUri()
public java.lang.String getSize()
public void setSize(java.lang.String size)
size
- the size in bytespublic long getLastModified()
public void setLastModified(long time)
date
- the lastModified-datepublic java.lang.String getMimeType()
text/html
public void setMimeType(java.lang.String v)
v
- the mimeTypepublic java.lang.String getAccessStatus()
200
or 404
-1
is returned, the node has not yet been visited
-1
if no status is availablepublic void setAccessStatus(java.lang.String v)
firstAccess
is set
v
- the statuspublic long getFirstAccess()
public long getLastAccess()
protected void setLastAccess(long v)
access()
instead for consistency!
v
- the datepublic int getAccessCounter()
protected void setAccessCounter(int v)
incAccessCounter()
instead for consistency!
v
- the dateprotected void incAccessCounter()
access()
instead for consistency!
public SimpleUri getSUri()
public boolean isFrames()
public void setFrames(boolean b)
public boolean isForms()
Bit 1 of type
public void setForms(boolean b)
public boolean isCommercial()
public void setCommercial(boolean b)
public boolean isJavaScript()
public void setJavaScript(boolean b)
public boolean isPlugins()
public void setPlugins(boolean b)
public boolean isAnimation()
public void setAnimation(boolean b)
public boolean isSound()
public void setSound(boolean b)
public boolean isCompletelyDownloaded()
public void setCompletelyDownloaded(boolean b)
public java.lang.String toDocString()
public java.lang.String toHostString()
public java.lang.String getProtocol()
public java.lang.String getHost()
public java.lang.String getPort()
public java.lang.String getPath()
public java.lang.String getFile()
public java.lang.String getExtension()
public java.lang.String getQuery()
public java.lang.String getRef()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |