Package com.google.common.base

Examples of com.google.common.base.Joiner.join()


  protected static void myInitCore(String baseDirName) throws Exception {
    Joiner joiner = Joiner.on(File.separator);
    initCore(
        joiner.join(RESOURCES_DIR, baseDirName, "collection1", "conf", "solrconfig.xml"),
        joiner.join(RESOURCES_DIR, baseDirName, "collection1", "conf", "schema.xml"),
        joiner.join(RESOURCES_DIR, baseDirName)
        );   
  }
 
  @Before
View Full Code Here


  protected static void myInitCore(String baseDirName) throws Exception {
    Joiner joiner = Joiner.on(File.separator);
    initCore(
        joiner.join(RESOURCES_DIR, baseDirName, "collection1", "conf", "solrconfig.xml"),
        joiner.join(RESOURCES_DIR, baseDirName, "collection1", "conf", "schema.xml"),
        joiner.join(RESOURCES_DIR, baseDirName)
        );   
  }
 
  @Before
  public void setUp() throws Exception {
View Full Code Here

public class SolrMorphlineZkAvroTest extends AbstractSolrMorphlineZkTest {
 
  @Override
  public void doTest() throws Exception {
    Joiner joiner = Joiner.on(File.separator);
    File file = new File(joiner.join(RESOURCES_DIR, "test-documents", "sample-statuses-20120906-141433-medium.avro"));
   
    waitForRecoveriesToFinish(false);
   
    // load avro records via morphline and zk into solr
    morphline = parse("test-morphlines" + File.separator + "tutorialReadAvroContainer");   
View Full Code Here

    /** Check that the exit value, stdout and stderr are as expected. */
    private void assertLintOutput(int actualExit, int expectedExit, List<String> expectedStdout,
            List<String> expectedStderr) {
        Joiner nl = Joiner.on(NEWLINE);
        assertThat(stdio.getStdout(), is(nl.join(maybeAddTrailer(expectedStdout))));
        assertThat(stdio.getStderr(), is(nl.join(maybeAddTrailer(expectedStderr))));
        // Do this last so that we see stdout/stderr errors first.
        assertThat(actualExit, is(expectedExit));
    }

View Full Code Here

    /** Check that the exit value, stdout and stderr are as expected. */
    private void assertLintOutput(int actualExit, int expectedExit, List<String> expectedStdout,
            List<String> expectedStderr) {
        Joiner nl = Joiner.on(NEWLINE);
        assertThat(stdio.getStdout(), is(nl.join(maybeAddTrailer(expectedStdout))));
        assertThat(stdio.getStderr(), is(nl.join(maybeAddTrailer(expectedStderr))));
        // Do this last so that we see stdout/stderr errors first.
        assertThat(actualExit, is(expectedExit));
    }

    private void assertStdoutContains(String expected) {
View Full Code Here

        inMemory = options.containsKey("inMemory") ? Boolean.parseBoolean(options.get("inMemory")) : true;
        options.remove("inMemory");

        if (options.size() > 0) {
            throw new BadClassifierSpecException("Extra options supplied: " + withSpaces.join(options.keySet()));
        }

        if (!inMemory) {
            tmpFile = File.createTempFile("trainingData", "tmp");
            tmpFile.deleteOnExit();
View Full Code Here

        } else {
            throw new BadClassifierSpecException("Must specify existing model");
        }

        if (options.size() > 0) {
            throw new BadClassifierSpecException("Extra options supplied: " + withSpaces.join(options.keySet()));
        }
    }


    /**
 
View Full Code Here

        if (arrayCopy.isEmpty())
            return null;

        Joiner stringJoiner = Joiner.on(" ");
        return stringJoiner.join(arrayCopy);
    }

}
View Full Code Here

  @Override
  public void writeToLocation(String dbLocation) {
    Joiner j = Joiner.on("\n");
    StringBuilder b = new StringBuilder("Equivalences:\n");
    j.join(b, equivalences);
    b.append("\nMigrations:\n");
    j.join(b, migrations);
    AppContext.RUN.ui.info(b.toString());
  }
}
View Full Code Here

  public void writeToLocation(String dbLocation) {
    Joiner j = Joiner.on("\n");
    StringBuilder b = new StringBuilder("Equivalences:\n");
    j.join(b, equivalences);
    b.append("\nMigrations:\n");
    j.join(b, migrations);
    AppContext.RUN.ui.info(b.toString());
  }
}
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.