public class LocalStyle extends Style
LocalStyle concept of the SBML render extension.
Local styles are the style information objects used in LocalRenderInformation (
Since LocalStyle is derived from Styles, it inherits all of the methods and attributes from Style. (@see Style)
LocalRenderInformation).
Local styles can be associated with layout objects by role and type as well as by
id of layout objects from the layout the local style belongs to.| Constructor and Description |
|---|
LocalStyle()
Creates a new
LocalStyle object with the given SBML level
and SBML version. |
LocalStyle(long level)
Creates a new
LocalStyle object with the given SBML level
and SBML version. |
LocalStyle(long level,
long version)
Creates a new
LocalStyle object with the given SBML level
and SBML version. |
LocalStyle(long level,
long version,
long pkgVersion)
Creates a new
LocalStyle object with the given SBML level
and SBML version. |
LocalStyle(RenderPkgNamespaces renderns)
Creates a new
LocalStyle object with the given SBMLNamespaces. |
LocalStyle(RenderPkgNamespaces renderns,
java.lang.String id)
Constructor which creates a
LocalStyle with an empty group
and empty id, role and type list. |
LocalStyle(XMLNode node)
Creates a new
LocalStyle object from the given XMLNode object. |
LocalStyle(XMLNode node,
long l2version)
Creates a new
LocalStyle object from the given XMLNode object. |
| Modifier and Type | Method and Description |
|---|---|
void |
addId(java.lang.String id)
Adds another id to the set.
|
LocalStyle |
cloneObject()
Creates and returns a deep copy of this
LocalStyle object. |
java.lang.String |
createIdString()  |
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
StringSet |
getIdList()
Returns the id list.
|
long |
getNumIds()
Returns the number of ids in the id set.
|
int |
getTypeCode()
Returns the libSBML type code for this SBML object.
|
boolean |
isInIdList(java.lang.String id)
Checks whether a given
id is in the id list. |
void |
removeId(java.lang.String id)
Removes an id from the set.
|
void |
setIdList(StringSet idList)
Sets the id list.
|
XMLNode |
toXML()
Creates an
XMLNode object from this LocalStyle object. |
addRole, addType, connectToChild, createRoleString, createTypeString, getGroup, getId, getName, getNumRoles, getNumTypes, getRoleList, getTypeList, isInRoleList, isInTypeList, isSetId, isSetName, removeRole, removeType, setGroup, setId, setName, setRoleList, setTypeList, unsetId, unsetNameaddCVTerm, addCVTerm, appendAnnotation, appendAnnotation, appendNotes, appendNotes, deleteDisabledPlugins, deleteDisabledPlugins, disablePackage, enablePackage, equals, getAncestorOfType, getAncestorOfType, getAnnotation, getAnnotationString, getColumn, getCVTerm, getCVTerms, getDisabledPlugin, getElementByMetaId, getElementBySId, 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, removeFromParentAndDelete, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, removeTopLevelAnnotationElement, renameMetaIdRefs, renameSIdRefs, renameUnitSIdRefs, replaceTopLevelAnnotationElement, replaceTopLevelAnnotationElement, setAnnotation, setAnnotation, setMetaId, setModelHistory, setNamespaces, setNotes, setNotes, setNotes, setSBOTerm, setSBOTerm, toSBML, toXMLNode, unsetAnnotation, unsetCVTerms, unsetMetaId, unsetModelHistory, unsetNotes, unsetSBOTerm, unsetUserDatapublic LocalStyle(long level, long version, long pkgVersion) throws SBMLConstructorException
LocalStyle object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic LocalStyle(long level, long version) throws SBMLConstructorException
LocalStyle object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic LocalStyle(long level) throws SBMLConstructorException
LocalStyle object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic LocalStyle() throws SBMLConstructorException
LocalStyle object with the given SBML level
and SBML version.
level - SBML level of the new objectlevel - SBML version of the new objectSBMLConstructorExceptionpublic LocalStyle(RenderPkgNamespaces renderns) throws SBMLConstructorException
LocalStyle object with the given SBMLNamespaces.
sbmlns - The SBML namespace for the object.SBMLConstructorExceptionpublic LocalStyle(XMLNode node, long l2version) throws SBMLConstructorException
LocalStyle object from the given XMLNode object.
The XMLNode object has to contain a valid XML representation of a
LocalStyle object as defined in the render extension specification.
This method is normally called when render information is read from a file and
should normally not have to be called explicitly.
node - the XMLNode object reference that describes the LocalStyle
object to be instantiated.SBMLConstructorExceptionpublic LocalStyle(XMLNode node) throws SBMLConstructorException
LocalStyle object from the given XMLNode object.
The XMLNode object has to contain a valid XML representation of a
LocalStyle object as defined in the render extension specification.
This method is normally called when render information is read from a file and
should normally not have to be called explicitly.
node - the XMLNode object reference that describes the LocalStyle
object to be instantiated.SBMLConstructorExceptionpublic LocalStyle(RenderPkgNamespaces renderns, java.lang.String id) throws SBMLConstructorException
LocalStyle with an empty group
and empty id, role and type list.
The group has to be filled before the
object is valid.
This constructor is deprecated. The new libsbml API only has
constructors which take the SBML level and version or one that takes
an SBMLNamespaces object.
SBMLConstructorExceptionpublic 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 LocalStyle.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 LocalStyle.delete() themselves.
public long getNumIds()
public StringSet getIdList()
public void setIdList(StringSet idList)
idList - The list of ids to be set on the local style.public void addId(java.lang.String id)
id - the id string to be added to the id list.public java.lang.String createIdString()
public boolean isInIdList(java.lang.String id)
id is in the id list.
id - the id to be searched for
id is in the id list or not.public void removeId(java.lang.String id)
the - id to be removed from the id list.public int getTypeCode()
LibSBML attaches an
identifying code to every kind of SBML object. These are known as
SBML type codes. In other languages, the set of type codes
is stored in an enumeration in the Java language interface for
libSBML, the type codes are defined as static integer constants in
interface class libsbmlConstants. The names of the type codes
all begin with the characters SBML_.
getTypeCode in class SBaseSBML_UNKNOWN (default).
LocalStyle.getElementName()public LocalStyle cloneObject()
LocalStyle object.
cloneObject in class StyleLocalStyle objectpublic java.lang.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', etc.
getElementName in class Stylepublic XMLNode toXML()
XMLNode object from this LocalStyle object.
toXML in class StyleXMLNode with the XML representation for the
LocalStyle object.