public class PopulateSummaryNodesUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) GeppettoModelAccess |
access |
private static Log |
logger |
private NeuroMLDocument |
neuroMLDocument |
private InfoNode |
nml2ModelInfo |
private static java.lang.String |
NOTES |
(package private) java.util.Map<java.lang.String,java.util.List<Variable>> |
plottableVariables |
(package private) Type |
type |
(package private) TypesFactory |
typeFactory |
(package private) java.util.Map<java.lang.String,java.util.List<Type>> |
typesMap |
(package private) java.net.URL |
url |
(package private) ValuesFactory |
valuesFactory |
(package private) VariablesFactory |
variablesFactory |
(package private) boolean |
verbose |
Constructor and Description |
---|
PopulateSummaryNodesUtils(java.util.Map<java.lang.String,java.util.List<Type>> typesMap,
Type type,
java.net.URL url,
GeppettoModelAccess access,
NeuroMLDocument neuroMLDocument) |
Modifier and Type | Method and Description |
---|---|
private void |
addList(java.util.List<Type> list,
java.lang.StringBuilder desc) |
private void |
createCellsHTMLVariable()
Create Variable with HTML value for a Cell
|
private void |
createChannelsHTMLVariable() |
void |
createHTMLVariables()
Creates all HTML variables for objects in maps.
|
private void |
createInputsHTMLVariable() |
private java.lang.String |
createIonChannelExpression(IonChannel chan) |
private void |
createSynapsesHTMLVariable() |
private void |
extractDescription(Type t,
java.lang.StringBuilder htmlText) |
private boolean |
extractPlottables(CompositeType ionChannel,
InfoNode node) |
private java.lang.String |
formatDescription(java.lang.String desc) |
Variable |
getDescriptionNode()
Creates general Model description
|
private Variable |
getExpressionVariable(java.lang.String expressionNodeId,
ExpressionNode expressionNode) |
private java.lang.String |
getIon(java.lang.String ionChannel)
Temporary method to guess at ion from name of ion channel It would be better to get ion attribute from channelDensity...
|
java.util.HashMap<java.lang.String,java.lang.Float[]> |
getIonChannelsInCell(Cell cell)
Gets the ion channels in a cell TODO: replace with call to method in org.neuroml.model.util.CellUtils
|
static int[] |
getIonColor(java.lang.String ion)
Gets an RGB value for ion: Na, Ca, etc.
|
private Standalone |
getNeuroMLIonChannel(Component component) |
static java.lang.String |
getSvgScale(float min,
float max,
int r,
int g,
int b)
Gets an image of a scalebar in SVG representing the conductance density of a named ion
|
static java.lang.String |
getSvgScale(float min,
float max,
java.lang.String ion)
Gets an image of a scalebar in SVG representing the conductance density of a named ion
|
static void |
main(java.lang.String[] args) |
private static java.lang.String |
parseForHyperlinks(java.lang.String text) |
private static java.lang.String |
replaceToken(java.lang.String line,
java.lang.String oldToken,
java.lang.String newToken,
int fromIndex) |
private static <T extends Node> |
sortNodes(java.util.List<T> l)
Sorts a list of Nodes
|
private static Log logger
private static java.lang.String NOTES
TypesFactory typeFactory
VariablesFactory variablesFactory
ValuesFactory valuesFactory
GeppettoModelAccess access
java.util.Map<java.lang.String,java.util.List<Type>> typesMap
java.util.Map<java.lang.String,java.util.List<Variable>> plottableVariables
Type type
java.net.URL url
private NeuroMLDocument neuroMLDocument
private InfoNode nml2ModelInfo
boolean verbose
public PopulateSummaryNodesUtils(java.util.Map<java.lang.String,java.util.List<Type>> typesMap, Type type, java.net.URL url, GeppettoModelAccess access, NeuroMLDocument neuroMLDocument)
public void createHTMLVariables() throws ModelInterpreterException, GeppettoVisitingException, NeuroMLException, LEMSException
ModelInterpreterException
GeppettoVisitingException
NeuroMLException
LEMSException
private void addList(java.util.List<Type> list, java.lang.StringBuilder desc)
public Variable getDescriptionNode() throws ModelInterpreterException, GeppettoVisitingException, NeuroMLException, LEMSException
ModelInterpreterException
GeppettoVisitingException
NeuroMLException
LEMSException
public java.util.HashMap<java.lang.String,java.lang.Float[]> getIonChannelsInCell(Cell cell) throws NeuroMLException, ContentError, ParseError
NeuroMLException
ContentError
ParseError
public static int[] getIonColor(java.lang.String ion)
public static java.lang.String getSvgScale(float min, float max, java.lang.String ion)
public static java.lang.String getSvgScale(float min, float max, int r, int g, int b)
private static <T extends Node> void sortNodes(java.util.List<T> l)
private java.lang.String getIon(java.lang.String ionChannel)
private void createCellsHTMLVariable() throws ModelInterpreterException, GeppettoVisitingException, NeuroMLException, LEMSException
cell
- - Cell used to create this html elementModelInterpreterException
GeppettoVisitingException
NeuroMLException
LEMSException
private java.lang.String formatDescription(java.lang.String desc)
private static java.lang.String replaceToken(java.lang.String line, java.lang.String oldToken, java.lang.String newToken, int fromIndex)
private static java.lang.String parseForHyperlinks(java.lang.String text)
private void extractDescription(Type t, java.lang.StringBuilder htmlText) throws GeppettoVisitingException
GeppettoVisitingException
private void createChannelsHTMLVariable() throws ModelInterpreterException, GeppettoVisitingException, NeuroMLException, LEMSException
ModelInterpreterException
GeppettoVisitingException
NeuroMLException
LEMSException
private java.lang.String createIonChannelExpression(IonChannel chan)
private void createSynapsesHTMLVariable() throws ModelInterpreterException, GeppettoVisitingException, NeuroMLException, LEMSException
ModelInterpreterException
GeppettoVisitingException
NeuroMLException
LEMSException
private void createInputsHTMLVariable() throws ModelInterpreterException, GeppettoVisitingException, NeuroMLException, LEMSException
ModelInterpreterException
GeppettoVisitingException
NeuroMLException
LEMSException
private Standalone getNeuroMLIonChannel(Component component)
component
- private boolean extractPlottables(CompositeType ionChannel, InfoNode node) throws GeppettoVisitingException, ModelInterpreterException
private Variable getExpressionVariable(java.lang.String expressionNodeId, ExpressionNode expressionNode) throws GeppettoVisitingException
GeppettoVisitingException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception