{"id":20650954,"url":"https://github.com/niklr/rdfmappernet","last_synced_at":"2025-09-26T21:30:49.112Z","repository":{"id":84678148,"uuid":"57452823","full_name":"niklr/RdfMapperNet","owner":"niklr","description":"RdfMapperNet is a .NET library to map classes to RDF triples.","archived":false,"fork":false,"pushed_at":"2016-05-23T08:48:42.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-05T00:35:42.753Z","etag":null,"topics":["json","rdf-triples"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niklr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-30T16:59:48.000Z","updated_at":"2020-04-22T05:42:58.000Z","dependencies_parsed_at":"2023-06-03T02:00:27.817Z","dependency_job_id":null,"html_url":"https://github.com/niklr/RdfMapperNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2FRdfMapperNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2FRdfMapperNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2FRdfMapperNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklr%2FRdfMapperNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklr","download_url":"https://codeload.github.com/niklr/RdfMapperNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234346886,"owners_count":18817806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","rdf-triples"],"created_at":"2024-11-16T17:24:39.859Z","updated_at":"2025-09-26T21:30:48.829Z","avatar_url":"https://github.com/niklr.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"RdfMapperNet\n=========\n\nRdfMapperNet is a .NET library to map classes to RDF triples. Attributes are used to annotate classes and their properties in order to map them to subjects, predicates and objects.\n\n### Dependencies:\n* [Json.NET](http://www.newtonsoft.com/json)\n\n## Example\n### The mapping document in JSON format\n```json\n{\n  \"namespaces\": {\n    \"ns1\": \"http://www.smir.ch/api/\",\n    \"ns2\": \"http://www.virtualskeleton.ch/schema/rdf-mapping#\",\n    \"ns3\": \"http://www.virtualskeleton.ch/schema/metadata4data#\"\n  },\n  \"map\": {\n    \"ns2:s_file_uri\": \"ns1:files/{id}\",\n    \"ns2:o_file_rdf_type\": \"ns3:file\",\n    \"ns2:p_file_id\": \"ns3:file_id\",\n\t\"ns2:p_file_extension\": \"ns3:file_extension\"\n  }\n}\n```\n\n### The class to be mapped\n```csharp\n[RdfMapperSubject(\"s_file_uri\", RdfType = \"o_file_rdf_type\")]\npublic class File\n{\n\t[RdfMapperSubjectId]\n\t[RdfMapperPredicate(\"p_file_id\")]\n\tpublic int Id { get; set; }\n\n\t[RdfMapperPredicate(\"p_file_extension\")]\n\tpublic string Extension { get; set; }\n}\n```\n\n### Map the class to RDF triples\n```csharp\nvar mapper = new RdfMapper(new RdfMapperJsonReader(), mappingDocumentPath, mappingNamespace);\nvar triples = mapper.MapTriples(model);\n```\n\n### Output\n```\n'http://www.smir.ch/api/files/1'\t'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'\t\t\t\t\t\t'http://www.virtualskeleton.ch/schema/metadata4data#file'\n'http://www.smir.ch/api/files/1'\t'http://www.virtualskeleton.ch/schema/metadata4data#file_id'\t\t\t'1'\n'http://www.smir.ch/api/files/1'\t'http://www.virtualskeleton.ch/schema/metadata4data#file_extension'\t\t'dcm'\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklr%2Frdfmappernet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklr%2Frdfmappernet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklr%2Frdfmappernet/lists"}