org.sbml.jsbml
public class CVTerm extends AnnotationElement
Modifier and Type | Class and Description |
---|---|
static class |
CVTerm.Qualifier
This
enum list all the possible MIRIAM qualifiers. |
static class |
CVTerm.Type
This enum list all the possible MIRIAM qualifiers type.
|
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
INVALID_TYPE_AND_QUALIFIER_COMBINATION_MSG
Message to indicate an illegal combination of a
CVTerm.Type and a
CVTerm.Qualifier attribute. |
private CVTerm.Qualifier |
qualifier
Represents the MIRIAM qualifier node in the annotation node of a SBML
component.
|
private java.util.List<java.lang.String> |
resourceURIs
Contains all the MIRIAM URI associated with the qualifier of this
CVTerm
instance. |
private static long |
serialVersionUID
Generated serial version identifier.
|
private CVTerm.Type |
type
Represents the type of MIRIAM qualifier for this
CVTerm . |
static java.lang.String |
URI_BIOMODELS_NET_BIOLOGY_QUALIFIERS
The Uniform Resource Identifier pointing to http://biomodels.net/biology-qualifiers/
|
static java.lang.String |
URI_BIOMODELS_NET_MODEL_QUALIFIERS
The Uniform Resource Identifier pointing to http://biomodels.net/model-qualifiers/
|
listOfListeners, parent, UNKNOWN_ATTRIBUTES, UNKNOWN_ELEMENTS
Constructor and Description |
---|
CVTerm()
Creates a
CVTerm instance. |
CVTerm(CVTerm.Qualifier qualifier,
java.lang.String... resources)
Guesses the
CVTerm.Type argument and sets the CVTerm.Qualifier
attribute appropriately. |
CVTerm(CVTerm.Type type,
CVTerm.Qualifier qualifier,
java.lang.String... resources)
Creates a new
CVTerm with the given CVTerm.Type and
CVTerm.Qualifier pointing to all given resources. |
CVTerm(CVTerm term)
|
Modifier and Type | Method and Description |
---|---|
boolean |
addResource(java.lang.String urn)
Adds a resource to the
CVTerm . |
boolean |
addResources(java.lang.String... resources)
Adds list of resources to the
CVTerm . |
boolean |
addResourceURI(java.lang.String uri)
Adds a resource to the
CVTerm . |
CVTerm |
clone() |
boolean |
equals(java.lang.Object object) |
java.util.List<java.lang.String> |
filterResources(java.lang.String pattern)
Returns a list of resources that contain the given pattern.
|
boolean |
getAllowsChildren() |
CVTerm.Qualifier |
getBiologicalQualifierType()
Returns the
CVTerm.Qualifier for this CVTerm, only if it if of type CVTerm.Type.BIOLOGICAL_QUALIFIER , null otherwise. |
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
CVTerm.Qualifier |
getModelQualifierType()
Returns the
CVTerm.Qualifier for this CVTerm, only if it if of type CVTerm.Type.MODEL_QUALIFIER , null otherwise. |
int |
getNumResources()
Returns the number of resources for this
CVTerm . |
CVTerm.Qualifier |
getQualifier()
Returns the
CVTerm.Qualifier for this CVTerm. |
CVTerm.Type |
getQualifierType()
Returns the qualifier
CVTerm.Type for this CVTerm. |
int |
getResourceCount()
Returns the number of resources for this
CVTerm . |
java.util.List<java.lang.String> |
getResources()
Returns the resources for this CVTerm.
|
java.lang.String |
getResourceURI(int i)
Returns the value of the nth resource for this CVTerm.
|
int |
hashCode() |
boolean |
isBiologicalQualifier()
Returns
true if this qualifier is a biological qualifier. |
boolean |
isModelQualifier()
Returns
true if this qualifier is a model qualifier. |
boolean |
isSetBiologicalQualifierType()
Returns true if the
CVTerm.Qualifier is set and is of type CVTerm.Type.BIOLOGICAL_QUALIFIER |
boolean |
isSetModelQualifierType()
Returns true if the
CVTerm.Qualifier is set and is of type CVTerm.Type.MODEL_QUALIFIER |
boolean |
isSetQualifier()
Returns
true if the CVTerm.Qualifier of this CVTerm
is set and is different from CVTerm.Qualifier.BQM_UNKNOWN and CVTerm.Qualifier.BQB_UNKNOWN . |
boolean |
isSetQualifierType()
Checks whether or not the
CVTerm.Type has been set for this
CVTerm . |
boolean |
isSetType()
Returns
true if the CVTerm.Type of this CVTerm is set and is different from CVTerm.Type.UNKNOWN_QUALIFIER . |
boolean |
isSetTypeQualifier()
Deprecated.
use
isSetQualifier() |
boolean |
readAttribute(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
void |
removeResource(int index)
Removes the ith resource from the
CVTerm . |
void |
removeResource(java.lang.String resource)
Removes a resource from the
CVTerm . |
void |
setBiologicalQualifierType(CVTerm.Qualifier qualifier)
Sets the biological qualifier type of this
CVTerm . |
void |
setBiologicalQualifierType(int specificQualifierType)
Sets the biological qualifier type, using the
CVTerm.Qualifier.values() array. |
void |
setModelQualifierType(CVTerm.Qualifier qualifier)
Sets the model qualifier type of this
CVTerm . |
void |
setModelQualifierType(int specificQualifierType)
Sets the model qualifier type of this
CVTerm , using the CVTerm.Qualifier.values() array. |
void |
setQualifier(CVTerm.Qualifier qualifier)
Sets the
CVTerm.Qualifier of this CVTerm , sets at the same time the CVTerm.Type to the proper value. |
void |
setQualifierType(CVTerm.Type type)
Sets the type of this
CVTerm to 'type', the value of the CVTerm.Qualifier is reset to
CVTerm.Qualifier.BQB_UNKNOWN or CVTerm.Qualifier.BQM_UNKNOWN . |
void |
setQualifierType(int qualifierType)
Sets the type of this
CVTerm to the CVTerm.Type represented by
'qualifierType'. |
java.lang.String |
toString()
Returns a
String containing the qualifier and all the resource
URIs of this CVTerm . |
void |
toXML(java.lang.String indent,
java.lang.StringBuffer buffer)
Writes all the MIRIAM annotations of the
CVTerm in 'buffer' |
void |
unsetBiologicalQualifierType()
Unsets the biological qualifier if it is set and of the type
CVTerm.Type.BIOLOGICAL_QUALIFIER |
void |
unsetModelQualifierType()
Unsets the
CVTerm.Qualifier if it is set and of the type CVTerm.Type.MODEL_QUALIFIER . |
void |
unsetQualifier()
Unsets the qualifier if it is set.
|
void |
unsetQualifierType()
Unsets the qualifier type if it is set.
|
addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, clearUserObjects, containsUserObjectKey, filter, filter, filter, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getRoot, getTreeNodeChangeListenerCount, getUserObject, indexOf, isLeaf, isRoot, isSetParent, isSetUserObjects, notifyChildChange, putUserObject, removeAllTreeNodeChangeListeners, removeFromParent, removeTreeNodeChangeListener, removeTreeNodeChangeListener, removeUserObject, setParent, userObjectKeySet
public static final java.lang.String URI_BIOMODELS_NET_MODEL_QUALIFIERS
public static final java.lang.String URI_BIOMODELS_NET_BIOLOGY_QUALIFIERS
private static final java.lang.String INVALID_TYPE_AND_QUALIFIER_COMBINATION_MSG
CVTerm.Type
and a
CVTerm.Qualifier
attribute.private static final long serialVersionUID
private CVTerm.Qualifier qualifier
private java.util.List<java.lang.String> resourceURIs
CVTerm
instance.private CVTerm.Type type
CVTerm
. It
depends on the name space in the SBML file, it can be a model qualifier
or a biological qualifier.public CVTerm()
public CVTerm(CVTerm.Qualifier qualifier, java.lang.String... resources)
CVTerm.Type
argument and sets the CVTerm.Qualifier
attribute appropriately. Then it adds all the given resources.qualifier
- resources
- public CVTerm(CVTerm.Type type, CVTerm.Qualifier qualifier, java.lang.String... resources)
CVTerm
with the given CVTerm.Type
and
CVTerm.Qualifier
pointing to all given resources.type
- qualifier
- resources
- java.lang.IllegalArgumentException
- if the combination of the given type and qualifier is not
possible or if the given resources are invalid.public boolean addResource(java.lang.String urn)
CVTerm
.
Same method a addResourceURI(String)
urn
- string representing the resource; e.g.,
'urn:miriam:kegg.reaction:R00351'true
as specified in Collection.add(Object)
public boolean addResources(java.lang.String... resources)
CVTerm
.resources
- a list of strings representing the resources; e.g.,
'urn:miriam:kegg.reaction:R00351'true
if all the resources have been added properly.public boolean addResourceURI(java.lang.String uri)
CVTerm
.
Same method a addResource(String)
uri
- string representing the resource; e.g.,
'urn:miriam:kegg.reaction:R00351'true
if 'uri' has been added to the list of resourceURI of this
CVTerm.public CVTerm clone()
clone
in class AbstractTreeNode
public boolean equals(java.lang.Object object)
equals
in class AbstractTreeNode
public java.util.List<java.lang.String> filterResources(java.lang.String pattern)
pattern
- e.g., "urn:miriam:kegg.reaction:R" or just "kegg".public boolean getAllowsChildren()
public CVTerm.Qualifier getBiologicalQualifierType()
CVTerm.Qualifier
for this CVTerm, only if it if of type CVTerm.Type.BIOLOGICAL_QUALIFIER
, null otherwise.CVTerm.Qualifier
for this CVTerm, only if it if of type CVTerm.Type.BIOLOGICAL_QUALIFIER
, null otherwise.public javax.swing.tree.TreeNode getChildAt(int childIndex)
public int getChildCount()
public CVTerm.Qualifier getModelQualifierType()
CVTerm.Qualifier
for this CVTerm, only if it if of type CVTerm.Type.MODEL_QUALIFIER
, null otherwise.CVTerm.Qualifier
for this CVTerm, only if it if of type CVTerm.Type.MODEL_QUALIFIER
, null otherwise.public int getNumResources()
CVTerm
.CVTerm
.public CVTerm.Qualifier getQualifier()
CVTerm.Qualifier
for this CVTerm.
If you want to know if the Qualifier is a model qualifier or a biological modifier,
you can use CVTerm.Qualifier.isModelQualifier()
and CVTerm.Qualifier.isBiologicalQualifier()
.
If you want to display the name of the Qualifier, you can use CVTerm.Qualifier.getElementNameEquivalent()
.
CVTerm.Qualifier
for this CVTerm.public int getResourceCount()
CVTerm
.CVTerm
.public CVTerm.Type getQualifierType()
CVTerm.Type
for this CVTerm.CVTerm.Type
for this CVTerm.public java.util.List<java.lang.String> getResources()
public java.lang.String getResourceURI(int i)
i
- index of the resourceURI in the list of the resourceURI.public int hashCode()
hashCode
in class AbstractTreeNode
public boolean isBiologicalQualifier()
true
if this qualifier is a biological qualifier.true
if this qualifier is a biological qualifier,
false
otherwise.public boolean isModelQualifier()
true
if this qualifier is a model qualifier.true
if this qualifier is a model qualifier,
false
otherwise.public boolean isSetBiologicalQualifierType()
CVTerm.Qualifier
is set and is of type CVTerm.Type.BIOLOGICAL_QUALIFIER
CVTerm.Qualifier
is set and is of type CVTerm.Type.BIOLOGICAL_QUALIFIER
, false otherwise.public boolean isSetModelQualifierType()
CVTerm.Qualifier
is set and is of type CVTerm.Type.MODEL_QUALIFIER
CVTerm.Qualifier
is set and is of type CVTerm.Type.MODEL_QUALIFIER
, false otherwise.public boolean isSetQualifierType()
CVTerm.Type
has been set for this
CVTerm
.true
if the CVTerm.Type
of this CVTerm is set.public boolean isSetType()
true
if the CVTerm.Type
of this CVTerm is set and is different from CVTerm.Type.UNKNOWN_QUALIFIER
.true
if the CVTerm.Type
of this CVTerm is set and is different from CVTerm.Type.UNKNOWN_QUALIFIER
.@Deprecated public boolean isSetTypeQualifier()
isSetQualifier()
true
if the CVTerm.Qualifier
of this CVTerm
is set and is different from CVTerm.Qualifier.BQM_UNKNOWN
and CVTerm.Qualifier.BQB_UNKNOWN
.true
if the CVTerm.Qualifier
of this CVTerm
is set.public boolean isSetQualifier()
true
if the CVTerm.Qualifier
of this CVTerm
is set and is different from CVTerm.Qualifier.BQM_UNKNOWN
and CVTerm.Qualifier.BQB_UNKNOWN
.true
if the CVTerm.Qualifier
of this CVTerm
is set.public boolean readAttribute(java.lang.String elementName, java.lang.String attributeName, java.lang.String prefix, java.lang.String value)
public void removeResource(java.lang.String resource)
CVTerm
.resource
- public void removeResource(int index)
CVTerm
.resource
- public void setBiologicalQualifierType(int specificQualifierType)
CVTerm.Qualifier.values()
array.specificQualifierType
- public void setBiologicalQualifierType(CVTerm.Qualifier qualifier)
CVTerm
.qualifier
- java.lang.IllegalArgumentException
- if the CVTerm.Qualifier
is not a biological one or if
the CVTerm.Type
was not set to CVTerm.Type.BIOLOGICAL_QUALIFIER
.#setQualifier(Qualifier)}
public void setModelQualifierType(int specificQualifierType)
CVTerm
, using the CVTerm.Qualifier.values()
array.specificQualifierType
- public void setModelQualifierType(CVTerm.Qualifier qualifier)
CVTerm
.qualifier
- java.lang.IllegalArgumentException
- if the CVTerm.Qualifier
is not a model one or if
the CVTerm.Type
was not set to CVTerm.Type.MODEL_QUALIFIER
.#setQualifier(Qualifier)}
public void setQualifier(CVTerm.Qualifier qualifier)
CVTerm.Qualifier
of this CVTerm
, sets at the same time the CVTerm.Type
to the proper value.qualifier
- public void setQualifierType(int qualifierType)
CVTerm
to the CVTerm.Type
represented by
'qualifierType'.qualifierType
- the Type to set as an integer.public void setQualifierType(CVTerm.Type type)
CVTerm
to 'type', the value of the CVTerm.Qualifier
is reset to
CVTerm.Qualifier.BQB_UNKNOWN
or CVTerm.Qualifier.BQM_UNKNOWN
.type
- #setQualifier(Qualifier)}
public java.lang.String toString()
String
containing the qualifier and all the resource
URIs of this CVTerm
.toString
in class AbstractTreeNode
String
containing the qualifier and all the resource
URIs of this CVTerm
.public void unsetBiologicalQualifierType()
CVTerm.Type.BIOLOGICAL_QUALIFIER
unsetQualifier()
public void unsetModelQualifierType()
CVTerm.Qualifier
if it is set and of the type CVTerm.Type.MODEL_QUALIFIER
.unsetQualifier()
public void unsetQualifier()
public void unsetQualifierType()
public void toXML(java.lang.String indent, java.lang.StringBuffer buffer)
CVTerm
in 'buffer'indent
- buffer
-