## org.exist.client
Class CollectionXConf

    java.lang.Object
      org.exist.client.CollectionXConf

public class CollectionXConf
extends java.lang.Object

Class to represent a collection.xconf which holds the configuration data for a collection

Version:
  1.2
Author:
  Adam Retter <adam.retter@devon.gov.uk>

Method Summary
`void` `addFullTextIndex(java.lang.String XPath, java.lang.String action)` Add a path to the full text index
`void` `addQNameIndex(java.lang.String QName, java.lang.String xsType)` Add a QName Index
`void` `addRangeIndex(java.lang.String XPath, java.lang.String xsType)` Add a Range Index
`void` `addTrigger(java.lang.String triggerClass, boolean STORE_DOCUMENT_EVENT, boolean UPDATE_DOCUMENT_EVENT, boolean REMOVE_DOCUMENT_EVENT, boolean CREATE_COLLECTION_EVENT, boolean RENAME_COLLECTION_EVENT, boolean DELETE_COLLECTION_EVENT, java.util.Properties parameters)` Add a Trigger
`void` `deleteFullTextIndex(int index)` Delete a path from the full text index
`void` `deleteQNameIndex(int index)` Delete a QName Index
`void` `deleteRangeIndex(int index)` Delete a Range Index
`void` `deleteTrigger(int index)` Delete a Trigger
`boolean` `getFullTextIndexAlphanum()` Indicates whether the fulltext index indexes alphanumeric values
`boolean` `getFullTextIndexAttributes()` Indicates whether the fulltext index indexes attributes
`boolean` `getFullTextIndexDefaultAll()` Indicates whether the fulltext index defaults to indexing all nodes
`java.lang.String` `getFullTextIndexPath(int index)` Returns a full text index path
`java.lang.String` `getFullTextIndexPathAction(int index)` Returns a full text index path action
`int` `getFullTextPathCount()` Returns the number of full text index paths defined
`org.exist.client.CollectionXConf.QNameIndex` `getQNameIndex(int index)` Returns a specific QName Index
`int` `getQNameIndexCount()` Returns the number of QName Indexes defined
`org.exist.client.CollectionXConf.QNameIndex[]` `getQNameIndexes()` Returns an array of the QName Indexes
`org.exist.client.CollectionXConf.RangeIndex` `getRangeIndex(int index)` Returns n specific Range Index
`int` `getRangeIndexCount()` Returns the number of Range Indexes defined
`org.exist.client.CollectionXConf.RangeIndex[]` `getRangeIndexes()` Returns an array of the Range Indexes
`org.exist.client.CollectionXConf.Trigger` `getTrigger(int index)` Returns n specific Trigger
`int` `getTriggerCount()` Returns the number of Triggers defined
`org.exist.client.CollectionXConf.Trigger[]` `getTriggers()` Returns an array of Triggers
`boolean` `hasChanged()` Indicates whether the collection configuration has changed
`boolean` `Save()` Saves the collection configuation back to the collection.xconf
`void` `setFullTextIndexAlphanum(boolean alphanum)` Set whether alphanumeric values should be indexed into the fulltext index
`void` `setFullTextIndexAttributes(boolean attributes)` Set whether attributes should be indexed into the fulltext index
`void` `setFullTextIndexDefaultAll(boolean defaultAll)` Set whether all nodes should be indexed into the fulltext index
`void` `updateFullTextIndex(int index, java.lang.String XPath, java.lang.String action)` Update the details of a full text index path
`void` `updateQNameIndex(int index, java.lang.String QName, java.lang.String xsType)` Update the details of a QName Index
`void` `updateRangeIndex(int index, java.lang.String XPath, java.lang.String xsType)` Update the details of a Range Index
`void` `updateTrigger(int index, java.lang.String triggerClass, boolean STORE_DOCUMENT_EVENT, boolean UPDATE_DOCUMENT_EVENT, boolean REMOVE_DOCUMENT_EVENT, boolean CREATE_COLLECTION_EVENT, boolean RENAME_COLLECTION_EVENT, boolean DELETE_COLLECTION_EVENT, java.util.Properties parameters)` Update the details of a Trigger

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getFullTextIndexDefaultAll

    public boolean getFullTextIndexDefaultAll()

  Indicates whether the fulltext index defaults to indexing all nodes

  Returns:
    true indicates all nodes are indexed, false indicates no nodes are indexed by default

