Esempio n. 1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void readFlowCharts(org.w3c.dom.Element flowcharts) throws org.maltparser.core.exception.MaltChainedException
        private void readFlowCharts(Element flowcharts)
        {
            NodeList flowChartList = flowcharts.getElementsByTagName("flowchart");

            for (int i = 0; i < flowChartList.Length; i++)
            {
                string flowChartName = ((Element)flowChartList.item(i)).getAttribute("name");
                if (!chartSpecifications.ContainsKey(flowChartName))
                {
                    ChartSpecification chart = new ChartSpecification();
                    chartSpecifications[flowChartName] = chart;
                    chart.read((Element)flowChartList.item(i), this);
                }
                else
                {
                    throw new FlowException("Problem parsing the flow chart file. The flow chart with the name " + flowChartName + " already exists. ");
                }
            }
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public FlowChartInstance(int optionContainerIndex, org.maltparser.core.flow.spec.ChartSpecification chartSpecification, FlowChartManager flowChartManager) throws org.maltparser.core.exception.MaltChainedException
        public FlowChartInstance(int optionContainerIndex, ChartSpecification chartSpecification, FlowChartManager flowChartManager)
        {
            FlowChartManager     = flowChartManager;
            OptionContainerIndex = optionContainerIndex;
            ChartSpecification   = chartSpecification;

            flowChartRegistry    = new Dictionary <string, object>();
            engineRegistry       = new Dictionary <string, object>();
            flowChartRegistryKey = new StringBuilder();
            //		dataFormatInstances = new HashMap<String, DataFormatInstance>(3);
            //
            //		String inputFormatName = OptionManager.instance().getOptionValue(0, "input", "format").toString();
            //		String outputFormatName = OptionManager.instance().getOptionValue(0, "output", "format").toString();
            //		SystemLogger.logger().info(inputFormatName + "\n");
            //		SystemLogger.logger().info(outputFormatName + "\n");
            ////		featureModelFileName = configDir.copyToConfig(Util.findURLinJars(featureModelFileName));
            //		dataFormatManager = new DataFormatManager(inputFormatName, outputFormatName);
            //		symbolTables = new TrieSymbolTableHandler();

            preProcessChartItems = new LinkedHashSet <ChartItem>();
            foreach (ChartItemSpecification chartItemSpecification in chartSpecification.PreProcessChartItemSpecifications)
            {
                preProcessChartItems.add(initChartItem(chartItemSpecification));
            }
            processChartItems = new LinkedHashSet <ChartItem>();
            foreach (ChartItemSpecification chartItemSpecification in chartSpecification.ProcessChartItemSpecifications)
            {
                processChartItems.add(initChartItem(chartItemSpecification));
            }

            postProcessChartItems = new LinkedHashSet <ChartItem>();
            foreach (ChartItemSpecification chartItemSpecification in chartSpecification.PostProcessChartItemSpecifications)
            {
                postProcessChartItems.add(initChartItem(chartItemSpecification));
            }
        }