PackageParser
, ReadingParser
, WritingParser
@ProviderFor(ReadingParser.class) public class QualParser extends AbstractReaderWriter implements PackageParser
Constructor | Description |
---|---|
QualParser() |
Modifier and Type | Method | Description |
---|---|---|
ASTNodePlugin |
createPluginFor(ASTNode astNode) |
Creates a new
ASTNodePlugin for the given ASTNode
and add it to the ASTNodePlugin map of the ASTNode . |
SBasePlugin |
createPluginFor(SBase sbase) |
|
java.util.List<java.lang.Object> |
getListOfSBMLElementsToWrite(java.lang.Object sbase) |
Returns the list of children of the
objectToWrite . |
java.lang.String |
getNamespaceFor(int level,
int version,
int packageVersion) |
Gets the namespace for this package that correspond to the given SBML level, version
and the package version.
|
java.util.List<java.lang.String> |
getNamespaces() |
Returns a
List of all the namespaces that this parser is handling. |
java.lang.String |
getNamespaceURI() |
Return the namespace URI of the namespace parsed by this class.
|
java.lang.String |
getPackageName() |
Returns the short name of this package.
|
java.util.List<java.lang.String> |
getPackageNamespaces() |
Returns a
List of all the valid namespaces for the package. |
java.lang.String |
getShortLabel() |
Returns the shortLabel of the namespace parsed by this class.
|
boolean |
isRequired() |
Returns the value of the
required attribute for this package. |
boolean |
processEndElement(java.lang.String elementName,
java.lang.String prefix,
boolean isNested,
java.lang.Object contextObject) |
Process the end of the element 'elementName'.
|
java.lang.Object |
processStartElement(java.lang.String elementName,
java.lang.String uri,
java.lang.String prefix,
boolean hasAttributes,
boolean hasNamespaces,
java.lang.Object contextObject) |
Process the XML element and modify 'contextObject' in consequence.
|
void |
writeElement(SBMLObjectForXML xmlObject,
java.lang.Object sbmlElementToWrite) |
Sets the name of xmlObject (if it is not set) to the element name of
sbmlElementToWrite.
|
processAttribute, processCharactersOf, processEndDocument, processInvalidAttribute, processNamespace, processUnknownAttribute, processUnknownElement, storeElementsOrder, writeAttributes, writeCharacters, writeNamespaces
public java.util.List<java.lang.Object> getListOfSBMLElementsToWrite(java.lang.Object sbase)
WritingParser
objectToWrite
.getListOfSBMLElementsToWrite
in interface WritingParser
getListOfSBMLElementsToWrite
in class AbstractReaderWriter
sbase
- the SBase
component to write.SBase
' contains. Represents
the list of subNodes of this SBase
component.public boolean processEndElement(java.lang.String elementName, java.lang.String prefix, boolean isNested, java.lang.Object contextObject)
ReadingParser
processEndElement
in interface ReadingParser
processEndElement
in class AbstractReaderWriter
elementName
- the localName of the XML element.prefix
- the prefix of the XML element.isNested
- boolean value to know if the XML element is a nested element.contextObject
- the object to set or modify depending on the identity of the current
element. This object
represents the context of the XML element in the SBMLDocument.true
to remove the contextObject from the stack, if
false
is returned the contextObject will stay on top
of the stackpublic java.lang.Object processStartElement(java.lang.String elementName, java.lang.String uri, java.lang.String prefix, boolean hasAttributes, boolean hasNamespaces, java.lang.Object contextObject)
ReadingParser
For example, if the contextObject is an instance of Event
and the
elementName is 'trigger', this method will create a new Trigger
instance
and will set the trigger instance of the 'contextObject' to the new
Trigger
. Then the method will return the new Trigger
instance which is the
new environment.
processStartElement
in interface ReadingParser
processStartElement
in class AbstractReaderWriter
elementName
- the localName of the XML element to processprefix
- the prefix of the XML element to processhasAttributes
- boolean value to know if this XML element has attributes.hasNamespaces
- boolean value to know if this XML element contains namespace
declarations.contextObject
- the object to set or modify depending on the identity of the current
XML element. This object
represents the context of the XML element in the SBMLDocument.ReadingParser.processStartElement(String,
String, String, boolean, boolean, Object)
public void writeElement(SBMLObjectForXML xmlObject, java.lang.Object sbmlElementToWrite)
WritingParser
writeElement
in interface WritingParser
writeElement
in class AbstractReaderWriter
xmlObject
- contains the XML information about sbmlElement.sbmlElementToWrite
- the SBase
component to writepublic java.lang.String getShortLabel()
AbstractReaderWriter
getShortLabel
in class AbstractReaderWriter
public java.lang.String getNamespaceURI()
AbstractReaderWriter
getNamespaceURI
in class AbstractReaderWriter
public java.lang.String getNamespaceFor(int level, int version, int packageVersion)
PackageParser
Returns null if the combined level, version and packageVersion is invalid or not known from the package parser implementation.
getNamespaceFor
in interface PackageParser
level
- - the SBML levelversion
- - the SBML versionpackageVersion
- - the package versionpublic java.util.List<java.lang.String> getNamespaces()
ReadingParser
List
of all the namespaces that this parser is handling.getNamespaces
in interface ReadingParser
getNamespaces
in interface WritingParser
List
of all the namespaces that this parser is handlingpublic java.util.List<java.lang.String> getPackageNamespaces()
PackageParser
List
of all the valid namespaces for the package.getPackageNamespaces
in interface PackageParser
List
of all the valid namespaces for the package.public java.lang.String getPackageName()
PackageParser
getPackageName
in interface PackageParser
public boolean isRequired()
PackageParser
required
attribute for this package.isRequired
in interface PackageParser
required
attribute for this package.public SBasePlugin createPluginFor(SBase sbase)
PackageParser
createPluginFor
in interface PackageParser
sbase
- - the sbase for which you want to create an SBasePlugin
SBasePlugin
corresponding to the given SBase
.public ASTNodePlugin createPluginFor(ASTNode astNode)
PackageParser
ASTNodePlugin
for the given ASTNode
and add it to the ASTNodePlugin
map of the ASTNode
.createPluginFor
in interface PackageParser
astNode
- - the astNode for which you want to create an ASTNodePlugin
ASTNodePlugin
corresponding to the given ASTNode
.