repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
chipKIT32/chipKIT-importer | src/com/microchip/mplab/nbide/embedded/arduino/importer/PlatformFactory.java | // Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/ArduinoConfig.java
// public static final String ROOT_PLATFORM_ARCH = "avr";
//
// Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/ArduinoConfig.java
// public static final String ROOT_PLATFORM_VENDOR = "arduino";
//
// Path: src/com/micro... | import static com.microchip.mplab.nbide.embedded.arduino.importer.ArduinoConfig.ROOT_PLATFORM_ARCH;
import static com.microchip.mplab.nbide.embedded.arduino.importer.ArduinoConfig.ROOT_PLATFORM_VENDOR;
import com.microchip.mplab.nbide.embedded.arduino.importer.pic32.PIC32Platform;
import java.io.FileNotFoundException;
... | return platform;
}
}
return null;
}
public Platform createPlatformFromRootDirectory(Path platformRootPath) throws IOException {
Path platformFilePath = platformRootPath.resolve(PLATFORM_FILENAME);
Platform rootPlatform = createRootPlatform();
... | // Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/ArduinoConfig.java
// public static final String ROOT_PLATFORM_ARCH = "avr";
//
// Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/ArduinoConfig.java
// public static final String ROOT_PLATFORM_VENDOR = "arduino";
//
// Path: src/com/micro... | return new PIC32Platform(rootPlatform, vendor, platformFilePath.getParent()); |
chipKIT32/chipKIT-importer | src/com/microchip/mplab/nbide/embedded/arduino/importer/BoardConfiguration.java | // Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/Board.java
// public static final PathMatcher SOURCE_FILE_MATCHER = FileSystems.getDefault().getPathMatcher("glob:*.{c,cpp,S}");
| import static com.microchip.mplab.nbide.embedded.arduino.importer.Board.SOURCE_FILE_MATCHER;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.u... | if (opt.isPresent()) {
Path variantPath = variantsDirPath.resolve(opt.get());
// If the path does not exist, it might just be because of the letter casing in the variant name
// so go through all directories and compare their lower-case names with lower-case ... | // Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/Board.java
// public static final PathMatcher SOURCE_FILE_MATCHER = FileSystems.getDefault().getPathMatcher("glob:*.{c,cpp,S}");
// Path: src/com/microchip/mplab/nbide/embedded/arduino/importer/BoardConfiguration.java
import static com.microchip.mpl... | .filter(filePath -> SOURCE_FILE_MATCHER.matches(filePath.getFileName())) |
chipKIT32/chipKIT-importer | src/com/microchip/mplab/nbide/embedded/arduino/importer/LibCoreBuilder.java | // Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/CopyingFileVisitor.java
// public class CopyingFileVisitor implements FileVisitor<Path> {
//
// private static final Logger LOGGER = Logger.getLogger(CopyingFileVisitor.class.getName());
//
// protected final CopyOption[] options = new ... | import com.microchip.mplab.nbide.embedded.arduino.utils.CopyingFileVisitor;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer; | getMakefileContents().add( "\t" + boardConfiguration.getValue("recipe.ar.pattern", runtimeData).get() );
});
}
@Override
protected String mapSourceFilePath(Path sourceFilePath) {
if ( sourceDir != null ) {
return sourceFilePath.getFileName().toString();
} el... | // Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/CopyingFileVisitor.java
// public class CopyingFileVisitor implements FileVisitor<Path> {
//
// private static final Logger LOGGER = Logger.getLogger(CopyingFileVisitor.class.getName());
//
// protected final CopyOption[] options = new ... | Files.walkFileTree(sourceDir, new CopyingFileVisitor(sourceDir, buildDirPath)); |
chipKIT32/chipKIT-importer | src/com/microchip/mplab/nbide/embedded/arduino/importer/ArduinoBuilderRunner.java | // Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/DeletingFileVisitor.java
// public class DeletingFileVisitor extends SimpleFileVisitor<Path> {
//
// @Override
// public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
// Files.delete(file);
// r... | import com.microchip.mplab.nbide.embedded.api.LanguageTool;
import com.microchip.mplab.nbide.embedded.arduino.utils.DeletingFileVisitor;
import static com.microchip.mplab.nbide.embedded.arduino.importer.NativeProcessRunner.NO_ERROR_CODE;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileRead... | }
public ArduinoConfig getArduinoPathResolver() {
return arduinoConfig;
}
public GCCToolFinder getToolFinder() {
return toolFinder;
}
public void preprocess(BoardConfiguration boardConfiguration, Path inoFilePath) {
Path tempDirPath = null;
try {
te... | // Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/DeletingFileVisitor.java
// public class DeletingFileVisitor extends SimpleFileVisitor<Path> {
//
// @Override
// public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
// Files.delete(file);
// r... | if (errorCode == NO_ERROR_CODE) { |
chipKIT32/chipKIT-importer | src/com/microchip/mplab/nbide/embedded/arduino/importer/ArduinoBuilderRunner.java | // Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/DeletingFileVisitor.java
// public class DeletingFileVisitor extends SimpleFileVisitor<Path> {
//
// @Override
// public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
// Files.delete(file);
// r... | import com.microchip.mplab.nbide.embedded.api.LanguageTool;
import com.microchip.mplab.nbide.embedded.arduino.utils.DeletingFileVisitor;
import static com.microchip.mplab.nbide.embedded.arduino.importer.NativeProcessRunner.NO_ERROR_CODE;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileRead... | }
}
public List<Path> getMainLibraryPaths() {
return new ArrayList<>(mainLibraryPaths);
}
public List<Path> getAuxLibraryPaths() {
return new ArrayList<>(auxLibraryPaths);
}
public List<Path> getAllLibraryPaths() {
List <Path> ret = new ArrayList<>(main... | // Path: src/com/microchip/mplab/nbide/embedded/arduino/utils/DeletingFileVisitor.java
// public class DeletingFileVisitor extends SimpleFileVisitor<Path> {
//
// @Override
// public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
// Files.delete(file);
// r... | Files.walkFileTree(preprocessDirPath, new DeletingFileVisitor()); |
tingley/tm3 | src/main/java/com/globalsight/ling/tm3/core/AllTusDataHandle.java | // Path: src/main/java/com/globalsight/ling/tm3/core/AbstractDataHandle.java
// abstract class TuIterator implements Iterator<TM3Tu<T>> {
//
// protected Iterator<TM3Tu<T>> currentPage;
// protected long startId = 0;
//
// @Override
// public boolean hasNext() {
// if (currentPage != n... | import java.sql.SQLException;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import com.globalsight.ling.tm3.core.AbstractDataHandle.TuIterator; | } catch (SQLException e) {
throw new TM3Exception(e);
}
}
@Override
public long getTuvCount() throws TM3Exception {
try {
return getTm().getStorageInfo().getTuStorage()
.getTuvCount(getStart(), getEnd());
} catch (SQLException e) {
... | // Path: src/main/java/com/globalsight/ling/tm3/core/AbstractDataHandle.java
// abstract class TuIterator implements Iterator<TM3Tu<T>> {
//
// protected Iterator<TM3Tu<T>> currentPage;
// protected long startId = 0;
//
// @Override
// public boolean hasNext() {
// if (currentPage != n... | class AllTusIterator extends AbstractDataHandle<T>.TuIterator { |
tingley/tm3 | src/test/java/com/globalsight/ling/tm3/core/TM3Tests.java | // Path: src/main/java/com/globalsight/ling/tm3/core/persistence/HibernateConfig.java
// public class HibernateConfig {
//
// public static SessionFactory createSessionFactory(Properties properties) {
// Configuration cfg = extendConfiguration(new Configuration())
// .addProperties(properti... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
import java.sql.SQLException;
i... | }
catch (Exception e) {
currentTransaction.rollback();
throw e;
}
}
// when it's safe to assume at most one tuv per locale
private static <T extends TM3Data> TM3Tuv<T> getLocaleTuv(TM3Tu<T> tu, TM3Locale locale) {
List<TM3Tuv<T>> tuvs = tu... | // Path: src/main/java/com/globalsight/ling/tm3/core/persistence/HibernateConfig.java
// public class HibernateConfig {
//
// public static SessionFactory createSessionFactory(Properties properties) {
// Configuration cfg = extendConfiguration(new Configuration())
// .addProperties(properti... | cfg = HibernateConfig.extendConfiguration(cfg); |
tingley/tm3 | src/main/java/com/globalsight/ling/tm3/core/Trigrammer.java | // Path: src/main/java/com/globalsight/ling/tm3/core/TM3Data.java
// public interface TM3Data {
//
// /**
// * Return the data as a stream of tokens. The fuzzy matching system
// * will bracket this stream with boundary tokens indicating the start
// * and end of the segment.
// *
// ... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.globalsight.ling.tm3.core.TM3Data; | package com.globalsight.ling.tm3.core;
class Trigrammer {
// Start/end of segment boundary
private static final Long BOUNDARY = -1l;
static class Trigram {
long[] fingerprints;
public Trigram(Long fp0, Long fp1, Long fp2) {
fingerprints = new long[3];
fingerpri... | // Path: src/main/java/com/globalsight/ling/tm3/core/TM3Data.java
// public interface TM3Data {
//
// /**
// * Return the data as a stream of tokens. The fuzzy matching system
// * will bracket this stream with boundary tokens indicating the start
// * and end of the segment.
// *
// ... | List<Trigram> getTrigrams(TM3Data data) { |
tingley/tm3 | src/main/java/com/globalsight/ling/tm3/core/persistence/DistributedId.java | // Path: src/main/java/com/globalsight/ling/tm3/core/TM3Exception.java
// public class TM3Exception extends RuntimeException {
// public TM3Exception(String s) {
// super(s);
// }
//
// public TM3Exception(String string, Throwable root) {
// super(string, root);
// }
// ... | import java.sql.ResultSet;
import java.sql.PreparedStatement;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import com.globalsight.ling.tm3.core.TM3Exception;
import com.globalsight.ling.tm3.core.persistence.StatementBuilder; | package com.globalsight.ling.tm3.core.persistence;
/**
* This class should not be public; I need to fix the test setup.
*
* Note that instances of this class are not themselves threadsafe.
*/
public class DistributedId {
private String tableName;
private long nextId = 0;
private long max = 0;
p... | // Path: src/main/java/com/globalsight/ling/tm3/core/TM3Exception.java
// public class TM3Exception extends RuntimeException {
// public TM3Exception(String s) {
// super(s);
// }
//
// public TM3Exception(String string, Throwable root) {
// super(string, root);
// }
// ... | SQLUtil.exec(conn, new StatementBuilder() |
tingley/tm3 | src/main/java/com/globalsight/ling/tm3/core/StorageInfo.java | // Path: src/main/java/com/globalsight/ling/tm3/core/persistence/DistributedId.java
// public class DistributedId {
//
// private String tableName;
// private long nextId = 0;
// private long max = 0;
// private int increment = 100;
//
// public DistributedId(String tableName) {
// thi... | import java.sql.Connection;
import java.sql.SQLException;
import java.util.Set;
import java.util.HashSet;
import java.util.Map;
import org.hibernate.Session;
import com.globalsight.ling.tm3.core.persistence.DistributedId;
import com.globalsight.ling.tm3.core.persistence.StatementBuilder; | package com.globalsight.ling.tm3.core;
/**
* Class that manages the table space for a given TM.
* Since different TM types may have different underlying
* table structures, we must abstract the table access through
* some intermediate mechanism.
*
* The TM3StorageInfo object is used to both create and access... | // Path: src/main/java/com/globalsight/ling/tm3/core/persistence/DistributedId.java
// public class DistributedId {
//
// private String tableName;
// private long nextId = 0;
// private long max = 0;
// private int increment = 100;
//
// public DistributedId(String tableName) {
// thi... | private DistributedId tuIds, tuvIds; |
tingley/tm3 | src/main/java/com/globalsight/ling/tm3/core/StorageInfo.java | // Path: src/main/java/com/globalsight/ling/tm3/core/persistence/DistributedId.java
// public class DistributedId {
//
// private String tableName;
// private long nextId = 0;
// private long max = 0;
// private int increment = 100;
//
// public DistributedId(String tableName) {
// thi... | import java.sql.Connection;
import java.sql.SQLException;
import java.util.Set;
import java.util.HashSet;
import java.util.Map;
import org.hibernate.Session;
import com.globalsight.ling.tm3.core.persistence.DistributedId;
import com.globalsight.ling.tm3.core.persistence.StatementBuilder; | if (tuIds == null) {
tuIds = new DistributedId(getTuTableName());
}
return tuIds;
}
protected DistributedId getTuvIds() {
if (tuvIds == null) {
tuvIds = new DistributedId(getTuvTableName());
}
return tuvIds;
}
// XXX Should this u... | // Path: src/main/java/com/globalsight/ling/tm3/core/persistence/DistributedId.java
// public class DistributedId {
//
// private String tableName;
// private long nextId = 0;
// private long max = 0;
// private int increment = 100;
//
// public DistributedId(String tableName) {
// thi... | StatementBuilder attributeJoinFilter(StatementBuilder sb, |
tingley/tm3 | src/main/java/com/globalsight/ling/tm3/core/AttributeDataHandle.java | // Path: src/main/java/com/globalsight/ling/tm3/core/AbstractDataHandle.java
// abstract class TuIterator implements Iterator<TM3Tu<T>> {
//
// protected Iterator<TM3Tu<T>> currentPage;
// protected long startId = 0;
//
// @Override
// public boolean hasNext() {
// if (currentPage != n... | import java.sql.SQLException;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Date;
import com.globalsight.ling.tm3.core.AbstractDataHandle.TuIterator; | return getTm().getStorageInfo().getTuStorage()
.getTuCountByAttributes(inlineAttrs, customAttrs,
getStart(), getEnd());
} catch (SQLException e) {
throw new TM3Exception(e);
}
}
@Override
public long get... | // Path: src/main/java/com/globalsight/ling/tm3/core/AbstractDataHandle.java
// abstract class TuIterator implements Iterator<TM3Tu<T>> {
//
// protected Iterator<TM3Tu<T>> currentPage;
// protected long startId = 0;
//
// @Override
// public boolean hasNext() {
// if (currentPage != n... | class AttributesTuIterator extends TuIterator { |
gfk-ba/senbot | SenBotRunner/src/test/java/com/gfk/senbot/framework/cucumber/tests/CucumberTestBaseTest.java | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/CucumberTestBase.java
// public class CucumberTestBase {
//
// private static Logger log = LoggerFactory.getLogger(CucumberTestBase.class);
//
// /**
// * Ok, this is an ugly hack so our {@link ParameterizedCucumber} runner extending {@l... | import org.junit.runner.RunWith;
import com.gfk.senbot.framework.cucumber.CucumberTestBase;
import cucumber.api.junit.Cucumber; | package com.gfk.senbot.framework.cucumber.tests;
@RunWith(Cucumber.class)
//@CucumberOptions
@Cucumber.Options(
format={"json", "json:target/test-results/result.json"},
monochrome = true,
glue = {"com.gfk"},
features = "src/test/resources/features",
tags = {"~@ignore", "~@to-implement", "~@random-fa... | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/CucumberTestBase.java
// public class CucumberTestBase {
//
// private static Logger log = LoggerFactory.getLogger(CucumberTestBase.class);
//
// /**
// * Ok, this is an ugly hack so our {@link ParameterizedCucumber} runner extending {@l... | public class CucumberTestBaseTest extends CucumberTestBase { |
gfk-ba/senbot | SenBotRunner/src/test/java/com/gfk/senbot/framework/context/MockScenarioCreationHook.java | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarioGlobals;
import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarionCreationShutdownHook; | package com.gfk.senbot.framework.context;
public class MockScenarioCreationHook implements ScenarionCreationShutdownHook {
public static final String STARTED_ATTRIBUTE_KEY = "STARTED_ATTRIBUTE_KEY";
public static final String STARTED_ATTRIBUTE_VALUE = "STARTED_ATTRIBUTE_VALUE";
public static final String STOPPED... | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | public void scenarionStarted(ScenarioGlobals scenarioGlobals) { |
gfk-ba/senbot | SenBotRunner/src/test/java/com/gfk/senbot/framework/cucumber/stepdefinitions/selenium/SeleniumNavigationStepsTest.java | // Path: SenBotRunner/src/test/java/com/gfkmock/senbot/framework/cucumber/stepdefinitions/MockSeleniumNavigationStepDefinitions.java
// public class MockSeleniumNavigationStepDefinitions extends SeleniumNavigationSteps {
//
// private WebDriver mockDriver;
//
// public MockSeleniumNavigationStepDefinitions(WebDrive... | import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import org.junit.Ignore;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriver.Navigation;
import com.gfkmock.sen... | package com.gfk.senbot.framework.cucumber.stepdefinitions.selenium;
public class SeleniumNavigationStepsTest {
@Test
public void testPageRefresh() {
final WebDriver mockDriver = mock(WebDriver.class);
Navigation navigation = mock(Navigation.class);
when(mockDriver.navigate()).thenRe... | // Path: SenBotRunner/src/test/java/com/gfkmock/senbot/framework/cucumber/stepdefinitions/MockSeleniumNavigationStepDefinitions.java
// public class MockSeleniumNavigationStepDefinitions extends SeleniumNavigationSteps {
//
// private WebDriver mockDriver;
//
// public MockSeleniumNavigationStepDefinitions(WebDrive... | MockSeleniumNavigationStepDefinitions navigationSteps = new MockSeleniumNavigationStepDefinitions(mockDriver); |
gfk-ba/senbot | SenBotRunner/src/test/java/com/gfk/senbot/framework/context/CucumberManagerTest.java | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import java.lang.reflect.InvocationTargetException;
import org.junit.Before;
import org.junit.Test;
import com.gfk.senbot.framework.cucumber... | package com.gfk.senbot.framework.context;
public class CucumberManagerTest {
@Before
public void setup() {
SenBotContext.cleanupSenBot();
}
@Test
public void testStartNewScenario() throws SecurityException, IllegalArgumentException, NoSuchMethodException, ClassNotFoundException, InstantiationException, ... | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | ScenarioGlobals instantiatedScenario = manager.startNewScenario(); |
gfk-ba/senbot | SenBotDemo/src/test/java/com/gfk/senbotdemo/ScenarioCreationHook.java | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | import org.openqa.selenium.By;
import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarioGlobals;
import com.gfk.senbot.framework.cucumber.stepdefinitions.ScenarionCreationShutdownHook;
import cucumber.api.Scenario; | package com.gfk.senbotdemo;
/**
* The {@link ScenarionCreationShutdownHook} specific to the drive framework registering {@link Scenario} scoped
* variables.
*/
public class ScenarioCreationHook implements ScenarionCreationShutdownHook {
public static final By LOADER_INDICATOR = By.id("yourLoaderId");
public s... | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | public void scenarionStarted(ScenarioGlobals scenarioGlobals) { |
gfk-ba/senbot | SenBotRunner/src/main/java/com/gfk/senbot/framework/context/SeleniumManager.java | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | import java.awt.AWTException;
import java.awt.Robot;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lan... | platform,
locale);
seleniumTestEnvironments.add(testEnvironment);
}
}
}
/**
* Check {@link PageFactory} for how these Objects are instantiated using the {@link FindBy} and {@link FindBys} annotations.
* Senbot will cache your ob... | // Path: SenBotRunner/src/main/java/com/gfk/senbot/framework/cucumber/stepdefinitions/ScenarioGlobals.java
// public class ScenarioGlobals {
//
// private static final Logger log = LoggerFactory.getLogger(ScenarioGlobals.class);
// private Map<String, Object> scenarioAttributes = new HashMap<String, Object>();
//... | ScenarioGlobals currentScenarioGlobals = SenBotContext.getSenBotContext().getCucumberManager().getCurrentScenarioGlobals(); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/util/task/AbstractThreadedTask.java | // Path: src/main/java/ch/picard/ppimapbuilder/util/concurrent/ExecutorServiceManager.java
// public class ExecutorServiceManager {
//
// public static final Integer DEFAULT_NB_THREAD = Runtime.getRuntime().availableProcessors()+1;
// protected final Integer maxNumberThread;
//
// private final Set<ExecutorService... | import ch.picard.ppimapbuilder.util.concurrent.ExecutorServiceManager;
import org.cytoscape.work.Task; | package ch.picard.ppimapbuilder.util.task;
public abstract class AbstractThreadedTask implements Task {
private boolean canceled = false; | // Path: src/main/java/ch/picard/ppimapbuilder/util/concurrent/ExecutorServiceManager.java
// public class ExecutorServiceManager {
//
// public static final Integer DEFAULT_NB_THREAD = Runtime.getRuntime().availableProcessors()+1;
// protected final Integer maxNumberThread;
//
// private final Set<ExecutorService... | protected final ExecutorServiceManager executorServiceManager; |
PPiMapBuilder/PPiMapBuilder | src/test/java/ch/picard/ppimapbuilder/util/io/FileUtilTest.java | // Path: src/test/java/ch/picard/ppimapbuilder/TestUtils.java
// public class TestUtils {
//
// private static final boolean deleteAtShutDown = false;
// private static final File baseTestOutputFolder = new File("test-output");
//
// public static File createTestOutputFolder(String preffix) {
// final File testF... | import org.junit.Test;
import java.io.File;
import ch.picard.ppimapbuilder.TestUtils;
import junit.framework.TestCase; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/test/java/ch/picard/ppimapbuilder/TestUtils.java
// public class TestUtils {
//
// private static final boolean deleteAtShutDown = false;
// private static final File baseTestOutputFolder = new File("test-output");
//
// public static File createTestOutputFolder(String preffix) {
// final File testF... | File folder = TestUtils.getBaseTestOutputFolder(); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/protein/UniProtEntry.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTerm;
import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTermSet;
import ch.picard.ppimapbuilder.data.organism.Organism;
import com.eclipsesource.json.JsonObject;
import java.util.*; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | private final GeneOntologyTermSet geneOntologyTerms; |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/protein/UniProtEntry.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTerm;
import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTermSet;
import ch.picard.ppimapbuilder.data.organism.Organism;
import com.eclipsesource.json.JsonObject;
import java.util.*; | getOrCreateSynonymGeneNames().add(synonymGeneName);
return this;
}
public Builder addSynonymGeneNames(Collection<String> synonymGeneNames) {
for (String synonymGeneName : synonymGeneNames)
addSynonymGeneName(synonymGeneName);
return this;
}
public Builder setProteinName(String proteinName) {
... | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | public Builder addGeneOntologyTerms(Collection<GeneOntologyTerm> terms) { |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/protein/UniProtEntrySet.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ortholog/OrthologScoredProtein.java
// public class OrthologScoredProtein extends Protein {
//
// private static final long serialVersionUID = 1L;
//
// private final Double score;
//
// public OrthologScoredProtein(Protein protein, Double score) {
// ... | import java.util.Map;
import java.util.Set;
import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.data.protein.ortholog.OrthologScoredProtein;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.io.Serializable... |
return atLeastOneAdditionMade;
}
public void addOrtholog(Protein entry, List<? extends Protein> orthologs) {
UniProtEntry uniProtEntry = null;
if (entry instanceof UniProtEntry) {
uniProtEntry = (UniProtEntry) entry;
add(uniProtEntry);
} else
uniProtEntry = findByPrimaryAccession(entry.getUniProtId... | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ortholog/OrthologScoredProtein.java
// public class OrthologScoredProtein extends Protein {
//
// private static final long serialVersionUID = 1L;
//
// private final Double score;
//
// public OrthologScoredProtein(Protein protein, Double score) {
// ... | public void addOrthologs(Map<Protein, Map<Organism, List<OrthologScoredProtein>>> orthologs) { |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/field/UniprotSelection.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import ch.picard.ppimapbuilder.ui.util.label.HelpIcon;
import net.miginfocom.swing.MigLayout;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import ja... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | setBorder(PMBUIStyle.fancyPanelBorder); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/field/UniprotSelection.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import ch.picard.ppimapbuilder.ui.util.label.HelpIcon;
import net.miginfocom.swing.MigLayout;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import ja... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | JLabel lblHelpUniprotIdentifiers = new HelpIcon("Please enter Uniprot identifiers (one per line)"); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/field/ReferenceOrganismSelectionPanel.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/label/HelpIcon.java
// public class HelpIcon extends JLabel{
// private static final long serialVersionUID = 1L;
//
// public HelpIcon(String message) {
// super();
// try {
// setIcon(new ImageIcon(HelpIcon.class.getResource("help.png")));
// } catch (... | import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.ui.util.label.HelpIcon;
import net.miginfocom.swing.MigLayout;
import javax.swing.*;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/label/HelpIcon.java
// public class HelpIcon extends JLabel{
// private static final long serialVersionUID = 1L;
//
// public HelpIcon(String message) {
// super();
// try {
// setIcon(new ImageIcon(HelpIcon.class.getResource("help.png")));
// } catch (... | JLabel lblHelpRefOrganism = new HelpIcon("Select here the organism from which the protein you entered come from"); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/ontology/goslim/GOSlimOBOParser.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTerm;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader; | try {
reader = new BufferedReader(new InputStreamReader(inputStream));
String line;
boolean inTerm = false;
String identifier = null;
String term = null;
Character category = null;
while((line = reader.readLine()) != null) {
if(line.contains("[Term]")) {
inTerm = true;
identifier =... | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | set.add(new GeneOntologyTerm(identifier, term, category)); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/util/field/ListDeletableItem.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.ActionListener; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | scrollPane.setViewportBorder(PMBUIStyle.emptyBorder); |
PPiMapBuilder/PPiMapBuilder | src/test/java/ch/picard/ppimapbuilder/data/protein/ortholog/client/cache/loader/InParanoidCacheLoaderTaskFactoryTest.java | // Path: src/test/java/ch/picard/ppimapbuilder/TestUtils.java
// public class TestUtils {
//
// private static final boolean deleteAtShutDown = false;
// private static final File baseTestOutputFolder = new File("test-output");
//
// public static File createTestOutputFolder(String preffix) {
// final File testF... | import java.util.List;
import ch.picard.ppimapbuilder.TestUtils;
import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.data.organism.UserOrganismRepository;
import ch.picard.ppimapbuilder.data.settings.PMBSettings;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/test/java/ch/picard/ppimapbuilder/TestUtils.java
// public class TestUtils {
//
// private static final boolean deleteAtShutDown = false;
// private static final File baseTestOutputFolder = new File("test-output");
//
// public static File createTestOutputFolder(String preffix) {
// final File testF... | testFolderOutput = TestUtils.createTestOutputFolder(InParanoidCacheLoaderTaskFactoryTest.class.getSimpleName()); |
PPiMapBuilder/PPiMapBuilder | src/test/java/ch/picard/ppimapbuilder/data/protein/ortholog/client/cache/loader/InParanoidCacheLoaderTaskFactoryTest.java | // Path: src/test/java/ch/picard/ppimapbuilder/TestUtils.java
// public class TestUtils {
//
// private static final boolean deleteAtShutDown = false;
// private static final File baseTestOutputFolder = new File("test-output");
//
// public static File createTestOutputFolder(String preffix) {
// final File testF... | import java.util.List;
import ch.picard.ppimapbuilder.TestUtils;
import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.data.organism.UserOrganismRepository;
import ch.picard.ppimapbuilder.data.settings.PMBSettings;
import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/test/java/ch/picard/ppimapbuilder/TestUtils.java
// public class TestUtils {
//
// private static final boolean deleteAtShutDown = false;
// private static final File baseTestOutputFolder = new File("test-output");
//
// public static File createTestOutputFolder(String preffix) {
// final File testF... | UserOrganismRepository.getInstance().getOrganismByTaxId(9606), |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/interaction/client/web/PsicquicRequest.java | // Path: src/main/java/ch/picard/ppimapbuilder/util/iterators/EmptyIterator.java
// public class EmptyIterator<T> implements Iterator<T> {
//
// @Override
// public boolean hasNext() {
// return false;
// }
//
// @Override
// public T next() {
// return null;
// }
//
// @Override
// public void remove() ... | import ch.picard.ppimapbuilder.util.concurrent.IteratorRequest;
import ch.picard.ppimapbuilder.util.iterators.EmptyIterator;
import org.hupo.psi.mi.psicquic.wsclient.PsicquicSimpleClient;
import psidev.psi.mi.tab.PsimiTabReader;
import psidev.psi.mi.tab.model.BinaryInteraction;
import java.io.IOException;
import java.u... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/util/iterators/EmptyIterator.java
// public class EmptyIterator<T> implements Iterator<T> {
//
// @Override
// public boolean hasNext() {
// return false;
// }
//
// @Override
// public T next() {
// return null;
// }
//
// @Override
// public void remove() ... | return new EmptyIterator<BinaryInteraction>(); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/util/concurrent/ConcurrentFetcherIterator.java | // Path: src/main/java/ch/picard/ppimapbuilder/util/iterators/IteratorChain.java
// public class IteratorChain<E> implements Iterator<E> {
//
// /**
// * The chain of iterators
// */
// private final Queue<Iterator<? extends E>> iteratorChain = new LinkedList<Iterator<? extends E>>();
//
// /**
// * The curr... | import ch.picard.ppimapbuilder.util.iterators.IteratorChain;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit; | package ch.picard.ppimapbuilder.util.concurrent;
/**
* an Iterator producing a "stream" of object from a list of concurrent iterator requests
* @param <T>
*/
public class ConcurrentFetcherIterator<T> implements Iterator<T> {
private boolean canceled = false; | // Path: src/main/java/ch/picard/ppimapbuilder/util/iterators/IteratorChain.java
// public class IteratorChain<E> implements Iterator<E> {
//
// /**
// * The chain of iterators
// */
// private final Queue<Iterator<? extends E>> iteratorChain = new LinkedList<Iterator<? extends E>>();
//
// /**
// * The curr... | private final IteratorChain<T> innerIterator; |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/interaction/client/web/PsicquicRequestBuilder.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/interaction/client/web/miql/MiQLParameterBuilder.java
// public class MiQLParameterBuilder extends AbstractMiQLQueryElement {
//
// public MiQLParameterBuilder(AbstractMiQLQueryElement value) {
// super(value);
// }
//
// public MiQLParameterBuilder(String val... | import java.util.List;
import java.util.Set;
import ch.picard.ppimapbuilder.data.interaction.client.web.miql.MiQLExpressionBuilder;
import ch.picard.ppimapbuilder.data.interaction.client.web.miql.MiQLParameterBuilder;
import com.google.common.collect.Lists;
import org.hupo.psi.mi.psicquic.wsclient.PsicquicSimpleClient;... | */
public PsicquicRequestBuilder addQuery(final String query) {
for (PsicquicSimpleClient client : clients) {
try {
long count = client.countByQuery(query);
estimatedInteractionsCount += count;
final int numberPages = (int) Math.ceil((double) count / (double) maxResultsPerPages);
for (int page ... | // Path: src/main/java/ch/picard/ppimapbuilder/data/interaction/client/web/miql/MiQLParameterBuilder.java
// public class MiQLParameterBuilder extends AbstractMiQLQueryElement {
//
// public MiQLParameterBuilder(AbstractMiQLQueryElement value) {
// super(value);
// }
//
// public MiQLParameterBuilder(String val... | query.add(new MiQLParameterBuilder("taxidA", taxonId)); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/CustomSplitPane.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.MatteBorder;
import javax.swing.plaf.basic.BasicSplitPaneDivider;
import javax.swing.plaf.basic.BasicSplitPaneUI;
import java.awt.*;
import java.awt.event.FocusEvent;
import java.awt.even... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | g2d.setColor(PMBUIStyle.defaultBorderColor); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/field/DatabaseSelectionPanel.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import java.util.Map.Entry;
import ch.picard.ppimapbuilder.data.interaction.client.web.PsicquicService;
import ch.picard.ppimapbuilder.data.settings.PMBSettings;
import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import ch.picard.ppimapbuilder.ui.util.label.HelpIcon;
import net.miginfocom.swing.MigLayout;
import javax.... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | JLabel lblHelpSourceDatabase = new HelpIcon("Select here the databases from which the interactions will be retrieved"); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/field/DatabaseSelectionPanel.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import java.util.Map.Entry;
import ch.picard.ppimapbuilder.data.interaction.client.web.PsicquicService;
import ch.picard.ppimapbuilder.data.settings.PMBSettings;
import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import ch.picard.ppimapbuilder.ui.util.label.HelpIcon;
import net.miginfocom.swing.MigLayout;
import javax.... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | scrollPaneSourceDatabases.setBorder(PMBUIStyle.fancyPanelBorder); |
PPiMapBuilder/PPiMapBuilder | src/test/java/ch/picard/ppimapbuilder/TestUtils.java | // Path: src/main/java/ch/picard/ppimapbuilder/util/io/FileUtil.java
// public class FileUtil {
// public static void recursiveDelete(File file) {
// if (!file.exists())
// return;
// if (file.isDirectory()) {
// for (File f : file.listFiles()) {
// recursiveDelete(f);
// }
// }
// file.delete();
... | import java.io.File;
import ch.picard.ppimapbuilder.util.io.FileUtil; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/util/io/FileUtil.java
// public class FileUtil {
// public static void recursiveDelete(File file) {
// if (!file.exists())
// return;
// if (file.isDirectory()) {
// for (File f : file.listFiles()) {
// recursiveDelete(f);
// }
// }
// file.delete();
... | FileUtil.recursiveDelete(testFolderOutput); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/field/OtherOrganismSelectionPanel.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import ch.picard.ppimapbuilder.ui.util.label.HelpIcon;
import com.google.common.collect.ImmutableList;
import... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | JLabel lblHelpOtherOrganism = new HelpIcon("Select here the other organism in which you want to search homologous interactions"); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/querywindow/component/panel/field/OtherOrganismSelectionPanel.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import ch.picard.ppimapbuilder.ui.util.label.HelpIcon;
import com.google.common.collect.ImmutableList;
import... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | scrollPaneOtherOrganisms.setViewportBorder(PMBUIStyle.emptyBorder); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/protein/ortholog/client/AbstractProteinOrthologClient.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ProteinUtils.java
// public class ProteinUtils {
//
// public static Set<Protein> newProteins(final Set<String> identifiers, final Organism organism) {
// final Set<Protein> out = new HashSet<Protein>();
// for(String id : identifiers)
// out.add(new ... | import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.data.protein.Protein;
import ch.picard.ppimapbuilder.data.protein.ProteinUtils;
import ch.picard.ppimapbuilder.data.protein.ortholog.OrthologGroup;
import ch.picard.ppimapbuilder.data.protein.ortholog.OrthologScoredProtein;
import jav... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ProteinUtils.java
// public class ProteinUtils {
//
// public static Set<Protein> newProteins(final Set<String> identifiers, final Organism organism) {
// final Set<Protein> out = new HashSet<Protein>();
// for(String id : identifiers)
// out.add(new ... | public List<OrthologScoredProtein> getOrtholog(Protein protein, Organism organism, Double score) throws Exception { |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/protein/ortholog/client/AbstractProteinOrthologClient.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ProteinUtils.java
// public class ProteinUtils {
//
// public static Set<Protein> newProteins(final Set<String> identifiers, final Organism organism) {
// final Set<Protein> out = new HashSet<Protein>();
// for(String id : identifiers)
// out.add(new ... | import ch.picard.ppimapbuilder.data.organism.Organism;
import ch.picard.ppimapbuilder.data.protein.Protein;
import ch.picard.ppimapbuilder.data.protein.ProteinUtils;
import ch.picard.ppimapbuilder.data.protein.ortholog.OrthologGroup;
import ch.picard.ppimapbuilder.data.protein.ortholog.OrthologScoredProtein;
import jav... | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ProteinUtils.java
// public class ProteinUtils {
//
// public static Set<Protein> newProteins(final Set<String> identifiers, final Organism organism) {
// final Set<Protein> out = new HashSet<Protein>();
// for(String id : identifiers)
// out.add(new ... | if (group == null && !ProteinUtils.UniProtId.isStrict(protein.getUniProtId())) { |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/organism/OrganismUtils.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/Pair.java
// public class Pair<T> implements Comparable<Pair<T>> {
//
// private final T first;
// private final T second;
//
// public Pair(List<T> elems) {
// this(elems.get(0), elems.get(1));
// }
//
// public Pair(T first, T second) {
// this.first = f... | import ch.picard.ppimapbuilder.data.Pair;
import ch.picard.ppimapbuilder.data.PairUtils;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/Pair.java
// public class Pair<T> implements Comparable<Pair<T>> {
//
// private final T first;
// private final T second;
//
// public Pair(List<T> elems) {
// this(elems.get(0), elems.get(1));
// }
//
// public Pair(T first, T second) {
// this.first = f... | public static Set<Pair<Organism>> createCombinations(List<Organism> organisms) { |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/organism/OrganismUtils.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/Pair.java
// public class Pair<T> implements Comparable<Pair<T>> {
//
// private final T first;
// private final T second;
//
// public Pair(List<T> elems) {
// this(elems.get(0), elems.get(1));
// }
//
// public Pair(T first, T second) {
// this.first = f... | import ch.picard.ppimapbuilder.data.Pair;
import ch.picard.ppimapbuilder.data.PairUtils;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/Pair.java
// public class Pair<T> implements Comparable<Pair<T>> {
//
// private final T first;
// private final T second;
//
// public Pair(List<T> elems) {
// this(elems.get(0), elems.get(1));
// }
//
// public Pair(T first, T second) {
// this.first = f... | return PairUtils.createCombinations(new HashSet<Organism>(organisms), false, true); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/interaction/client/web/filter/ProgressMonitoringInteractionFilter.java | // Path: src/main/java/ch/picard/ppimapbuilder/util/ProgressMonitor.java
// public interface ProgressMonitor {
// public void setProgress(double v);
// }
| import ch.picard.ppimapbuilder.util.ProgressMonitor;
import psidev.psi.mi.tab.model.BinaryInteraction; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/util/ProgressMonitor.java
// public interface ProgressMonitor {
// public void setProgress(double v);
// }
// Path: src/main/java/ch/picard/ppimapbuilder/data/interaction/client/web/filter/ProgressMonitoringInteractionFilter.java
import ch.picard.ppimapbuilder.util.Prog... | private final ProgressMonitor progressMonitor; |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/interaction/client/web/filter/UniProtInteractorFilter.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ProteinUtils.java
// public class ProteinUtils {
//
// public static Set<Protein> newProteins(final Set<String> identifiers, final Organism organism) {
// final Set<Protein> out = new HashSet<Protein>();
// for(String id : identifiers)
// out.add(new ... | import ch.picard.ppimapbuilder.data.protein.ProteinUtils;
import psidev.psi.mi.tab.model.CrossReference;
import psidev.psi.mi.tab.model.Interactor;
import java.util.ArrayList;
import java.util.List; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder is... | // Path: src/main/java/ch/picard/ppimapbuilder/data/protein/ProteinUtils.java
// public class ProteinUtils {
//
// public static Set<Protein> newProteins(final Set<String> identifiers, final Organism organism) {
// final Set<Protein> out = new HashSet<Protein>();
// for(String id : identifiers)
// out.add(new ... | ProteinUtils.UniProtId.isValid(ref.getIdentifier()) // Valid UniProt |
PPiMapBuilder/PPiMapBuilder | src/test/java/ch/picard/ppimapbuilder/data/ontology/goslim/GOSlimOBOParserTest.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTerm;
import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTermSet;
import junit.framework.Assert;
import org.junit.Test;
import java.io.InputStream; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | expected.add(new GeneOntologyTerm("GO:0005975", "carbohydrate metabolic process", 'P')); |
PPiMapBuilder/PPiMapBuilder | src/test/java/ch/picard/ppimapbuilder/data/ontology/goslim/GOSlimOBOParserTest.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTerm;
import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTermSet;
import junit.framework.Assert;
import org.junit.Test;
import java.io.InputStream; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTerm.java
// public class GeneOntologyTerm extends OntologyTerm implements JSONable, Serializable {
//
// private static final long serialVersionUID = 1L;
//
// private final String term;
// private final GeneOntologyCategory category;
// pu... | GeneOntologyTermSet actual = GOSlimOBOParser.parseOBOFile(oboFile, "oboFileTest"); |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/data/ontology/goslim/GOSlimRepository.java | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTermSet.java
// public class GeneOntologyTermSet extends HashSet<GeneOntologyTerm> {
//
// private static final long serialVersionUID = 1L;
//
// public GeneOntologyTermSet() {
// super();
// }
//
// public GeneOntologyTermSet(Collection<... | import ch.picard.ppimapbuilder.data.ontology.GeneOntologyTermSet;
import ch.picard.ppimapbuilder.data.settings.PMBSettings;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map; | /*
* This file is part of PPiMapBuilder.
*
* PPiMapBuilder is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PPiMapBuilder... | // Path: src/main/java/ch/picard/ppimapbuilder/data/ontology/GeneOntologyTermSet.java
// public class GeneOntologyTermSet extends HashSet<GeneOntologyTerm> {
//
// private static final long serialVersionUID = 1L;
//
// public GeneOntologyTermSet() {
// super();
// }
//
// public GeneOntologyTermSet(Collection<... | public GeneOntologyTermSet getGOSlim(String name) { |
PPiMapBuilder/PPiMapBuilder | src/main/java/ch/picard/ppimapbuilder/ui/util/tabpanel/TabButton.java | // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | import ch.picard.ppimapbuilder.ui.util.FocusPropagator;
import ch.picard.ppimapbuilder.ui.util.PMBUIStyle;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.border.CompoundBorder;
import javax.swing.border.MatteBorder;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener; | package ch.picard.ppimapbuilder.ui.util.tabpanel;
class TabButton<T extends TabContent> extends JButton implements FocusListener {
private final boolean first;
private boolean active = false;
private boolean focused = true;
| // Path: src/main/java/ch/picard/ppimapbuilder/ui/util/PMBUIStyle.java
// public class PMBUIStyle {
//
// private static Color defaultPanelColor = UIManager.getColor("Panel.background");
// private static float hsbVals[] = Color.RGBtoHSB(
// defaultPanelColor.getRed(),
// defaultPanelColor.getGreen(),
// de... | private Border bottomBorder = new MatteBorder(0, 0, 1, 0, PMBUIStyle.defaultBorderColor); |
spotify/dns-java | src/main/java/com/spotify/dns/MeteredDnsSrvResolver.java | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | import static com.google.common.base.Throwables.throwIfUnchecked;
import static java.util.Objects.requireNonNull;
import com.spotify.dns.statistics.DnsReporter;
import com.spotify.dns.statistics.DnsTimingContext;
import java.util.List;
import java.util.concurrent.CompletionStage; | /*
* Copyright (c) 2015 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | private final DnsReporter reporter; |
spotify/dns-java | src/main/java/com/spotify/dns/MeteredDnsSrvResolver.java | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | import static com.google.common.base.Throwables.throwIfUnchecked;
import static java.util.Objects.requireNonNull;
import com.spotify.dns.statistics.DnsReporter;
import com.spotify.dns.statistics.DnsTimingContext;
import java.util.List;
import java.util.concurrent.CompletionStage; | /*
* Copyright (c) 2015 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | final DnsTimingContext resolveTimer = reporter.resolveTimer(); |
spotify/dns-java | src/main/java/com/spotify/dns/DnsSrvResolvers.java | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | import static java.util.concurrent.TimeUnit.HOURS;
import static java.util.concurrent.TimeUnit.SECONDS;
import com.spotify.dns.statistics.DnsReporter;
import java.net.UnknownHostException;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.concurrent.ForkJoinPool;
i... | /*
* Copyright (c) 2015 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | private final DnsReporter reporter; |
spotify/dns-java | src/test/java/com/spotify/dns/RetainingDnsSrvResolverTest.java | // Path: src/test/java/com/spotify/dns/DnsTestUtil.java
// static List<LookupResult> nodes(String... nodeNames) {
// return Stream.of(nodeNames)
// .map(input -> LookupResult.create(input, 8080, 1, 2, 999))
// .collect(Collectors.toList());
// }
| import org.junit.rules.ExpectedException;
import static com.spotify.dns.DnsTestUtil.nodes;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.... | /*
* Copyright (c) 2015 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | // Path: src/test/java/com/spotify/dns/DnsTestUtil.java
// static List<LookupResult> nodes(String... nodeNames) {
// return Stream.of(nodeNames)
// .map(input -> LookupResult.create(input, 8080, 1, 2, 999))
// .collect(Collectors.toList());
// }
// Path: src/test/java/com/spotify/dns/RetainingDnsSrvReso... | nodes1 = nodes("noden1", "noden2"); |
spotify/dns-java | src/test/java/com/spotify/dns/DnsSrvResolversIT.java | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.isA;
import static org.mockito.Mockito.mock... | }
@Test
public void shouldReturnResultsForValidQuery() throws ExecutionException, InterruptedException {
assertThat(resolver.resolve("_spotify-client._tcp.spotify.com").isEmpty(), is(false));
assertThat(resolver.resolveAsync("_spotify-client._tcp.spotify.com").toCompletableFuture().get().isEmpty(), is(fa... | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | final DnsReporter reporter = mock(DnsReporter.class); |
spotify/dns-java | src/test/java/com/spotify/dns/DnsSrvResolversIT.java | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.isA;
import static org.mockito.Mockito.mock... |
@Test
public void shouldReturnResultsForValidQuery() throws ExecutionException, InterruptedException {
assertThat(resolver.resolve("_spotify-client._tcp.spotify.com").isEmpty(), is(false));
assertThat(resolver.resolveAsync("_spotify-client._tcp.spotify.com").toCompletableFuture().get().isEmpty(), is(false)... | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | final DnsTimingContext timingReporter = mock(DnsTimingContext.class); |
spotify/dns-java | src/test/java/com/spotify/dns/MeteredDnsSrvResolverTest.java | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.spotify.dns.stat... | /*
* Copyright (c) 2015 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | private DnsReporter reporter; |
spotify/dns-java | src/test/java/com/spotify/dns/MeteredDnsSrvResolverTest.java | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import com.spotify.dns.stat... | /*
* Copyright (c) 2015 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | // Path: src/main/java/com/spotify/dns/statistics/DnsReporter.java
// public interface DnsReporter {
// /**
// * Report resolve timing.
// * @return A new timing context.
// */
// DnsTimingContext resolveTimer();
//
// /**
// * Report that an empty response has been received from a resolve.
// */
... | private DnsTimingContext timingReporter; |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithJunitRule.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
/**
*
* @author Jeremy Sevellec
*
*/
public class CQLDataLoadTestWithJunitRule {
@Rule | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("cql/simple.cql", "mykeyspace")); |
jsevellec/cassandra-unit | cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/AbstractCQLDataSet.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import org.cassandraunit.dataset.CQLDataSet;
import org.cassandraunit.dataset.ParseException;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.List;
import java.util.stream.Collectors; | package org.cassandraunit.dataset.cql;
/**
* @author Jeremy Sevellec
*/
public abstract class AbstractCQLDataSet implements CQLDataSet {
public static final String END_OF_STATEMENT_DELIMITER = ";";
private String dataSetLocation = null;
private String keyspaceName = null;
private boolean keyspaceC... | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | throw new ParseException("Dataset not found"); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithMultiLineCQLStatements.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
/**
*
* @author Jeremy Sevellec
*
*/
public class CQLDataLoadTestWithMultiLineCQLStatements {
@Rule | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("cql/multiLineStatements.cql", "mykeyspace")); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithNoKeyspaceDeletion.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
public class CQLDataLoadTestWithNoKeyspaceDeletion {
@Rule | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("cql/simple.cql", true, false, "mykeyspace")); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/dataset/cql/ClasspathCQLDataSetTest.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import org.cassandraunit.dataset.CQLDataSet;
import org.cassandraunit.dataset.ParseException;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; | package org.cassandraunit.dataset.cql;
/**
* @author Jeremy Sevellec
*/
public class ClasspathCQLDataSetTest {
@Test
public void shouldGetACQLDataSet() {
| // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | CQLDataSet dataSet = new ClassPathCQLDataSet("cql/simple.cql"); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/dataset/cql/ClasspathCQLDataSetTest.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import org.cassandraunit.dataset.CQLDataSet;
import org.cassandraunit.dataset.ParseException;
import org.junit.Test;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; | package org.cassandraunit.dataset.cql;
/**
* @author Jeremy Sevellec
*/
public class ClasspathCQLDataSetTest {
@Test
public void shouldGetACQLDataSet() {
CQLDataSet dataSet = new ClassPathCQLDataSet("cql/simple.cql");
assertThat(dataSet, notNullValue());
}
@Test
public void s... | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | } catch (ParseException e) { |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithReadTimeout.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
/**
*
* @author Jeremy Sevellec
*
*/
public class CQLDataLoadTestWithReadTimeout {
private static final int READ_TIMEOUT_VALUE = 15000;
@Rule | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("cql/simple.cql", |
jsevellec/cassandra-unit | cassandra-unit/src/main/java/org/cassandraunit/CQLDataLoader.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import com.datastax.oss.driver.api.core.CqlSession;
import org.cassandraunit.dataset.CQLDataSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.cassandraunit.utils.CqlOperations.*; | package org.cassandraunit;
/**
* @author Marcin Szymaniuk
* @author Jeremy Sevellec
*/
public class CQLDataLoader {
private static final Logger log = LoggerFactory.getLogger(CQLDataLoader.class);
public static final String DEFAULT_KEYSPACE_NAME = "cassandraunitkeyspace";
public CqlSession getSession... | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | public void load(CQLDataSet dataSet) { |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithBlankLineEndings.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
/**
*
* @author Laurent Liger
*
*/
public class CQLDataLoadTestWithBlankLineEndings {
@Rule | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("cql/statementsWithBlankEndings.cql", "mykeyspace")); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithClassInheritance.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.CQLDataSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
/**
*
* @author Marcin Szymaniuk
* @author Jeremy Sevellec
*
*/
public class CQLDataLoadTestWithClassInheritance extends AbstractCassandraUnit4CQLTestCase {
@Override | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | public CQLDataSet getDataSet() { |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithClassInheritance.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.CQLDataSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
/**
*
* @author Marcin Szymaniuk
* @author Jeremy Sevellec
*
*/
public class CQLDataLoadTestWithClassInheritance extends AbstractCassandraUnit4CQLTestCase {
@Override
public CQLDataSet getDataSet() { | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | return new ClassPathCQLDataSet("cql/simple.cql", "mykeyspace"); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/CQLDataLoadTestWithNoKeyspaceCreation.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | import com.datastax.oss.driver.api.core.cql.ResultSet;
import org.cassandraunit.dataset.cql.ClassPathCQLDataSet;
import org.junit.Rule;
import org.junit.Test;
import static org.junit.Assert.assertEquals; | package org.cassandraunit;
/**
*
* @author Jeremy Sevellec
*
*/
public class CQLDataLoadTestWithNoKeyspaceCreation {
@Rule | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/cql/ClassPathCQLDataSet.java
// public class ClassPathCQLDataSet extends AbstractCQLDataSet implements CQLDataSet {
//
// public ClassPathCQLDataSet(String dataSetLocation) {
// super(dataSetLocation, true, true, null);
// }
//
// pub... | public CassandraCQLUnit cassandraCQLUnit = new CassandraCQLUnit(new ClassPathCQLDataSet("cql/simpleWithKeyspaceCreation.cql", false, "mykeyspace")); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/dataset/cql/FileCQLDataSetTest.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import org.cassandraunit.dataset.AbstractFileDataSetTest;
import org.cassandraunit.dataset.CQLDataSet;
import org.cassandraunit.dataset.ParseException;
import org.junit.Test;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; | package org.cassandraunit.dataset.cql;
/**
*
* @author Jeremy Sevellec
*
*/
public class FileCQLDataSetTest extends AbstractFileDataSetTest {
@Override
public String getDataSetClasspathRessource() {
return "/cql/simple.cql";
}
@Test
public void shouldGetACQLDataSet() {
| // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | CQLDataSet dataSet = new FileCQLDataSet(super.targetDataSetPathFileName); |
jsevellec/cassandra-unit | cassandra-unit/src/test/java/org/cassandraunit/dataset/cql/FileCQLDataSetTest.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | import org.cassandraunit.dataset.AbstractFileDataSetTest;
import org.cassandraunit.dataset.CQLDataSet;
import org.cassandraunit.dataset.ParseException;
import org.junit.Test;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; | package org.cassandraunit.dataset.cql;
/**
*
* @author Jeremy Sevellec
*
*/
public class FileCQLDataSetTest extends AbstractFileDataSetTest {
@Override
public String getDataSetClasspathRessource() {
return "/cql/simple.cql";
}
@Test
public void shouldGetACQLDataSet() {
CQLDataSet dataSet = new File... | // Path: cassandra-unit/src/main/java/org/cassandraunit/dataset/CQLDataSet.java
// public interface CQLDataSet {
//
// List<String> getCQLStatements();
//
// String getKeyspaceName();
//
// boolean isKeyspaceCreation();
//
// boolean isKeyspaceDeletion();
// }
//
// Path: cassandra-unit/src/main/ja... | } catch (ParseException e) { |
jsevellec/cassandra-unit | cassandra-unit/src/main/java/org/cassandraunit/cli/CassandraUnitCommandLineLoader.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/CQLDataLoader.java
// public class CQLDataLoader {
//
// private static final Logger log = LoggerFactory.getLogger(CQLDataLoader.class);
// public static final String DEFAULT_KEYSPACE_NAME = "cassandraunitkeyspace";
//
// public CqlSession getSession... | import com.datastax.oss.driver.api.core.CqlSession;
import org.apache.commons.cli.*;
import org.apache.commons.lang3.StringUtils;
import org.cassandraunit.CQLDataLoader;
import org.cassandraunit.dataset.cql.FileCQLDataSet;
import java.net.InetSocketAddress; | exit = true;
}
return exit;
}
protected static void load() {
System.out.println("Start Loading...");
String host = commandLine.getOptionValue("h");
String port = commandLine.getOptionValue("p");
String file = commandLine.getOptionValue("f");
... | // Path: cassandra-unit/src/main/java/org/cassandraunit/CQLDataLoader.java
// public class CQLDataLoader {
//
// private static final Logger log = LoggerFactory.getLogger(CQLDataLoader.class);
// public static final String DEFAULT_KEYSPACE_NAME = "cassandraunitkeyspace";
//
// public CqlSession getSession... | CQLDataLoader dataLoader = new CQLDataLoader(session); |
jsevellec/cassandra-unit | cassandra-unit/src/main/java/org/cassandraunit/cli/CassandraUnitCommandLineLoader.java | // Path: cassandra-unit/src/main/java/org/cassandraunit/CQLDataLoader.java
// public class CQLDataLoader {
//
// private static final Logger log = LoggerFactory.getLogger(CQLDataLoader.class);
// public static final String DEFAULT_KEYSPACE_NAME = "cassandraunitkeyspace";
//
// public CqlSession getSession... | import com.datastax.oss.driver.api.core.CqlSession;
import org.apache.commons.cli.*;
import org.apache.commons.lang3.StringUtils;
import org.cassandraunit.CQLDataLoader;
import org.cassandraunit.dataset.cql.FileCQLDataSet;
import java.net.InetSocketAddress; | }
return exit;
}
protected static void load() {
System.out.println("Start Loading...");
String host = commandLine.getOptionValue("h");
String port = commandLine.getOptionValue("p");
String file = commandLine.getOptionValue("f");
String fileExtension = S... | // Path: cassandra-unit/src/main/java/org/cassandraunit/CQLDataLoader.java
// public class CQLDataLoader {
//
// private static final Logger log = LoggerFactory.getLogger(CQLDataLoader.class);
// public static final String DEFAULT_KEYSPACE_NAME = "cassandraunitkeyspace";
//
// public CqlSession getSession... | dataLoader.load(new FileCQLDataSet(file)); |
Xiaofei-it/Shelly | app/src/main/java/xiaofei/library/shellytest/MainActivity.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import retrofit2.Response;
import retrofit2.Retrofit;
import xiaofei.library.shelly.Shelly;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import java.io.IOException;
import okhttp... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | Shelly.register(this); |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/operator/MapOperator2.java | // Path: shelly/src/main/java/xiaofei/library/shelly/function/Function2.java
// public interface Function2<T, R, S> extends Function {
// S call(T input1, R input2);
// }
//
// Path: shelly/src/main/java/xiaofei/library/shelly/util/TargetCenter.java
// public class TargetCenter {
//
// private static volatile... | import java.util.concurrent.CopyOnWriteArrayList;
import xiaofei.library.shelly.function.Function2;
import xiaofei.library.shelly.util.TargetCenter; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/function/Function2.java
// public interface Function2<T, R, S> extends Function {
// S call(T input1, R input2);
// }
//
// Path: shelly/src/main/java/xiaofei/library/shelly/util/TargetCenter.java
// public class TargetCenter {
//
// private static volatile... | private Function2<? super U, ? super T, ? extends R> map; |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/util/TaskFunction.java | // Path: shelly/src/main/java/xiaofei/library/shelly/function/Function1.java
// public interface Function1<T, R> extends Function {
// R call(T input);
// }
//
// Path: shelly/src/main/java/xiaofei/library/shelly/function/Function2.java
// public interface Function2<T, R, S> extends Function {
// S call(T inpu... | import xiaofei.library.concurrentutils.ObjectCanary;
import xiaofei.library.concurrentutils.util.Action;
import xiaofei.library.concurrentutils.util.Condition;
import xiaofei.library.concurrentutils.util.Function;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.Function2;
import... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/function/Function1.java
// public interface Function1<T, R> extends Function {
// R call(T input);
// }
//
// Path: shelly/src/main/java/xiaofei/library/shelly/function/Function2.java
// public interface Function2<T, R, S> extends Function {
// S call(T inpu... | private Function2<T, R1, R2> mFunc1; |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test01.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction1; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | Shelly.register(new A(1)); |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test01.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction1; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .perform(new Action0() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test01.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction1; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .perform(new Action1<String>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test01.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction1; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .perform(A.class, new TargetAction1<A, String>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test01.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction1; | public void g(String s) {
System.out.println("A " + i + " g " + s);
}
}
private static class B {
}
@Test
public void case01() {
Shelly.register(new A(1));
Shelly.register(new A(2));
Shelly.<String>createDomino("case01")
.perform(ne... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .map(new Function1<String, String>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test05.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.Function2; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | Shelly.<String>createDomino(1) |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test05.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.Function2; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .perform(new Action1<String>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test05.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.Function2; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .map(new Function1<String, String>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test05.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.Function2; | } catch (InterruptedException e) {
}
return input.charAt(0) - 'A';
}
})
.commit();
Shelly.<String>createDomino(6)
.newThread()
.perform(new Action1<String>... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | new Function2<Integer, Boolean, String>() { |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/domino/TaskDomino.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.f... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | perform(Shelly.<Triple<Boolean, R, U>>createAnonymousDomino() |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/domino/TaskDomino.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.f... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .reduce(new Function1<List<Triple<Boolean, R, U>>, List<R>>() { |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/domino/TaskDomino.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.f... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .flatMap(new ListIdentityOperator<R>()) |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/domino/TaskDomino.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.f... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | public <S> TaskDomino<T, R, U> onSuccess(final Class<? extends S> target, final TargetAction0<? super S> targetAction0) { |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/domino/TaskDomino.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.f... | reduce(new ListIdentityOperator<Triple<Boolean, R, U>>())
.perform(target, new TargetAction1<S, List<Triple<Boolean, R, U>>>() {
@Override
public void call(S s, List<Triple<Boolean, R, U>> input) {
boolean success = false;
... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | public TaskDomino<T, R, U> onSuccess(final Action0 action0) { |
Xiaofei-it/Shelly | shelly/src/main/java/xiaofei/library/shelly/domino/TaskDomino.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.f... | public void call(S s, List<Triple<Boolean, R, U>> input) {
boolean success = false;
for (Triple<Boolean, R, U> triple : input) {
if (triple.first) {
success = true;
... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .perform(new Action1<List<Triple<Boolean, R, U>>>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test06.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.concurrent.TimeUnit;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.function.TargetAction1;
import xiaofei.li... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | Shelly.register(new A()); |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test06.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.concurrent.TimeUnit;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.function.TargetAction1;
import xiaofei.li... | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .beginTask(new Task<String, Character, Integer>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test06.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.concurrent.TimeUnit;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.function.TargetAction1;
import xiaofei.li... | public void testTask() {
class A {
public void f(Character s) {
System.out.println("A f: " + Thread.currentThread().getName() + " " + s);
}
public void g(int s) {
System.out.println("A g: " + Thread.currentThread().getName() + " " + s);
... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .perform(new Action1<Character>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test06.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.concurrent.TimeUnit;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.function.TargetAction1;
import xiaofei.li... | }
}
Shelly.register(new A());
Shelly.<String>createDomino(1)
.beginTask(new Task<String, Character, Integer>() {
@Override
protected void onExecute(String input) {
System.out.println("1: " + Thread.curren... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .onSuccess(new Action0() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test06.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.concurrent.TimeUnit;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.function.TargetAction1;
import xiaofei.li... | System.out.println("2: " + Thread.currentThread().getName() + " " + input);
if (input.length() == 1) {
notifySuccess(input.charAt(0));
} else {
notifyFailure(input.charAt(0) - 'A');
... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .onSuccess(A.class, new TargetAction0<A>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test06.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.concurrent.TimeUnit;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action0;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.TargetAction0;
import xiaofei.library.shelly.function.TargetAction1;
import xiaofei.li... | })
.background()
.onSuccess(A.class, new TargetAction0<A>() {
@Override
public void call(A a) {
System.out.println("6: " + Thread.currentThread().getName());
a.f('T');
... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .onSuccess(A.class, new TargetAction1<A, Character>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test04.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | Shelly.<String>createDomino(1) |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test04.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .perform(new Action1<String>() { |
Xiaofei-it/Shelly | shelly/src/test/java/xiaofei/library/shelly/domino/Test04.java | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import xiaofei.library.shelly.Shelly;
import xiaofei.library.shelly.function.Action1;
import xiaofei.library.shelly.function.Function1; | /**
*
* Copyright 2016 Xiaofei
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | // Path: shelly/src/main/java/xiaofei/library/shelly/Shelly.java
// public class Shelly {
//
// private static final TargetCenter TARGET_CENTER = TargetCenter.getInstance();
//
// private static final DominoCenter DOMINO_CENTER = DominoCenter.getInstance();
//
// public static void register(Object object... | .flatMap(new Function1<String, List<Integer>>() { |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.