// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgContract.java
// public static class Timestamps implements TimestampsColumns {
// 	public static final Uri CONTENT_URI =
// 			BASE_CONTENT_URI.buildUpon().appendPath(PATH_TIMESTAMPS).build();
// 	public static final String[] DEFAULT_COLUMNS = {NODE_ID, FILE_ID, TYPE, TIMESTAMP, ALL_DAY};
// 
// 	public static Uri buildIdUri(Long id) {
// 		return CONTENT_URI.buildUpon().appendPath(id.toString()).build();
// 	}
// 
// 	public static String getId(Uri uri) {
// 		return uri.getLastPathSegment();
// 	}
// }
// 
// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgDatabase.java
// public interface Tables {
// 	String TIMESTAMPS = "timestamps";
// 	String FILES = "files";
// 	String PRIORITIES = "priorities";
// 	String TAGS = "tags";
// 	String TODOS = "todos";
// 	String ORGDATA = "orgdata";
// }


import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import com.matburt.mobileorg.orgdata.OrgContract.Timestamps;
import com.matburt.mobileorg.orgdata.OrgDatabase.Tables;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Collections;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


	public OrgNodeTimeDate(TYPE type, String line){
		this.type = type;
		parseDate(line);
	}

	public OrgNodeTimeDate(TYPE type, int day, int month, int year) {
		this(type);
		setDate(day, month, year);
	}

	public OrgNodeTimeDate(TYPE type, int day, int month, int year, int startTimeOfDay, int startMinute) {
		this(type, day, month, year);
		setTime(startTimeOfDay, startMinute);
	}

    public OrgNodeTimeDate(long epochTimeInSec){
        setEpochTime(epochTimeInSec, false);
    }

	/**
	 * OrgNodeTimeDate ctor from the database
	 * @param type
	 * @param nodeId The OrgNode ID associated with this timestamp
     */
	public OrgNodeTimeDate(TYPE type, long nodeId){

		String todoQuery = "SELECT " +
				OrgContract.formatColumns(
// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgContract.java
// public static class Timestamps implements TimestampsColumns {
// 	public static final Uri CONTENT_URI =
// 			BASE_CONTENT_URI.buildUpon().appendPath(PATH_TIMESTAMPS).build();
// 	public static final String[] DEFAULT_COLUMNS = {NODE_ID, FILE_ID, TYPE, TIMESTAMP, ALL_DAY};
// 
// 	public static Uri buildIdUri(Long id) {
// 		return CONTENT_URI.buildUpon().appendPath(id.toString()).build();
// 	}
// 
// 	public static String getId(Uri uri) {
// 		return uri.getLastPathSegment();
// 	}
// }
// 
// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgDatabase.java
// public interface Tables {
// 	String TIMESTAMPS = "timestamps";
// 	String FILES = "files";
// 	String PRIORITIES = "priorities";
// 	String TAGS = "tags";
// 	String TODOS = "todos";
// 	String ORGDATA = "orgdata";
// }


// Path: MobileOrg/src/main/java/com/matburt/mobileorg/orgdata/OrgNodeTimeDate.java
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import com.matburt.mobileorg.orgdata.OrgContract.Timestamps;
import com.matburt.mobileorg.orgdata.OrgDatabase.Tables;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Collections;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;



	public OrgNodeTimeDate(TYPE type, String line){
		this.type = type;
		parseDate(line);
	}

	public OrgNodeTimeDate(TYPE type, int day, int month, int year) {
		this(type);
		setDate(day, month, year);
	}

	public OrgNodeTimeDate(TYPE type, int day, int month, int year, int startTimeOfDay, int startMinute) {
		this(type, day, month, year);
		setTime(startTimeOfDay, startMinute);
	}

    public OrgNodeTimeDate(long epochTimeInSec){
        setEpochTime(epochTimeInSec, false);
    }

	/**
	 * OrgNodeTimeDate ctor from the database
	 * @param type
	 * @param nodeId The OrgNode ID associated with this timestamp
     */
	public OrgNodeTimeDate(TYPE type, long nodeId){

		String todoQuery = "SELECT " +
				OrgContract.formatColumns(
						Tables.TIMESTAMPS,