Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2005Q4 Technical Reference Guide 

Chapter 54
Robot Application Functions - Enumeration Functions

This chapter contains the following sections


Introduction

The functions discussed in this chapter operate at the Enumerate stage. These functions control if and how a robot gathers links from a given resource in order to use as starting points for further resource discovery.


enumerate-urls

The enumerate-urls function scans the resource and enumerates all URLs found in hypertext links. The results are used to spawn further resource discovery. You can specify a content-type to restrict the kind of URLs enumerated.

Parameters

The following table lists the parameters used with the enumerate-urls function. The table contains two columns. The first column lists the parameter, and the second column provides a description.

max

The maximum number of URLs to spawn from a given resource. The default, if max is omitted, is 1024.

type

Content-type that restricts enumeration to those URLs that have the specified content-type. type is an optional parameter. If omitted, it will enumerate all URLs.

Example

The following example enumerates HTML URLs only, up to a maximum of 1024:

Enumerate fn=enumerate-urls type=text/html


enumerate-urls-from-text

The enumerate-urls-from-text function scans text resources, looking for strings matching this regular expression: URL:.*. It spawns robots to enumerate the URLs from these strings and generate further resource descriptions.

Parameters

The following table lists the parameter used with the enumerate-urls-from-text function. The table contains two columns. The first column lists the parameter, and the second column provides a description.

max

The maximum number of URLs to spawn from a given resource. The default, if max is omitted, is 1024.

Example

Enumerate fn=enumerate-urls-from-text



Previous      Contents      Index      Next     


Part No: 819-4159.   Copyright 2005 Sun Microsystems, Inc. All rights reserved.