### setFullTextIndexDefaultAll

    public void setFullTextIndexDefaultAll(boolean defaultAll)

  Set whether all nodes should be indexed into the fulltext index

  Parameters:
    `defaultAll` - true indicates all nodes should be indexed, false indicates no nodes should be indexed by default

### getFullTextIndexAttributes

    public boolean getFullTextIndexAttributes()

  Indicates whether the fulltext index indexes attributes

  Returns:
    true indicates attributes are indexed, false indicates attributes are not indexed

### setFullTextIndexAttributes

    public void setFullTextIndexAttributes(boolean attributes)

  Set whether attributes should be indexed into the fulltext index

  Parameters:
    `attributes` - true indicates attributes should be indexed, false indicates attributes should not be indexed

### getFullTextIndexAlphanum

    public boolean getFullTextIndexAlphanum()

  Indicates whether the fulltext index indexes alphanumeric values

  Returns:
    true indicates alphanumeric values are indexed, false indicates alphanumeric values are not indexed

### setFullTextIndexAlphanum

    public void setFullTextIndexAlphanum(boolean alphanum)

  Set whether alphanumeric values should be indexed into the fulltext index

  Parameters:
    `alphanum` - true indicates alphanumeric values should be indexed, false indicates alphanumeric values should not be indexed

### getFullTextIndexPath

    public java.lang.String getFullTextIndexPath(int index)

  Returns a full text index path

  Parameters:
    `index` - The numeric index of the fulltext index path to retreive
  Returns:
    The XPath

### getFullTextIndexPathAction

    public java.lang.String getFullTextIndexPathAction(int index)

  Returns a full text index path action

  Parameters:
    `index` - The numeric index of the fulltext index path action to retreive
  Returns:
    The Action, either "include" or "exclude"

### getFullTextPathCount

    public int getFullTextPathCount()

  Returns the number of full text index paths defined

  Returns:
    The number of paths

### addFullTextIndex

    public void addFullTextIndex(java.lang.String XPath,
                                 java.lang.String action)

  Add a path to the full text index

  Parameters:
    `XPath` - The XPath to index
    `action` - The action to take on the path, either "include" or "exclude"

### updateFullTextIndex

    public void updateFullTextIndex(int index,
                                    java.lang.String XPath,
                                    java.lang.String action)

  Update the details of a full text index path

  Parameters:
    `index` - The numeric index of the path to update
    `XPath` - The new XPath, or null to just set the action
    `action` - The new action, either "include" or "exclude", or null to just set the XPath

### deleteFullTextIndex

    public void deleteFullTextIndex(int index)

  Delete a path from the full text index

  Parameters:
    `index` - The numeric index of the path to delete

### getRangeIndexes

    public org.exist.client.CollectionXConf.RangeIndex[] getRangeIndexes()

  Returns an array of the Range Indexes

  Returns:
    Array of Range Indexes

### getRangeIndex

    public org.exist.client.CollectionXConf.RangeIndex getRangeIndex(int index)

  Returns n specific Range Index

  Parameters:
    `index` - The numeric index of the Range Index to return
  Returns:
    The Range Index

### getRangeIndexCount

    public int getRangeIndexCount()

  Returns the number of Range Indexes defined

  Returns:
    The number of Range indexes

### deleteRangeIndex

    public void deleteRangeIndex(int index)

  Delete a Range Index

  Parameters:
    `index` - The numeric index of the Range Index to delete

