|
Oracle Application Server Web Clipping API Reference 10g (9.0.4) B10912-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface that users will use to navigate through the response set that results from an execution of a Web Clipping. The way to access the data contained within a WebClippingResponse is treat it as a java.util.List object to access the different elements contained within. As far as accessing the WebClippingResponse is concerned, there are two possible types of elements that may be contained within an instance of a WebClippingResponse: a String or an object that has a toString() method, or another nested WebClippingResponse. The way that data can be gathered / scraped from any Web site, necessitates the same level of generic access mechanism that java.util.List has. The following snippet of code will show how one can iterate through the different elements of this List and display them in a formatted way.
void writeFormatted(String tab, Writer writer, WebClippingResponse response) { // Print the record name first writer.write(tab+response.getRecordName()+": "); // Scroll through the result and recursively print every element. for (int i = 0; i < response.size(); i++) { Object o = response.get(i); if (o instanceof WebClippingResponse) { writer.write("\n"); prettyPrint(tab+"\t", (WebClippingResponse)o, writer); } else { writer.write(o); } } }
Method Summary | |
java.lang.String |
getRecordName() As we allow nesting of Web Clipping Responses, each Web Clipping Response has a name to refer to. |
java.lang.String |
getRecordShortDescription() In addition to the Record name, there is also a short description to better describe the Response. |
void |
setRecordName(java.lang.String recordName) As we allow nesting of Web Clipping Responses, each Web Clipping Response has a name to refer to. |
void |
setRecordShortDescription(java.lang.String shortDescription) In addition to the Record name, there is also a short description to better describe the Response. |
Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public java.lang.String getRecordName()
public java.lang.String getRecordShortDescription()
public void setRecordName(java.lang.String recordName)
recordName
- The name to set the Web Clipping Response to.public void setRecordShortDescription(java.lang.String shortDescription)
shortDescription
- The short description that better qualifies this instance of the Web Clipping Response.
|
Oracle Application Server Web Clipping API Reference 10g (9.0.4) B10912-01 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |