1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.4
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.sbml.libsbml;
/**
* SBML converter for removing packages.
<p>
* <p style='color: #777; font-style: italic'>
This class of objects is defined by libSBML only and has no direct
equivalent in terms of SBML components. It is a class used in
the implementation of extra functionality provided by libSBML.
</p>
<p>
* This SBML converter takes an SBML document and removes (strips) a package
* from it. No conversion is performed; the package constructs are simply
* removed from the SBML document. The package to be stripped is determined
* by the value of the option 'package' on the conversion properties.
<p>
* @see SBMLFunctionDefinitionConverter
* @see SBMLLevelVersionConverter
* @see SBMLRuleConverter
* @see SBMLLevelVersionConverter
* @see SBMLUnitsConverter
*/
public class SBMLStripPackageConverter extends SBMLConverter {
private long swigCPtr;
protected SBMLStripPackageConverter(long cPtr, boolean cMemoryOwn)
{
super(libsbmlJNI.SBMLStripPackageConverter_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(SBMLStripPackageConverter obj)
{
return (obj == null) ? 0 : obj.swigCPtr;
}
protected static long getCPtrAndDisown (SBMLStripPackageConverter obj)
{
long ptr = 0;
if (obj != null)
{
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
}
return ptr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libsbmlJNI.delete_SBMLStripPackageConverter(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public static void init() {
libsbmlJNI.SBMLStripPackageConverter_init();
}
/**
* Creates a new {@link SBMLStripPackageConverter} object.
*/ public
SBMLStripPackageConverter() {
this(libsbmlJNI.new_SBMLStripPackageConverter__SWIG_0(), true);
}
/**
* Copy constructor; creates a copy of an {@link SBMLStripPackageConverter}
* object.
<p>
* @param obj the {@link SBMLStripPackageConverter} object to copy.
*/ public
SBMLStripPackageConverter(SBMLStripPackageConverter obj) {
this(libsbmlJNI.new_SBMLStripPackageConverter__SWIG_1(SBMLStripPackageConverter.getCPtr(obj), obj), true);
}
/**
* Creates and returns a deep copy of this {@link SBMLStripPackageConverter}
* object.
<p>
* @return a (deep) copy of this converter.
*/ public
SBMLConverter cloneObject() {
long cPtr = libsbmlJNI.SBMLStripPackageConverter_cloneObject(swigCPtr, this);
return (cPtr == 0) ? null : new SBMLStripPackageConverter(cPtr, true);
}
/**
* Returns <code>true</code> if this converter object's properties match the given
* properties.
<p>
* A typical use of this method involves creating a {@link ConversionProperties}
* object, setting the options desired, and then calling this method on
* an {@link SBMLStripPackageConverter} object to find out if the object's
* property values match the given ones. This method is also used by
* {@link SBMLConverterRegistry#getConverterFor(ConversionProperties props)}
* to search across all registered converters for one matching particular
* properties.
<p>
* @param props the properties to match.
<p>
* @return <code>true</code> if this converter's properties match, <code>false</code>
* otherwise.
*/ public
boolean matchesProperties(ConversionProperties props) {
return libsbmlJNI.SBMLStripPackageConverter_matchesProperties(swigCPtr, this, ConversionProperties.getCPtr(props), props);
}
/**
* Perform the conversion.
<p>
* This method causes the converter to do the actual conversion work,
* that is, to convert the {@link SBMLDocument} object set by
* {@link SBMLConverter#setDocument(SBMLDocument doc)} and
* with the configuration options set by
* {@link SBMLConverter#setProperties(ConversionProperties props)}.
<p>
* @return integer value indicating the success/failure of the operation.
* The possible values are:
* <ul>
* <li> {@link libsbmlConstants#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS }
* <li> {@link libsbmlConstants#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED }
* <li> {@link libsbmlConstants#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE }
* </ul>
*/ public
int convert() {
return libsbmlJNI.SBMLStripPackageConverter_convert(swigCPtr, this);
}
/**
* Returns the default properties of this converter.
<p>
* A given converter exposes one or more properties that can be adjusted
* in order to influence the behavior of the converter. This method
* returns the <em>default</em> property settings for this converter. It is
* meant to be called in order to discover all the settings for the
* converter object.
<p>
* @return the {@link ConversionProperties} object describing the default properties
* for this converter.
*/ public
ConversionProperties getDefaultProperties() {
return new ConversionProperties(libsbmlJNI.SBMLStripPackageConverter_getDefaultProperties(swigCPtr, this), true);
}
}
|