public class Style extends SBase
Local and global styles in the SBML render extension have many attributes and methods in common.
These have been implemented in the abstract base class Style
.
A style is a graphical representation for certain layout objects. The assignment of styles to individual layout objects can either be done through layout object ids (local styles only), layout object types (SPECIES, COMPARTMENT, etc.) or layout object roles.
Modifier and Type | Method and Description |
---|---|
void |
addRole(java.lang.String role)
Adds an id to the role list.
|
void |
addType(java.lang.String type)
Adds a type string to the type list.
|
SBase |
cloneObject()
Creates and returns a deep copy of this
Style object. |
void |
connectToChild()   |
java.lang.String |
createRoleString()   |
java.lang.String |
createTypeString()   |
void |
delete()
Explicitly deletes the underlying native object.
|
java.lang.String |
getElementName()
Returns the XML element name of this object.
|
RenderGroup |
getGroup()
Returns a pointer to the group of the
Style . |
java.lang.String |
getId()
Returns the value of the 'id' attribute of this
Style . |
java.lang.String |
getName()
Returns the value of the 'name' attribute of this
Style . |
long |
getNumRoles()
Returns the number of ids in the role list.
|
long |
getNumTypes()
Returns the number of types in the type list.
|
StringSet |
getRoleList()
Returns a reference to the role list.
|
StringSet |
getTypeList()
Returns the type list.
|
boolean |
isInRoleList(java.lang.String role)
Checks whether a given role is in the role list.
|
boolean |
isInTypeList(java.lang.String type)
Checks whether a given type string is in the type list.
|
boolean |
isSetId()
|
boolean |
isSetName()
|
void |
removeRole(java.lang.String role)
Removes the given role from the role list.
|
void |
removeType(java.lang.String type)
Removes a type string from the type list.
|
void |
setGroup(RenderGroup group)
Sets the group of the
Style . |
int |
setId(java.lang.String id)
Sets the value of the 'id' attribute of this
Style . |
int |
setName(java.lang.String id)
Sets the value of the 'name' attribute of this
Style . |
void |
setRoleList(StringSet roleList)
Sets the complete role list to a copy of the given list.
|
void |
setTypeList(StringSet typeList)
Sets the complete type list to a copy of the given list.
|
XMLNode |
toXML()
|
int |
unsetId()
Unsets the value of the 'id' attribute of this
Style . |
int |
unsetName()
Unsets the value of the 'name' attribute of this
Style . |
addCVTerm, 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, getTypeCode, 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, unsetUserData
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 Style.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 Style.delete()
themselves.
public void setGroup(RenderGroup group)
Style
.
group
- New group to be set on the style.
The group is copied.public RenderGroup getGroup()
Style
.
public long getNumRoles()
public java.lang.String createRoleString()
public java.lang.String createTypeString()
public void addRole(java.lang.String role)
role
- New role to be added to the role list.public boolean isInRoleList(java.lang.String role)
role
- role string to check for in the role list.public void removeRole(java.lang.String role)
role
- role string to be removed from the role list.public void setRoleList(StringSet roleList)
roleList
- New list of role strings to be set on the style.public StringSet getRoleList()
public StringSet getTypeList()
public void setTypeList(StringSet typeList)
typeList
- the list of types to be set for the style.public long getNumTypes()
public void addType(java.lang.String type)
type
- new type string to be added to the type listpublic boolean isInTypeList(java.lang.String type)
type
- string to be searched for in the type list
public void removeType(java.lang.String type)
type
- type string to be removed from the type list.public SBase cloneObject()
Style
object.
This method is purely abstract and has to be implemented in derived classes.
cloneObject
 in class SBase
Style
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.
NOTE: this function is only ever going to be called from the constructor
getElementName
 in class SBase
public void connectToChild()
connectToChild
 in class SBase
public java.lang.String getId()
Style
.
public boolean isSetId()
public int setId(java.lang.String id)
Style
.
public int unsetId()
Style
.public java.lang.String getName()
Style
.
public boolean isSetName()
public int setName(java.lang.String id)
Style
.