Oracle Fusion Applications Search Java API Reference for Oracle Enterprise Crawl and Search Framework
11g Release 1 (11.1.2)

E21908-02

oracle.ecsf
Interface Document

All Known Subinterfaces:
IndexableDocument, IndexedDocument

public interface Document

An document represents an instance of a searchable object.


Method Summary
 void addChildDoc(java.lang.String name, Document doc)
          Adds a child indexable document.
 void addField(FieldDefinition field, java.lang.Object value)
          Adds a name/value pair as a unstored field.
 void addTags(java.lang.String[] tags)
          Adds a list of tags to this document.
 void clearTags()
          Clears tags added to this document.
 java.util.Map getAttributes()
          Returns fields map hashed against attribute name.
 Document[] getChildDocs(java.lang.String name)
          Gets a child indexable document by name.
 java.lang.String getContent()
          Returns content assigned to this document.
 java.lang.String getContentType()
          Returns mContent type for this document.
 java.lang.String getDisplayURL()
          Returns a url that uniquely identifies the document in a search engine instance.
 DocumentDefinition getDocumentDefinition()
          Gets document definition of this document.
 java.util.Map getFields()
          Returns fields map hashed against field binding.
 java.lang.Object getFieldValue(java.lang.String name)
          Returns a field value from result for a given name.
 java.lang.String getKeywords()
          Returns keywords of this document.
 java.lang.String getLanguage()
          Returns the language code for the document
 PrimaryKey getPrimaryKey()
          Gets primaryKey of this document.
 SearchableObject getSearchableObject()
          Gets meta data definition for this document.
 java.util.List<java.lang.String> getTags()
          Returns a list of tags attached to this document.
 java.lang.String getTitle()
          Returns title of this document.
 void removeChildDocs()
          Removes all child indexable documents (when no longer needed).
 void setContent(java.lang.String content)
          Sets content for this document.
 void setContentType(java.lang.String contentType)
          Sets contentType for this document.
 void setDocumentDefinition(DocumentDefinition docDef)
          Sets the document definition.
 void setFieldValue(java.lang.String attributeName, java.lang.Object attributeValue)
          Sets attribute value.
 void setKeywords(java.lang.String keywords)
          Sets keywords.
 void setLanguage(java.lang.String language)
          Sets the language for the Document
 void setPrimaryKey(PrimaryKey pk)
          Sets primaryKey for this document;
 void setTitle(java.lang.String title)
          Sets title.
 

Method Detail

addField

void addField(FieldDefinition field,
              java.lang.Object value)
Adds a name/value pair as a unstored field.

Parameters:
field -
value -

getFields

java.util.Map getFields()
Returns fields map hashed against field binding.

Returns:
fields.

getAttributes

java.util.Map getAttributes()
Returns fields map hashed against attribute name.

Returns:
attributes

getFieldValue

java.lang.Object getFieldValue(java.lang.String name)
Returns a field value from result for a given name.

Parameters:
name - field name.
Returns:
value of named field.

getPrimaryKey

PrimaryKey getPrimaryKey()
Gets primaryKey of this document. Null if none.

Returns:
primaryKey

setPrimaryKey

void setPrimaryKey(PrimaryKey pk)
Sets primaryKey for this document;

Parameters:
pk -

getContentType

java.lang.String getContentType()
Returns mContent type for this document.


setContentType

void setContentType(java.lang.String contentType)
Sets contentType for this document.

Parameters:
contentType - new conent.

getContent

java.lang.String getContent()
Returns content assigned to this document.

Returns:
content of this document.

setContent

void setContent(java.lang.String content)
Sets content for this document.

Parameters:
content - new conent.

getSearchableObject

SearchableObject getSearchableObject()
Gets meta data definition for this document.

Returns:
mSearchableObject that defines this document.

setFieldValue

void setFieldValue(java.lang.String attributeName,
                   java.lang.Object attributeValue)
Sets attribute value.

Parameters:
attributeName - name of the attribute.
attributeValue - new value for the attribute.

getLanguage

java.lang.String getLanguage()
Returns the language code for the document

Returns:
language code for e.g. en_US.

setLanguage

void setLanguage(java.lang.String language)
Sets the language for the Document

Parameters:
language - default language of this document.

getDisplayURL

java.lang.String getDisplayURL()
Returns a url that uniquely identifies the document in a search engine instance.


getTitle

java.lang.String getTitle()
Returns title of this document.

Returns:
title of this document.

setTitle

void setTitle(java.lang.String title)
Sets title.

Parameters:
title - new title.

getKeywords

java.lang.String getKeywords()
Returns keywords of this document.

Returns:
keywords of this document.

setKeywords

void setKeywords(java.lang.String keywords)
Sets keywords.

Parameters:
keywords - new keywords.

addChildDoc

void addChildDoc(java.lang.String name,
                 Document doc)
Adds a child indexable document.


getChildDocs

Document[] getChildDocs(java.lang.String name)
Gets a child indexable document by name.


removeChildDocs

void removeChildDocs()
Removes all child indexable documents (when no longer needed).


getDocumentDefinition

DocumentDefinition getDocumentDefinition()
Gets document definition of this document.

Returns:
abstract document definition

setDocumentDefinition

void setDocumentDefinition(DocumentDefinition docDef)
Sets the document definition. (called by addChildDoc)

Parameters:
docDef -

addTags

void addTags(java.lang.String[] tags)
Adds a list of tags to this document. Tags will be indexed with the document when it is consumed by a search engine. Tags are indexed as space delimited terms. Adding two of same tags will result just one tag for the document.

Parameters:
tags - a list of tags.

getTags

java.util.List<java.lang.String> getTags()
Returns a list of tags attached to this document.

Returns:
a list of tags for this document.

clearTags

void clearTags()
Clears tags added to this document.


Oracle Fusion Applications Search Java API Reference for Oracle Enterprise Crawl and Search Framework
11g Release 1 (11.1.2)

E21908-02

Copyright © 2011 Oracle. All rights reserved.