001/* ----------------------------------------------------------------------------
002 * This file was automatically generated by SWIG (http://www.swig.org).
003 * Version 2.0.11
004 *
005 * Do not make changes to this file unless you know what you are doing--modify
006 * the SWIG interface file instead.
007 * ----------------------------------------------------------------------------- */
008
009package org.sbml.libsbml;
010
011public class SBMLExternalValidator extends SBMLValidator {
012   private long swigCPtr;
013
014   protected SBMLExternalValidator(long cPtr, boolean cMemoryOwn)
015   {
016     super(libsbmlJNI.SBMLExternalValidator_SWIGUpcast(cPtr), cMemoryOwn);
017     swigCPtr = cPtr;
018   }
019
020   protected static long getCPtr(SBMLExternalValidator obj)
021   {
022     return (obj == null) ? 0 : obj.swigCPtr;
023   }
024
025   protected static long getCPtrAndDisown (SBMLExternalValidator obj)
026   {
027     long ptr = 0;
028
029     if (obj != null)
030     {
031       ptr             = obj.swigCPtr;
032       obj.swigCMemOwn = false;
033     }
034
035     return ptr;
036   }
037
038  protected void finalize() {
039    delete();
040  }
041
042  public synchronized void delete() {
043    if (swigCPtr != 0) {
044      if (swigCMemOwn) {
045        swigCMemOwn = false;
046        libsbmlJNI.delete_SBMLExternalValidator(swigCPtr);
047      }
048      swigCPtr = 0;
049    }
050    super.delete();
051  }
052
053  
054/**
055   * Constructor.
056   */ public
057 SBMLExternalValidator() {
058    this(libsbmlJNI.new_SBMLExternalValidator__SWIG_0(), true);
059  }
060
061  
062/**
063   * Copy constructor.
064   */ public
065 SBMLExternalValidator(SBMLExternalValidator arg0) {
066    this(libsbmlJNI.new_SBMLExternalValidator__SWIG_1(SBMLExternalValidator.getCPtr(arg0), arg0), true);
067  }
068
069  
070/**
071   * Creates and returns a deep copy of this converter.
072   * <p>
073   * @return a (deep) copy of this converter.
074   */ public
075 SBMLValidator cloneObject() {
076    long cPtr = libsbmlJNI.SBMLExternalValidator_cloneObject(swigCPtr, this);
077    return (cPtr == 0) ? null : new SBMLValidator(cPtr, true);
078  }
079
080  
081/** 
082   * the actual conversion 
083   * <p>
084   * @return status code represeting success/failure/conversion impossible
085   */ public
086 long validate() {
087    return libsbmlJNI.SBMLExternalValidator_validate(swigCPtr, this);
088  }
089
090  
091/** 
092   * @return the program name of the validator to be run
093   */ public
094 String getProgram() {
095    return libsbmlJNI.SBMLExternalValidator_getProgram(swigCPtr, this);
096  }
097
098  
099/**
100   * Sets the name of the program to run
101   * <p>
102   * @param program the program to be started
103   */ public
104 void setProgram(String program) {
105    libsbmlJNI.SBMLExternalValidator_setProgram(swigCPtr, this, program);
106  }
107
108  
109/**
110   * @return the output file name (this is the file the external program will write)
111   */ public
112 String getOutputFileName() {
113    return libsbmlJNI.SBMLExternalValidator_getOutputFileName(swigCPtr, this);
114  }
115
116  
117/**
118   * Sets the output file name
119   * <p>
120   * @param outputFileName the name of the output XML file
121   */ public
122 void setOutputFileName(String outputFileName) {
123    libsbmlJNI.SBMLExternalValidator_setOutputFileName(swigCPtr, this, outputFileName);
124  }
125
126  
127/** 
128   * @return the name of the SBML file (the document of this validator will be written to it)
129   */ public
130 String getSBMLFileName() {
131    return libsbmlJNI.SBMLExternalValidator_getSBMLFileName(swigCPtr, this);
132  }
133
134  
135/**
136   * Sets the filename for the temporary file to be created
137   * <p>
138   * @param sbmlFileName the temporary name
139   */ public
140 void setSBMLFileName(String sbmlFileName) {
141    libsbmlJNI.SBMLExternalValidator_setSBMLFileName(swigCPtr, this, sbmlFileName);
142  }
143
144  
145/**
146   * Clear all additional arguments
147   */ public
148 void clearArguments() {
149    libsbmlJNI.SBMLExternalValidator_clearArguments(swigCPtr, this);
150  }
151
152  
153/** 
154   * Adds the given argument to the list of additional arguments 
155   * <p>
156   * @param arg the argument
157   */ public
158 void addArgument(String arg) {
159    libsbmlJNI.SBMLExternalValidator_addArgument(swigCPtr, this, arg);
160  }
161
162  
163/** 
164   * @return the number of arguments. 
165   */ public
166 long getNumArguments() {
167    return libsbmlJNI.SBMLExternalValidator_getNumArguments(swigCPtr, this);
168  }
169
170  
171/** 
172   * Returns the argument for the given index. 
173   * <p>
174   * @param n the zero based index of the argument. 
175   * <p>
176   * @return the argument at the given index. 
177   */ public
178 String getArgument(long n) {
179    return libsbmlJNI.SBMLExternalValidator_getArgument(swigCPtr, this, n);
180  }
181
182}