### updateRangeIndex

    public void updateRangeIndex(int index,
                                 java.lang.String XPath,
                                 java.lang.String xsType)

  Update the details of a Range Index

  Parameters:
    `index` - The numeric index of the range index to update
    `XPath` - The new XPath, or null to just set the type
    `xsType` - The new type of the path, a valid xs:type, or just null to set the path

### addRangeIndex

    public void addRangeIndex(java.lang.String XPath,
                              java.lang.String xsType)

  Add a Range Index

  Parameters:
    `XPath` - The XPath to index
    `xsType` - The type of the path, a valid xs:type

### getQNameIndexes

    public org.exist.client.CollectionXConf.QNameIndex[] getQNameIndexes()

  Returns an array of the QName Indexes

  Returns:
    Array of QName Indexes

### getQNameIndex

    public org.exist.client.CollectionXConf.QNameIndex getQNameIndex(int index)

  Returns a specific QName Index

  Parameters:
    `index` - The numeric index of the QName index to return
  Returns:
    The QName Index

### getQNameIndexCount

    public int getQNameIndexCount()

  Returns the number of QName Indexes defined

  Returns:
    The number of QName indexes

### deleteQNameIndex

    public void deleteQNameIndex(int index)

  Delete a QName Index

  Parameters:
    `index` - The numeric index of the QName Index to delete

### updateQNameIndex

    public void updateQNameIndex(int index,
                                 java.lang.String QName,
                                 java.lang.String xsType)

  Update the details of a QName Index

  Parameters:
    `index` - The numeric index of the qname index to update
    `QName` - The new QName, or null to just set the type
    `xsType` - The new type of the path, a valid xs:type, or just null to set the QName

### addQNameIndex

    public void addQNameIndex(java.lang.String QName,
                              java.lang.String xsType)

  Add a QName Index

  Parameters:
    `QName` - The QName to index
    `xsType` - The type of the QName, a valid xs:type

### getTriggers

    public org.exist.client.CollectionXConf.Trigger[] getTriggers()

  Returns an array of Triggers

  Returns:
    Array of Range Indexes

### getTrigger

    public org.exist.client.CollectionXConf.Trigger getTrigger(int index)

  Returns n specific Trigger

  Parameters:
    `index` - The numeric index of the Trigger to return
  Returns:
    The Trigger

### getTriggerCount

    public int getTriggerCount()

  Returns the number of Triggers defined

  Returns:
    The number of Triggers

### deleteTrigger

    public void deleteTrigger(int index)

  Delete a Trigger

  Parameters:
    `index` - The numeric index of the Trigger to delete

### updateTrigger

    public void updateTrigger(int index,
                              java.lang.String triggerClass,
                              boolean STORE_DOCUMENT_EVENT,
                              boolean UPDATE_DOCUMENT_EVENT,
                              boolean REMOVE_DOCUMENT_EVENT,
                              boolean CREATE_COLLECTION_EVENT,
                              boolean RENAME_COLLECTION_EVENT,
                              boolean DELETE_COLLECTION_EVENT,
                              java.util.Properties parameters)

  Update the details of a Trigger

  Parameters:
    `index` - The numeric index of the range index to update
    `triggerClass` - The name of the new class for the trigger

### addTrigger

    public void addTrigger(java.lang.String triggerClass,
                           boolean STORE_DOCUMENT_EVENT,
                           boolean UPDATE_DOCUMENT_EVENT,
                           boolean REMOVE_DOCUMENT_EVENT,
                           boolean CREATE_COLLECTION_EVENT,
                           boolean RENAME_COLLECTION_EVENT,
                           boolean DELETE_COLLECTION_EVENT,
                           java.util.Properties parameters)

  Add a Trigger

  Parameters:
    `triggerClass` - The class for the Trigger

### hasChanged

    public boolean hasChanged()

  Indicates whether the collection configuration has changed

  Returns:
    true if the configuration has changed, false otherwise

### Save

    public boolean Save()

  Saves the collection configuation back to the collection.xconf

  Returns:
    true if the save succeeds, false otherwise

Copyright (C) Wolfgang Meier. All rights reserved.