Android Open Source - openhds-tablet Open H D S






From Project

Back to project page openhds-tablet.

License

The source code is released under:

OPENHDS PLATFORM OPENSOURCE LICENSE AGREEMENT Copyright (c) 2013 University of Southern Maine. All rights reserved. Redistribution and use in source and binary forms, with or without mo...

If you think the Android project openhds-tablet listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.openhds.mobile;
//  w ww  .  ja  v  a  2  s  . com
import android.net.Uri;
import android.provider.BaseColumns;

public class OpenHDS {
    public static final String AUTHORITY = "org.openhds.Application";

    private OpenHDS() {
    }

    public static final String DEFAULT_SORT_ORDER = "_id ASC";
  

    public static final class Individuals implements BaseColumns {

        private Individuals() {
        }

        public static final String TABLE_NAME = "individuals";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/individuals";
        private static final String PATH_NOTE_ID = "/individuals/";
        private static final String PATH_SG = "/individuals/sg/";

        public static final int NOTE_ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_SG_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_SG);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.individual";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.individual";

        public static final String COLUMN_INDIVIDUAL_EXTID = "extId";
        public static final String COLUMN_INDIVIDUAL_FIRSTNAME = "firstName";
        public static final String COLUMN_INDIVIDUAL_FULLNAME = "fullname";
        public static final String COLUMN_INDIVIDUAL_LASTNAME = "lastName";
        public static final String COLUMN_INDIVIDUAL_DOB = "dob";
        public static final String COLUMN_INDIVIDUAL_GENDER = "gender";
        public static final String COLUMN_INDIVIDUAL_MOTHER = "mother";
        public static final String COLUMN_INDIVIDUAL_FATHER = "father";
        public static final String COLUMN_INDIVIDUAL_RESIDENCE = "currentResidence";
        public static final String COLUMN_RESIDENCE_END_TYPE = "endType";

    }

    public static final class Locations implements BaseColumns {
        public static final String TABLE_NAME = "locations";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/locations";
        private static final String PATH_NOTE_ID = "/locations/";

        public static final int NOTE_ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.location";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.location";

        public static final String COLUMN_LOCATION_EXTID = "extId";
        public static final String COLUMN_LOCATION_NAME = "name";
        public static final String COLUMN_LOCATION_LATITUDE = "latitude";
        public static final String COLUMN_LOCATION_LONGITUDE = "longitude";
        public static final String COLUMN_LOCATION_HIERARCHY = "hierarchy";
    }

    public static final class HierarchyItems implements BaseColumns {
        public static final String TABLE_NAME = "hierarchyitems";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/hierarchyitems";
        private static final String PATH_NOTE_ID = "/hierarchyitems/";

        public static final int NOTE_ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.hierarchyitem";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.hierarchyitem";

        public static final String COLUMN_HIERARCHY_EXTID = "extId";
        public static final String COLUMN_HIERARCHY_NAME = "name";
        public static final String COLUMN_HIERARCHY_PARENT = "parent";
        public static final String COLUMN_HIERARCHY_LEVEL = "level";
    }

    public static final class Rounds implements BaseColumns {
        public static final String TABLE_NAME = "rounds";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/rounds";
        private static final String PATH_NOTE_ID = "/rounds/";

        public static final int ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.round";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.round";

        public static final String COLUMN_ROUND_STARTDATE = "startDate";
        public static final String COLUMN_ROUND_ENDDATE = "endDate";
        public static final String COLUMN_ROUND_NUMBER = "roundNumber";
    }

    public static final class Visits implements BaseColumns {
        public static final String TABLE_NAME = "visits";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/visits";
        private static final String PATH_NOTE_ID = "/visits/";

        public static final int ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.visit";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.visit";

        public static final String COLUMN_VISIT_EXTID = "extId";
        public static final String COLUMN_VISIT_ROUND = "round";
        public static final String COLUMN_VISIT_DATE = "date";
        public static final String COLUMN_VISIT_LOCATION = "location";
        public static final String COLUMN_INTERVIEWEE = "interviewee";

    }

    public static final class Relationships implements BaseColumns {
        public static final String TABLE_NAME = "relationships";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/relationships";
        private static final String PATH_NOTE_ID = "/relationships/";

        public static final int ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.relationship";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.relationship";

        public static final String COLUMN_RELATIONSHIP_INDIVIDUAL_A = "individualA";
        public static final String COLUMN_RELATIONSHIP_INDIVIDUAL_B = "individualB";
        public static final String COLUMN_RELATIONSHIP_STARTDATE = "startDate";
    }

    public static final class FieldWorkers implements BaseColumns {
        public static final String TABLE_NAME = "fieldworkers";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/fieldworkers";
        private static final String PATH_NOTE_ID = "/fieldworkers/";

        public static final int ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.fieldworker";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.fieldworker";

        public static final String COLUMN_FIELDWORKER_EXTID = "extId";
        public static final String COLUMN_FIELDWORKER_PASSWORD = "password";
        public static final String COLUMN_FIELDWORKER_FIRSTNAME = "firstName";
        public static final String COLUMN_FIELDWORKER_LASTNAME = "lastName";
    }

    public static final class SocialGroups implements BaseColumns {
        public static final String TABLE_NAME = "socialgroups";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/socialgroups";
        private static final String PATH_LOCATION_ID = "/socialgroups/location/";
        private static final String PATH_INDIVIDUAL_ID = "/socialgroups/individual/";
        private static final String PATH_NOTE_ID = "/socialgroups/";

        public static final int ID_PATH_POSITION = 1;
        public static final int LOCATION_PATH_POSITION = 2;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_LOCATION_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_LOCATION_ID);
        public static final Uri CONTENT_LOCATION_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_LOCATION_ID + "/*");
        public static final Uri CONTENT_INDIVIDUAL_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_INDIVIDUAL_ID);
        public static final Uri CONTENT_INDIVIDUAL_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_INDIVIDUAL_ID + "/*");

        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.socialgroups";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.socialgroups";

        public static final String COLUMN_SOCIALGROUP_EXTID = "extId";
        public static final String COLUMN_SOCIALGROUP_GROUPNAME = "groupName";
        public static final String COLUMN_SOCIALGROUP_GROUPHEAD = "groupHead";
    }
    
    public static final class IndividualGroups implements BaseColumns {
        public static final String TABLE_NAME = "individualgroups";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/individualgroups";
        private static final String PATH_NOTE_ID = "/individualgroups/";

        public static final int ID_PATH_POSITION = 2;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.individualgroups";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.individualgroups";

      public static final String COLUMN_INDIVIDUALUUID = "individual_extId";
      public static final String COLUMN_SOCIALGROUPUUID = "socialgroup_extId";  
    }
    
    
    
    public static final class Forms implements BaseColumns {
        public static final String TABLE_NAME = "forms";
        private static final String SCHEME = "content://";

        private static final String PATH_NOTES = "/forms";
        private static final String PATH_NOTE_ID = "/forms/";

        public static final int ID_PATH_POSITION = 1;

        public static final Uri CONTENT_URI = Uri.parse(SCHEME + AUTHORITY + PATH_NOTES);
        public static final Uri CONTENT_ID_URI_BASE = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID);
        public static final Uri CONTENT_ID_URI_PATTERN = Uri.parse(SCHEME + AUTHORITY + PATH_NOTE_ID + "/#");

        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.openhds.forms";
        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.openhds.forms";

        public static final String COLUMN_FORM_NAME = "name";
        
        public static final String COLUMN_FORM_GENDER = "gender";
    }
    
    
}




