/// <summary> /// Initializes a new instance of the <see cref="RedirectModule"/> class. /// </summary> public RedirectModule(IWikibusConfiguration config) { this.Get("/{path*}", rqst => this.RedirectRdfRequest(config.BaseApiNamespace)); this.Get("/{path*}", rqst => this.RedirectRdfRequest(config.BaseWebNamespace), IsHtmlRequest); this.Get("/", rqst => this.RedirectRdfRequest(config.BaseApiNamespace)); this.Get("/", rqst => this.RedirectRdfRequest(config.BaseWebNamespace), IsHtmlRequest); }
/// <summary> /// Initializes a new instance of the <see cref="SourcesStore"/> class. /// </summary> /// <param name="connection">The connection.</param> /// <param name="config">The configuration</param> public SourcesStore(IDbConnection connection, IWikibusConfiguration config) { this.config = config; var processor = new W3CR2RMLProcessor(connection); processor.GenerateTriples(new WikibusR2RML(config), this); }
/// <summary> /// Initializes a new instance of the <see cref="EntrypointModule"/> class. /// </summary> public EntrypointModule(IWikibusConfiguration config) { this.Get("/", route => new EntryPoint(config.BaseResourceNamespace) { Title = "wikibus.org library", Description = "Here you can explore the private collection of books and other physical and electronic media about public transport" }); }
public EntityFactory( IUriTemplateExpander expander, IWikibusConfiguration configuration, [AllowNull] ClaimsPrincipal principal, ISourceContext context) { this.expander = expander; this.configuration = configuration; this.principal = principal; this.context = context; }
/// <summary> /// Initializes a new instance of the <see cref="NancyRdfStartup"/> class. /// </summary> public NancyRdfStartup(INamespaceManager mapper, IWikibusConfiguration config) { mapper.SetBaseUri(new Uri(config.BaseResourceNamespace)); mapper.AddNamespace(Dc.Prefix, new Uri(Dc.BaseUri)); mapper.AddNamespace(Dcterms.Prefix, new Uri(Dcterms.BaseUri)); mapper.AddNamespace(Schema.Prefix, new Uri(Schema.BaseUri)); mapper.AddNamespace(Vocab.Hydra.Prefix, new Uri(Vocab.Hydra.BaseUri)); mapper.AddNamespace(Rdf.Prefix, new Uri(Rdf.BaseUri)); mapper.AddNamespace(Rdfs.Prefix, new Uri(Rdfs.BaseUri)); mapper.AddNamespace(Bibo.Prefix, new Uri(Bibo.BaseUri)); mapper.AddNamespace(Opus.Prefix, new Uri(Opus.BaseUri)); mapper.AddNamespace("lexvo", new Uri(Lexvo.iso639_1)); mapper.AddNamespace(Wbo.Prefix, new Uri(Wbo.BaseUri)); }
public ContentLocationPipeline(IWikibusConfiguration configuration) { this.configuration = configuration; }
public EntityFactory(IUriTemplateExpander expander, IWikibusConfiguration configuration) { this.expander = expander; this.configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="EntrypointModule"/> class. /// </summary> public EntrypointModule(IWikibusConfiguration config) { this.Get("/", route => new EntryPoint(config.BaseResourceNamespace)); }
/// <summary> /// Initializes a new instance of the <see cref="HydraDocumentationSettings"/> class. /// </summary> public HydraDocumentationSettings(IWikibusConfiguration configuration) { this.EntryPoint = (IriRef)configuration.BaseResourceNamespace; }
/// <summary> /// Initializes a new instance of the <see cref="WikibusR2RML" /> class /// </summary> public WikibusR2RML(IWikibusConfiguration config) { this.config = config; this.rml = new Lazy <IR2RML>(this.CreateMappings); }