Exemple #1
0
        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");
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 private void MapFolderName(ITriplesMapFromR2RMLViewConfiguration sourceMap)
 {
     sourceMap.MapColumn("FolderName", DCTerms.title);
     sourceMap.MapColumn("BookTitle", DCTerms.title);
 }
Exemple #4
0
 private void MapType(ITriplesMapFromR2RMLViewConfiguration sourceMap)
 {
     sourceMap.MapTemplate(Wbo.BaseUri + "{Type}", Rdf.type);
 }
Exemple #5
0
 private void MapFolderCode(ITriplesMapFromR2RMLViewConfiguration sourceMap)
 {
     sourceMap.MapColumn("FolderCode", DCTerms.identifier);
 }
Exemple #6
0
 private void MapBookISBN(ITriplesMapFromR2RMLViewConfiguration sourceMap)
 {
     sourceMap.MapColumn("BookISBN", Schema.isbn);
 }