Java Source Code List

org.openhds.mobile.BadXmlException.java
org.openhds.mobile.Converter.java
org.openhds.mobile.FieldWorkerProvider.java
org.openhds.mobile.FormsProviderAPI.java
org.openhds.mobile.InstanceProviderAPI.java
org.openhds.mobile.OpenHDS.java
org.openhds.mobile.Queries.java
org.openhds.mobile.activity.AbstractActivity.java
org.openhds.mobile.activity.FieldWorkerLoginActivity.java
org.openhds.mobile.activity.FilterActivity.java
org.openhds.mobile.activity.FilterFormActivity.java
org.openhds.mobile.activity.FilterLocationActivity.java
org.openhds.mobile.activity.FilterVisitActivity.java
org.openhds.mobile.activity.FormListActivity.java
org.openhds.mobile.activity.FormViewActivity.java
org.openhds.mobile.activity.OpeningActivity.java
org.openhds.mobile.activity.ServerPreferencesActivity.java
org.openhds.mobile.activity.ShowMapActivity.java
org.openhds.mobile.activity.SupervisorLoginActivity.java
org.openhds.mobile.activity.SupervisorMainActivity.java
org.openhds.mobile.activity.SyncDatabaseActivity.java
org.openhds.mobile.activity.UpdateActivity.java
org.openhds.mobile.adapter.AdapterContent.java
org.openhds.mobile.adapter.MapAdapter.java
org.openhds.mobile.database.DatabaseAdapter.java
org.openhds.mobile.database.DeathUpdate.java
org.openhds.mobile.database.ExternalInMigrationUpdate.java
org.openhds.mobile.database.HouseholdUpdate.java
org.openhds.mobile.database.InternalInMigrationUpdate.java
org.openhds.mobile.database.LocationUpdate.java
org.openhds.mobile.database.MembershipUpdate.java
org.openhds.mobile.database.OutMigrationUpdate.java
org.openhds.mobile.database.PregnancyOutcomeUpdate.java
org.openhds.mobile.database.RelationshipUpdate.java
org.openhds.mobile.database.Updatable.java
org.openhds.mobile.database.VisitUpdate.java
org.openhds.mobile.fragment.EventFragment.java
org.openhds.mobile.fragment.ProgressFragment.java
org.openhds.mobile.fragment.SelectionFilterFragment.java
org.openhds.mobile.fragment.SelectionFilterLocFragment.java
org.openhds.mobile.fragment.SelectionFormFragment.java
org.openhds.mobile.fragment.SelectionFragment.java
org.openhds.mobile.fragment.ValueFormFragment.java
org.openhds.mobile.fragment.ValueFragment.java
org.openhds.mobile.fragment.ValueLocFragment.java
org.openhds.mobile.listener.CollectEntitiesListener.java
org.openhds.mobile.listener.OdkFormLoadListener.java
org.openhds.mobile.listener.RetrieveFieldWorkersListener.java
org.openhds.mobile.listener.TaskCompleteListener.java
org.openhds.mobile.listener.ValueSelectedListener.java
org.openhds.mobile.model.Child.java
org.openhds.mobile.model.FieldWorker.java
org.openhds.mobile.model.FilledForm.java
org.openhds.mobile.model.FilledParams.java
org.openhds.mobile.model.FormFiller.java
org.openhds.mobile.model.FormSubmissionRecord.java
org.openhds.mobile.model.FormXmlReader.java
org.openhds.mobile.model.Form.java
org.openhds.mobile.model.HierarchySelection.java
org.openhds.mobile.model.Individual.java
org.openhds.mobile.model.LocationHierarchy.java
org.openhds.mobile.model.LocationVisit.java
org.openhds.mobile.model.Location.java
org.openhds.mobile.model.Membership.java
org.openhds.mobile.model.PregnancyObservationUpdate.java
org.openhds.mobile.model.PregnancyOutcome.java
org.openhds.mobile.model.Relationship.java
org.openhds.mobile.model.Result.java
org.openhds.mobile.model.Round.java
org.openhds.mobile.model.SocialGroup.java
org.openhds.mobile.model.StateMachine.java
org.openhds.mobile.model.Supervisor.java
org.openhds.mobile.model.UpdateEvent.java
org.openhds.mobile.model.UpdateParams.java
org.openhds.mobile.model.UpdateStatus.java
org.openhds.mobile.model.Visit.java
org.openhds.mobile.provider.OpenHDSProvider.java
org.openhds.mobile.task.AbstractHttpTask.java
org.openhds.mobile.task.AuthenticateTask.java
org.openhds.mobile.task.DownloadFormsTask.java
org.openhds.mobile.task.FieldWorkerLoginTask.java
org.openhds.mobile.task.OdkFormLoadTask.java
org.openhds.mobile.task.OdkGeneratedFormLoadTask.java
org.openhds.mobile.task.SupervisorLoginTask.java
org.openhds.mobile.task.SyncEntitiesTask.java
org.openhds.mobile.task.SyncFormsTask.java
org.openhds.mobile.utilities.L.java
org.openhds.mobile.utilities.Logg.java
org.openhds.mobile.utilities.UrlUtils.java