本文整理匯總了Java中com.belladati.sdk.dataset.source.DataSourceImport類的典型用法代碼示例。如果您正苦於以下問題:Java DataSourceImport類的具體用法?Java DataSourceImport怎麽用?Java DataSourceImport使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
DataSourceImport類屬於com.belladati.sdk.dataset.source包,在下文中一共展示了DataSourceImport類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getDataSourceImports
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
@Override
public CachedList<DataSourceImport> getDataSourceImports(String id) throws NotFoundException {
CachedList<DataSourceImport> list = dataSourceImportList.get(id);
if (list == null) {
// we don't have this data set's sources in our cache yet
list = new CachedListImpl<DataSourceImport>(this, "api/dataSets/dataSources/" + id + "/executions", "executions") {
@Override
protected DataSourceImport parse(BellaDatiServiceImpl service, JsonNode node) throws ParseException {
try {
return new DataSourceImportImpl(node);
} catch (InvalidDataSourceImportException e) {
throw new ParseException(node, e);
}
}
};
dataSourceImportList.put(id, list);
}
return list;
}
示例2: loadDataSource
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
/** Import is loaded correctly from getService(). */
public void loadDataSource() {
registerSingleImport(
builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval, customIntervalLength));
CachedList<DataSourceImport> imports = getService().getDataSourceImports(dsId);
imports.load();
server.assertRequestUris(importUri);
assertEquals(imports.toList().size(), 1);
DataSourceImport exec = imports.toList().get(0);
assertEquals(exec.getId(), id);
assertEquals(exec.getCallerName(), caller);
Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
expectedImport.set(2012, 3, 16, 10, 17, 26);
expectedImport.set(Calendar.MILLISECOND, 0);
assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
assertTrue(exec.isOverwriting());
}
示例3: loadFromDataSet
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
/** Import is loaded correctly from data source. */
public void loadFromDataSet() {
registerSingleImport(
builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval, customIntervalLength));
DataSource source = new DataSourceImpl(getService(), builder.buildDataSourceNode(dsId, "", ""));
CachedList<DataSourceImport> imports = source.getImports();
imports.load();
server.assertRequestUris(importUri);
assertEquals(imports.toList().size(), 1);
DataSourceImport exec = imports.toList().get(0);
assertEquals(exec.getId(), id);
assertEquals(exec.getCallerName(), caller);
Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
expectedImport.set(2012, 3, 16, 10, 17, 26);
expectedImport.set(Calendar.MILLISECOND, 0);
assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
assertTrue(exec.isOverwriting());
}
示例4: getDataSourceImports
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
@Override
public CachedList<DataSourceImport> getDataSourceImports(String id) throws NotFoundException {
CachedListImpl<DataSourceImport> list = dataSourceImportList.get(id);
if (list == null) {
// we don't have this data set's sources in our cache yet
list = new CachedListImpl<DataSourceImport>(this, "api/dataSets/dataSources/" + id + "/executions", "executions") {
@Override
protected DataSourceImport parse(BellaDatiServiceImpl service, JsonNode node) throws ParseException {
try {
return new DataSourceImportImpl(node);
} catch (InvalidDataSourceImportException e) {
throw new ParseException(node, e);
}
}
};
dataSourceImportList.put(id, list);
}
return list;
}
示例5: loadDataSource
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
/** Import is loaded correctly from service. */
public void loadDataSource() {
CachedList<DataSourceImport> imports = service.getDataSourceImports(dsId);
registerSingleImport(builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval,
customIntervalLength));
imports.load();
server.assertRequestUris(importUri);
assertEquals(imports.toList().size(), 1);
DataSourceImport exec = imports.toList().get(0);
assertEquals(exec.getId(), id);
assertEquals(exec.getCallerName(), caller);
Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
expectedImport.set(2012, 3, 16, 10, 17, 26);
expectedImport.set(Calendar.MILLISECOND, 0);
assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
assertTrue(exec.isOverwriting());
}
示例6: loadFromDataSet
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
/** Import is loaded correctly from data source. */
public void loadFromDataSet() {
DataSource source = new DataSourceImpl(service, builder.buildDataSourceNode(dsId, "", ""));
CachedList<DataSourceImport> imports = source.getImports();
registerSingleImport(builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval,
customIntervalLength));
imports.load();
server.assertRequestUris(importUri);
assertEquals(imports.toList().size(), 1);
DataSourceImport exec = imports.toList().get(0);
assertEquals(exec.getId(), id);
assertEquals(exec.getCallerName(), caller);
Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
expectedImport.set(2012, 3, 16, 10, 17, 26);
expectedImport.set(Calendar.MILLISECOND, 0);
assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
assertTrue(exec.isOverwriting());
}
示例7: dataSourceEquality
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
/** equals/hashcode for imports */
public void dataSourceEquality() throws InvalidDataSourceImportException {
DataSourceImport d1 = new DataSourceImportImpl(
builder.buildSourceImportNode(dsId, caller, lastImport, overwritePolicy, interval, customIntervalLength));
DataSourceImport d2 = new DataSourceImportImpl(builder.buildSourceImportNode(dsId, null, lastImport, null, null));
DataSourceImport d3 = new DataSourceImportImpl(
builder.buildSourceImportNode("other id", caller, lastImport, overwritePolicy, interval, customIntervalLength));
assertEquals(d1, d2);
assertEquals(d1.hashCode(), d2.hashCode());
assertFalse(d1.equals(new Object()));
assertNotEquals(d1, d3);
}
示例8: dataSourceEquality
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
/** equals/hashcode for imports */
public void dataSourceEquality() throws InvalidDataSourceImportException {
DataSourceImport d1 = new DataSourceImportImpl(builder.buildSourceImportNode(dsId, caller, lastImport, overwritePolicy,
interval, customIntervalLength));
DataSourceImport d2 = new DataSourceImportImpl(builder.buildSourceImportNode(dsId, null, lastImport, null, null));
DataSourceImport d3 = new DataSourceImportImpl(builder.buildSourceImportNode("other id", caller, lastImport,
overwritePolicy, interval, customIntervalLength));
assertEquals(d1, d2);
assertEquals(d1.hashCode(), d2.hashCode());
assertNotEquals(d1, d3);
}
示例9: getImports
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
@Override
public CachedList<DataSourceImport> getImports() {
return service.getDataSourceImports(id);
}
示例10: getDataSourceImports
import com.belladati.sdk.dataset.source.DataSourceImport; //導入依賴的package包/類
/**
* Returns the list of import configurations for the data source with the
* given ID. This is a cached list, call
* {@link CachedCollection#loadFirstTime()} to populate it initially.
*
* @param id ID of the data source whose import configurations to load
* @return the list of import configurations for the data source with the
* given ID
* @throws NotFoundException if the ID wasn't found
* @see <a href="http://support.belladati.com/techdoc/GET+Data+Source+Executions">GET Data Source Executions</a>
*/
CachedList<DataSourceImport> getDataSourceImports(String id) throws NotFoundException;