PackageParser, ReadingParser, WritingParser@ProviderFor(ReadingParser.class) public class MultiParser extends AbstractReaderWriter implements PackageParser
| Constructor | Description |
|---|---|
MultiParser() |
| 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 treeNode) |
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 |
processAttribute(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String value,
java.lang.String uri,
java.lang.String prefix,
boolean isLastAttribute,
java.lang.Object contextObject) |
Process the XML attribute and modify 'contextObject' in consequence.
|
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.
|
processCharactersOf, processEndDocument, processEndElement, processInvalidAttribute, processNamespace, processUnknownAttribute, processUnknownElement, storeElementsOrder, writeAttributes, writeCharacters, writeNamespacespublic java.lang.String getNamespaceURI()
AbstractReaderWritergetNamespaceURI in class AbstractReaderWriterpublic java.lang.String getShortLabel()
AbstractReaderWritergetShortLabel in class AbstractReaderWriterpublic java.util.List<java.lang.Object> getListOfSBMLElementsToWrite(java.lang.Object treeNode)
WritingParserobjectToWrite.getListOfSBMLElementsToWrite in interface WritingParsergetListOfSBMLElementsToWrite in class AbstractReaderWritertreeNode - the SBase component to write.SBase' contains. Represents
the list of subNodes of this SBase component.public boolean processAttribute(java.lang.String elementName,
java.lang.String attributeName,
java.lang.String value,
java.lang.String uri,
java.lang.String prefix,
boolean isLastAttribute,
java.lang.Object contextObject)
ReadingParserFor example, if the contextObject is an instance of Reaction and the
attributeName is 'fast', this method will set the 'fast' variable of the
'contextObject' to 'value'. Then it will return the modified
Reaction instance.
processAttribute in interface ReadingParserprocessAttribute in class AbstractReaderWriterelementName - the localName of the XML element.attributeName - the attribute localName of the XML element.value - the value of the XML attribute.prefix - the attribute prefixisLastAttribute - boolean value to know if this attribute is the last attribute of the
XML element.contextObject - the object to set or modify depending on the identity of the current
attribute. This object
represents the context of the XML attribute in the SBMLDocument.public java.lang.Object processStartElement(java.lang.String elementName,
java.lang.String uri,
java.lang.String prefix,
boolean hasAttributes,
boolean hasNamespaces,
java.lang.Object contextObject)
ReadingParserFor 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 ReadingParserprocessStartElement in class AbstractReaderWriterelementName - 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.public void writeElement(SBMLObjectForXML xmlObject, java.lang.Object sbmlElementToWrite)
WritingParserwriteElement in interface WritingParserwriteElement in class AbstractReaderWriterxmlObject - contains the XML information about sbmlElement.sbmlElementToWrite - the SBase component to writepublic java.lang.String getNamespaceFor(int level,
int version,
int packageVersion)
PackageParserReturns null if the combined level, version and packageVersion is invalid or not known from the package parser implementation.
getNamespaceFor in interface PackageParserlevel - - the SBML levelversion - - the SBML versionpackageVersion - - the package versionpublic java.util.List<java.lang.String> getNamespaces()
ReadingParserList of all the namespaces that this parser is handling.getNamespaces in interface ReadingParsergetNamespaces in interface WritingParserList of all the namespaces that this parser is handlingpublic java.util.List<java.lang.String> getPackageNamespaces()
PackageParserList of all the valid namespaces for the package.getPackageNamespaces in interface PackageParserList of all the valid namespaces for the package.public java.lang.String getPackageName()
PackageParsergetPackageName in interface PackageParserpublic boolean isRequired()
PackageParserrequired attribute for this package.isRequired in interface PackageParserrequired attribute for this package.public SBasePlugin createPluginFor(SBase sbase)
PackageParsercreatePluginFor in interface PackageParsersbase - - the sbase for which you want to create an SBasePluginSBasePlugin corresponding to the given SBase.public ASTNodePlugin createPluginFor(ASTNode astNode)
PackageParserASTNodePlugin for the given ASTNode
and add it to the ASTNodePlugin map of the ASTNode.createPluginFor in interface PackageParserastNode - - the astNode for which you want to create an ASTNodePluginASTNodePlugin corresponding to the given ASTNode.