|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.gcs.urlpool.URLContainer | +--com.ibm.gcs.urlpool.MemoryURLContainer | +--com.ibm.gcs.db.component.DB2URLContainer
A DB2URLContainer object provides access to the crawl information for a URL which is stored in DB2 relations. Each DB2URLContainer is composed of a
setState()
, the public methods provided by this class
perform read-only operations on the DB2 tables. All the set
methods store the modifications in memory. These modifications
are only written into the database when other package members
explicitly save the DB2URLRow or DB2AnnotationsList objects.
Note: In addition to the get and set methods specified by the interface, this class also provides corresponding get and set methods that take a Transaction object. This object is used to execute any necessary SQL inserts, updates, and queries. The corresponding methods, which do not take a Transaction object, each create a new Transaction object, call the instance method with the object, and commit the transaction. Any classes that use a Transaction object explicitly should pass the Transaction to DB2URLContainer's methods explicitly in order to avoid Transaction deadlock.
Constructor Summary | |
DB2URLContainer()
Default constructor called by URLContainerFactory. |
|
DB2URLContainer(java.lang.String urlString)
|
|
DB2URLContainer(java.lang.String urlString,
com.ibm.gcs.urlpool.Annotation ann)
|
|
DB2URLContainer(java.lang.String urlString,
CrawlPattern urlPTree)
|
|
DB2URLContainer(java.lang.String urlString,
CrawlPattern urlPTree,
com.ibm.gcs.urlpool.Annotation ann)
|
|
DB2URLContainer(java.lang.String urlString,
CrawlPattern urlPTree,
java.lang.Boolean isSeed)
constructor |
|
DB2URLContainer(java.lang.String urlString,
com.ibm.gcs.urlpool.URLContainer parentUrlC)
|
|
DB2URLContainer(java.lang.String urlString,
com.ibm.gcs.urlpool.URLContainer parentUrlC,
com.ibm.gcs.urlpool.Annotation ann)
|
|
DB2URLContainer(java.lang.String urlString,
com.ibm.gcs.urlpool.URLContainer parentUrlC,
CrawlPattern urlPTree)
|
|
DB2URLContainer(java.lang.String urlString,
com.ibm.gcs.urlpool.URLContainer parentUrlC,
CrawlPattern urlPTree,
com.ibm.gcs.urlpool.Annotation ann)
|
Method Summary | |
void |
addAnnotation(com.ibm.gcs.urlpool.Annotation ann)
Add an annotation for this urlC. |
void |
addAnnotation(com.ibm.gcs.urlpool.Annotation ann,
com.ibm.gcs.urlpool.URLContainer urlC)
Add an annotation for this urlC. |
void |
addAnnotations(com.ibm.gcs.urlpool.Annotation[] anns)
Add a set annotations for this urlC. |
java.util.Enumeration |
getAnnotationEnums()
Gets the list of all annotations for this urlC as an enumeration object. |
com.ibm.gcs.urlpool.Annotation[] |
getAnnotations()
Gets the list of all annotations for this urlC. |
com.ibm.gcs.urlpool.Annotation[] |
getAnnotations(Transaction t)
Gets the list of all annotations for this urlC as an array. |
CrawlPattern |
getCrawlPattern()
Gets the associated URL pattern tree that says how to traverse and summarize this URL. |
CrawlPattern |
getCrawlPattern(Transaction t)
Gets the associated URL pattern tree that says how to traverse and summarize this URL. |
int |
getDepth()
Get the recursion depth of the URL. |
int |
getDepth(Transaction t)
If data has to be loaded from/written to the database, executes the SQL query using the transaction object. |
com.ibm.gcs.resourcepool.ResourceCollection |
getDSC()
Returns the ResourceCollection that this URLContainer represents. |
boolean |
getHide(Transaction t)
Get the hide flag for the URLContainer. |
int |
getPriority(Transaction t)
Get the priority of this container for a Priority Crawl |
com.ibm.gcs.urlpool.URLState |
getState()
Get the state of this url container. |
com.ibm.gcs.urlpool.URLState |
getState(Transaction t)
Get the state of this url container. |
java.lang.String |
getURLString()
Return the url string. |
boolean |
hasAnnotations()
Returns true if the urlC has annotations, false otherwise. |
boolean |
isSeed()
Returns true if it is a seed url |
void |
setCrawlPattern(CrawlPattern crawlPattern)
Sets the associated URL pattern tree that says how to traverse and summarize this URL. |
void |
setCrawlPattern(CrawlPattern crawlPattern,
PreparedTransaction t)
Sets the associated URL crawl pattern that says how to traverse and summarize this URL. |
void |
setDepth(int depth)
Set the recursion depth of the URL. |
void |
setHide(boolean hidden)
Set the hide flag for the URLContainer. |
void |
setPriority(int p)
Set the priority of this container for a Priority Crawl |
void |
setState(com.ibm.gcs.urlpool.URLState state)
Set the state of this url container. |
void |
setState(com.ibm.gcs.urlpool.URLState state,
Transaction t)
Set the state of this url container. |
void |
setURLString(java.lang.String urlString)
Set the URLString for the container. |
Methods inherited from class com.ibm.gcs.urlpool.URLContainer |
getUniqueName, setUniqueName |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DB2URLContainer()
public DB2URLContainer(java.lang.String urlString)
urlString
- The url string identifying this object.public DB2URLContainer(java.lang.String urlString, com.ibm.gcs.urlpool.Annotation ann)
urlString
- The url string identifying this object..ann
- public DB2URLContainer(java.lang.String urlString, com.ibm.gcs.urlpool.URLContainer parentUrlC)
urlString
- The url string identifying this object..parentUrlC
- A url container pointing to this one.public DB2URLContainer(java.lang.String urlString, com.ibm.gcs.urlpool.URLContainer parentUrlC, com.ibm.gcs.urlpool.Annotation ann)
urlString
- The url string identifying this object..parentUrlC
- A url container pointing to this one.ann
- The annotation by the parentUrlCpublic DB2URLContainer(java.lang.String urlString, CrawlPattern urlPTree)
urlString
- The url string identifying this object..urlPTree
- The url patten tree.public DB2URLContainer(java.lang.String urlString, com.ibm.gcs.urlpool.URLContainer parentUrlC, CrawlPattern urlPTree)
urlString
- The url string identifying this object..urlPTree
- The url patten tree.parentUrlC
- A url container pointing to this one.public DB2URLContainer(java.lang.String urlString, com.ibm.gcs.urlpool.URLContainer parentUrlC, CrawlPattern urlPTree, com.ibm.gcs.urlpool.Annotation ann)
urlString
- The url string identifying this object..urlPTree
- The url patten tree.parentUrlC
- A url container pointing to this one.ann
- The annotation by the parentUrlC about this urlCpublic DB2URLContainer(java.lang.String urlString, CrawlPattern urlPTree, com.ibm.gcs.urlpool.Annotation ann)
urlString
- The url string identifying this object..urlPTree
- The url patten tree.ann
- An annnotation about this urlC.public DB2URLContainer(java.lang.String urlString, CrawlPattern urlPTree, java.lang.Boolean isSeed)
urlString
- a URL stringurlPTree
- a configuration structure that says how to traverse and summarize this URLCrawlPattern
Method Detail |
public void setURLString(java.lang.String urlString)
If the urlString is greater than 250 characters, throws DB2ComponentException.
setURLString
in class com.ibm.gcs.urlpool.URLContainer
urlString
- The url string identifying this object.DB2URLContainer(String urlString)
public java.lang.String getURLString()
getURLString
in class com.ibm.gcs.urlpool.URLContainer
public void setCrawlPattern(CrawlPattern crawlPattern) throws DB2ComponentException
setCrawlPattern
in class com.ibm.gcs.urlpool.URLContainer
CrawlPattern
- the URLPatternTreeDB2ComponentException
- on TransactionExceptionpublic CrawlPattern getCrawlPattern() throws DB2ComponentException
getCrawlPattern
in class com.ibm.gcs.urlpool.URLContainer
DB2ComponentException
- on TransactionExceptionpublic void setCrawlPattern(CrawlPattern crawlPattern, PreparedTransaction t) throws DB2ComponentException
CrawlPattern
- the CrawlPattern for this URLt
- The Transaction object for DB2 access.DB2ComponentException
- on TransactionExceptionpublic CrawlPattern getCrawlPattern(Transaction t) throws DB2ComponentException
t
- The Transaction object for DB2 access.TransactionException
- public void setDepth(int depth)
setDepth
in class com.ibm.gcs.urlpool.URLContainer
depth
- recursion depthpublic int getDepth() throws DB2ComponentException
getDepth
in class com.ibm.gcs.urlpool.URLContainer
DB2ComponentException
- on TransactionException
Catches DB2ComponentException from DB2ConfigTable and DB2URLRowpublic int getDepth(Transaction t) throws DB2ComponentException
DB2ComponentException
- on TransactionException
Catches DB2ComponentException from DB2ConfigTable and DB2URLRowpublic void setState(com.ibm.gcs.urlpool.URLState state)
setState
in class com.ibm.gcs.urlpool.URLContainer
DB2ComponentException
- on TransactionExceptionpublic void setState(com.ibm.gcs.urlpool.URLState state, Transaction t)
DB2ComponentException
- on TransactionExceptionpublic com.ibm.gcs.urlpool.URLState getState() throws DB2ComponentException
getState
in class com.ibm.gcs.urlpool.URLContainer
DB2ComponentException
- on TransactionExceptionpublic com.ibm.gcs.urlpool.URLState getState(Transaction t) throws DB2ComponentException
DB2ComponentException
- on TransactionExceptionpublic boolean getHide(Transaction t) throws TransactionException
t
- The transaction object to use for db access.TransactionException
- on failed SQL update.public void setHide(boolean hidden)
t
- The transaction object to use for db access.TransactionException
- on failed SQL update.public int getPriority(Transaction t) throws TransactionException
t
- The transaction object to use for db access.TransactionException
- on failed SQL update.public void setPriority(int p)
t
- The transaction object to use for db access.TransactionException
- on failed SQL update.public boolean isSeed()
public com.ibm.gcs.resourcepool.ResourceCollection getDSC() throws URLCrawlException
getDSC
in class com.ibm.gcs.urlpool.MemoryURLContainer
see com.ibm.almaden.gcs.gcsurl.*
public com.ibm.gcs.urlpool.Annotation[] getAnnotations()
getAnnotations
in class com.ibm.gcs.urlpool.URLContainer
public com.ibm.gcs.urlpool.Annotation[] getAnnotations(Transaction t) throws TransactionException
DB2ComponentException
- on TransactionExceptionpublic java.util.Enumeration getAnnotationEnums()
getAnnotationEnums
in class com.ibm.gcs.urlpool.URLContainer
DB2ComponentException
- on TransactionExceptionpublic void addAnnotation(com.ibm.gcs.urlpool.Annotation ann)
addAnnotation
in class com.ibm.gcs.urlpool.URLContainer
ann
- The annotation for this urlC.DB2ComponentException
- on TransactionExceptionpublic void addAnnotation(com.ibm.gcs.urlpool.Annotation ann, com.ibm.gcs.urlpool.URLContainer urlC) throws DB2ComponentException
ann
- The annotation for this urlC.annotator
- The annotator/parent urlDB2ComponentException
- public void addAnnotations(com.ibm.gcs.urlpool.Annotation[] anns)
addAnnotations
in class com.ibm.gcs.urlpool.URLContainer
annotations
- An array of annotation objects for this urlC.DB2ComponentException
- on TransactionExceptionpublic boolean hasAnnotations()
hasAnnotations
in class com.ibm.gcs.urlpool.URLContainer
DB2ComponentException
-
|
EIP Web Crawler APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |