private void MapBookAuthor(ITriplesMapFromR2RMLViewConfiguration sourceMap) { var authorTriplesMap = sourceMap.R2RMLConfiguration.CreateTriplesMapFromR2RMLView(SelectBookAuthorSql); authorTriplesMap.SubjectMap.TermType.IsBlankNode().IsTemplateValued("author_{Id}"); authorTriplesMap.SubjectMap.CreateGraphMap().IsTemplateValued(SourceGraphTemplate); authorTriplesMap.MapColumn("BookAuthor", Schema.name); var authorMap = sourceMap.CreatePropertyObjectMap(); authorMap.CreatePredicateMap().IsConstantValued(new Uri(Schema.author)); authorMap.CreateRefObjectMap(authorTriplesMap).AddJoinCondition("Id", "Id"); }
private void MapBooksAndBrochures(FluentR2RML rml) { this.sourceMap = rml.CreateTriplesMapFromR2RMLView(SelectBrochureAndBook); var template = this.config.BaseResourceNamespace + "{TypeLower}/{Id}"; this.sourceMap.SubjectMap.IsTemplateValued(template); this.sourceMap.SubjectMap.CreateGraphMap().IsTemplateValued(SourceGraphTemplate); this.MapFolderName(this.sourceMap); this.MapType(this.sourceMap); this.MapLanguages(this.sourceMap); this.MapPagesCount(this.sourceMap); this.MapFolderCode(this.sourceMap); this.MapDate(this.sourceMap); this.MapBookAuthor(this.sourceMap); this.MapBookISBN(this.sourceMap); this.MapImage(this.sourceMap); }
private void MapFolderName(ITriplesMapFromR2RMLViewConfiguration sourceMap) { sourceMap.MapColumn("FolderName", DCTerms.title); sourceMap.MapColumn("BookTitle", DCTerms.title); }
private void MapType(ITriplesMapFromR2RMLViewConfiguration sourceMap) { sourceMap.MapTemplate(Wbo.BaseUri + "{Type}", Rdf.type); }
private void MapFolderCode(ITriplesMapFromR2RMLViewConfiguration sourceMap) { sourceMap.MapColumn("FolderCode", DCTerms.identifier); }
private void MapBookISBN(ITriplesMapFromR2RMLViewConfiguration sourceMap) { sourceMap.MapColumn("BookISBN", Schema.isbn); }