Object Properties

All object types have properties that configure the object to operate in a particular way. An XML document describes these properties. When you create or modify an object, you submit an XML document to Oracle SES that describes the object and sets the values of its properties. When you query Oracle SES for a description of an object, it returns the information as an XML document.

XML Documents

Although you can develop XML descriptions of administration objects from scratch, an easier method is to let Oracle SES do the work for you. For universal objects, you can export the description to a file for editing. For creatable objects, you can use the Administration GUI to develop an object and then export the description to a file. You can then edit the file or copy it to create similar objects. This method is particularly useful when creating or updating complex object types, such as sources.

Sample XML Document of an Administration Object

The following is a very simple example of an XML document generated by Oracle SES. It describes the universal index object:

<?xml version="1.0" encoding="UTF-8"?>
<search:config productVersion="11.1.2.0.0" xmlns:search="http://xmlns.oracle.com/search">
   <search:index>
      <search:indexingBatchSize>250</search:indexingBatchSize>
      <search:indexingMemorySize>275</search:indexingMemorySize>
   </search:index>
</search:config>
<?xml version="1.0" encoding="UTF-8"?>

Identifies the file as an XML document. The encoding of exported XML is set to UTF-8, but imported documents can have other encoding.

<search:config>

Contains all Oracle SES object configuration elements. This is the root element of the XML document.

<search:index>

Contains the configuration settings for the universal index element. You can describe administration objects in individual XML files or all objects in one XML file.

Chapter 2, "Administration Object Types," discusses the XML description of each object type.

Editing XML Files

The XML complies with the standard conventions for XML documents. You should have a working knowledge of XML before using the administration APIs.

XML is a text-based markup language, so you can use any text editor to create and edit XML files. However, an ordinary text editor cannot detect when the document is correctly formed and, more importantly, when it contains syntax errors. For that, you should use an XML editor. You can choose from professional and freeware versions that are available for download on the Web.

An XML editor can also check an XML document against the XML Schema Definition (XSD). Oracle SES has two files for the XSD:

  • Config.xsd: Contains the object definitions.

  • State.xsd: Contains the schema for the getState, getStateList, and getAllStates operations.

Both files are in ORACLE_HOME/search/xsd/11_1_2_0_0/adminapi.

State Properties

Some object types have state properties that provide information about the current state of the object. For example, a cluster tree has a status property that reports whether it is enabled or disabled. Both universal and creatable object types can have state properties. Chapter 2, "Administration Object Types," lists the state properties for each object type.

Oracle SES returns the current state of an object in the form of an XML document. See "XML Description of State Properties".

Table 1-4 Administrative Objects With State Properties

Object Type State Properties

clustering

status

clusterTree

status

identityPlugin

status

index

estimatedFragmentation

indexOptimizer

endTime, startTime, status

resultList

status

schedule

lastCrawled, logFilePath, nextCrawl, scheduleError, status

skinBundle

status

spaceCalculator

endTime, error, startTime, status

task

disabledSchedules, endTime, error, startTime, status, stoppedSchedules