ucl.physiol.neuroconstruct.mechanisms
Class XMLCellMechanism
java.lang.Object
ucl.physiol.neuroconstruct.mechanisms.CellMechanism
ucl.physiol.neuroconstruct.mechanisms.XMLCellMechanism
- Direct Known Subclasses:
- ChannelMLCellMechanism, NeuroML2Component, SBMLCellMechanism
public abstract class XMLCellMechanism
- extends CellMechanism
Base class for all XML based Cell Mechanism. Contains (in addition to info
in CellMechanism class) a string with the name of the file and a SimpleXMLDocument
containing the contents of the xml (once initialised) and a number of mappings to NEURON, etc.
- Author:
- Padraig Gleeson
| Fields inherited from class ucl.physiol.neuroconstruct.mechanisms.CellMechanism |
ABSTRACTED_CELL_MECHANISM, CHANNEL_MECHANISM, CHANNELML_BASED_CELL_MECHANISM, description, FILE_BASED_CELL_MECHANISM, GAP_JUNCTION, instanceName, ION_CONCENTRATION, logger, mechanismModel, mechanismType, NEUROML2_ABSTRACT_CELL, NEUROML2_BASED_CELL_MECHANISM, NEUROML2_ION_CHANNEL, POINT_PROCESS, SBML_BASED_CELL_MECHANISM, SBML_MECHANISM, SYNAPTIC_MECHANISM |
|
Method Summary |
void |
addSimMapping(SimulatorMapping simMapping)
|
abstract boolean |
createImplementationFile(String targetEnv,
int unitsSystem,
File fileToGenerate,
Project project,
boolean requiresCompilation,
boolean includeComments,
boolean forceCorrectInit,
boolean parallelMode)
Create a script file for the specified simulation environment |
String |
getDescription()
|
abstract String |
getDescriptionXPath()
|
String |
getInstanceName()
|
abstract String |
getMechanismType()
Channel or Synaptic mechanism or Ion concentration |
abstract String |
getNameXPath()
|
SimulatorMapping |
getSimMapping(String simEnv)
|
ArrayList<SimulatorMapping> |
getSimMappings()
|
String |
getValue(String simpleXPathExp)
|
SimpleXMLDocument |
getXMLDoc()
|
String |
getXMLFile()
|
File |
getXMLFile(Project project)
|
File |
initialise(Project project,
boolean save)
Loads up the xmlDoc with information from the file specified, using the
location based on the project directory |
void |
initPropsFromPropsFile(File propsFile)
|
boolean |
isNeuroML2()
|
File |
reset(Project project,
boolean save)
Sets the xmlDoc to null and reinitialises |
void |
saveCurrentState(Project project)
|
void |
setDescription(String description)
|
void |
setInstanceName(String instanceName)
|
void |
setSimMappings(ArrayList<SimulatorMapping> simMappings)
|
boolean |
setValue(String path,
String value)
|
void |
setXMLFile(String xmlFile)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xmlDoc
protected SimpleXMLDocument xmlDoc
XMLCellMechanism
public XMLCellMechanism()
isNeuroML2
public boolean isNeuroML2()
initPropsFromPropsFile
public void initPropsFromPropsFile(File propsFile)
throws IOException
- Throws:
IOException
getXMLFile
public String getXMLFile()
getXMLFile
public File getXMLFile(Project project)
getXMLDoc
public SimpleXMLDocument getXMLDoc()
throws XMLMechanismException
- Throws:
XMLMechanismException
setXMLFile
public void setXMLFile(String xmlFile)
getMechanismType
public abstract String getMechanismType()
- Description copied from class:
CellMechanism
- Channel or Synaptic mechanism or Ion concentration
- Overrides:
getMechanismType in class CellMechanism
getNameXPath
public abstract String getNameXPath()
getDescriptionXPath
public abstract String getDescriptionXPath()
getDescription
public String getDescription()
- Overrides:
getDescription in class CellMechanism
setDescription
public void setDescription(String description)
- Overrides:
setDescription in class CellMechanism
getInstanceName
public String getInstanceName()
- Overrides:
getInstanceName in class CellMechanism
setInstanceName
public void setInstanceName(String instanceName)
- Overrides:
setInstanceName in class CellMechanism
reset
public File reset(Project project,
boolean save)
throws XMLMechanismException
- Sets the xmlDoc to null and reinitialises
- Throws:
XMLMechanismException
initialise
public File initialise(Project project,
boolean save)
throws XMLMechanismException
- Loads up the xmlDoc with information from the file specified, using the
location based on the project directory
- Returns:
- The actual File used
- Throws:
XMLMechanismException
saveCurrentState
public void saveCurrentState(Project project)
throws XMLMechanismException
- Throws:
XMLMechanismException
createImplementationFile
public abstract boolean createImplementationFile(String targetEnv,
int unitsSystem,
File fileToGenerate,
Project project,
boolean requiresCompilation,
boolean includeComments,
boolean forceCorrectInit,
boolean parallelMode)
- Create a script file for the specified simulation environment
- Specified by:
createImplementationFile in class CellMechanism
addSimMapping
public void addSimMapping(SimulatorMapping simMapping)
getValue
public String getValue(String simpleXPathExp)
setValue
public boolean setValue(String path,
String value)
getSimMappings
public ArrayList<SimulatorMapping> getSimMappings()
getSimMapping
public SimulatorMapping getSimMapping(String simEnv)
setSimMappings
public void setSimMappings(ArrayList<SimulatorMapping> simMappings)