Constructor and Description |
---|
SBaseRef()   |
SBaseRef(CompPkgNamespaces compns)   |
SBaseRef(long level)   |
SBaseRef(long level,
long version)   |
SBaseRef(long level,
long version,
long pkgVersion)   |
SBaseRef(SBaseRef source)   |
Modifier and Type | Method and Description |
---|---|
void |
clearReferencedElement()   |
SBase |
cloneObject()
Creates and returns a deep copy of this
SBase object. |
SBaseRef |
createSBaseRef()   |
void |
delete()
Explicitly deletes the underlying native object.
|
SBase |
getElementByMetaId(String metaid)
Returns the first child element it can find with a specific 'metaid'
attribute value, or
null if no such object is found. |
SBase |
getElementBySId(String id)
Returns the first child element found that has the given
id in the
model-wide SId namespace, or null if no such object is found. |
String |
getElementName()
Returns the XML element name of this object.
|
String |
getIdRef()   |
String |
getMetaIdRef()   |
int |
getNumReferents()   |
String |
getPortRef()   |
SBase |
getReferencedElement()   |
SBase |
getReferencedElementFrom(Model model)   |
SBaseRef |
getSBaseRef()   |
int |
getTypeCode()
Returns the libSBML type code for this object.
|
String |
getUnitRef()   |
boolean |
isSetIdRef()   |
boolean |
isSetMetaIdRef()   |
boolean |
isSetPortRef()   |
boolean |
isSetSBaseRef()   |
boolean |
isSetUnitRef()   |
int |
performDeletion()   |
int |
removeFromParentAndDelete()
Removes itself from its parent.
|
void |
renameSIdRefs(String oldid,
String newid)
Renames all the
SIdRef attributes on this element, including any
found in MathML content (if such exists). |
int |
saveReferencedElement()   |
int |
setIdRef(String id)   |
int |
setMetaIdRef(String id)   |
int |
setPortRef(String id)   |
int |
setSBaseRef(SBaseRef sBaseRef)   |
int |
setUnitRef(String id)   |
int |
unsetIdRef()   |
int |
unsetMetaIdRef()   |
int |
unsetPortRef()   |
int |
unsetSBaseRef()   |
int |
unsetUnitRef()   |
getPackageName, getPackageURI, getPackageVersion, getParentModel
addCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getLevel, getLine, getListOfAllElements, getListOfAllElementsFromPlugins, getMetaId, getModel, getModelHistory, getNamespaces, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getParentSBMLObject, getPlugin, getPlugin, getResourceBiologicalQualifier, getResourceModelQualifier, getSBMLDocument, getSBOTerm, getSBOTermAsURL, getSBOTermID, getVersion, hashCode, hasValidLevelVersionNamespaceCombination, isPackageEnabled, isPackageURIEnabled, isSetAnnotation, isSetMetaId, isSetModelHistory, isSetNotes, isSetSBOTerm, matchesRequiredSBMLNamespacesForAddition, matchesSBMLNamespaces, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, unsetAnnotation, unsetCVTerms, unsetId, unsetMetaId, unsetModelHistory, unsetName, unsetNotes, unsetSBOTerm
public SBaseRef() throws SBMLConstructorException
SBMLConstructorException
public SBaseRef(CompPkgNamespaces compns) throws SBMLConstructorException
SBMLConstructorException
public SBaseRef(long level) throws SBMLConstructorException
SBMLConstructorException
public SBaseRef(long level, long version) throws SBMLConstructorException
SBMLConstructorException
public SBaseRef(long level, long version, long pkgVersion) throws SBMLConstructorException
SBMLConstructorException
public SBaseRef(SBaseRef source) throws SBMLConstructorException
SBMLConstructorException
public void clearReferencedElement()
public SBase cloneObject()
SBase
object.
cloneObject
 in class SBase
SBase
object.public SBaseRef createSBaseRef()
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 SBaseRef.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 SBaseRef.delete()
themselves.
public SBase getElementByMetaId(String metaid)
null
if no such object is found.
getElementByMetaId
 in class SBase
metaid
- string representing the 'metaid' attribute value of the
object to find.
public SBase getElementBySId(String id)
id
in the
model-wide SId
namespace, or null
if no such object is found.
getElementBySId
 in class SBase
id
- string representing the 'id' attribute value of the object
to find.
public String getElementName()
This is overridden by subclasses to return a string appropriate to the
SBML component. For example, Model
defines it as returning
'model'
, CompartmentType
defines it as returning 'compartmentType'
,
and so on.
getElementName
 in class SBase
public String getMetaIdRef()
public int getNumReferents()
public String getPortRef()
public SBase getReferencedElement()
public SBase getReferencedElementFrom(Model model)
public SBaseRef getSBaseRef()
public int getTypeCode()
This method may return the type code of this SBML object, or it may
return SBML_UNKNOWN
. This
is because subclasses of SBase
are not required to implement this
method to return a type code. This method is meant primarily for the
LibSBML C interface, in which class and subclass information is not
readily available.
getTypeCode
 in class SBase
SBML_UNKNOWN
(the default).
SBaseRef.getElementName()
,
CompBase.getPackageName()
public String getUnitRef()
public boolean isSetIdRef()
public boolean isSetMetaIdRef()
public boolean isSetPortRef()
public boolean isSetSBaseRef()
public boolean isSetUnitRef()
public int performDeletion()
public int removeFromParentAndDelete()
ListOf
objects). Pure virutal, as every SBase
element has different parents,
and therefore different methods of removing itself. Will fail (and
not delete itself) if it has no parent object. This function is
designed to be overridden, but for all objects whose parent is of the
class ListOf
, the default implementation will work.
removeFromParentAndDelete
 in class SBase
public void renameSIdRefs(String oldid, String newid)
SIdRef
attributes on this element, including any
found in MathML content (if such exists).
This method works by looking at all attributes and (if appropriate)
mathematical formulas, comparing the identifiers to the value of
oldid
. If any matches are found, the matching identifiers are replaced
with newid
. The method does not descend into child elements.
renameSIdRefs
 in class SBase
oldid
- the old identifiernewid
- the new identifierpublic int saveReferencedElement()
public int setMetaIdRef(String id)
public int setPortRef(String id)
public int setSBaseRef(SBaseRef sBaseRef)
public int setUnitRef(String id)
public int unsetIdRef()
public int unsetMetaIdRef()
public int unsetPortRef()
public int unsetSBaseRef()
public int unsetUnitRef()