public static ContentProviderOperation ParseTracks(TrackXml input)
        {
            ContentProviderOperation.Builder builder = ContentProviderOperation.NewInsert(ScheduleContract.Tracks.CONTENT_URI);

            input.TrackId = ParserUtils.SanitizeId(input.Name);

            builder.WithValue(ScheduleContract.Tracks.TRACK_ID, input.TrackId);
            builder.WithValue(ScheduleContract.Tracks.TRACK_NAME, input.Name);
            builder.WithValue(ScheduleContract.Tracks.TRACK_COLOR, input.Color);
            builder.WithValue(ScheduleContract.Tracks.TRACK_ABSTRACT, input.Abstract);

            return(builder.Build());
        }
Beispiel #2
0
 /**
  * Generate a {@link #VENDOR_ID} that will always match the requested
  * {@link Vendors} details.
  */
 public static String GenerateVendorId(String companyLogo)
 {
     return(ParserUtils.SanitizeId(companyLogo));
 }
Beispiel #3
0
 /**
  * Generate a {@link #SPEAKER_ID} that will always match the requested
  * {@link Speakers} details.
  */
 public static String GenerateSpeakerId(String speakerLdap)
 {
     return(ParserUtils.SanitizeId(speakerLdap));
 }
Beispiel #4
0
 /**
  * Generate a {@link #SESSION_ID} that will always match the requested
  * {@link Sessions} details.
  */
 public static String GenerateSessionId(String title)
 {
     return(ParserUtils.SanitizeId(title));
 }
Beispiel #5
0
 /**
  * Generate a {@link #ROOM_ID} that will always match the requested
  * {@link Rooms} details.
  */
 public static String GenerateRoomId(String room)
 {
     return(ParserUtils.SanitizeId(room));
 }
Beispiel #6
0
 /**
  * Generate a {@link #BLOCK_ID} that will always match the requested
  * {@link Blocks} details.
  */
 public static String GenerateBlockId(long startTime, long endTime)
 {
     startTime /= DateUtils.SecondInMillis;
     endTime   /= DateUtils.SecondInMillis;
     return(ParserUtils.SanitizeId(startTime + "-" + endTime));
 }