@Test public void testBasicExport() { SurvexExporter survexExporter = new SurvexExporter(); Survey oneNorth = BasicTestSurveyCreator.createStraightNorth(); String content = survexExporter.getContent(oneNorth); Assert.assertTrue(content.contains("1\t2\t5.000\t0.00\t0.00")); Assert.assertTrue(content.contains("2\t3\t5.000\t0.00\t0.00")); Assert.assertTrue(content.contains("3\t4\t5.000\t0.00\t0.00")); }
public String getContent(Survey survey) { StringBuilder builder = new StringBuilder(); builder.append("*alias station - ..\n\n"); List<GraphToListTranslator.SurveyListEntry> list = graphToListTranslator.toChronoListOfSurveyListEntries(survey); for (GraphToListTranslator.SurveyListEntry entry : list) { SurvexTherionUtil.formatEntry(builder, entry, COMMENT_CHAR); builder.append("\n"); } return builder.toString(); }
SurvexExporter extends SingleFileExporter { public String getContent(Survey survey) { StringBuilder builder = new StringBuilder(); builder.append("*alias station - ..\n\n"); List<GraphToListTranslator.SurveyListEntry> list = graphToListTranslator.toChronoListOfSurveyListEntries(survey); for (GraphToListTranslator.SurveyListEntry entry : list) { SurvexTherionUtil.formatEntry(builder, entry, COMMENT_CHAR); builder.append("\n"); } return builder.toString(); } }
SurvexExporter extends SingleFileExporter { public String getContent(Survey survey) { StringBuilder builder = new StringBuilder(); builder.append("*alias station - ..\n\n"); List<GraphToListTranslator.SurveyListEntry> list = graphToListTranslator.toChronoListOfSurveyListEntries(survey); for (GraphToListTranslator.SurveyListEntry entry : list) { SurvexTherionUtil.formatEntry(builder, entry, COMMENT_CHAR); builder.append("\n"); } return builder.toString(); }  }
SurvexExporter extends SingleFileExporter { public String getContent(Survey survey) { StringBuilder builder = new StringBuilder(); builder.append("*alias station - ..\n\n"); List<GraphToListTranslator.SurveyListEntry> list = graphToListTranslator.toChronoListOfSurveyListEntries(survey); for (GraphToListTranslator.SurveyListEntry entry : list) { SurvexTherionUtil.formatEntry(builder, entry, COMMENT_CHAR); builder.append("\n"); } return builder.toString(); }  String getContent(Survey survey); @Override String getFileExtension(); @Override String getExportTypeName(Context context); @Override String getExportDirectoryName(); }
SurvexExporter extends SingleFileExporter { public String getContent(Survey survey) { StringBuilder builder = new StringBuilder(); builder.append("*alias station - ..\n\n"); List<GraphToListTranslator.SurveyListEntry> list = graphToListTranslator.toChronoListOfSurveyListEntries(survey); for (GraphToListTranslator.SurveyListEntry entry : list) { SurvexTherionUtil.formatEntry(builder, entry, COMMENT_CHAR); builder.append("\n"); } return builder.toString(); }  String getContent(Survey survey); @Override String getFileExtension(); @Override String getExportTypeName(Context context); @Override String getExportDirectoryName(); static final char COMMENT_CHAR; }