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 |
static java.lang.String |
URI_BIOMODELS_NET_MODEL_QUALIFIERS |
listOfListeners, parent
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 Biological QualifierType code for this CVTerm.
|
javax.swing.tree.TreeNode |
getChildAt(int childIndex) |
int |
getChildCount() |
CVTerm.Qualifier |
getModelQualifierType()
Returns the Model QualifierType code for this CVTerm.
|
int |
getNumResources()
Returns the number of resources for this CVTerm.
|
CVTerm.Type |
getQualifierType()
Returns the Qualifier Type code 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() |
boolean |
isSetModelQualifierType() |
boolean |
isSetQualifierType()
Checks whether or not the
CVTerm.Qualifier has been set for this
CVTerm . |
boolean |
isSetType()
Returns true if the Type of this CVTerm is set.
|
boolean |
isSetTypeQualifier()
Returns true if the Qualifier of this CVTerm is set.
|
boolean |
readAttribute(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String prefix,
java.lang.String value) |
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.
|
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.
|
void |
setQualifierType(CVTerm.Type type)
Sets the type of this CVTerm to 'type'
|
void |
setQualifierType(int qualifierType)
Sets the type of this CVTerm to the 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.
|
void |
unsetModelQualifierType()
Unsets the model qualifier if it is set.
|
void |
unsetQualifierType()
Unsets the qualifier type if it is set.
|
addAllChangeListeners, addTreeNodeChangeListener, addTreeNodeChangeListener, children, fireNodeAddedEvent, fireNodeRemovedEvent, firePropertyChange, getIndex, getListOfTreeNodeChangeListeners, getNumChildren, getParent, getTreeNodeChangeListenerCount, indexOf, isLeaf, isRoot, isSetParent, notifyChildChange, removeAllTreeNodeChangeListeners, removeTreeNodeChangeListener, removeTreeNodeChangeListener, setParent
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'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'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'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()
public javax.swing.tree.TreeNode getChildAt(int childIndex)
public int getChildCount()
public CVTerm.Qualifier getModelQualifierType()
public int getNumResources()
public CVTerm.Type getQualifierType()
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()
public boolean isModelQualifier()
public boolean isSetBiologicalQualifierType()
public boolean isSetModelQualifierType()
public boolean isSetQualifierType()
CVTerm.Qualifier
has been set for this
CVTerm
.public boolean isSetType()
public boolean isSetTypeQualifier()
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)
resource
- public void setBiologicalQualifierType(int specificQualifierType)
specificQualifierType
- public void setBiologicalQualifierType(CVTerm.Qualifier qualifier)
qualifier
- public void setModelQualifierType(int specificQualifierType)
specificQualifierType
- public void setModelQualifierType(CVTerm.Qualifier qualifier)
qualifier
- public void setQualifierType(int qualifierType)
qualifierType
- the Type to set as an integer.public void setQualifierType(CVTerm.Type type)
type
- 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()
public void unsetModelQualifierType()
public void unsetQualifierType()
public void toXML(java.lang.String indent, java.lang.StringBuffer buffer)
CVTerm
in 'buffer'indent
- buffer
-