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());
        }
예제 #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));
 }
예제 #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));
 }
예제 #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));
 }
예제 #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));
 }
예제 #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));
 }