Class XMLReader
java.lang.Object
common.xml.XMLReader
- All Implemented Interfaces:
CommonConstants, EngineNodeConstants, XMLConstantNames
Title: XML Reader
Description: Reads model information from an XML file. This class provides methods for model load.
- Author:
- Bertoli Marco Date: 27-lug-2005 Time: 13.59.48
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringdefines matching between engine representation and gui names for drop rules.protected static Map<String, Distribution> protected static Map<String, ForkStrategy> protected static Map<String, JoinStrategy> protected static Map<String, RoutingStrategy> protected static Map<String, SemaphoreStrategy> protected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from interface CommonConstants
ALL_CLASSES, ALL_MODES, ALL_STATIONS, BALKINGSTRATEGY_DESCRIPTION, BATCH_SIMULATION_DESCRIPTION, BLOCKING_DESCRIPTION, CLASS_TYPE_CLOSED, CLASS_TYPE_OPEN, CLASSES_DESCRIPTION, COMPATIBILITIES_DESCRIPTION, CONNECTIONS_DESCRIPTION, CONVERSION_WARNING_DESCRIPTION, DIM_BUTTON_L, DIM_BUTTON_M, DIM_BUTTON_S, DIM_BUTTON_XL, DIM_BUTTON_XS, DISTRIBUTION_BATCH, DISTRIBUTION_BERNOULLI_DISCRETE, DISTRIBUTION_BINOMIAL_DISCRETE, DISTRIBUTION_BURST, DISTRIBUTION_COXIAN, DISTRIBUTION_DETERMINISTIC, DISTRIBUTION_ERLANG, DISTRIBUTION_EXPONENTIAL, DISTRIBUTION_GAMMA, DISTRIBUTION_HYPEREXPONENTIAL, DISTRIBUTION_LOGNORMAL, DISTRIBUTION_MAP, DISTRIBUTION_MMPP2, DISTRIBUTION_NORMAL, DISTRIBUTION_PARETO, DISTRIBUTION_PHASETYPE, DISTRIBUTION_POISSON_DISCRETE, DISTRIBUTION_REPLAYER, DISTRIBUTION_SHIFTED_GEOMETRIC_DISCRETE, DISTRIBUTION_UNIFORM, DISTRIBUTION_UNIFORM_DISCRETE, DISTRIBUTION_WEIBULL, DISTRIBUTION_ZIPF_DISCRETE, FINITE_BLOCK, FINITE_DROP, FINITE_RETRIAL, FINITE_WAITING, FORK_CLASS_SWITCH, FORK_COMBINATION, FORK_MULTI_BRANCH_CLASS_SWITCH, FORK_PROBABILITIES, heightScaling, HTML_END, HTML_FONT_NOR_END, HTML_FONT_NORM, HTML_FONT_TIT_END, HTML_FONT_TITLE, HTML_START, IMG_JABAICON, IMG_JMCHICON, IMG_JMODELICON, IMG_JMVAICON, IMG_JSIMICON, IMG_JWATICON, IMG_SUITEICON, INFINITE_CAPACITY, JABA, JMVA, JOIN_MIX, JOIN_NORMAL, JOIN_PARTIAL, JSIM, JWAT, LARGE_ICON_SIZE_MENU_BAR, LARGE_ICON_SIZE_TOOL_BAR, LDROUTING_DESCRIPTION, LDSERVICE_DESCRIPTION, MAX_GUI_HEIGHT_ABOUT, MAX_GUI_HEIGHT_COMMON, MAX_GUI_HEIGHT_DIALOG_DEFAULT, MAX_GUI_HEIGHT_JABA, MAX_GUI_HEIGHT_JMCH, MAX_GUI_HEIGHT_JMVA, MAX_GUI_HEIGHT_JSIM_DISTRIB, MAX_GUI_HEIGHT_JSIM_PROBLEMS, MAX_GUI_HEIGHT_JSIM_RESULTS, MAX_GUI_HEIGHT_JSIM_STAT_OUTPUT, MAX_GUI_HEIGHT_JWAT, MAX_GUI_HEIGHT_JWAT_COLOR, MAX_GUI_HEIGHT_JWAT_STARTSCREEN, MAX_GUI_HEIGHT_LDEDITING, MAX_GUI_HEIGHT_LDHELP, MAX_GUI_HEIGHT_LDROUTING, MAX_GUI_HEIGHT_LDSTRATEGY, MAX_GUI_HEIGHT_POLLING, MAX_GUI_HEIGHT_PSSERVER, MAX_GUI_HEIGHT_QUICKHTML, MAX_GUI_HEIGHT_SERVER_FEATURES, MAX_GUI_HEIGHT_STARTSCREEN, MAX_GUI_HEIGHT_WHATIF_PROGRESS, MAX_GUI_HEIGHT_WHATIF_RESULTS, MAX_GUI_WIDTH_ABOUT, MAX_GUI_WIDTH_COMMON, MAX_GUI_WIDTH_DIALOG_DEFAULT, MAX_GUI_WIDTH_JABA, MAX_GUI_WIDTH_JMCH, MAX_GUI_WIDTH_JMVA, MAX_GUI_WIDTH_JSIM_DISTRIB, MAX_GUI_WIDTH_JSIM_PROBLEMS, MAX_GUI_WIDTH_JSIM_RESULTS, MAX_GUI_WIDTH_JSIM_STAT_OUTPUT, MAX_GUI_WIDTH_JWAT, MAX_GUI_WIDTH_JWAT_COLOR, MAX_GUI_WIDTH_JWAT_STARTSCREEN, MAX_GUI_WIDTH_LDEDITING, MAX_GUI_WIDTH_LDHELP, MAX_GUI_WIDTH_LDROUTING, MAX_GUI_WIDTH_LDSTRATEGY, MAX_GUI_WIDTH_POLLING, MAX_GUI_WIDTH_PSSERVER, MAX_GUI_WIDTH_QUICKHTML, MAX_GUI_WIDTH_SERVER_FEATURES, MAX_GUI_WIDTH_STARTSCREEN, MAX_GUI_WIDTH_WHATIF_PROGRESS, MAX_GUI_WIDTH_WHATIF_RESULTS, MAX_NUMBER_OF_CLASSES, MAX_NUMBER_OF_GROUPS, MAX_NUMBER_OF_PHASES, MAX_NUMBER_OF_REGIONS, MAX_NUMBER_OF_STATIONS, MAX_SMALL_ICON_SCREEN_HEIGHT, MAX_SMALL_ICON_SCREEN_WIDTH, MEASURE_LOG_DESCRIPTION, MEASURES_DESCRIPTION, METRIC_CONFIGURATIONS_DESCRIPTION, PAR1, PAR2, PARAMETRIC_ANALYSIS_DESCRIPTION, QUEUE_STRATEGY_DPS, QUEUE_STRATEGY_EDD, QUEUE_STRATEGY_EDF, QUEUE_STRATEGY_FCFS, QUEUE_STRATEGY_FCFS_PR, QUEUE_STRATEGY_GPS, QUEUE_STRATEGY_LCFS, QUEUE_STRATEGY_LCFS_PR, QUEUE_STRATEGY_LEPT, QUEUE_STRATEGY_LJF, QUEUE_STRATEGY_PS, QUEUE_STRATEGY_QBPS, QUEUE_STRATEGY_RAND, QUEUE_STRATEGY_SEPT, QUEUE_STRATEGY_SJF, QUEUE_STRATEGY_SRPT, QUEUE_STRATEGY_TBS, REFSOURCE_DESCRIPTION, ROUTING_CLASS_SWITCH, ROUTING_DISABLED, ROUTING_FASTESTSERVICE, ROUTING_LEASTUTILIZATION, ROUTING_LOADDEPENDENT, ROUTING_POWER_OF_K, ROUTING_PROBABILITIES, ROUTING_RANDOM, ROUTING_ROUNDROBIN, ROUTING_SHORTESTQL, ROUTING_SHORTESTRT, ROUTING_WEIGHTED_ROUNDROBIN, ROW_HEIGHT, SEMAPHORE_NORMAL, SERVER_FEATURE_CLASS_PARALLELISM, SERVER_FEATURE_DELAY_OFF_STRATEGIES, SERVER_FEATURE_PREEMPTIVE_STRATEGIES, SERVER_FEATURE_SCHEDULING_POLICY, SERVER_FEATURE_SERVER_COMPATIBILITIES, SERVER_FEATURE_SERVER_NAMES, SERVER_FEATURE_SERVERS_PER_SERVER_TYPE, SERVER_FEATURE_SETUP_STRATEGIES, SERVER_FEATURE_SWITCHOVER_STRATEGIES, SERVER_FEATURE_VACATION_STRATEGY, SERVER_PARAMETER_ADVANCED_FEATURES, SERVER_SETTINGS_DESCRIPTION, SERVER_VACATION_DESCRIPTION, SERVICE_DISABLED, SERVICE_LOAD_DEPENDENT, SERVICE_LOAD_INDEPENDENT, SERVICE_ZERO, SIMENGINE, SIMULATION_DESCRIPTION, SMALL_ICON_SIZE_MENU_BAR, SMALL_ICON_SIZE_TOOL_BAR, STATION_NAMES, STATION_QUEUE_STRATEGY_NON_PREEMPTIVE, STATION_QUEUE_STRATEGY_NON_PREEMPTIVE_PRIORITY, STATION_QUEUE_STRATEGY_POLLING, STATION_QUEUE_STRATEGY_POLLING_EXHAUSTIVE, STATION_QUEUE_STRATEGY_POLLING_GATED, STATION_QUEUE_STRATEGY_POLLING_LIMITED, STATION_QUEUE_STRATEGY_PREEMPTIVE, STATION_QUEUE_STRATEGY_PREEMPTIVE_PRIORITY, STATION_QUEUE_STRATEGY_PS, STATION_QUEUE_STRATEGY_PSSERVER, STATION_QUEUE_STRATEGY_PSSERVER_PRIORITY, STATION_SCHEDULING_POLICY_ALFS, STATION_SCHEDULING_POLICY_ALIS, STATION_SCHEDULING_POLICY_FAIRNESS, STATION_SCHEDULING_POLICY_FSF, STATION_SCHEDULING_POLICY_ORDER, STATION_SCHEDULING_POLICY_RAIS, STATION_TYPE_CLASSSWITCH, STATION_TYPE_DELAY, STATION_TYPE_FORK, STATION_TYPE_JOIN, STATION_TYPE_LOGGER, STATION_TYPE_PLACE, STATION_TYPE_ROUTER, STATION_TYPE_SCALER, STATION_TYPE_SEMAPHORE, STATION_TYPE_SERVER, STATION_TYPE_SINK, STATION_TYPE_SOURCE, STATION_TYPE_TERMINAL, STATION_TYPE_TRANSITION, STATION_VACATION_POLICY_BERNOULLI, STATION_VACATION_POLICY_MULTIPLE, STATION_VACATION_POLICY_NONE, STATION_VACATION_POLICY_SINGLE, STATIONS_DESCRIPTION, STATIONS_PAR_DESCRIPTION, SWITCHOVER_ZERO, TIMING_STRATEGY_IMMEDIATE, TIMING_STRATEGY_TIMED, WARNING_CLASS, WARNING_CLASS_INCOMING_ROUTING, WARNING_CLASS_OUTGOING_ROUTING, WARNING_CLASS_STATION, WARNING_INCOMING_ROUTING, WARNING_MULTI_CLASS, WARNING_OUTGOING_ROUTING, WARNING_STATION, widthScalingFields inherited from interface XMLConstantNames
CLASSNAME_CLASSSWITCH, CLASSNAME_DELAY, CLASSNAME_ENABLING, CLASSNAME_ENABLING_SERVER, CLASSNAME_EXHAUSTIVEPSERVER, CLASSNAME_FIRING, CLASSNAME_FORK, CLASSNAME_GATEDPSERVER, CLASSNAME_JOIN, CLASSNAME_LINKAGE, CLASSNAME_LKPSERVER, CLASSNAME_LOGGER, CLASSNAME_PREEMPTIVESERVER, CLASSNAME_PSSERVER, CLASSNAME_PSSERVER_PRIORITY, CLASSNAME_QUEUE, CLASSNAME_ROUTER, CLASSNAME_SEMAPHORE, CLASSNAME_SERVER, CLASSNAME_SINK, CLASSNAME_SOURCE, CLASSNAME_STORAGE, CLASSNAME_TERMINAL, CLASSNAME_TIMING, CLASSNAME_TUNNEL, EXTERNAL_SCHEMA_LOCATION_PROPERTY_ID, NAMESPACES_FEATURE_ID, NODETYPE_REGION, NODETYPE_STATION, SCHEMA_VALIDATION_FEATURE_ID, VALIDATION_DYNAMIC_FEATURE_ID, VALIDATION_FEATURE_ID, XML_A_CLASS_CUSTOMERS, XML_A_CLASS_DUE_DATE, XML_A_CLASS_NAME, XML_A_CLASS_PRIORITY, XML_A_CLASS_REFSOURCE, XML_A_CLASS_TYPE, XML_A_CLASSCONSTRAINT_CLASS, XML_A_CLASSCONSTRAINT_MAXJOBS, XML_A_CLASSDUEDATE_CLASS, XML_A_CLASSDUEDATE_DUEDATE, XML_A_CLASSMEMORYCONSTRAINT_CLASS, XML_A_CLASSMEMORYCONSTRAINT_MAXMEMORY, XML_A_CLASSPOPULATION_NAME, XML_A_CLASSPOPULATION_POPULATION, XML_A_CLASSSIZE_CLASS, XML_A_CLASSSIZE_SIZE, XML_A_CLASSWEIGHT_CLASS, XML_A_CLASSWEIGHT_WEIGHT, XML_A_CONNECTION_SOURCE, XML_A_CONNECTION_TARGET, XML_A_DROPRULE_CLASS, XML_A_DROPRULE_DROP, XML_A_GLOBALCONSTRAINT_MAXJOBS, XML_A_GLOBALMEMORYCONSTRAINT_MAXMEMORY, XML_A_GROUPCLASS_CLASS, XML_A_GROUPCLASS_GROUP, XML_A_GROUPCONSTRAINT_GROUP, XML_A_GROUPCONSTRAINT_MAXJOBS, XML_A_GROUPMEMORYCONSTRAINT_GROUP, XML_A_GROUPMEMORYCONSTRAINT_MAXMEMORY, XML_A_MEASURE_ALPHA, XML_A_MEASURE_CLASS, XML_A_MEASURE_ISSERVERTYPE, XML_A_MEASURE_LOG, XML_A_MEASURE_NAME, XML_A_MEASURE_NODETYPE, XML_A_MEASURE_NUMOFSERVERTYPES, XML_A_MEASURE_PARENTSTATION, XML_A_MEASURE_PRECISION, XML_A_MEASURE_SERVERTYPE, XML_A_MEASURE_STATION, XML_A_MEASURE_TYPE, XML_A_MEASURE_VERBOSE, XML_A_PARAMETER_ARRAY, XML_A_PARAMETER_CLASSPATH, XML_A_PARAMETER_MAP, XML_A_PARAMETER_NAME, XML_A_PRELOADSTATION_NAME, XML_A_REGION_NAME, XML_A_REGION_TYPE, XML_A_REGIONNODE_NAME, XML_A_ROOT_DISABLESTATISTIC, XML_A_ROOT_DURATION, XML_A_ROOT_LOGDECIMALSEPARATOR, XML_A_ROOT_LOGDELIM, XML_A_ROOT_LOGPATH, XML_A_ROOT_LOGREPLACE, XML_A_ROOT_MAXEVENTS, XML_A_ROOT_MAXSAMPLES, XML_A_ROOT_NAME, XML_A_ROOT_POLLING, XML_A_ROOT_SEED, XML_A_ROOT_SIMULATED, XML_A_STATION_NAME, XML_A_STATION_SECTION_CLASSNAME, XML_A_STATION_SECTION_PS_PRIORITY, XML_A_SUBPARAMETER_ARRAY, XML_A_SUBPARAMETER_CLASSPATH, XML_A_SUBPARAMETER_NAME, XML_DOCUMENT_ROOT, XML_DOCUMENT_XSD, XML_E_CLASS, XML_E_CLASSCONSTRAINT, XML_E_CLASSDUEDATE, XML_E_CLASSMEMORYCONSTRAINT, XML_E_CLASSPOPULATION, XML_E_CLASSSIZE, XML_E_CLASSWEIGHT, XML_E_CONNECTION, XML_E_DROPRULES, XML_E_GLOBALCONSTRAINT, XML_E_GLOBALMEMORYCONSTRAINT, XML_E_GROUPCLASS, XML_E_GROUPCLASSLIST, XML_E_GROUPCONSTRAINT, XML_E_GROUPMEMORYCONSTRAINT, XML_E_MAPREDUCE, XML_E_MEASURE, XML_E_PARAMETER, XML_E_PARAMETER_REFCLASS, XML_E_PARAMETER_VALUE, XML_E_PRELOAD, XML_E_REGION, XML_E_REGIONNODE, XML_E_SERVER_TYPE, XML_E_STATION, XML_E_STATION_DELAY_OFF, XML_E_STATION_DUE_DATES, XML_E_STATION_QUANTUM_SIZE, XML_E_STATION_QUANTUM_SWITCHOVER_TIME, XML_E_STATION_SECTION, XML_E_STATION_SET_UP, XML_E_STATIONPOPULATIONS, XML_E_SUBPARAMETER, XML_E_SUBPARAMETER_REFCLASS, XML_E_SUBPARAMETER_VALUE, XML_LOG_B_EXECTIMESTAMP, XML_LOG_B_JOBCLASS, XML_LOG_B_JOBID, XML_LOG_B_LOGGERNAME, XML_LOG_B_TIMEANYCLS, XML_LOG_B_TIMESAMECLS, XML_LOG_B_TIMESTAMP, XML_LOG_FILENAME, XML_LOG_FILEPATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringHelper method that searches for first text node, between all children of current node and returns its value.protected static StringgetStationType(Element station) Returns the type of a station, reconstructing it from section names.static booleanloadModel(File xmlFile, CommonModel model) Loads a model saved in an XML file, given the handler to the file.static booleanloadModel(String fileName, CommonModel model) Loads a model saved in an XML file, given the name of the file.static DocumentLoads an XML file, returning the Document representation of it.static DocumentLoads an XML file, returning the Document representation of it.protected static StringStrips legacy "jmt.engine." or "jmt.gui." prefix for backwards-compatible classPath matching.protected static voidparseBlockingRegions(Element root, CommonModel model) Parses all informations on blocking regions to be added to the modelprotected static voidparseClasses(Element root, CommonModel model) Parses userclasses information.protected static voidparseClassStationSoftDeadlines(NodeList classSoftDeadlines, CommonModel model, Object key) protected static voidparseClassSwitchSection(Element section, CommonModel model, Object stationKey) Parses class switch sectionprotected static voidparseConnections(Element root, CommonModel model) Parses all informations on connections to be made into modelprotected static voidparseDelaySection(Element section, CommonModel model, Object key) Parses all informations regarding Delay section.protected static DistributionparseDistribution(Element distr, Element distrPar) Parses a distribution, given its distribution and distributionPar nodesprotected static voidparseEnablingSection(Element section, CommonModel model, Object key) Parses all informations regarding Enabling section.protected static voidparseFiringSection(Element section, CommonModel model, Object key) Parses all informations regarding Firing section.protected static voidparseForkSection(Element section, CommonModel model, Object key) Parses all informations regarding Fork section.protected static voidparseJoinSection(Element section, CommonModel model, Object key) Parses all informations regarding Join section.protected static voidparseLoggerSection(Element section, CommonModel model, Object key) Parses all parameters for a Logger section from the XML document.protected static voidparseMeasures(Element root, CommonModel model) Parses all informations on measures to be taken during simulationparseParameterArray(Element parameterNode) Parses a parameter array and returns Vector of found subParametersparseParameterRefclassArray(Element parameterNode) Parses a Parameter array and returns a Map of ClassName -> subParameterprotected static voidparsePreloading(Element root, CommonModel model) Parses all informations on preloading to be added to the modelprotected static voidparseQuantaSize(NodeList quantaSize, CommonModel model, Object key) protected static voidparseQuantumSwitchoverTime(NodeList quantumSwitchoverTime, CommonModel model, Object key) protected static voidparseQueueSection(Element section, CommonModel model, Object key) Parses all informations regarding Queue section.protected static voidparseQueueSectionDelay(Element section, CommonModel model, Object key) Parses all information regarding enabling, inhibiting and resource conditions for a delay stationprotected static voidparseRouterSection(Element section, CommonModel model, Object key) Parses router sectionprotected static voidparseSemaphoreSection(Element section, CommonModel model, Object key) Parses all informations regarding Semaphore section.protected static voidparseServerSection(Element section, CommonModel model, Object key) Parses all informations regarding Server section.protected static ObjectparseServiceStrategy(Element serviceTimeStrategy) Parses service section informations contained in serviceTimeStrategy element to create a correct Distribution or LDStrategy objectprotected static voidparseSourceSection(Element section, CommonModel model, Object key, String stationName) Parses all informations regarding Source section.protected static voidparseStations(Element root, CommonModel model) Parses all station related informations and puts them into data structureprotected static voidparseStorageSection(Element section, CommonModel model, Object key) Parses all informations regarding Storage section.protected static voidparseTimingSection(Element section, CommonModel model, Object key) Parses all informations regarding Timing section.static voidparseXML(Document xml, CommonModel model) Parses given XML Document to reconstruct simulation model.static voidparseXML(Element root, CommonModel model) Parses given XML Document to reconstruct simulation model.protected static voidThis method is used for debug purpose to write a portion of xml on standard output.
-
Field Details
-
classes
-
stations
-
regions
-
refStations
-
modeNameLists
-
empiricalRouting
-
empiricalLDRouting
-
wrrRouting
-
csBranchRouting
-
csClassRouting
-
empiricalFork
-
combFork
-
enablingConditionMap
-
inhibitingConditionMap
-
resourceConditionMap
-
firingOutcomeMap
-
DROP_RULES_MAPPING
-
engineToGuiDistr
-
engineToGuiRouting
-
engineToGuiFork
-
engineToGuiJoin
-
engineToGuiSemaphore
-
psStrategy
- See Also:
-
queuePut
- See Also:
-
queueGet
- See Also:
-
serviceStrategy
- See Also:
-
distributionContainer
- See Also:
-
-
Constructor Details
-
XMLReader
public XMLReader()
-
-
Method Details
-
loadModel
Loads a model saved in an XML file, given the name of the file. If specified file is a jmodel archive, extracts model informations from it and uses them to reconstruct the model. This method is provided to be used with JSIM- Parameters:
fileName- name of the file to be openedmodel- data structure where model should be created (a new data structure is the best choice)- Returns:
- true iff model was recognized and loaded, false otherwise
-
loadModel
Loads a model saved in an XML file, given the handler to the file. If specified file is a jmodel archive, extracts model informations from it and uses them to reconstruct the model. This method is provided to be used with JSIM- Parameters:
xmlFile- handler to the file to be openedmodel- data structure where model should be created (a new data structure is the best choice)- Returns:
- true iff model was recognized and loaded, false otherwise
-
parseXML
Parses given XML Document to reconstruct simulation model.- Parameters:
root- root of document to be parsedmodel- data model to be elaborated
-
parseXML
Parses given XML Document to reconstruct simulation model.- Parameters:
xml- Document to be parsedmodel- data model to be elaborated
-
findText
-
parseClasses
Parses userclasses information. Note that distributions for open class will be set lately and reference station information is stored into refStations data structure as will be used later- Parameters:
root- root element of XML Documentmodel- data structure where all properties have to be set
-
parseStations
Parses all station related informations and puts them into data structure- Parameters:
root- root element of XML Documentmodel- data structure where all properties have to be set
-
parseClassStationSoftDeadlines
protected static void parseClassStationSoftDeadlines(NodeList classSoftDeadlines, CommonModel model, Object key) -
parseQuantaSize
-
parseQuantumSwitchoverTime
protected static void parseQuantumSwitchoverTime(NodeList quantumSwitchoverTime, CommonModel model, Object key) -
parseSourceSection
protected static void parseSourceSection(Element section, CommonModel model, Object key, String stationName) Parses all informations regarding Source section. If this source is reference class for any kind of open class, uses service time informations stored here to set distribution for this class.- Parameters:
section- input section of source stationmodel- link to data structurekey- key of search for this source station into data structurestationName- Name of current station. This is used to correctly set reference station distribution. That cannot be derived from model.getStationName(key) as JSim can change source name upon opening a model stored with JModel.
-
parseQueueSection
Parses all informations regarding Queue section.- Parameters:
section- input section of queue or delay stationmodel- link to data structurekey- key of search for this queue or delay station into data structure
-
parseQueueSectionDelay
Parses all information regarding enabling, inhibiting and resource conditions for a delay station- Parameters:
section- input section of delay stationmodel- link to data structurekey- key of search for this delay station into data structure
-
parseDelaySection
Parses all informations regarding Delay section.- Parameters:
section- service section of delay stationmodel- link to data structurekey- key of search for this delay station into data structure
-
parseServerSection
Parses all informations regarding Server section.- Parameters:
section- service section of queue stationmodel- link to data structurekey- key of search for this queue station into data structure
-
parseParameterRefclassArray
-
parseParameterArray
-
parseRouterSection
Parses router section- Parameters:
section- router sectionmodel- data structurekey- station's key
-
parseClassSwitchSection
protected static void parseClassSwitchSection(Element section, CommonModel model, Object stationKey) Parses class switch section- Parameters:
section- class switch sectionmodel- data structurestationKey- station's key
-
parseLoggerSection
Parses all parameters for a Logger section from the XML document. The information from parseLogger is passed to LogTunnel.- Parameters:
section- service section of logger stationmodel- link to data structurekey- key of search for this logger station into data structure- See Also:
-
parseForkSection
Parses all informations regarding Fork section.- Parameters:
section- output section of fork stationmodel- link to data structurekey- key of search for this fork station into data structure
-
parseJoinSection
Parses all informations regarding Join section.- Parameters:
section- input section of join stationmodel- link to data structurekey- key of search for this join station into data structure
-
parseSemaphoreSection
Parses all informations regarding Semaphore section.- Parameters:
section- input section of semaphore stationmodel- link to data structurekey- key of search for this semaphore station into data structure
-
parseStorageSection
Parses all informations regarding Storage section.- Parameters:
section- input section of place stationmodel- link to data structurekey- key of search for this place station into data structure
-
parseEnablingSection
Parses all informations regarding Enabling section.- Parameters:
section- input section of transition stationmodel- link to data structurekey- key of search for this transition station into data structure
-
parseTimingSection
Parses all informations regarding Timing section.- Parameters:
section- service section of transition stationmodel- link to data structurekey- key of search for this transition station into data structure
-
parseFiringSection
Parses all informations regarding Firing section.- Parameters:
section- output section of transition stationmodel- link to data structurekey- key of search for this transition station into data structure
-
parseServiceStrategy
Parses service section informations contained in serviceTimeStrategy element to create a correct Distribution or LDStrategy object- Parameters:
serviceTimeStrategy- Element that holds all distribution informations- Returns:
- created Distribution or LDStrategy or null if this field is set to null
-
parseDistribution
Parses a distribution, given its distribution and distributionPar nodes- Parameters:
distr- distribution nodedistrPar- distribution's parameter node- Returns:
- parsed distribution
-
getStationType
Returns the type of a station, reconstructing it from section names. This method must be modified if a new station type is inserted.- Parameters:
station- element containing sections- Returns:
- station type as expected by CommonModel / JMODELModel
-
parseMeasures
Parses all informations on measures to be taken during simulation- Parameters:
root- root element of XML Documentmodel- data structure where all properties have to be set
-
parseConnections
Parses all informations on connections to be made into model- Parameters:
root- root element of XML Documentmodel- data structure where all properties have to be set
-
parsePreloading
Parses all informations on preloading to be added to the model- Parameters:
root- root element of XML Documentmodel- data structure where all properties have to be set
-
parseBlockingRegions
Parses all informations on blocking regions to be added to the model- Parameters:
root- root element of XML Documentmodel- data structure where all properties have to be set
-
loadXML
Loads an XML file, returning the Document representation of it. This method is generic and can be used to load every xml file. Actually it is used byXMLReaderand byGuiXMLReader. This method will validate input file.- Parameters:
filename- name of the file to be loadedschemaSource- url of schema to be used to validate the model- Returns:
- Document representation of input xml file
-
loadXML
Loads an XML file, returning the Document representation of it. This method is generic and can be used to load every xml file. Actually it is used byXMLReaderand byGuiXMLReader. This method will not validate input file.- Parameters:
filename- name of the file to be loaded- Returns:
- Document representation of input xml file
-
write
This method is used for debug purpose to write a portion of xml on standard output. This can be removed freely!- Parameters:
node- node to be written on standard output
-
normalizeClassPath
-