public class ModelCreator extends java.lang.Object
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
The SBML specification beginning with Level 2 Version 2
defines a standard approach to recording model history and model creator
information in a form that complies with MIRIAM ('Minimum Information
Requested in the Annotation of biochemical Models', Nature
Biotechnology, vol. 23, no. 12, Dec. 2005). For the model creator,
this form involves the use of parts of the vCard representation.
LibSBML provides the ModelCreator
class as a convenience high-level
interface for working with model creator data. Objects of class
ModelCreator
can be used to store and carry around creator data within a
program, and the various methods in this object class let callers
manipulate the different parts of the model creator representation.
The ModelCreator
class mirrors the structure of the MIRIAM model creator
annotations in SBML. The following template illustrates these different
fields when they are written in XML form:
<vCard:N rdf:parseType='Resource'> <vCard:Family>family name</vCard:Family> <vCard:Given>given name</vCard:Given> </vCard:N> ... <vCard:EMAIL>email address</vCard:EMAIL> ... <vCard:ORG rdf:parseType='Resource'> <vCard:Orgname>organization</vCard:Orgname> </vCard:ORG>
Each of the separate data values
family name,
given name,
email address, and
organization can
be set and retrieved via corresponding methods in the ModelCreator
class. These methods are documented in more detail below.
Constructor and Description |
---|
ModelCreator()
Creates a new
ModelCreator object. |
ModelCreator(ModelCreator orig)
Copy constructor creates a copy of the
ModelCreator . |
ModelCreator(XMLNode creator)
Creates a new
ModelCreator from an XMLNode . |
Modifier and Type | Method and Description |
---|---|
ModelCreator |
cloneObject()
Creates and returns a deep copy of this
ModelCreator object. |
void |
delete()
Explicitly deletes the underlying native object.
|
boolean |
equals(java.lang.Object sb)
Equality comparison method for ModelCreator.
|
java.lang.String |
getEmail()
Returns the 'email' stored in this
ModelCreator object. |
java.lang.String |
getFamilyName()
Returns the 'family name' stored in this
ModelCreator object. |
java.lang.String |
getGivenName()
Returns the 'given name' stored in this
ModelCreator object. |
java.lang.String |
getOrganisation()
(Alternate spelling) Returns the 'organization' stored in this
ModelCreator object. |
java.lang.String |
getOrganization()
Returns the 'organization' stored in this
ModelCreator object. |
int |
hashCode()
Returns a hashcode for this ModelCreator object.
|
boolean |
hasRequiredAttributes()
Predicate returning
true if all the required elements for this
ModelCreator object have been set. |
boolean |
isSetEmail()
|
boolean |
isSetFamilyName()
Predicate returning
true or false depending on whether this
ModelCreator 's 'family name' part is set. |
boolean |
isSetGivenName()
Predicate returning
true or false depending on whether this
ModelCreator 's 'given name' part is set. |
boolean |
isSetOrganisation()
(Alternate spelling) Predicate returning
true or false depending
on whether this ModelCreator 's 'organization' part is set. |
boolean |
isSetOrganization()
Predicate returning
true or false depending on whether this
ModelCreator 's 'organization' part is set. |
int |
setEmail(java.lang.String email)
Sets the 'email' portion of this
ModelCreator object. |
int |
setFamilyName(java.lang.String familyName)
Sets the 'family name' portion of this
ModelCreator object. |
int |
setGivenName(java.lang.String givenName)
Sets the 'given name' portion of this
ModelCreator object. |
int |
setOrganisation(java.lang.String organization)
(Alternate spelling) Sets the 'organization' portion of this
ModelCreator object. |
int |
setOrganization(java.lang.String organization)
Sets the 'organization' portion of this
ModelCreator object. |
int |
unsetEmail()
Unsets the 'email' portion of this
ModelCreator object. |
int |
unsetFamilyName()
Unsets the 'family name' portion of this
ModelCreator object. |
int |
unsetGivenName()
Unsets the 'given name' portion of this
ModelCreator object. |
int |
unsetOrganisation()
(Alternate spelling) Unsets the 'organization' portion of this
ModelCreator object. |
int |
unsetOrganization()
Unsets the 'organization' portion of this
ModelCreator object. |
public ModelCreator()
ModelCreator
object.public ModelCreator(XMLNode creator)
ModelCreator
from an XMLNode
.
creator
- the XMLNode
from which to create the ModelCreator
.public ModelCreator(ModelCreator orig)
ModelCreator
.
orig
- the object to copy.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 ModelCreator.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 ModelCreator.delete()
themselves.
public boolean equals(java.lang.Object sb)
Because the Java methods for libSBML are actually wrappers around code
implemented in C++ and C, certain operations will not behave as
expected. Equality comparison is one such case. An instance of a
libSBML object class is actually a proxy object
wrapping the real underlying C/C++ object. The normal ==
equality operator in Java will only compare the Java proxy objects,
not the underlying native object. The result is almost never what you
want in practical situations. Unfortunately, Java does not provide a
way to override ==
.
The alternative that must be followed is to use the
equals()
method. The equals
method on this
class overrides the default java.lang.Object one, and performs an
intelligent comparison of instances of objects of this class. The
result is an assessment of whether two libSBML Java objects are truly
the same underlying native-code objects.
The use of this method in practice is the same as the use of any other
Java equals
method. For example,
a.equals(
b)
returns
true
if a and b are references to the
same underlying object.
equals
 in class java.lang.Object
