本文整理汇总了Java中org.md2k.datakitapi.source.METADATA类的典型用法代码示例。如果您正苦于以下问题:Java METADATA类的具体用法?Java METADATA怎么用?Java METADATA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
METADATA类属于org.md2k.datakitapi.source包,在下文中一共展示了METADATA类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createDataSourceBuilderDayStart
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderDayStart() {
Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.DAY_START).setPlatform(platform);
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Day Start");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when day started");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Day Start");
dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
dataDescriptor.put(METADATA.UNIT, "millisecond");
dataDescriptor.put(METADATA.DESCRIPTION, "Contains day start time in millisecond");
dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
dataDescriptors.add(dataDescriptor);
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:DayStartEndInfoManager.java
示例2: createDataSourceBuilderDayEnd
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderDayEnd() {
Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.DAY_END).setPlatform(platform);
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Day End");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when day ended");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Day End");
dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
dataDescriptor.put(METADATA.UNIT, "millisecond");
dataDescriptor.put(METADATA.DESCRIPTION, "Contains day end time in millisecond");
dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
dataDescriptors.add(dataDescriptor);
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:DayStartEndInfoManager.java
示例3: createDataSourceBuilderStudyStart
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderStudyStart() {
Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.STUDY_START).setPlatform(platform);
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Study Start");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when study started");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Study Start");
dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
dataDescriptor.put(METADATA.UNIT, "millisecond");
dataDescriptor.put(METADATA.DESCRIPTION, "Contains study start time in millisecond");
dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
dataDescriptors.add(dataDescriptor);
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:StudyStartEndInfoManager.java
示例4: createDataSourceBuilderStudyEnd
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
private DataSourceBuilder createDataSourceBuilderStudyEnd() {
Platform platform = new PlatformBuilder().setType(PlatformType.PHONE).build();
DataSourceBuilder dataSourceBuilder = new DataSourceBuilder().setType(DataSourceType.STUDY_END).setPlatform(platform);
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Study End");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents when study ended");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeLong.class.getName());
ArrayList<HashMap<String, String>> dataDescriptors = new ArrayList<>();
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Study End");
dataDescriptor.put(METADATA.MIN_VALUE, String.valueOf(0));
dataDescriptor.put(METADATA.MAX_VALUE, String.valueOf(Long.MAX_VALUE));
dataDescriptor.put(METADATA.UNIT, "millisecond");
dataDescriptor.put(METADATA.DESCRIPTION, "Contains study end time in millisecond");
dataDescriptor.put(METADATA.DATA_TYPE, long.class.getName());
dataDescriptors.add(dataDescriptor);
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(dataDescriptors);
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:19,代码来源:StudyStartEndInfoManager.java
示例5: readDataSourceFromFile
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
private void readDataSourceFromFile(){
try {
Log.d(TAG, "readDataSourceFromFile()...");
ArrayList<DataSource> dataSources = Configuration.getDataSources();
if(dataSources==null) throw new FileNotFoundException();
Log.d(TAG, "readDataSourceFromFile() .. datasource_size=" + dataSources.size());
for (int i = 0; i < dataSources.size(); i++) {
String deviceId = dataSources.get(i).getPlatform().getMetadata().get(METADATA.DEVICE_ID);
String platformId = dataSources.get(i).getPlatform().getId();
MicrosoftBand microsoftBand = find(deviceId);
if (microsoftBand == null) {
microsoftBand = new MicrosoftBand(context, platformId,deviceId);
microsoftBands.add(microsoftBand);
}
microsoftBand.setEnabled(true);
microsoftBand.setEnabled(dataSources.get(i), true);
}
} catch (FileNotFoundException e) {
Toast.makeText(context,"Microsoft Band is not configured",Toast.LENGTH_LONG).show();
}
Log.d(TAG,"...readDataSourceFromFile()");
}
开发者ID:MD2Korg,项目名称:mCerebrum-MicrosoftBand,代码行数:23,代码来源:MicrosoftBands.java
示例6: addPreferenceScreenSensors
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
protected void addPreferenceScreenSensors() {
ArrayList<DataSource> dataSources = null;
try {
dataSources = Configuration.getDataSources();
} catch (FileNotFoundException e) {
return;
}
String dataSourceType, platformId, dataSourceId, platformType, deviceId;
PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("dataSourceType");
preferenceCategory.removeAll();
for (int i = 0; i < dataSources.size(); i++) {
platformId = dataSources.get(i).getPlatform().getId();
dataSourceType = dataSources.get(i).getType();
dataSourceId = dataSources.get(i).getId();
platformType = dataSources.get(i).getPlatform().getType();
deviceId = dataSources.get(i).getPlatform().getMetadata().get(METADATA.DEVICE_ID);
Preference preference = createPreference(dataSourceType, dataSourceId, platformType, platformId, deviceId);
preferenceCategory.addPreference(preference);
}
}
开发者ID:MD2Korg,项目名称:mCerebrum-AutoSense,代码行数:21,代码来源:PrefsFragmentPlot.java
示例7: writeDataSourceToFile
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public void writeDataSourceToFile() throws IOException {
ArrayList<DataSource> dataSources = new ArrayList<>();
if (autoSensePlatforms == null) throw new NullPointerException();
for (int i = 0; i < autoSensePlatforms.size(); i++) {
String platformId = autoSensePlatforms.get(i).getPlatformId();
String platformType = autoSensePlatforms.get(i).getPlatformType();
String deviceId = autoSensePlatforms.get(i).getDeviceId();
Platform platform = new PlatformBuilder().setId(platformId).setType(platformType).setMetadata(METADATA.DEVICE_ID, deviceId).build();
ArrayList<AutoSenseDataSource> autoSenseDataSources=autoSensePlatforms.get(i).autoSenseDataSources;
for (int j = 0; j < autoSenseDataSources.size(); j++) {
DataSource dataSource=autoSenseDataSources.get(j).createDatSourceBuilder(platform).build();
// String dataSourceType = autoSenseDataSources.get(i).getDataSourceType();
// autoSenseDataSources.get(i).createDatSourceBuilder()
// DataSource dataSource = new DataSourceBuilder().
// setPlatform(platform).
// setType(dataSourceType).build();
dataSources.add(dataSource);
}
}
Configuration.write(dataSources);
}
开发者ID:MD2Korg,项目名称:mCerebrum-AutoSense,代码行数:23,代码来源:AutoSensePlatforms.java
示例8: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptor());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, "0.0167 Hz");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "cStress Feature Vector");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents the 37 features used by the cStress algorithm");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDoubleArray.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:cStressFeatureVector.java
示例9: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptor());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, "0.0167 Hz");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "puffMarker Feature Vector");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents the 36 features used by the puffMarker algorithm");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDoubleArray.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:puffMarkerFeatureVector.java
示例10: createDataDescriptor
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
HashMap<String, String> createDataDescriptor() {
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Smoking Episode");
dataDescriptor.put(METADATA.MIN_VALUE, "1");
dataDescriptor.put(METADATA.MAX_VALUE, "1");
dataDescriptor.put(METADATA.DESCRIPTION, "Represents smoking episode");
dataDescriptor.put(METADATA.DATA_TYPE, double.class.getName());
return dataDescriptor;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:10,代码来源:SmokingEpisode.java
示例11: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Smoking Episode");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents smoking episode");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDouble.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:10,代码来源:SmokingEpisode.java
示例12: createDataDescriptor
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
HashMap<String, String> createDataDescriptor() {
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Puff Probability");
dataDescriptor.put(METADATA.MIN_VALUE, "0");
dataDescriptor.put(METADATA.MAX_VALUE, "1");
dataDescriptor.put(METADATA.FREQUENCY, "0.0167 Hz");
dataDescriptor.put(METADATA.DESCRIPTION, "Represents the probability of Puff using the puffMarker model");
dataDescriptor.put(METADATA.DATA_TYPE, double.class.getName());
return dataDescriptor;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:PuffProbability.java
示例13: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, "0.0167 Hz");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Puff Probability");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents the probability of Puff using the puffMarker model");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDouble.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:PuffProbability.java
示例14: createDataDescriptor
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
HashMap<String, String> createDataDescriptor() {
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Stress Label");
dataDescriptor.put(METADATA.MIN_VALUE, "0");
dataDescriptor.put(METADATA.MAX_VALUE, "2");
dataDescriptor.put(METADATA.FREQUENCY, "0.0167 Hz");
dataDescriptor.put(METADATA.DESCRIPTION, "Represents stress value cStress model, no stress (0), stress(1), unsure(2)");
dataDescriptor.put(METADATA.DATA_TYPE, double.class.getName());
return dataDescriptor;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:StressLabel.java
示例15: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, "0.0167 Hz");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Stress Label");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents stress value using cStress model, no stress (0), stress(1), unsure(2)");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDouble.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:StressLabel.java
示例16: createDataDescriptor
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
HashMap<String, String> createDataDescriptor() {
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "RIP Data Quality");
dataDescriptor.put(METADATA.MIN_VALUE, "0");
dataDescriptor.put(METADATA.MAX_VALUE, "4");
dataDescriptor.put(METADATA.FREQUENCY, "0.2 Hz");
dataDescriptor.put(METADATA.DESCRIPTION, "Represents the data quality classification for RIP: QUALITY_GOOD = 0, QUALITY_NOISE = 1, QUALITY_BAD = 2, QUALITY_BAND_OFF = 3, QUALITY_MISSING = 4");
dataDescriptor.put(METADATA.DATA_TYPE, double.class.getName());
return dataDescriptor;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:RIPQuality.java
示例17: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, "0.2 Hz");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "RIP Data Quality");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents the data quality classification for RIP: QUALITY_GOOD = 0, QUALITY_NOISE = 1, QUALITY_BAD = 2, QUALITY_BAND_OFF = 3, QUALITY_MISSING = 4");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDouble.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:RIPQuality.java
示例18: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptor());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, "0.0167 Hz");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "cStress Feature Vector (RIP)");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents the RIP-only features used by the cStress algorithm");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDoubleArray.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:cStressRIPFeatureVector.java
示例19: createDataDescriptor
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
HashMap<String, String> createDataDescriptor() {
HashMap<String, String> dataDescriptor = new HashMap<>();
dataDescriptor.put(METADATA.NAME, "Stress Label (RIP)");
dataDescriptor.put(METADATA.MIN_VALUE, "0");
dataDescriptor.put(METADATA.MAX_VALUE, "2");
dataDescriptor.put(METADATA.FREQUENCY, "0.0167 Hz");
dataDescriptor.put(METADATA.DESCRIPTION, "Represents stress value cStress RIP model, no stress (0), stress(1), unsure(2)");
dataDescriptor.put(METADATA.DATA_TYPE, double.class.getName());
return dataDescriptor;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:StressRIPLabel.java
示例20: createDataSourceBuilder
import org.md2k.datakitapi.source.METADATA; //导入依赖的package包/类
public DataSourceBuilder createDataSourceBuilder() {
DataSourceBuilder dataSourceBuilder = super.createDataSourceBuilder();
if (dataSourceBuilder == null) return null;
dataSourceBuilder = dataSourceBuilder.setDataDescriptors(createDataDescriptors());
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.FREQUENCY, "0.0167 Hz");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.NAME, "Stress Label (RIP)");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DESCRIPTION, "Represents stress value using cStress RIP model, no stress (0), stress(1), unsure(2)");
dataSourceBuilder = dataSourceBuilder.setMetadata(METADATA.DATA_TYPE, DataTypeDouble.class.getName());
return dataSourceBuilder;
}
开发者ID:MD2Korg,项目名称:mCerebrum-StreamProcessor,代码行数:11,代码来源:StressRIPLabel.java
注:本文中的org.md2k.datakitapi.source.METADATA类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论