public static XElement HeaderItem(Header rec, string granularity) { return rec == null ? null : new XElement("header", new XElement("identifier", rec.OAI_Identifier), new XElement("datestamp", rec.Datestamp.HasValue ? rec.Datestamp.Value.ToString(granularity) : rec.Datestamp.ToString()), from s in rec.OAI_Set.Split(';') select new XElement("setSpec", s)); }
public static void AddRecHeaderToDatabase( OaiPmhContext context, Header header, OAIDataProvider dataProvider, bool createNewIdentifier, string identifierBase) { header.OAIDataProviderId = dataProvider.OAIDataProviderId; context.Header.Add(header); context.SaveChanges(); if (createNewIdentifier) { if(identifierBase.ElementAt(identifierBase.Length -1) != ':') { identifierBase += ':'; } header.OAI_Identifier = identifierBase + header.HeaderId; context.Entry(header).State = System.Data.EntityState.Modified; } }
public RecordQueryResult(Header header, Metadata metadata, IEnumerable<Metadata> about) { this.Header = header; this.Metadata = metadata; this.About = about == null ? null : about.ToList(); }
public RecordQueryResult(Header header, Metadata metadata) { this.Header = header; this.Metadata = metadata; }
public static async Task<XElement> HeaderItemAsync(Header rec, string granularity) { return await Task.Run<XElement>(() => HeaderItem(rec, granularity)).ConfigureAwait(false); }