public class ReplacedBy extends Replacing
The ReplacedBy
class was introduced by the SBML Level 3 Hierarchical Model Composition
(&ldquocomp&rdquo) package to allow submodel elements to be 'canonical'
versions of the element while still allowing the parent model to reference
those elements. Whereas a ReplacedElement
object indicates that the
containing object replaces another, a ReplacedBy
object indicates the
converse: the parent object is to be replaced by another object.
As is the case with ReplacedElement
, the ReplacedBy
class inherits from SBaseRef
.
It additionally defines one required attribute ('submodelRef'), defined in
libSBML in the Replacing
class.
Constructor and Description |
---|
ReplacedBy()
Creates a new
ReplacedBy with the given level, version, and package
version. |
ReplacedBy(CompPkgNamespaces compns)
Creates a new
ReplacedBy with the given CompPkgNamespaces object. |
ReplacedBy(long level)
Creates a new
ReplacedBy with the given level, version, and package
version. |
ReplacedBy(long level,
long version)
Creates a new
ReplacedBy with the given level, version, and package
version. |
ReplacedBy(long level,
long version,
long pkgVersion)
Creates a new
ReplacedBy with the given level, version, and package
version. |
ReplacedBy(ReplacedBy source)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
SBase |
cloneObject()
Creates and returns a deep copy of this
ReplacedBy object. |
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getElementName()
Returns the XML element name of
this SBML object.
|
int |
getTypeCode()
Returns the libSBML type code of this object instance.
|
int |
removeFromParentAndDelete()
Finds this
ReplacedBy 's SBase parent, gets the &ldquocomp&rdquo plugin from it,
and tells that to remove this. |
getSubmodelRef, hasRequiredAttributes, isSetSubmodelRef, performReplacement, renameSIdRefs, saveReferencedElement, setSubmodelRef, unsetSubmodelRef
clearReferencedElement, connectToChild, createSBaseRef, getElementByMetaId, getElementBySId, getIdRef, getMetaIdRef, getNumReferents, getPortRef, getReferencedElement, getReferencedElementFrom, getSBaseRef, getUnitRef, isSetIdRef, isSetMetaIdRef, isSetPortRef, isSetSBaseRef, isSetUnitRef, performDeletion, setIdRef, setMetaIdRef, setPortRef, setSBaseRef, setUnitRef, unsetIdRef, unsetMetaIdRef, unsetPortRef, unsetSBaseRef, unsetUnitRef
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getLevel, getLine, getListOfAllElements, getListOfAllElements, getListOfAllElementsFromPlugins, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumDisabledPlugins, getNumPlugins, getPackageName, getPackageVersion, getParentSBMLObject, getPlugin, getPlugin, getPrefix, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getURI, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, isSetUserData, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetId, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm, unsetUserData
public ReplacedBy(long level, long version, long pkgVersion) throws SBMLConstructorException
ReplacedBy
with the given level, version, and package
version.
level
- the SBML Levelversion
- the Version within the SBML LevelpkgVersion
- the version of the packageSBMLConstructorException
public ReplacedBy(long level, long version) throws SBMLConstructorException
ReplacedBy
with the given level, version, and package
version.
level
- the SBML Levelversion
- the Version within the SBML LevelpkgVersion
- the version of the packageSBMLConstructorException
public ReplacedBy(long level) throws SBMLConstructorException
ReplacedBy
with the given level, version, and package
version.
level
- the SBML Levelversion
- the Version within the SBML LevelpkgVersion
- the version of the packageSBMLConstructorException
public ReplacedBy() throws SBMLConstructorException
ReplacedBy
with the given level, version, and package
version.
level
- the SBML Levelversion
- the Version within the SBML LevelpkgVersion
- the version of the packageSBMLConstructorException
public ReplacedBy(CompPkgNamespaces compns) throws SBMLConstructorException
ReplacedBy
with the given CompPkgNamespaces
object.
compns
- the namespace to useSBMLConstructorException
public ReplacedBy(ReplacedBy source) throws SBMLConstructorException
SBMLConstructorException
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the ReplacedBy.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke ReplacedBy.delete()
themselves.
public SBase cloneObject()
ReplacedBy
object.
cloneObject
 in class SBaseRef
ReplacedBy
objectpublic java.lang.String getElementName()
getElementName
 in class SBaseRef
public int getTypeCode()
LibSBML attaches an identifying code to every kind of SBML object. These
are integer constants known as SBML type codes. The names of all
the codes begin with the characters SBML_
.
In the Java language interface for libSBML, the
type codes are defined as static integer constants in the interface class
libsbmlConstants
. Note that different Level 3
package plug-ins may use overlapping type codes to identify the package
to which a given object belongs, call the getPackageName()
method on the object.
getTypeCode
 in class SBaseRef
SBML_COMP_REPLACEDBY
ReplacedBy.getElementName()
,
CompBase.getPackageName()
public int removeFromParentAndDelete()
ReplacedBy
's SBase
parent, gets the &ldquocomp&rdquo plugin from it,
and tells that to remove this.
removeFromParentAndDelete
 in class SBaseRef