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()); }
/** * Generate a {@link #VENDOR_ID} that will always match the requested * {@link Vendors} details. */ public static String GenerateVendorId(String companyLogo) { return(ParserUtils.SanitizeId(companyLogo)); }
/** * Generate a {@link #SPEAKER_ID} that will always match the requested * {@link Speakers} details. */ public static String GenerateSpeakerId(String speakerLdap) { return(ParserUtils.SanitizeId(speakerLdap)); }
/** * Generate a {@link #SESSION_ID} that will always match the requested * {@link Sessions} details. */ public static String GenerateSessionId(String title) { return(ParserUtils.SanitizeId(title)); }
/** * Generate a {@link #ROOM_ID} that will always match the requested * {@link Rooms} details. */ public static String GenerateRoomId(String room) { return(ParserUtils.SanitizeId(room)); }
/** * 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)); }