Package org.lemsml.jlems.core.type
Class Lems
- java.lang.Object
-
- org.lemsml.jlems.core.type.Lems
-
- All Implemented Interfaces:
ILEMSDocument
public class Lems extends java.lang.Object implements ILEMSDocument
-
-
Field Summary
Fields Modifier and Type Field Description LemsCollection<Assertion>
assertions
LemsCollection<Component>
components
LemsCollection<ComponentType>
componentTypes
LemsCollection<Constant>
constants
private LemsCollection<Valued>
constantValued
java.lang.String
description
LemsCollection<Dimension>
dimensions
private LemsCollection<Valued>
globals
private java.util.HashSet<java.lang.String>
included
(package private) static int
LOOSE
(package private) Parser
parser
private static java.util.Random
randomGenerator
private boolean
resolved
private int
resolveMode
private static int
seedForRandomGenerator
(package private) static int
STRICT
LemsCollection<Target>
targets
LemsCollection<Unit>
units
-
Constructor Summary
Constructors Constructor Description Lems()
-
Method Summary
-
-
-
Field Detail
-
STRICT
static final int STRICT
- See Also:
- Constant Field Values
-
LOOSE
static final int LOOSE
- See Also:
- Constant Field Values
-
resolveMode
private int resolveMode
-
dimensions
public LemsCollection<Dimension> dimensions
-
constants
public LemsCollection<Constant> constants
-
units
public LemsCollection<Unit> units
-
assertions
public LemsCollection<Assertion> assertions
-
componentTypes
public LemsCollection<ComponentType> componentTypes
-
components
public LemsCollection<Component> components
-
targets
public LemsCollection<Target> targets
-
parser
Parser parser
-
description
public java.lang.String description
-
globals
private final LemsCollection<Valued> globals
-
constantValued
private LemsCollection<Valued> constantValued
-
randomGenerator
private static java.util.Random randomGenerator
-
seedForRandomGenerator
private static int seedForRandomGenerator
-
resolved
private boolean resolved
-
included
private java.util.HashSet<java.lang.String> included
-
-
Method Detail
-
deduplicate
public void deduplicate() throws ContentError
- Throws:
ContentError
-
setResolveModeLoose
public void setResolveModeLoose()
-
looseResolving
public boolean looseResolving()
-
getRandomGenerator
public static java.util.Random getRandomGenerator()
-
resolve
public void resolve(ComponentType ct) throws ParseError, ContentError
- Throws:
ParseError
ContentError
-
resolve
public void resolve(Component c) throws ParseError, ContentError
- Throws:
ParseError
ContentError
-
resolve
public void resolve() throws ContentError, ParseError
- Throws:
ContentError
ParseError
-
addComponent
public void addComponent(Component c)
-
addComponentType
public void addComponentType(ComponentType ct)
-
evaluateStatic
public void evaluateStatic() throws ContentError, ParseError
- Throws:
ContentError
ParseError
-
getDimensions
public LemsCollection<Dimension> getDimensions()
-
getUnits
public LemsCollection<Unit> getUnits()
-
getGlobals
public LemsCollection<Valued> getGlobals()
-
getConstantValueds
public LemsCollection<Valued> getConstantValueds()
-
getConstantsHM
public java.util.HashMap<java.lang.String,Valued> getConstantsHM()
-
getConstantsValueHM
public java.util.HashMap<java.lang.String,java.lang.Double> getConstantsValueHM()
-
getConstantDimHM
public java.util.HashMap<java.lang.String,Dimensional> getConstantDimHM() throws ContentError
- Throws:
ContentError
-
getComponentTypesExtending
public LemsCollection<ComponentType> getComponentTypesExtending(java.lang.String typeName)
-
getComponentTypeByName
public ComponentType getComponentTypeByName(java.lang.String nm) throws ContentError
- Throws:
ContentError
-
hasComponent
public boolean hasComponent(java.lang.String sid) throws ContentError
- Throws:
ContentError
-
getComponent
public Component getComponent(java.lang.String sid) throws ContentError
- Throws:
ContentError
-
textSummary
public java.lang.String textSummary()
-
textSummary
public java.lang.String textSummary(boolean showTypes)
-
textSummary
public java.lang.String textSummary(boolean showTypes, boolean showDimsUnits)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getTarget
public Target getTarget() throws ContentError
- Throws:
ContentError
-
build
public StateInstance build(StateType cptb, EventManager em) throws ContentError, ConnectionError, ParseError, RuntimeError
-
getComponentTypes
public LemsCollection<ComponentType> getComponentTypes()
-
getComponents
public LemsCollection<Component> getComponents()
-
getAllByType
public java.util.ArrayList<Component> getAllByType(ComponentType tgtct) throws ContentError
- Throws:
ContentError
-
getAllByType
public java.util.ArrayList<Component> getAllByType(java.lang.String typeName) throws ContentError
- Throws:
ContentError
-
getParser
public Parser getParser()
-
getSubtypeNames
public java.lang.String[] getSubtypeNames(java.lang.String typeName) throws ContentError
- Throws:
ContentError
-
getTargets
public LemsCollection<Target> getTargets()
-
getUnit
public Unit getUnit(java.lang.String symbol) throws ContentError
- Throws:
ContentError
-
addDimension
public void addDimension(Dimension d)
-
addUnit
public void addUnit(Unit u)
-
setTargetComponent
public void setTargetComponent(Component cp) throws ContentError
- Throws:
ContentError
-
setAllIncludedFiles
public void setAllIncludedFiles(java.util.HashSet<java.lang.String> included)
-
getAllIncludedFiles
public java.util.HashSet<java.lang.String> getAllIncludedFiles()
-
-