Skip to content

Commit cfb518d

Browse files
committed
Update documentation
1 parent 77a6e62 commit cfb518d

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2023 Cyber Domain Ontology
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CASE Conversion Examples
22

3-
[![Project Status: WIPInitial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
3+
[![Project Status: ActiveThe project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
44
![CASE Version](https://img.shields.io/badge/CASE%20Version-1.2.0-brightgreen.svg)
55

66
This repository provides example scripts for extracting information from CASE graphs and writing them to various output formats. This project contains several directories with the same general intent, but different implementations/languages. The directories are as follows:
@@ -9,11 +9,17 @@ This repository provides example scripts for extracting information from CASE gr
99
- `java` - Java implementation using the Apache Jena library
1010
- `python` - Python implementation using the RDFLib library
1111

12-
Each directory contains the code to convert a CASE graph to a specific output format. The input and output files are specified as command line arguments. The input file should be a CASE graph in JSON-LD format. The output file will be written to a GeoJSON file.
12+
Each directory contains the code to convert a CASE graph to a specific output format after storing them in intermediary types. The general process is:
1313

14-
These implementations are not production ready and do not properly handle errors. They are intended to be used as a starting point for a more robust solution. They also do not represent the only way to convert a CASE graph to a GeoJSON file. They are intended to highlight the value of utilizing the CASE Ontology to create a graph that can be used to query and generate data in a variety of formats, regardless of the source application's data model.
14+
1. Read the contents of the JSON-LD graph into an in-memory graph datastore in the selected library (e.g. `dotNetRDF`)
15+
1. Query properties from the datastore using a SPARQL query and store each record into a custom `GeoRecord` object
16+
1. Convert the list of `GeoRecord` objects into a `.geojson` file
1517

16-
Each directory contains a README with more information about the specific implementation as well as specific usage but the general usage expects the following two positional arguments:
18+
The input and output files are specified as command line arguments. The input file should be a CASE graph in JSON-LD format. The output file will be written to a GeoJSON file.
19+
20+
These implementations are not production ready and do not properly handle all exceptional states nor do they contain proper logging, documentation, or automated tests. They are intended to be used as a starting point for a more robust solution. They also do not represent the only way to convert a CASE graph to a GeoJSON file. They are intended to highlight the value of utilizing the CASE Ontology to create a graph that can be used to query and generate data in a variety of formats, regardless of the source application's data model.
21+
22+
Each directory contains a `README.md` with more information about the specific implementation as well as specific usage but the general usage expects the following two positional arguments:
1723

1824
| Argument | Description |
1925
| -------- | ---------------------------------------------------------- |

dotnet/Helpers.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
public static class Helpers
44
{
5+
///
6+
/// <summary>Convert the list of records into a single GeoJSON object</summary>
7+
///
58
public static GeoJSON.RootObject ConvertToGeoJSON(IEnumerable<GeoRecord> records)
69
{
710
// Convert the list of records into a single GeoJSON object
@@ -45,6 +48,9 @@ public static GeoJSON.RootObject ConvertToGeoJSON(IEnumerable<GeoRecord> records
4548
return geoJSON;
4649
}
4750

51+
///
52+
/// <summary>Write the GeoJSON object to a file</summary>
53+
///
4854
public static void WriteGeoJSON(GeoJSON.RootObject geoJSON, string outputPath)
4955
{
5056
// Write the GeoJSON object to a file

0 commit comments

Comments
 (0)