Skip to content

Commit c20c9d1

Browse files
committed
Added new details and configurations for v0.1.2
1 parent 36c5450 commit c20c9d1

File tree

4 files changed

+56
-33
lines changed

4 files changed

+56
-33
lines changed

README.md

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,56 @@ section.
2929

3030
# CLI
3131
```
32-
Usage: dmaog [-hV] [-dr=<drivers>] -m=<mappingRules> [-ml=<mappingLanguage>]
33-
-o=<outputPath> -p=<packageName> [-ps=<password>] [-u=<username>]
32+
Usage: dmaog [-hV] [--static] [-dr=<drivers>] [-m=<mappingRules>]
33+
[-ml=<mappingLanguage>] -o=<outputPath> -p=<packageName>
34+
[-ps=<password>] [-se=<sparqlEndpoint>] [-u=<username>]
3435
Generate data access objects and services from your mapping rules.
35-
-dr, --drivers=<drivers>
36-
Drivers string in case it is not included in ShExML
37-
-h, --help Show this help message and exit.
38-
-m, --mapping=<mappingRules>
39-
Path to the file with the mappings
40-
-ml, --mappingLanguage=<mappingLanguage>
41-
Mapping language to use: ShExML or RML
42-
-o, --output=<outputPath>
43-
Path where to generate the output files
44-
-p, --package=<packageName>
45-
Package information for the generated files
46-
-ps, --password=<password>
47-
Password in case of database connection
48-
-u, --username=<username>
49-
Username in case of database connection
50-
-V, --version Print version information and exit.
36+
-dr, --drivers=<drivers>
37+
Drivers string in case it is not included in ShExML
38+
-h, --help Show this help message and exit.
39+
-m, --mapping=<mappingRules>
40+
Path to the file with the mappings
41+
-ml, --mappingLanguage=<mappingLanguage>
42+
Mapping language to use: ShExML or RML
43+
-o, --output=<outputPath>
44+
Path where to generate the output files
45+
-p, --package=<packageName>
46+
Package information for the generated files
47+
-ps, --password=<password>
48+
Password in case of database connection
49+
-se, --sparqlEndpoint=<sparqlEndpoint>
50+
URL pointing to the SPARQL endpoint
51+
--static Exploit mapping rules without executing them
52+
-u, --username=<username>
53+
Username in case of database connection
54+
-V, --version Print version information and exit.
5155
```
5256

57+
# Supported features
58+
* Generation of data against files and SPARQL endpoints
59+
* Using already existing data files and SPARQL endpoints without mapping rules
60+
* Update actions on files and SPARQL endpoints (without authentication)
61+
* Static analysis of ShExML rules (not need to run the mapping rules to generate classes)
62+
* Multilingual strings
63+
* Pagination of the results
64+
5365
# Supported methods in services
5466
* getAll(): List[Type] -> Returns all the results for the type
67+
* getAll(Long limit, Long offset): List[Type] -> Returns all the results for the type within the given page
68+
* getAll(String rdfFormat): String -> Returns all the results in the requested format
69+
* count(): Long -> Returns the total number of objects of this type
5570
* getById(String id): Type -> Return the object with the given id for the type. Take into account that the id is refering
5671
to the local part of the subject URI when talking about RDF data.
72+
* getById(String id, String rdfFormat): String -> Return the object with the given id in the requested format.
5773
* getByField(String fieldName, String value): List<Type> -> Return all the results whose indicated field value matches with
5874
the given value. Take into account that the fieldName refers to the localPart of the predicate URI when talking about RDF data.
75+
* getByField(String fieldName, String value, String rdfFormat): String -> Return all the results whose indicated field
76+
value matches with the given value in the requested format.
77+
* commit(Type instance) -> Deletes the instance (if it exists) in the data store and inserts the new data. It can act
78+
as create or update method.
79+
* delete(Type instance) -> Deletes the instance in the data store.
5980

6081
# Future work
61-
* Support for Triple Stores and for data modification actions
62-
* Possibility to use Shapes for code generation
82+
* Support for authentication on update actions against SPARQL endpoints
83+
* Possibility to use Shapes for code generation
84+
* Static analysis of RML rules

build.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ lazy val dmaog = project
44
.in(file("."))
55
.settings(
66
name := "DMAOG",
7-
version := "0.1.1",
7+
version := "0.1.2",
88
scalaVersion := "3.2.0",
99
crossScalaVersions := Seq("2.12.17", "2.13.9", "3.2.0"),
1010
libraryDependencies ++= Seq(
@@ -21,6 +21,7 @@ lazy val dmaog = project
2121
"org.apache.jena" % "apache-jena-libs" % "3.8.0"
2222
),
2323
assembly / assemblyMergeStrategy := {
24+
case PathList("META-INF", "services", xs @ _*) => MergeStrategy.concat
2425
case PathList("META-INF", xs @ _*) => MergeStrategy.discard
2526
case x => MergeStrategy.first
2627
}

publish.sbt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
organization in ThisBuild := "com.herminiogarcia"
2-
organizationName in ThisBuild := "herminiogarcia"
3-
organizationHomepage in ThisBuild := Some(url("https://herminiogarcia.com"))
1+
ThisBuild / organization := "com.herminiogarcia"
2+
ThisBuild / organizationName := "herminiogarcia"
3+
ThisBuild /organizationHomepage := Some(url("https://herminiogarcia.com"))
44

5-
scmInfo in ThisBuild := Some(
5+
ThisBuild / scmInfo := Some(
66
ScmInfo(
77
url("https://github.com/herminiogg/dmaog"),
88
"scm:[email protected]:herminiogg/dmaog.git"
99
)
1010
)
1111

12-
developers in ThisBuild := List(
12+
ThisBuild / developers := List(
1313
Developer(
1414
id = "herminiogg",
1515
name = "Herminio Garcia Gonzalez",
@@ -18,17 +18,17 @@ developers in ThisBuild := List(
1818
)
1919
)
2020

21-
description in ThisBuild := "Data Mapping Access Objects Generator (DMAOG)"
22-
licenses in ThisBuild := List("MIT License" -> new URL("https://opensource.org/licenses/MIT"))
23-
homepage in ThisBuild := Some(url("https://github.com/herminiogg/dmaog"))
21+
ThisBuild / description := "Data Mapping Access Objects Generator (DMAOG)"
22+
ThisBuild / licenses := List("MIT License" -> new URL("https://opensource.org/licenses/MIT"))
23+
ThisBuild / homepage := Some(url("https://github.com/herminiogg/dmaog"))
2424

2525
// Remove all additional repository other than Maven Central from POM
26-
pomIncludeRepository in ThisBuild := { _ => false }
26+
ThisBuild / pomIncludeRepository := { _ => false }
2727

28-
publishTo in ThisBuild := {
28+
ThisBuild / publishTo := {
2929
val nexus = "https://s01.oss.sonatype.org/"
3030
if (isSnapshot.value) Some("snapshots" at nexus + "content/repositories/snapshots")
3131
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
3232
}
3333

34-
publishMavenStyle in ThisBuild := true
34+
ThisBuild / publishMavenStyle := true

src/main/scala/com/herminiogarcia/dmaog/Main.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ object Main {
1616

1717
}
1818

19-
@Command(name = "dmaog", version = Array("v0.1.1"),
19+
@Command(name = "dmaog", version = Array("v0.1.2"),
2020
mixinStandardHelpOptions = true,
2121
description = Array("Generate data access objects and services from your mapping rules."))
2222
class Main extends Callable[Int] {

0 commit comments

Comments
 (0)