Skip to content

Commit 12571ac

Browse files
author
cimmino
committed
javadocs included
1 parent efd86e9 commit 12571ac

File tree

69 files changed

+4756
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+4756
-147
lines changed

README.md

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,12 @@
11
# ASTREA
22

3-
## 1. Quick start
4-
Astrea can be used as a java library for third-party java projects. First install Astrea as a dependency following the steps detailed in the section **1.1.1 Install Astrea**. Then, in you code create an instance of our Astrea object as follows:
5-
````
6-
ShaclFromOwl sharper = new OptimisedOwlGenerator();
7-
````
8-
Having this object the shapes, which will be provided as [jena]([https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/Model.html](https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/Model.html)) Models, can be generated using different methods:
9-
10-
- Using the URL of an ontology
11-
````
12-
Model shapes = sharper.fromURL("http://iot.linkeddata.es/def/core/ontology.ttl");
13-
````
14-
- Using a list containing the URLs of several ontologies
15-
````
16-
List<String> ontologies = new ArrayList<>();
17-
ontologies.add("http://iot.linkeddata.es/def/core/ontology.ttl");
18-
...
19-
Model shapes = sharper.fromURLs(ontologies);
20-
````
21-
- Using an ontology in memory, consider that the [formats supported are the ones specified in jena]([https://jena.apache.org/documentation/io/](https://jena.apache.org/documentation/io/))
22-
`````
23-
Model shapes = sharper.fromOwl(String owlContent, String format);
24-
`````
25-
- Using an jena model
26-
`````
27-
Model ontologyModel = ModelFactory.createDefaultModel();
28-
// insert content in the variable ontologyModel
29-
Model shapes = sharper.fromModel(ontologyModel);
30-
`````
313

32-
**Keep in mind that Astrea will automatically include all the ontologies that are specified under the owl:imports statement, and therefore, it will generate their shapes as well.**
33-
34-
### 1.1 Install Astrea
4+
## 1 - Install Astrea
355
In order to use the Astrea as java library for third-party components there are two approaches: import the library as a *jar* or install Astrea as a local maven dependency and then use your *pom.xml* to import it. Following we provide a guide for both options.
366

37-
#### 1.1.1 Import Astrea as a jar
7+
#### 1.1Import Astrea as a jar
388
Download the last release from our GitHub. Then, import the *jar* file in a project .
39-
#### 1.1.2 Instaling as local maven dependency
9+
#### 1.2 Instaling as local maven dependency
4010
Astrea can be installed as a local dependency. For this purpose download the code from this repository:
4111
`````
4212
git clone https://github.com/oeg-upm/Astrea.git
@@ -62,4 +32,37 @@ mvn clean package -Dskiptests
6232
````
6333
mvn install:install-file -Dfile=./target/astrea-1.0.0.jar -DgroupId=oeg.validation -DartifactId=astrea -Dversion=1.0.0 -Dpackaging=jar
6434
````
65-
3. Import the dependency in your project using the pom file relying on the previous snipped
35+
3. Import the dependency in your project using the pom file relying on the previous snipped
36+
37+
## 2 - Quick start
38+
Astrea can be used as a java library for third-party java projects, in you code create an instance of our Astrea object as follows:
39+
````
40+
ShaclFromOwl sharper = new OwlGenerator();
41+
````
42+
Having this object the shapes, which will be provided as [jena]([https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/Model.html](https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/Model.html)) Models, can be generated using different methods:
43+
44+
- Using the URL of an ontology
45+
````
46+
Model shapes = sharper.fromURL("http://iot.linkeddata.es/def/core/ontology.ttl");
47+
````
48+
- Using a list containing the URLs of several ontologies
49+
````
50+
List<String> ontologies = new ArrayList<>();
51+
ontologies.add("http://iot.linkeddata.es/def/core/ontology.ttl");
52+
...
53+
Model shapes = sharper.fromURLs(ontologies);
54+
````
55+
- Using an ontology in memory, consider that the [formats supported are the ones specified in jena]([https://jena.apache.org/documentation/io/](https://jena.apache.org/documentation/io/))
56+
`````
57+
Model shapes = sharper.fromOwl(String owlContent, String format);
58+
`````
59+
- Using an jena model
60+
`````
61+
Model ontologyModel = ModelFactory.createDefaultModel();
62+
// insert content in the variable ontologyModel
63+
Model shapes = sharper.fromModel(ontologyModel);
64+
`````
65+
66+
**Keep in mind that Astrea will automatically include all the ontologies that are specified under the owl:imports statement, and therefore, it will generate their shapes as well.**
67+
68+
**To check other constructors of the OwlGenerator class read our [java doc]()**

astrea.iml

Lines changed: 0 additions & 52 deletions
This file was deleted.

docs/allclasses-frame.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_151) on Tue Nov 12 19:45:04 CET 2019 -->
6+
<title>All Classes</title>
7+
<meta name="date" content="2019-11-12">
8+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
9+
<script type="text/javascript" src="script.js"></script>
10+
</head>
11+
<body>
12+
<h1 class="bar">All&nbsp;Classes</h1>
13+
<div class="indexContainer">
14+
<ul>
15+
<li><a href="astrea/generators/OptimisedOwlGenerator.html" title="class in astrea.generators" target="classFrame">OptimisedOwlGenerator</a></li>
16+
<li><a href="astrea/generators/OwlGenerator.html" title="class in astrea.generators" target="classFrame">OwlGenerator</a></li>
17+
<li><a href="astrea/model/ShaclFromOwl.html" title="interface in astrea.model" target="classFrame"><span class="interfaceName">ShaclFromOwl</span></a></li>
18+
</ul>
19+
</div>
20+
</body>
21+
</html>

docs/allclasses-noframe.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc (1.8.0_151) on Tue Nov 12 19:45:04 CET 2019 -->
6+
<title>All Classes</title>
7+
<meta name="date" content="2019-11-12">
8+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
9+
<script type="text/javascript" src="script.js"></script>
10+
</head>
11+
<body>
12+
<h1 class="bar">All&nbsp;Classes</h1>
13+
<div class="indexContainer">
14+
<ul>
15+
<li><a href="astrea/generators/OptimisedOwlGenerator.html" title="class in astrea.generators">OptimisedOwlGenerator</a></li>
16+
<li><a href="astrea/generators/OwlGenerator.html" title="class in astrea.generators">OwlGenerator</a></li>
17+
<li><a href="astrea/model/ShaclFromOwl.html" title="interface in astrea.model"><span class="interfaceName">ShaclFromOwl</span></a></li>
18+
</ul>
19+
</div>
20+
</body>
21+
</html>

0 commit comments

Comments
 (0)