Commit c144d073 authored by CallisteHanriat's avatar CallisteHanriat

fixing typo problems + fixing date format problems + new elicitation name rules

parent 52a8f9b1
......@@ -177,7 +177,7 @@ public class RecordActivityLig extends RecordActivity {
ArrayList<String> speakerIds = new ArrayList<String>();
Double latitude = MainActivity.locationDetector.getLatitude();
Double longitude = MainActivity.locationDetector.getLongitude();
String name = new SimpleDateFormat("yyMMdd-hhmmss").format(date) + "_" + recordLang.getCode()
String name = new SimpleDateFormat("yyMMdd-HHmmss").format(date) + "_" + recordLang.getCode()
+ "_" + idDevice;
Log.d("new_name", name);
......
......@@ -192,9 +192,9 @@ public class RecordElicitation extends AikumaActivity {
Double longitude = MainActivity.locationDetector.getLongitude();
String suffix = new File(eliciTextFile).getName().replace(".txt", "").length() >= 10 ? new File(eliciTextFile).getName().substring(0, 10)
: new File(eliciTextFile).getName().replace(".txt", "");
String name = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(date)
+ "_" + deviceName + "_" + recordLang.getCode()
+ "_elicit_" + suffix;
String idDevice = Aikuma.getDeviceId();
String name = new SimpleDateFormat("yyMMdd-HHmmss").format(date) + "_" + recordLang.getCode()
+ "_" + idDevice;
// + "_elicit_" + new File(eliciTextFile).getName().substring(0,10);
// + "_" + eliciTextFile.substring(0, 10) + "_" + phraseId
Log.i(TAG, "recording name: " + name);
......
......@@ -525,8 +525,9 @@ public class RecordingMetadataLig extends AikumaActivity implements OnClickListe
String gender = "";
if (speakerGender == RecordingMetadataLig.GENDER_MALE) { gender = "Male"; }
else if (speakerGender == RecordingMetadataLig.GENDER_FEMALE) { gender = "Female"; }
String name = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(date)
+ "_" + Aikuma.getDeviceName() + "_" + recordLang.getCode();
String idDevice = Aikuma.getDeviceId();
String name = new SimpleDateFormat("yyMMdd-HHmmss").format(date) + "_" + recordLang.getCode()
+ "_" + idDevice;
Double latitude = MainActivity.locationDetector.getLatitude();
Double longitude = MainActivity.locationDetector.getLongitude();
RecordingLig recording = new RecordingLig(importWavUUID, name, date,
......
......@@ -63,6 +63,11 @@ public class RespeakingMetadataLig extends AikumaActivity implements OnClickList
private String OrigDirName;
private String origRecName;
private String msgError;
/**
* if translate mode has been selected in ModeSelection.java or not.
* In other words, if it's a respeaking or a translation
*/
private boolean translateMode = false;
/** Called when the activity is first created. */
......@@ -369,10 +374,10 @@ public class RespeakingMetadataLig extends AikumaActivity implements OnClickList
}
/**
* retreive the original language thanks to reading original textview
* retrieve the original language thanks to reading original textview
* @return the good language object
*/
private Language retriveOriginalRecordLang() {
private Language retrieveOriginalRecordLang() {
String lang_name = ((TextView) findViewById(R.id.record_edit_recording_lang)).getText().toString();
return getLanguageFromName(lang_name);
}
......@@ -438,7 +443,7 @@ public class RespeakingMetadataLig extends AikumaActivity implements OnClickList
*/
private void loadSession() {
MetadataSession session = MetadataSession.getMetadataSession();
Language recordLanguage = retriveOriginalRecordLang();
Language recordLanguage = retrieveOriginalRecordLang();
if (!translateMode) {
((TextView) findViewById(R.id.respeak_tv_selectedlangRespeaking)).setText(recordLanguage.getName());
}
......
......@@ -28,6 +28,12 @@ import android.util.Log;
import android.view.View;
import android.widget.Toast;
/**
* This Activity contains one ThrumbRespeakFragment fragment.
* @author LIG
*
*/
public class ThumbRespeakActivityLig extends AikumaActivity {
public static final String TAG = "ThumbRespeakActivityLig";
......@@ -35,6 +41,11 @@ public class ThumbRespeakActivityLig extends AikumaActivity {
private boolean translateMode = false;
private ThumbRespeakFragment fragment;
/**
* containing informations about mapping and start/stop/pause
* the original or respeaking recording.
*/
private ThumbRespeaker respeaker;
private String sourceId;
private UUID respeakingUUID;
......@@ -58,6 +69,10 @@ public class ThumbRespeakActivityLig extends AikumaActivity {
translateMode = getIntent().getBooleanExtra(ModeSelection.TRANSLATE_MODE, false);
}
/**
* set the ThumbRespeaker thanks to a metadata file which
* contains element about segments to recording a respeaking.
*/
private void setUpThumbRespeaker() {
Intent intent = getIntent();
String recordName = intent.getStringExtra(RecordActivityLig.intent_recordname);
......
......@@ -45,6 +45,7 @@ import com.musicg.experiment.math.cluster.Segment;
import com.musicg.wave.Wave;
/**
* This fragment contains all views which can be used by a respeaking/translating activity
* @author Oliver Adams <oliver.adams@gmail.com>
* @author Florian Hanke <florian.hanke@gmail.com>
*/
......
......@@ -121,6 +121,9 @@ public class ThumbRespeakSummaryLig extends AikumaActivity implements OnClickLis
}
}
/**
* function called when we want to create the view programmatically.
*/
private void setSummaryView() {
LayoutInflater inflater = (LayoutInflater)
this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment