Oracle Application Server Web Clipping API Reference
10g (9.0.4)

B10912-01

oracle.webclipping.bean
Interface WebClippingResponse

All Superinterfaces:
java.lang.Cloneable, java.util.Collection, java.lang.Comparable, java.util.List, java.io.Serializable

public interface WebClippingResponse
extends java.util.List, java.lang.Comparable, java.lang.Cloneable, java.io.Serializable

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

getRecordName

public java.lang.String getRecordName()
As we allow nesting of Web Clipping Responses, each Web Clipping Response has a name to refer to. It is termed a Record name as a WebClippingResponse is usually implementated with a Record-like construct. This method allows for the getting of that name.
Returns:
The name of the response object.

getRecordShortDescription

public java.lang.String getRecordShortDescription()
In addition to the Record name, there is also a short description to better describe the Response. This method allows for the getting of that description.
Returns:
A short description of the Web Clipping Response.

setRecordName

public void setRecordName(java.lang.String recordName)
As we allow nesting of Web Clipping Responses, each Web Clipping Response has a name to refer to. It is termed a Record name as a WebClippingResponse is usually implementated with a Record-like construct. This method allows for the setting of that name.
Parameters:
recordName - The name to set the Web Clipping Response to.

setRecordShortDescription

public void setRecordShortDescription(java.lang.String shortDescription)
In addition to the Record name, there is also a short description to better describe the Response. This method allows for the setting of that description.
Parameters:
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

Copyright © 1996, 2003, Oracle. All rights reserved.