Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiadaniela authored Dec 21, 2017
1 parent d1fae56 commit 0d6fdbd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ A more formal description of the framework can be found at http://ieeexplore.iee

## Using M2O

### M2O configuration
### M2O Configuration

### Java Class Annotations
The setup of this library is done via a configuration file (ont-config.config). The following parameters need to be setup in order to ensure the correct functionality of the library:

* ONT_FILE= path to the owl file. The ontology file needs to be specified. If the ontology already exists, it will be loaded from this path; otherwise a file will be created containing an ontology corresponding to the Java model -
* ONT_URI = ontology URI .The identifier of the Ontology (Uniform Resource Identifier)
* API_TYPE=JENA or OWLAPI. Based on the user preferences, the API needs to be specified in this file. The API’s that are available so far are : JENA and OWL API
* ENTITIES_PACKAGE=ro.tuc.dsrl.m2o.example.entities. The user must specify the package that contains the classes that are going to be mapped to the ontology
* AUTO_GEN=true or false. According to this flag, an ontology will be created based on the entities from the specified package. Otherwise the specified ontology will be loaded from the file.

### Java Model Annotations

Annotated the Java classes that you want to map to the ontology classes. There are four types of annotations used for entity mapping:
@OntologyEntity - It is a class annotation that will be used for every class that needs to be mapped to the ontology.
Expand Down Expand Up @@ -45,6 +53,8 @@ public class Wine extends PortableLiquid {
//getters / setters
```

### Java Repositories

Then create the repository classes by extending the OntologyRepository class. The first generic type specifies the entity that the repo is linked to, and the second type specifies the type of individual identifier.

```
Expand Down

0 comments on commit 0d6fdbd

Please sign in to comment.