Package clips.directory.editors.mkb10

Examples of clips.directory.editors.mkb10.MahonParser


    }
    MKBParser      parser = new MKBParser(MKBParser.ParseLevel.soft);
    try {
      ArrayList<MKBCode>        codes = parser.parse(curLine.getAlternativeMkbCode());
      DirectoryMKB10          mkbDir = DirectoryLocator.getDirectory(DirectoryMKB10.class);
      MKbSelector            selector = new MKbSelector(mkbDir, MKbSelector.SelectType.single);
      ArrayList<DirectoryMKB10Item>  mkbItems = selector.getSelectedItem(codes);
      int[]              ids = new int[mkbItems.size()];
      for (int i = 0; i < ids.length; i++) {
        ids[i] = mkbItems.get(i).getID();
      }
      curLine.setItems(ids);
View Full Code Here


        throw new ParseException("Строка \"" + code + "\" содержит более одного кода мкб", 0);
      }
      parsed = codes.get(0);
    }
    if (selector == null){
      selector = new MKbSelector(this, MKbSelector.SelectType.oneToOne);
    }
    return selector.getSingleItem(parsed);
  }
View Full Code Here

    int          res = dlg.showOpenDialog(this);
    if (res == JFileChooser.APPROVE_OPTION){
      cfg.setLastOpenDialogPath(dlg.getCurrentDirectory());
      try {
        File csv = dlg.getSelectedFile();
        MahonParser parser = new MahonParser(csv);
        ArrayList<MkbItem>    list = parser.read();
        DirectoryMKB10      dir = (DirectoryMKB10) DirectoryLocator.getDirectory(DirectoryMKB10.class, false);
        dir.synchronize(list);
        DirectoryLocator.getDirectory(DirectoryMKB10.class, true);
      } catch (FileNotFoundException ex) {
        MessageBox.showExceptionOnly(ex);
View Full Code Here

    int          res = dlg.showOpenDialog(this);
    if (res == JFileChooser.APPROVE_OPTION){
      cfg.setLastOpenDialogPath(dlg.getCurrentDirectory());
      try {
        File txt = dlg.getSelectedFile();
        TxtParser parser = new TxtParser(txt);
        ArrayList<MkbItem>    list = parser.read();
        DirectoryMKB10      dir = (DirectoryMKB10) DirectoryLocator.getDirectory(DirectoryMKB10.class, false);
                dir.updateTitle(list);
                MessageBox.showInfo("Обновление прошло удачно");
      } catch (FileNotFoundException ex) {
        MessageBox.showExceptionOnly(ex);
View Full Code Here

TOP

Related Classes of clips.directory.editors.mkb10.MahonParser

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.