Examples of MapVersionInterpreter


Examples of org.freeplane.features.url.MapVersionInterpreter

    final int readCount = file.read(buffer);
    final String mapStart = new String(buffer, FileUtils.defaultCharset().name());
    final ByteArrayInputStream readBytes = new ByteArrayInputStream(buffer, 0, readCount);
    final InputStream sequencedInput = new SequenceInputStream(readBytes, file);
    Reader reader = null;
    MapVersionInterpreter versionInterpreter = MapVersionInterpreter.getVersionInterpreter(mapStart);
    map.addExtension(versionInterpreter);
    if(versionInterpreter.anotherDialect){
      String message = versionInterpreter.getDialectInfo(f.getAbsolutePath());
      UITools.showMessage(message, JOptionPane.WARNING_MESSAGE);
    }
    if(versionInterpreter.needsConversion){
      final int showResult = OptionalDontShowMeAgainDialog.show("really_convert_to_current_version",
          "confirmation", MMapController.RESOURCES_CONVERT_TO_CURRENT_VERSION,
          OptionalDontShowMeAgainDialog.ONLY_OK_SELECTION_IS_STORED);
      IMapInputStreamConverter isConverter = versionInterpreter.getMapInputStreamConverter();
      if (showResult != JOptionPane.OK_OPTION || isConverter == null) {
        reader = new XsltPipeReaderFactory().getActualReader(sequencedInput);
      }
      else {
        sequencedInput.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.