Package org.maltparserx.core.flow

Examples of org.maltparserx.core.flow.FlowException


    setName(chartElem.getAttribute("name"));
    NodeList flowChartProcessList = chartElem.getElementsByTagName("preprocess");
    if (flowChartProcessList.getLength() == 1) {
      readChartItems((Element)flowChartProcessList.item(0), flowCharts, preProcessChartItemSpecifications);
    } else if (flowChartProcessList.getLength() > 1) {
      throw new FlowException("The flow chart '"+getName()+"' has more than one preprocess elements. ");
    }
   
    flowChartProcessList = chartElem.getElementsByTagName("process");
    if (flowChartProcessList.getLength() == 1) {
      readChartItems((Element)flowChartProcessList.item(0), flowCharts, processChartItemSpecifications);
    } else if (flowChartProcessList.getLength() > 1) {
      throw new FlowException("The flow chart '"+getName()+"' has more than one process elements. ");
    }
   
    flowChartProcessList = chartElem.getElementsByTagName("postprocess");
    if (flowChartProcessList.getLength() == 1) {
      readChartItems((Element)flowChartProcessList.item(0), flowCharts, postProcessChartItemSpecifications);
    } else if (flowChartProcessList.getLength() > 1) {
      throw new FlowException("The flow chart '"+getName()+"' has more than one postprocess elements. ");
    }
  }
View Full Code Here


            Element root = null;

            root = db.parse(specModelURL.openStream()).getDocumentElement();

            if (root == null) {
              throw new FlowException("The flow chart system file '"+specModelURL.getFile()+"' cannot be found. ");
            }
           
            readChartElements(root);
        } catch (IOException e) {
          throw new FlowException("The flow chart system file '"+specModelURL.getFile()+"' cannot be found. ", e);
        } catch (ParserConfigurationException e) {
          throw new FlowException("Problem parsing the file "+specModelURL.getFile()+". ", e);
        } catch (SAXException e) {
          throw new FlowException("Problem parsing the file "+specModelURL.getFile()+". ", e);
        }
  }
View Full Code Here

      if (clazz == null) {
        clazz = Class.forName(chartItemClassName);
      }
      this.chartItemClass = clazz.asSubclass(org.maltparserx.core.flow.item.ChartItem.class);
    } catch (ClassCastException e) {
      throw new FlowException("The class '"+clazz.getName()+"' is not a subclass of '"+org.maltparserx.core.flow.item.ChartItem.class.getName()+"'. ", e);
    } catch (ClassNotFoundException e) {
      throw new FlowException("The class "+chartItemClassName+"  could not be found. ", e);
    }
    NodeList attrElements = chartElem.getElementsByTagName("attribute");
    for (int i = 0; i < attrElements.getLength(); i++) {
      ChartAttribute attribute = new ChartAttribute();
      attribute.read((Element)attrElements.item(i),flowChartSystem);
View Full Code Here

          if (inFormat.getDataFormarSpec().getDataStructure() == DataStructure.PHRASE) {
            mapping.setHeadRules(OptionManager.instance().getOptionValue(getOptionContainerIndex(), "graph", "head_rules").toString());
          }
          ((MappablePhraseStructureGraph)graph).setMapping(mapping);
        } else {
          throw new FlowException("Couldn't determine the input and output data format. ");
        }
        flowChartinstance.addFlowChartRegistry(org.maltparserx.core.syntaxgraph.DependencyStructure.class, structureName, graph);
        flowChartinstance.addFlowChartRegistry(org.maltparserx.core.syntaxgraph.PhraseStructure.class, structureName, graph);
      } else if (dependency == false && phrase == true) {
        graph = new PhraseStructureGraph(symbolTables);
View Full Code Here

TOP

Related Classes of org.maltparserx.core.flow.FlowException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.