java.io.Serializable
, java.lang.Cloneable
, javax.swing.tree.TreeNode
, SBase
, TreeNodeWithChangeSupport
public class ReplacedElement extends SBaseRef
The object holding the
ReplacedElement
instance is the one doing the replacing; the object
pointed to by the ReplacedElement
object is the object being replaced.
JSBML_WRONG_SBO_TERM
Constructor | Description |
---|---|
ReplacedElement() |
Creates an ReplacedElement instance
|
ReplacedElement(int level,
int version) |
Creates a ReplacedElement instance with a level and version
|
ReplacedElement(ReplacedElement obj) |
Clone constructor
|
Modifier and Type | Method | Description |
---|---|---|
ReplacedElement |
clone() |
clones this class
|
boolean |
equals(java.lang.Object obj) |
|
java.lang.String |
getConversionFactor() |
Returns the value of conversionFactor
|
java.lang.String |
getDeletion() |
Returns the value of deletion
|
java.lang.String |
getSubmodelRef() |
Returns the value of submodelRef
|
int |
hashCode() |
Returns a hash code value for this
SBase instance. |
void |
initDefaults() |
Initializes the default values using the namespace.
|
boolean |
isSetConversionFactor() |
Returns whether conversionFactor is set
|
boolean |
isSetDeletion() |
Returns whether deletion is set
|
boolean |
isSetSubmodelRef() |
Returns whether submodelRef is set
|
boolean |
readAttribute(java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
Sets the given attribute in this
SBase . |
void |
setConversionFactor(java.lang.String conversionFactor) |
Sets the value of the optional conversionFactor attribute.
|
void |
setDeletion(java.lang.String deletion) |
Sets the value of the optional deletion attribute.
|
void |
setSubmodelRef(java.lang.String submodelRef) |
Sets the value of the required submodelRef attribute.
|
boolean |
unsetConversionFactor() |
Unsets the variable conversionFactor
|
boolean |
unsetDeletion() |
Unsets the variable deletion
|
boolean |
unsetSubmodelRef() |
Unsets the variable submodelRef
|
java.util.Map<java.lang.String,java.lang.String> |
writeXMLAttributes() |
Returns a map with all the attributes of this
SBase that
need to be written out in XML. |
addCVTerm, addDeclaredNamespace, addExtension, addPlugin, addResources, appendAnnotation, appendAnnotation, appendNotes, appendNotes, createHistory, createPlugin, disablePackage, enablePackage, enablePackage, filterCVTerms, filterCVTerms, filterCVTerms, filterCVTerms, fireNodeRemovedEvent, firePropertyChange, getAllDeclaredNamespaces, getAnnotation, getAnnotationString, getCVTerm, getCVTermCount, getCVTerms, getDeclaredNamespaces, getElementByMetaId, getElementBySId, getElementName, getExtension, getExtensionCount, getExtensionPackages, getFirstElementIndex, getHistory, getId, getLevel, getLevelAndVersion, getMetaId, getModel, getName, getNamespace, getNotes, getNotesString, getNumCVTerms, getNumPlugins, getPackageName, getPackageVersion, getParent, getParentSBMLObject, getPlugin, getSBMLDocument, getSBOTerm, getSBOTermID, getURI, getVersion, hasExtension, hasValidAnnotation, hasValidLevelVersionNamespaceCombination, isExtendedByOtherPackages, isIdMandatory, isPackageEnabled, isPackageURIEnabled, isPkgEnabled, isPkgURIEnabled, isSetAnnotation, isSetHistory, isSetId, isSetLevel, isSetLevelAndVersion, isSetMetaId, isSetName, isSetNotes, isSetPackageVErsion, isSetParentSBMLObject, isSetPlugin, isSetSBOTerm, isSetVersion, isValidLevelAndVersionCombination, isValidMetaId, registerChild, removeCVTerm, removeCVTerm, removeDeclaredNamespaceByNamespace, removeDeclaredNamespaceByPrefix, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setAnnotation, setHistory, setId, setLevel, setMetaId, setName, setNamespace, setNotes, setNotes, setPackageVersion, setSBOTerm, setSBOTerm, setThisAsParentSBMLObject, setVersion, toString, unregisterChild, unsetAnnotation, unsetCVTerms, unsetExtension, unsetHistory, unsetId, unsetMetaId, unsetName, unsetNamespace, unsetNotes, unsetPlugin, unsetSBOTerm
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
removeTreeNodeChangeListener
createSBaseRef, getAllowsChildren, getChildAt, getChildCount, getIdRef, getMetaIdRef, getPortRef, getSBaseRef, getUnitRef, isSetIdRef, isSetMetaIdRef, isSetPortRef, isSetSBaseRef, isSetUnitRef, setIdRef, setMetaIdRef, setPortRef, setSBaseRef, setUnitRef, unsetIdRef, unsetMetaIdRef, unsetPortRef, unsetSBaseRef, unsetUnitRef
addAllChangeListeners, addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, getListOfTreeNodeChangeListeners, getRoot, getTreeNodeChangeListenerCount, getUserObject, isRoot, isSetParent, isSetUserObjects, putUserObject, removeAllTreeNodeChangeListeners, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeUserObject, userObjectKeySet
public ReplacedElement()
public ReplacedElement(int level, int version)
level
- the SBML levelversion
- the SBML versionpublic ReplacedElement(ReplacedElement obj)
obj
- the instance to clonepublic ReplacedElement clone()
public void initDefaults()
initDefaults
in class SBaseRef
public int hashCode()
SBase
SBase
instance.public boolean equals(java.lang.Object obj)
SBase
public java.lang.String getSubmodelRef()
public boolean isSetSubmodelRef()
public void setSubmodelRef(java.lang.String submodelRef)
The required attribute submodelRef takes a value which must be
the identifier of a Submodel
object in the containing model.
This attribute is analogous to the corresponding attribute on
ReplacedElement
; that is, the model referenced by the
Submodel
object establishes the object namespaces for the portRef,
idRef, unitRef and metaIdRef attributes: only objects within the Model
object may be referenced by those attributes.
submodelRef
- the value of submodelRefpublic boolean unsetSubmodelRef()
true
, if submodelRef was set before,
otherwise false
public java.lang.String getDeletion()
public boolean isSetDeletion()
public void setDeletion(java.lang.String deletion)
The optional attribute deletion takes a value that must be the identifier of a
Deletion
object in the parentModel of the ReplacedElement
(i.e.,
the value of some Deletion
object's id attribute). When deletion is set,
it means the ReplacedElement
object is actually an annotation to indicate
that the replacement object replaces something deleted from a submodel. The use
of the deletion attribute overrides the use of the attributes inherited from
SBaseRef
: instead of using portRef or idRef, the ReplacedElement
instance sets deletion to the identifier of the Deletion
object. In addition,
the referenced Deletion
must be a child of the Submodel
referenced by
the submodelRef attribute.
deletion
- the value of deletionpublic boolean unsetDeletion()
true
, if deletion was set before,
otherwise false
public java.lang.String getConversionFactor()
public boolean isSetConversionFactor()
public void setConversionFactor(java.lang.String conversionFactor)
The ReplacedElement
class's conversionFactor attribute,
if present, defines how to transform or rescale the replaced object's
value so that it is appropriate for the new contexts in which the
object appears. This attribute takes a value that must refer to a
Parameter
object instance defined in the model. This parameter
then acts as a conversion factor.
conversionFactor
- the value of conversionFactorpublic boolean unsetConversionFactor()
true
, if conversionFactor was set before,
otherwise false
public java.util.Map<java.lang.String,java.lang.String> writeXMLAttributes()
SBase
SBase
that
need to be written out in XML.
The attribute name is used as a key and the attribute value as value. If a prefix is needed for the attribute name, it need to be set directly in this map.
writeXMLAttributes
in interface SBase
writeXMLAttributes
in class SBaseRef
Map
containing the XML attributes of this object.public boolean readAttribute(java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
SBase
SBase
.
If the given attribute name is not recognized, nothing is done and
false
is returned.
readAttribute
in interface SBase
readAttribute
in class SBaseRef
attributeName
- localName of the XML attributeprefix
- prefix of the XML attributevalue
- value of the XML attributetrue
if the attribute has been successfully read.