sb
- a reference to an object to which the current object
instance will be comparedtrue
if sb
refers to the same underlying
native object as this one, false
otherwisepublic int hashCode()
hashCode
 in class java.lang.Object
public ModelCreator cloneObject()
ModelCreator
object.
ModelCreator
object.public java.lang.String getFamilyName()
ModelCreator
object.
ModelCreator
object.public java.lang.String getGivenName()
ModelCreator
object.
ModelCreator
object.public java.lang.String getEmail()
ModelCreator
object.
ModelCreator
.public java.lang.String getOrganization()
ModelCreator
object.
ModelCreator
.public java.lang.String getOrganisation()
ModelCreator
object.
ModelCreator
.
ModelCreator.getOrganization()
public boolean isSetFamilyName()
true
or false
depending on whether this
ModelCreator
's 'family name' part is set.
true
if the familyName of this ModelCreator
is set, false
otherwise.public boolean isSetGivenName()
true
or false
depending on whether this
ModelCreator
's 'given name' part is set.
true
if the givenName of this ModelCreator
is set, false
otherwise.public boolean isSetEmail()
true
if the email of this ModelCreator
is set, false
otherwise.public boolean isSetOrganization()
true
or false
depending on whether this
ModelCreator
's 'organization' part is set.
true
if the organization of this ModelCreator
is set, false
otherwise.public boolean isSetOrganisation()
true
or false
depending
on whether this ModelCreator
's 'organization' part is set.
true
if the organization of this ModelCreator
is set, false
otherwise.
ModelCreator.isSetOrganization()
public int setFamilyName(java.lang.String familyName)
ModelCreator
object.
familyName
- a string representing the familyName of the ModelCreator
.
public int setGivenName(java.lang.String givenName)
ModelCreator
object.
givenName
- a string representing the givenName of the ModelCreator
.
public int setEmail(java.lang.String email)
ModelCreator
object.
email
- a string representing the email of the ModelCreator
.
public int setOrganization(java.lang.String organization)
ModelCreator
object.
organization
- a string representing the organization of the
ModelCreator
.
public int setOrganisation(java.lang.String organization)
ModelCreator
object.
organization
- a string representing the organization of the
ModelCreator
.
ModelCreator.setOrganization(String organization)
public int unsetFamilyName()
ModelCreator
object.
public int unsetGivenName()
ModelCreator
object.
public int unsetEmail()
ModelCreator
object.
public int unsetOrganization()
ModelCreator
object.
public int unsetOrganisation()
ModelCreator
object.
ModelCreator.unsetOrganization()
public boolean hasRequiredAttributes()
true
if all the required elements for this
ModelCreator
object have been set.
The only required elements for a ModelCreator
object are the 'family
name' and 'given name'.