Skip to content

Commit

Permalink
Merge pull request #108 from RADAR-base/remove_questions
Browse files Browse the repository at this point in the history
Remove questions
  • Loading branch information
blootsvoets authored Feb 28, 2018
2 parents ad432f9 + 8c83057 commit 080cc58
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 3,594 deletions.
4 changes: 2 additions & 2 deletions commons/active/opensmile/open_smile_2_audio_recording.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{ "name": "time", "type": "double", "doc": "Device timestamp when the audio recording was started (s since the Unix Epoch)." },
{ "name": "timeCompleted", "type": "double", "doc": "Device timestamp when the audio recording was completed (s since the Unix Epoch)." },
{ "name": "mediaType", "type": "string", "doc": "Media type of the audio recording format. For example, audio/wav for a WAV recording. See https://www.iana.org/assignments/media-types/media-types.xhtml#audio for the list of standardized audio media types."},
{ "name": "data", "type": "bytes", "doc": "Raw contents of the recorded audio file." },
{ "name": "data", "type": "string", "doc": "Base64 encoded contents of the recorded audio file." },
{ "name": "reciteText", "type": ["null", "string"], "doc": "Text that was supposed to be recited as part of the recording.", "default": null }
]
}
}
15 changes: 0 additions & 15 deletions commons/catalogue/radar_widget.avsc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ private static <T> Map<String, T> initSources(ObjectReader reader, Path root, Sc
return Files.walk(baseFolder)
.filter(Files::isRegularFile)
.map(f -> {
String filename = f.getFileName().toString();
int extensionIndex = filename.lastIndexOf('.');
if (extensionIndex != -1) {
filename = filename.substring(0, extensionIndex);
}
try {
String filename = f.getFileName().toString();
int extensionIndex = filename.lastIndexOf('.');
if (extensionIndex != -1) {
filename = filename.substring(0, extensionIndex);
}
return new AbstractMap.SimpleImmutableEntry<>(
filename.toUpperCase(Locale.ENGLISH),
reader.<T>readValue(f.toFile()));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
package org.radarcns.schema.specification.active.questionnaire;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.radarcns.schema.specification.DataTopic;

import javax.validation.constraints.NotEmpty;
import java.util.List;
import java.net.URL;
import java.util.Map;
import org.radarcns.schema.specification.DataTopic;

/**
* TODO.
Expand All @@ -31,18 +29,16 @@ public enum RadarSourceTypes {
ARMT
}

@JsonProperty @NotEmpty
private List<Question> questions;
@JsonProperty
private URL questionnaireDefinitionUrl;

public List<Question> getQuestions() {
return questions;
public URL getQuestionnaireDefinitionUrl() {
return questionnaireDefinitionUrl;
}

@Override
protected void propertiesMap(Map<String, Object> properties, boolean reduced) {
super.propertiesMap(properties, reduced);
if (!reduced) {
properties.put("questions", questions);
}
protected void propertiesMap(Map<String, Object> props, boolean reduced) {
super.propertiesMap(props, reduced);
props.put("questionnaireDefinitionUrl", questionnaireDefinitionUrl);
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,17 @@

package org.radarcns.schema.validation.rules;

import org.radarcns.schema.specification.active.questionnaire.QuestionnaireDataTopic;

import java.nio.file.Path;

import static org.radarcns.schema.specification.SourceCatalogue.YAML_EXTENSION;
import static org.radarcns.schema.validation.ValidationSupport.equalsFileName;
import static org.radarcns.schema.validation.rules.Validator.validateNonEmpty;
import static org.radarcns.schema.validation.rules.Validator.validateNonNull;

import java.nio.file.Path;
import org.radarcns.schema.specification.active.questionnaire.QuestionnaireDataTopic;

/**
* TODO.
*/
public final class QuestionnaireRoles {

private static final String QUESTIONS = "Questions list cannot null or empty.";
private static final String QUESTIONNAIRE_TYPE = "Questionnaire Type cannot be null"
+ " and should match with the configuration file name.";

Expand All @@ -47,12 +43,4 @@ static Validator<QuestionnaireDataTopic> validateQuestionnaireType(Path file) {
equalsFileName(file, YAML_EXTENSION),
QUESTIONNAIRE_TYPE);
}

/**
* TODO.
* @return TODO
*/
static Validator<QuestionnaireDataTopic> validateQuestions() {
return validateNonEmpty(QuestionnaireDataTopic::getQuestions, QUESTIONS);
}
}

This file was deleted.

Loading

0 comments on commit 080cc58

Please sign in to comment.