|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectscone.netobjects.TableRecord
scone.netobjects.NetNode
public class NetNode
a NetNode
represents a node from the Internet.
use the static methods provided by NetNodeCache class to obtain NetNode objects.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
static DBTableAdapter |
dbTable
|
protected SimpleUri |
sUri
|
Fields inherited from class scone.netobjects.TableRecord |
---|
ctei, date, fieldValues, hasChanged, hasRecordInDB, persistent |
Constructor Summary | |
---|---|
protected |
NetNode()
Creates an empty NetNodeCache set with no equivalent set in the scone databaseSuch an object may used to find out whether a corresponding set exists |
|
NetNode(java.sql.ResultSet results)
Create Netnode to Result of DB-Query. |
protected |
NetNode(SimpleUri sUri)
Creates or reads a NetNodeCache set in the scone databaseThe corresponding set in the scone database is identified by the URI. |
protected |
NetNode(java.lang.String id)
Reads a NetNodeCache set in the scone databaseThe corresponding set in the scone database is identified by the
nodeId which may have been obtained from other objects. |
Method Summary | |
---|---|
void |
access()
sets lastAccess to now and increments accessCounter if the node is visted for the first time, the method sets firstAccess |
void |
computeType()
Compute NetNode type. |
void |
fill(com.ibm.wbi.protocol.http.DocumentInfo documentInfo)
fills the fields mimeType, size, and accessStatus from a
DocumentInfo -object |
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 |
getExtension()
|
java.lang.String |
getFile()
|
long |
getFirstAccess()
Returns the date of the first access of this node. |
java.lang.String |
getFragment()
|
java.lang.String |
getHost()
|
java.lang.Object |
getKey(int keyNo)
returns the hashkey for this object (to be deprecated!) |
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) |
long |
getLastRobotAccess()
Returns the date of the last robot-access of this node. |
java.lang.String |
getMainHost()
|
java.lang.String |
getMimeType()
Returns the mimeType of the node, for example text/html |
java.lang.String |
getNodeId()
Returns the key for this database set |
java.lang.String |
getOpaquePart()
|
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 |
SimpleUri |
getSUri()
Returns the parsed URI of the node |
int |
getType()
returns the NetNode type bitfield parameter |
java.lang.String |
getUri()
Returns the URI of the node |
protected void |
incAccessCounter()
Increases the accessCounter. |
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 |
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 |
setLastModifiedString(java.lang.String lastModifiedString)
Sets the date of the last modification of the node (at the server). |
void |
setLastRobotAccess(long v)
Sets the date of the last robot-access (the current access!) |
void |
setMimeType(java.lang.String v)
Sets the mimeType of the node |
void |
setSize(java.lang.String size)
Sets the size of this node in bytes. |
void |
setType(int t)
sets the type parameter |
void |
store()
Writes the content of the object into the scone database if it has been changed. |
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
public static DBTableAdapter dbTable
protected SimpleUri sUri
Constructor Detail |
---|
protected NetNode()
NetNodeCache
set with no equivalent set in the scone
database
sUri
- the parsed URI of the nodeprotected NetNode(SimpleUri sUri)
NetNodeCache
set in the scone
databasescone
database is identified by the URI.
If such a set already exists, the values are read from the database. Else a set is created.
sUri
- the parsed URI of the nodeprotected NetNode(java.lang.String id)
NetNodeCache
set in the scone
databasescone
database is identified by the
nodeId
which may have been obtained from other objects.
If such a set already exists, the values are read from the database.
Else, hasRecordInDB is set to false
id
- the code>nodeId of the desired nodepublic NetNode(java.sql.ResultSet results)
results
- the ResultSet returnetd by the query.Method Detail |
---|
public void access()
lastAccess
to now and increments accessCounter
firstAccess
public java.lang.String getNodeId()
nodeId
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 setLastModifiedString(java.lang.String lastModifiedString)
date
- the lastModified-datepublic 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 int getType()
public void setType(int t)
t
- the type parameterpublic 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 long getLastRobotAccess()
public void setLastRobotAccess(long v)
v
- the datepublic SimpleUri getSUri()
public void fill(com.ibm.wbi.protocol.http.DocumentInfo documentInfo)
mimeType, size,
and accessStatus from a
DocumentInfo
-object
documentInfo
- the DocumentInfo
-object belonging to this nodepublic void computeType()
bit 0: Path: Path defined
bit 1: No Path: No path defined
bit 2: Filename: filename defined
bit 3: No Filename: no filename in URI
bit 4: Fragment: Fragment (#) defined
bit 5: No Fragment
bit 6: Query: Query GET-parameters defined
bit 7: No Query: Query GET-parameters not defined
bit 10: Homepage: Homepage of server
bit 14: HTTP: Prptpcol is http.
bit 15: Other protocol: Prptpcol is not http but mail, ftp etc.
bit 20: Mime type is HTML
bit 21: Mime type is NOT HTML
bit 22: Mime type: Text/*
bit 23: Mime type: Image/*
public java.lang.String toDocString()
public java.lang.String toHostString()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getProtocol()
public java.lang.String getHost()
public java.lang.String getMainHost()
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 getFragment()
public java.lang.String getOpaquePart()
public java.lang.String getRef()
public void store()
scone
database if it has been changed.
public java.lang.Object getKey(int keyNo)
Cacheable
getKey
in interface Cacheable
getKey
in class TableRecord
the
- number of the key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |