Skip navigation links

Oracle Secure Enterprise Search Java API Reference
10g Release 1 (10.1.8.2)

E10465-01


oracle.search.sdk.crawler
Interface DocumentMetadata


public interface DocumentMetadata

DocumentMetadata is an interface used by a crawler plug-in to submit URL-related data to the crawler.


Field Summary
static int ATTR_TYPE_DATE
          Date attribute data type
static int ATTR_TYPE_NUMBER
          Number attribute data type
static int ATTR_TYPE_STRING
          String attribute data type

 

Method Summary
 void addAttribute(String name, BigDecimal value)
          Adds an attribute value whose type is number
 void addAttribute(String name, Date value)
          Adds an attribute value whose type is java.util.Date.
 void addAttribute(String name, String value)
          Adds an attribute value whose type is String
 void clearData()
          Clears all meta data of this document
 void deleteAttribute(String name)
          Deletes the specified attribute
 String getAccessURL()
          Gets the value of an access URL document property
 DocumentAcl getACLInfo()
          Gets the access control information associated with the document.
 String getAttributeName(int attrIndex)
          Gets the name of the specified attribute
 int getAttributeType(int attrIndex)
          Gets the data type of the specified attribute
 Enumeration getAttributeValues(int attrIndex)
          Get the list of values for a specified attribute
 Enumeration getAttributeValues(String attrName)
          Gets the list of values for a specified attribute
 int getContentLength()
          Returns the actual document content size in bytes.
 String getContentType()
          Gets the document content type
 int getCrawlDepth()
          Gets the crawling depth of the document.
 String getDisplayURL()
          Gets the value of an URL data property.
 String getLanguage()
          Gets the ISO 639-1 language code of the document.
 int getLastDocumentStatus()
          Gets the document status of the previous crawl
 Date getLastModifiedDate()
          Gets the last modification date of the document
 int getNumAttributes()
          Gets the number of attributes
 int getNumAttrValues()
          Gets the number of attribute values
 String getOwnerGuid()
          Gets the owner principal of the document.
 String[] getSourceHierarchy()
          Gets the source hierarchy of the document
 void setAccessURL(String value)
          Sets the access URL property
 void setACLInfo(DocumentAcl acl)
          Sets the document ACL.
 void setAffinity(String value)
          Sets the document affinity value for duplicate detection
 void setAttributes(String name, BigDecimal[] values)
          Sets (replaces) a list of attribute values whose type is number
 void setAttributes(String name, Date[] values)
          Sets (replaces) a list of attribute values whose type is java.util.Date.
 void setAttributes(String name, String[] values)
          Sets (replaces) a list of attribute values whose type is String
 void setContentLength(int size)
          Sets the size of the document.
 void setContentType(String mimeType)
          Sets the content type of the document
 void setCrawlDepth(int depth)
          Sets the crawling depth of the document.
 void setDisplayURL(String value)
          Sets the display URL property
 void setLanguage(String value)
          Sets the language of the document using ISO 639-1 language code; for example, 'en' for English, 'ja' for Japanese, and 'fr' for French
 void setLastModifiedDate(Date timeStamp)
          Sets the last modification date of the document
 void setOwnerGuid(String ownerGuid)
          Sets the document owner.
 void setSourceHierarchy(String[] hierarchyList)
          Sets the path of the document in terms of information source organization.

 

Field Detail

ATTR_TYPE_STRING

public static final int ATTR_TYPE_STRING
String attribute data type
See Also:
Constant Field Values

ATTR_TYPE_NUMBER

public static final int ATTR_TYPE_NUMBER
Number attribute data type
See Also:
Constant Field Values

ATTR_TYPE_DATE

public static final int ATTR_TYPE_DATE
Date attribute data type
See Also:
Constant Field Values

Method Detail

setDisplayURL

public void setDisplayURL(String value)
Sets the display URL property
Parameters:
value - the display URL property value

getDisplayURL

public String getDisplayURL()
Gets the value of an URL data property. If there are multiple display URLs set, the first URL is returned
Returns:
the property value, which can be null if there is no such property

setAccessURL

public void setAccessURL(String value)
Sets the access URL property
Parameters:
value - the access URL property value

getAccessURL

public String getAccessURL()
Gets the value of an access URL document property
Returns:
the property value, which can be null

setAffinity

public void setAffinity(String value)
Sets the document affinity value for duplicate detection
Parameters:
value - the affinity string

setContentType

public void setContentType(String mimeType)
Sets the content type of the document
Parameters:
mimeType - the document key value

getContentType

public String getContentType()
Gets the document content type
Returns:
the content type

setCrawlDepth

public void setCrawlDepth(int depth)
Sets the crawling depth of the document. The value of the depth can be generalized to any integer value that suits the need of the crawl.
Parameters:
depth - the crawling depth of the document

getCrawlDepth

public int getCrawlDepth()
Gets the crawling depth of the document.
Returns:
the crawling depth of the document

setLanguage

public void setLanguage(String value)
Sets the language of the document using ISO 639-1 language code; for example, 'en' for English, 'ja' for Japanese, and 'fr' for French
Parameters:
value - the ISO 639-1 language code

getLanguage

public String getLanguage()
Gets the ISO 639-1 language code of the document.
Returns:
the ISO 639-1 language code of the document

setSourceHierarchy

public void setSourceHierarchy(String[] hierarchyList)
Sets the path of the document in terms of information source organization. For example, [hardware][power tools][sanders] for a URL path /hardware/power%20tools/sanders
Parameters:
hierarchyList - the hierarchy list from top to bottom

getSourceHierarchy

public String[] getSourceHierarchy()
Gets the source hierarchy of the document
Returns:
the hierarchy list from top to bottom

setLastModifiedDate

public void setLastModifiedDate(Date timeStamp)
Sets the last modification date of the document
Parameters:
timeStamp - the last modification date

getLastModifiedDate

public Date getLastModifiedDate()
Gets the last modification date of the document
Returns:
the last modification date

setACLInfo

public void setACLInfo(DocumentAcl acl)
Sets the document ACL. ACL information is provided through the use of a DocumentAcl object.
Parameters:
acl - the ACL or set of security attribute values protecting the document. If null, there will be no access control information associated with this document.

getACLInfo

public DocumentAcl getACLInfo()
Gets the access control information associated with the document. This security information will be in the form of an ACL for identity-based security, or a set of security attributes values for user-defined security.
Returns:
the access control information, or null if there is no security information associated with this document

setOwnerGuid

public void setOwnerGuid(String ownerGuid)
Sets the document owner. The owner principal should be in the format of the canonical attribute, as returned by the active identity plug-in manager. This will effectively grant read privileges for this document to the given principal.
Parameters:
ownerGuid - the owner principal, in the format of the canonical attribute
See Also:
IdentityPluginManager.getCanonicalAttribute()

getOwnerGuid

public String getOwnerGuid()
Gets the owner principal of the document.
Returns:
the owner principal, in the format of the canonical attribute

getLastDocumentStatus

public int getLastDocumentStatus()
Gets the document status of the previous crawl
Returns:
document status code. Return 0 if this is a first time crawl

addAttribute

public void addAttribute(String name,
                         BigDecimal value)
Adds an attribute value whose type is number
Parameters:
name - the name of the attribute
value - the value of the attribute

addAttribute

public void addAttribute(String name,
                         Date value)
Adds an attribute value whose type is java.util.Date. Note that java.util.Date has a time component.
Parameters:
name - the name of the attribute
value - the value of the attribute

addAttribute

public void addAttribute(String name,
                         String value)
Adds an attribute value whose type is String
Parameters:
name - the name of the attribute
value - the value of the attribute

setAttributes

public void setAttributes(String name,
                          BigDecimal[] values)
Sets (replaces) a list of attribute values whose type is number
Parameters:
name - the name of the attribute
values - array of attribute values, at least one value should exist

setAttributes

public void setAttributes(String name,
                          Date[] values)
Sets (replaces) a list of attribute values whose type is java.util.Date. Note that java.util.Date has a time component
Parameters:
name - the name of the attribute
values - array of attribute values, at least one value should exist

setAttributes

public void setAttributes(String name,
                          String[] values)
Sets (replaces) a list of attribute values whose type is String
Parameters:
name - the name of the attribute
values - array of attribute values, at least one value should exist

deleteAttribute

public void deleteAttribute(String name)
Deletes the specified attribute
Parameters:
name - the name of the attribute

getNumAttributes

public int getNumAttributes()
Gets the number of attributes
Returns:
number of attributes for this document

getNumAttrValues

public int getNumAttrValues()
Gets the number of attribute values
Returns:
number of attribute values for this document

getAttributeName

public String getAttributeName(int attrIndex)
Gets the name of the specified attribute
Parameters:
attrIndex - 0-based index indicating which attribute to return
Returns:
the name of the specified attribute

getAttributeType

public int getAttributeType(int attrIndex)
Gets the data type of the specified attribute
Parameters:
attrIndex - 0-based index indicating which attribute to return
Returns:
the data type of the specified attribute: ATTR_TYPE_NUMBER, ATTR_TYPE_STRING, or ATTR_TYPE_DATE.

getAttributeValues

public Enumeration getAttributeValues(int attrIndex)
Get the list of values for a specified attribute
Parameters:
attrIndex - 0-based index indicating which attribute
Returns:
an enumeration of String, BigDecimal, or Date objects containing attribute values

getAttributeValues

public Enumeration getAttributeValues(String attrName)
Gets the list of values for a specified attribute
Parameters:
attrName - the name of the attribute
Returns:
an enumeration of String, BigDecimal, or Date objects containing attribute values. Returns null if there is no such attribute name

clearData

public void clearData()
Clears all meta data of this document

setContentLength

public void setContentLength(int size)
Sets the size of the document. The size may be overwritten by the crawler when fetching the actual content.
Parameters:
size - size of the document in bytes

getContentLength

public int getContentLength()
Returns the actual document content size in bytes. It may not be the exact same number as set by the plug-in.
Returns:
the content length of the document

Skip navigation links

Oracle Secure Enterprise Search Java API Reference
10g Release 1 (10.1.8.2)

E10465-01


Copyright © 2006, 2007, Oracle. All rights reserved.