/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version: 1.3.19
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.sleepycat.dbxml;


public class XmlIndexSpecification {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected XmlIndexSpecification(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() /* no exception */ {
    if(swigCPtr != 0 && swigCMemOwn) {
      dbxml_javaJNI.delete_XmlIndexSpecification(swigCPtr);
      swigCMemOwn = false;
    }
    swigCPtr = 0;
  }

  protected static long getCPtr(XmlIndexSpecification obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public XmlIndexSpecification() throws XmlException {
    this(dbxml_javaJNI.new_XmlIndexSpecification(), true);
  }

  public void addIndex(String uri, String name, String index) throws XmlException {
    dbxml_javaJNI.XmlIndexSpecification_addIndex(swigCPtr, uri, name, index);
  }

  public void deleteIndex(String uri, String name, String index) throws XmlException {
    dbxml_javaJNI.XmlIndexSpecification_deleteIndex(swigCPtr, uri, name, index);
  }

  public void replaceIndex(String uri, String name, String index) throws XmlException {
    dbxml_javaJNI.XmlIndexSpecification_replaceIndex(swigCPtr, uri, name, index);
  }

  public void reset() throws XmlException {
    dbxml_javaJNI.XmlIndexSpecification_reset(swigCPtr);
  }

  public XmlIndexDeclaration find(String uri, String name) { return dbxml_javaJNI.XmlIndexSpecification_find(swigCPtr, uri, name); }

  public XmlIndexDeclaration next() { return dbxml_javaJNI.XmlIndexSpecification_next(swigCPtr); }

}
