com.esri.sde.sdk.client
Class SeXmlIndex

java.lang.Object
  extended by com.esri.sde.sdk.client.SeXmlIndex

public final class SeXmlIndex
extends java.lang.Object

Represents an XML index object.

Since:
ArcSDE 9.0

Constructor Summary
SeXmlIndex(SeConnection conn)
           
SeXmlIndex(SeConnection conn, java.lang.String indexName)
          This constructor retrives information about an XML index by name.
 
Method Summary
 void addTag(SeXmlTag tag)
          Adds a tag to this XML index.
 void alterTemplate()
          This method alters an XML index template, based on the contents of this SeXmlIndex object.
 void createTemplate()
          This method creates an XML index template based on the contents of this SeXmlIndex object.
 void deleteTags()
          Removes all tags from an XML index.
 void deleteTemplate(java.lang.String indexName)
          This method deletes an XML index template.
 void generateFromDoc(SeXmlIndex xmlIndex, SeXmlDoc xmlDoc)
          This method generates a best-guess XML index definition or template from a sample document.
 java.lang.String getDescription()
          Return XML index's description.
 void getInfo(java.lang.String indexName)
          This constructor retrives information about an XML index by name.
 SeXmlIndex[] getInfoList()
          This method returns a list of all XML index templates.
 java.lang.String getName()
          Return XML index's name.
 SeXmlTag[] getTagConflicts(SeXmlDoc xmlDoc)
          Get conflicting tags in a document.
 SeXmlTag[] getTags()
          Return XML index's tag/data type list.
 int getType()
          Return XML index's type.
 void setDescription(java.lang.String description)
          Sets the XML index's description.
 void setName(java.lang.String name)
          Sets the XML index's name.
 void setType(int indexType)
          Sets the XML index type.
 void updateTextIndex(java.lang.String table, java.lang.String column)
          Updates the full text index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeXmlIndex

public SeXmlIndex(SeConnection conn)
Parameters:
conn - SDE Connection.

SeXmlIndex

public SeXmlIndex(SeConnection conn,
                  java.lang.String indexName)
           throws SeException
This constructor retrives information about an XML index by name.

Parameters:
conn - open SeConnection object.
indexName - Name of index to fetch.
Throws:
SeException
Method Detail

getType

public int getType()
            throws SeException
Return XML index's type.

Returns:
The type of index.
Throws:
SeException

setType

public void setType(int indexType)
             throws SeException
Sets the XML index type. An SeXmlIndex object can contain one of several different types of XML index information. getType() returns a value that indicates the type of information in a given SeXmlIndex object. The value for index type will be one of these values:

SeDefs.SE_XML_INDEX_TEMPLATE - Index template

SeDefs.SE_XML_INDEX_DEFINITION - Index definition

SeDefs.SE_XML_INDEX_AUTO - Index definition with automatic indexing (default)

Parameters:
indexType - The type of index.
Throws:
SeException

getName

public java.lang.String getName()
                         throws SeException
Return XML index's name.

Returns:
The name of the index.
Throws:
SeException

setName

public void setName(java.lang.String name)
             throws SeException
Sets the XML index's name. The name can contain up to SeDefs.SE_MAX_XML_INDEX_NAME_LEN characters.

Parameters:
name - The name of the index.
Throws:
SeException

getDescription

public java.lang.String getDescription()
                                throws SeException
Return XML index's description.

Returns:
The description of the index.
Throws:
SeException

setDescription

public void setDescription(java.lang.String description)
                    throws SeException
Sets the XML index's description.

Parameters:
description - The description of the index.
Throws:
SeException

getTags

public SeXmlTag[] getTags()
                   throws SeException
Return XML index's tag/data type list.

Returns:
The list of tags.
Throws:
SeException

addTag

public void addTag(SeXmlTag tag)
            throws SeException
Adds a tag to this XML index.

Parameters:
tag -
Throws:
SeException

deleteTags

public void deleteTags()
                throws SeException
Removes all tags from an XML index.

Throws:
SeException

generateFromDoc

public void generateFromDoc(SeXmlIndex xmlIndex,
                            SeXmlDoc xmlDoc)
                     throws SeException
This method generates a best-guess XML index definition or template from a sample document. It accumulates a list of unique tags and a best guess for their data types.

The SeXmlDoc object passed to this function must be valid and contain text. For example, you can initialize a new SeXmlDoc object with SeXmlDoc.SeXmlDoc() and place text into it with SeXmlDoc.setText(java.lang.String).

You can build an XML index that is suitable for multiple documents by calling this method multiple times, providing additional example documents. The method is called once for each new document, specifying the same SeXmlIndex object each time. Additions and changes to the index are accumulated in the SeXmlIndex object. With each call, the index description stored in the SeXmlIndex object is updated with any new tags the function finds in the document.

Parameters:
xmlIndex - XML index template to create.
xmlDoc - XML document.
Throws:
SeException

createTemplate

public void createTemplate()
                    throws SeException
This method creates an XML index template based on the contents of this SeXmlIndex object. It creates the required tags if they do not exist.

Throws:
SeException

alterTemplate

public void alterTemplate()
                   throws SeException
This method alters an XML index template, based on the contents of this SeXmlIndex object. The template's list of tags and its description can be modified.

Throws:
SeException

deleteTemplate

public void deleteTemplate(java.lang.String indexName)
                    throws SeException
This method deletes an XML index template. If no other XML index template or definition is referencing the tags associated with the XML index template being deleted, the tags are also deleted.

Parameters:
indexName - Name of XML index to delete.
Throws:
SeException

getInfo

public void getInfo(java.lang.String indexName)
             throws SeException
This constructor retrives information about an XML index by name.

Parameters:
indexName - Name of the XML index to fetch.
Throws:
SeException

getInfoList

public SeXmlIndex[] getInfoList()
                         throws SeException
This method returns a list of all XML index templates. This function does not return individual XML column index definitions.

Returns:
an array of XML index objects.
Throws:
SeException

updateTextIndex

public void updateTextIndex(java.lang.String table,
                            java.lang.String column)
                     throws SeException
Updates the full text index.

Parameters:
table - XML column's table name.
column - XML column name.
Throws:
SeException

getTagConflicts

public SeXmlTag[] getTagConflicts(SeXmlDoc xmlDoc)
                           throws SeException
Get conflicting tags in a document.

Parameters:
xmlDoc - The list of tags and their data types.
Returns:
SeXmlTag[] Array of conflicting tags.
Throws:
SeException