You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by ha...@apache.org on 2021/07/13 05:27:46 UTC

[clerezza] branch CLEREZZA-1068-schemagen updated (b6e7ab9 -> c9846cf)

This is an automated email from the ASF dual-hosted git repository.

hasan pushed a change to branch CLEREZZA-1068-schemagen
in repository https://gitbox.apache.org/repos/asf/clerezza.git.


 discard b6e7ab9  CLEREZZA-1068: Reformat and refactor codes in schemagen module
     new c9846cf  CLEREZZA-1068: Reformat and refactor codes in schemagen module

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b6e7ab9)
            \
             N -- N -- N   refs/heads/CLEREZZA-1068-schemagen (c9846cf)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 schemagen/maven-plugin/pom.xml                                   | 6 ++----
 .../clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java  | 9 +++------
 2 files changed, 5 insertions(+), 10 deletions(-)

[clerezza] 01/01: CLEREZZA-1068: Reformat and refactor codes in schemagen module

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

hasan pushed a commit to branch CLEREZZA-1068-schemagen
in repository https://gitbox.apache.org/repos/asf/clerezza.git

commit c9846cf15b1aa653f1696dc411fea5104dc193eb
Author: Hasan <ha...@apache.org>
AuthorDate: Thu Jul 8 08:06:20 2021 +0200

    CLEREZZA-1068: Reformat and refactor codes in schemagen module
---
 ontologies/pom.xml                                 |  30 +-
 .../org/apache/clerezza/ontologies/foaf.rdf        |  59 +--
 parent/pom.xml                                     |   5 +
 schemagen/main/LICENSE                             | 201 ----------
 schemagen/main/pom.xml                             |  52 ++-
 schemagen/main/src/assembly/dist.xml               |  82 ++--
 .../org/apache/clerezza/schemagen/SchemaGen.java   | 437 ++++++++++-----------
 .../clerezza/schemagen/SchemaGenArguments.java     |  36 +-
 schemagen/maven-plugin/LICENSE                     | 201 ----------
 schemagen/maven-plugin/pom.xml                     |  51 ++-
 .../OntologyJavaClassCreatorMojo.java              | 125 +++---
 11 files changed, 431 insertions(+), 848 deletions(-)

diff --git a/ontologies/pom.xml b/ontologies/pom.xml
index c24cf7d..3841aa5 100644
--- a/ontologies/pom.xml
+++ b/ontologies/pom.xml
@@ -42,16 +42,6 @@
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Export-Package>${project.groupId}.${project.artifactId}.*</Export-Package>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
                 <groupId>org.apache.clerezza</groupId>
                 <artifactId>maven-ontologies-plugin</artifactId>
                 <version>2.0.0-SNAPSHOT</version>
@@ -63,6 +53,16 @@
                             <sources>
                                 <source>${basedir}/target/generated-sources/main/java</source>
                             </sources>
+                            <namespaceOfOntology>
+                                <property>
+                                    <name>dc.rdf</name>
+                                    <value>http://purl.org/dc/elements/1.1/</value>
+                                </property>
+                                <property>
+                                    <name>dcterms.rdf</name>
+                                    <value>http://purl.org/dc/terms/</value>
+                                </property>
+                            </namespaceOfOntology>
                         </configuration>
                         <goals>
                             <goal>generate</goal>
@@ -70,6 +70,16 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Export-Package>${project.groupId}.${project.artifactId}.*</Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/ontologies/src/main/resources/org/apache/clerezza/ontologies/foaf.rdf b/ontologies/src/main/resources/org/apache/clerezza/ontologies/foaf.rdf
index 84421ff..ac82588 100644
--- a/ontologies/src/main/resources/org/apache/clerezza/ontologies/foaf.rdf
+++ b/ontologies/src/main/resources/org/apache/clerezza/ontologies/foaf.rdf
@@ -4,13 +4,13 @@
 <!--   FOAF specification, http://xmlns.com/foaf/spec/                             -->
 <!--                                                                             -->
 <!-- first we introduce a number of RDF namespaces we will be using... -->
-<rdf:RDF
-	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
-	xmlns:owl="http://www.w3.org/2002/07/owl#"
-	xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#"
-	xmlns:foaf="http://xmlns.com/foaf/0.1/"
-	xmlns:wot="http://xmlns.com/wot/0.1/"
+<rdf:RDF 
+	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
+	xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" 
+	xmlns:owl="http://www.w3.org/2002/07/owl#" 
+	xmlns:vs="http://www.w3.org/2003/06/sw-vocab-status/ns#" 
+	xmlns:foaf="http://xmlns.com/foaf/0.1/" 
+	xmlns:wot="http://xmlns.com/wot/0.1/" 
 	xmlns:dc="http://purl.org/dc/elements/1.1/">
 <!-- Here we describe general characteristics of the FOAF vocabulary ('ontology'). -->
   <owl:Ontology rdf:about="http://xmlns.com/foaf/0.1/" dc:title="Friend of a Friend (FOAF) vocabulary" dc:description="The Friend of a Friend (FOAF) RDF vocabulary, described using W3C RDF Schema and the Web Ontology Language." >
@@ -19,8 +19,8 @@
 
   <!-- OWL/RDF interop section - geeks only -->
   <!--  most folk can ignore this lot. the game here is to make FOAF
-  	work with vanilla RDF/RDFS tools, and with the stricter OWL DL
-	profile of OWL. At the moment we're in the OWL Full flavour of OWL.
+  	work with vanilla RDF/RDFS tools, and with the stricter OWL DL 
+	profile of OWL. At the moment we're in the OWL Full flavour of OWL. 
 	The following are tricks to try have the spec live in both worlds
 	at once. See
 		http://phoebus.cs.man.ac.uk:9999/OWL/Validator
@@ -29,7 +29,7 @@
   <owl:AnnotationProperty rdf:about="http://xmlns.com/wot/0.1/assurance"/>
   <owl:AnnotationProperty rdf:about="http://xmlns.com/wot/0.1/src_assurance"/>
   <owl:AnnotationProperty rdf:about="http://www.w3.org/2003/06/sw-vocab-status/ns#term_status"/>
-  <!--  DC terms are NOT annotation properties in general, so we consider the following
+  <!--  DC terms are NOT annotation properties in general, so we consider the following 
 	claims scoped to this document. They may be removed in future revisions if
 	OWL tools become more flexible. -->
   <owl:AnnotationProperty rdf:about="http://purl.org/dc/elements/1.1/description"/>
@@ -58,8 +58,8 @@
 <!--    <rdfs:subClassOf><owl:Class rdf:about="http://xmlns.com/wordnet/1.6/Agent"/></rdfs:subClassOf> -->
     <rdfs:subClassOf><owl:Class rdf:about="http://www.w3.org/2000/10/swap/pim/contact#Person" rdfs:label="Person"/></rdfs:subClassOf>
     <rdfs:subClassOf><owl:Class rdf:about="http://www.w3.org/2003/01/geo/wgs84_pos#SpatialThing" rdfs:label="Spatial Thing"/></rdfs:subClassOf>
-    <!-- aside:
-	are spatial things always spatially located?
+    <!-- aside: 
+	are spatial things always spatially located? 
 	Person includes imaginary people... discuss... -->
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
     <owl:disjointWith rdf:resource="http://xmlns.com/foaf/0.1/Document"/>
@@ -110,7 +110,7 @@
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
     <rdfs:subClassOf rdf:resource="http://xmlns.com/foaf/0.1/Document"/>
   </rdfs:Class>
-
+	
   <rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/OnlineAccount" vs:term_status="unstable" rdfs:label="Online Account" rdfs:comment="An online account.">
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Class"/>
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
@@ -132,7 +132,7 @@
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
   </rdfs:Class>
 <!-- FOAF properties (ie. relationships). -->
-  <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/mbox" vs:term_status="stable" rdfs:label="personal mailbox" rdfs:comment="A
+  <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/mbox" vs:term_status="stable" rdfs:label="personal mailbox" rdfs:comment="A 
 personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox. This is a 'static inverse functional property', in that  there is (across time and change) at most one individual that ever has any particular value for foaf:mbox.">
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
@@ -144,15 +144,15 @@ personal mailbox, ie. an Internet mailbox associated with exactly one owner, the
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#InverseFunctionalProperty"/>
 
 <!--
-put it back in again 2006-01-29 - see
+put it back in again 2006-01-29 - see 
 http://chatlogs.planetrdf.com/swig/2006-01-29.html#T21-12-35
 I have mailed rdfweb-dev@vapours.rdfweb.org for discussion.
 Libby
 
 Commenting out as a kindness to OWL DL users. The semantics didn't quite cover
-our usage anyway, since (a) we want static-across-time, which is so beyond OWL as
-to be from another planet (b) we want identity reasoning invariant across xml:lang
-tagging. FOAF code will know what to do. OWL folks note, this assertion might return.
+our usage anyway, since (a) we want static-across-time, which is so beyond OWL as 
+to be from another planet (b) we want identity reasoning invariant across xml:lang 
+tagging. FOAF code will know what to do. OWL folks note, this assertion might return. 
 
 danbri
 -->
@@ -162,15 +162,15 @@ danbri
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
   </rdf:Property>
 
-  <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/gender" vs:term_status="testing"
-rdfs:label="gender"
+  <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/gender" vs:term_status="testing" 
+rdfs:label="gender" 
 rdfs:comment="The gender of this Agent (typically but not necessarily 'male' or 'female').">
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#FunctionalProperty"/>
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>
     <rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Agent"/>
     <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
-    <!-- whatever one's gender is, and we are liberal in leaving room for more options
+    <!-- whatever one's gender is, and we are liberal in leaving room for more options 
     than 'male' and 'female', we model this so that an agent has only one gender. -->
   </rdf:Property>
 
@@ -216,7 +216,7 @@ rdfs:comment="The gender of this Agent (typically but not necessarily 'male' or
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
 <!--
     <rdfs:subPropertyOf rdf:resource="http://xmlns.com/foaf/0.1/nick"/>
-...different to the other IM IDs, as Jabber has wider usage, so
+...different to the other IM IDs, as Jabber has wider usage, so 
 we don't want the implied rdfs:domain here.
 
 -->
@@ -372,7 +372,7 @@ we don't want the implied rdfs:domain here.
     <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
     <owl:inverseOf rdf:resource="http://xmlns.com/foaf/0.1/maker"/>
   </rdf:Property>
-  <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/maker"  vs:term_status="stable" rdfs:label="maker" rdfs:comment="An agent that
+  <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/maker"  vs:term_status="stable" rdfs:label="maker" rdfs:comment="An agent that 
 made this thing.">
     <owl:equivalentProperty rdf:resource="http://purl.org/dc/terms/creator"/>
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
@@ -447,12 +447,12 @@ made this thing.">
   </rdf:Property>
   <rdf:Property rdf:about="http://xmlns.com/foaf/0.1/topic_interest" vs:term_status="testing" rdfs:label="interest_topic" rdfs:comment="A thing of interest to this person.">
 <!-- we should distinguish the page from the topic more carefully. danbri 2002-07-08 -->
-<!--    foaf:interest_topic(P,R)
+<!--    foaf:interest_topic(P,R) 
 		always true whenever
-		foaf:interest(P,D), foaf:topic(D,R)
-		ie. a person has a foaf:topic_interest in all things
-		that are the foaf:topic of pages they have a foaf:interest in.
-		hmm, does this mean i'm forced to be interested in all the things that are the
+		foaf:interest(P,D), foaf:topic(D,R) 
+		ie. a person has a foaf:topic_interest in all things 
+		that are the foaf:topic of pages they have a foaf:interest in. 
+		hmm, does this mean i'm forced to be interested in all the things that are the 
 		topic of a page i'm interested in. thats a strong restriction on foaf:topic's utility.	-->
     <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/>
     <rdfs:domain rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
@@ -600,4 +600,5 @@ made this thing.">
      <rdfs:isDefinedBy rdf:resource="http://xmlns.com/foaf/0.1/"/>
    </rdf:Property>
 
-</rdf:RDF>
\ No newline at end of file
+</rdf:RDF>
+
diff --git a/parent/pom.xml b/parent/pom.xml
index 35b6bb5..8671a8d 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -371,6 +371,11 @@
                 <version>1.7.28</version>
             </dependency>
             <dependency>
+                <groupId>org.apache.maven</groupId>
+                <artifactId>maven-plugin-api</artifactId>
+                <version>3.8.1</version>
+            </dependency>
+            <dependency>
                 <groupId>org.osgi</groupId>
                 <artifactId>org.osgi.compendium</artifactId>
                 <version>5.0.0</version>
diff --git a/schemagen/main/LICENSE b/schemagen/main/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/schemagen/main/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/schemagen/main/pom.xml b/schemagen/main/pom.xml
index f2695a6..6f04ee5 100644
--- a/schemagen/main/pom.xml
+++ b/schemagen/main/pom.xml
@@ -1,37 +1,35 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <!--
-
-     Licensed to the Apache Software Foundation (ASF) under one
-     or more contributor license agreements.  See the NOTICE file
-     distributed with this work for additional information
-     regarding copyright ownership.  The ASF licenses this file
-     to you under the Apache License, Version 2.0 (the
-     "License"); you may not use this file except in compliance
-     with the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor  license  agreements.  See the NOTICE file distributed
+  with this work  for  additional  information  regarding  copyright
+  ownership.  The ASF  licenses  this file to you under  the  Apache
+  License, Version 2.0 (the "License"); you may not  use  this  file
+  except in compliance with the License.  You may obtain  a copy  of
+  the License at
 
-     Unless required by applicable law or agreed to in writing,
-     software distributed under the License is distributed on an
-     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-     KIND, either express or implied.  See the License for the
-     specific language governing permissions and limitations
-     under the License.
+    http://www.apache.org/licenses/LICENSE-2.0
 
-    -->
+  Unless  required  by  applicable law  or  agreed  to  in  writing,
+  software  distributed  under  the  License  is  distributed  on an
+  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR  CONDITIONS  OF ANY KIND,
+  either  express  or implied.  See  the License  for  the  specific
+  language governing permissions and limitations under  the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
         <version>9-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
-    <version>2.0.0-SNAPSHOT</version>
+
     <artifactId>schemagen</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
     <packaging>jar</packaging>
-    <name>Clerezza - RDF - SchemaGen: Class Generator for Ontologies</name>
+    <name>Clerezza - SchemaGen: Class Generator for Ontologies</name>
     <dependencies>
         <dependency>
             <groupId>org.wymiwyg</groupId>
@@ -60,7 +58,7 @@
     </dependencies>
     <build>
         <plugins>
-            <plugin>
+            <!-- <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <configuration>
                     <archive>
@@ -81,7 +79,7 @@
                         <phase>package</phase>
                     </execution>
                 </executions>
-            </plugin>
+	    </plugin> -->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
@@ -97,4 +95,4 @@
             </plugin>
         </plugins>
     </build>
-</project>
\ No newline at end of file
+</project>
diff --git a/schemagen/main/src/assembly/dist.xml b/schemagen/main/src/assembly/dist.xml
index 30c832d..95da964 100644
--- a/schemagen/main/src/assembly/dist.xml
+++ b/schemagen/main/src/assembly/dist.xml
@@ -1,48 +1,46 @@
-<?xml version='1.0'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor  license  agreements.  See the NOTICE file distributed
+  with this work  for  additional  information  regarding  copyright
+  ownership.  The ASF  licenses  this file to you under  the  Apache
+  License, Version 2.0 (the "License"); you may not  use  this  file
+  except in compliance with the License.  You may obtain  a copy  of
+  the License at
 
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
+    http://www.apache.org/licenses/LICENSE-2.0
 
+  Unless  required  by  applicable law  or  agreed  to  in  writing,
+  software  distributed  under  the  License  is  distributed  on an
+  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR  CONDITIONS  OF ANY KIND,
+  either  express  or implied.  See  the License  for  the  specific
+  language governing permissions and limitations under  the License.
 -->
-
 <assembly>
-  <id>dist</id>
-  <formats>
-    <format>dir</format>
-    <format>zip</format>
-    <!-- <format>tar.bz2</format> -->
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <fileSets>
-    <fileSet>
-      <directory>target</directory>
-      <outputDirectory></outputDirectory>
-      <includes>
-        <include>*.jar</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>/lib</outputDirectory>
-      <unpack>false</unpack>
-      <scope>runtime</scope>
-      <outputFileNameMapping> ${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
-    </dependencySet>
-  </dependencySets>
+    <id>dist</id>
+    <formats>
+        <format>dir</format>
+        <format>zip</format>
+        <!-- <format>tar.bz2</format> -->
+    </formats>
+    <includeBaseDirectory>false</includeBaseDirectory>
+    <fileSets>
+        <fileSet>
+            <directory>target</directory>
+            <outputDirectory></outputDirectory>
+            <includes>
+                <include>*.jar</include>
+            </includes>
+        </fileSet>
+    </fileSets>
+    <dependencySets>
+        <dependencySet>
+            <outputDirectory>/lib</outputDirectory>
+            <unpack>false</unpack>
+            <scope>runtime</scope>
+            <outputFileNameMapping>
+                ${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}
+            </outputFileNameMapping>
+        </dependencySet>
+    </dependencySets>
 </assembly>
diff --git a/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGen.java b/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGen.java
index b832113..3296842 100644
--- a/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGen.java
+++ b/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGen.java
@@ -1,26 +1,24 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor  license  agreements.  See the NOTICE file distributed
+ * with this work  for  additional  information  regarding  copyright
+ * ownership.  The ASF  licenses  this file to you under  the  Apache
+ * License, Version 2.0 (the "License"); you may not  use  this  file
+ * except in compliance with the License.  You may obtain  a copy  of
+ * the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless  required  by  applicable law  or  agreed  to  in  writing,
+ * software  distributed  under  the  License  is  distributed  on an
+ * "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR  CONDITIONS  OF ANY KIND,
+ * either  express  or implied.  See  the License  for  the  specific
+ * language governing permissions and limitations under  the License.
  */
 package org.apache.clerezza.schemagen;
 
 import org.apache.clerezza.*;
 import org.apache.clerezza.implementation.in_memory.SimpleGraph;
-import org.apache.clerezza.rdf.jena.parser.JenaParserProvider;
 import org.apache.clerezza.representation.Parser;
 import org.wymiwyg.commons.util.arguments.AnnotatedInterfaceArguments;
 import org.wymiwyg.commons.util.arguments.ArgumentHandler;
@@ -29,41 +27,41 @@ import org.wymiwyg.commons.util.arguments.InvalidArgumentsException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintWriter;
+import java.net.URISyntaxException;
 import java.util.*;
 
 /**
- * Generates the source code of a java-class with constants for an ontology
- * described in RDF
+ * Generates the source code of a java-class with constants for an ontology described in RDF.
  *
  * @author reto
  */
 public class SchemaGen {
 
-    public static void main( String... args ) throws Exception {
+    private final Graph schemaGraph;
+    private final String className;
+    private final String namespace;
+
+    public static void main(String... args) throws Exception {
         SchemaGenArguments arguments;
         try {
-            arguments = new ArgumentHandler( args ).getInstance( SchemaGenArguments.class );
-        } catch ( InvalidArgumentsException e ) {
-            System.out.println( e.getMessage() );
-            System.out.print( "Usage: SchemaGen " );
-            System.out.println( AnnotatedInterfaceArguments.getArgumentsSyntax( SchemaGenArguments.class ) );
-            PrintWriter out = new PrintWriter( System.out, true );
+            arguments = new ArgumentHandler(args).getInstance(SchemaGenArguments.class);
+        } catch (InvalidArgumentsException e) {
+            System.out.println(e.getMessage());
+            System.out.print("Usage: SchemaGen ");
+            System.out.println(AnnotatedInterfaceArguments.getArgumentsSyntax(SchemaGenArguments.class));
+            PrintWriter out = new PrintWriter(System.out, true);
             AnnotatedInterfaceArguments.printArgumentDescriptions(
-                    SchemaGenArguments.class, out );
+                    SchemaGenArguments.class, out);
             out.flush();
             return;
         }
 
-        SchemaGen schemaGen = new SchemaGen( arguments );
-        PrintWriter out = new PrintWriter( System.out );
-        schemaGen.writeClass( out );
+        SchemaGen schemaGen = new SchemaGen(arguments);
+        PrintWriter out = new PrintWriter(System.out);
+        schemaGen.writeClass(out);
         out.flush();
     }
 
-    private final Graph schemaGraph;
-    private final String className;
-    private final String namespace;
-
     /**
      * Creates an instance doing the transformation as specified by the
      * arguments.
@@ -71,16 +69,15 @@ public class SchemaGen {
      * @param arguments specification of the transformation
      * @throws IOException If an IO error occurs.
      */
-    public SchemaGen( SchemaGenArguments arguments )
-            throws IOException {
+    public SchemaGen(SchemaGenArguments arguments)
+            throws IOException, URISyntaxException {
         Parser parser = Parser.getInstance();
-        parser.bindParsingProvider( new JenaParserProvider() );
         InputStream serializedGraph = arguments.getSchemaUrl().openStream();
-        schemaGraph = parser.parse( serializedGraph,
-                arguments.getFormatIdentifier() );
+        schemaGraph = parser.parse(serializedGraph,
+                arguments.getFormatIdentifier());
         className = arguments.getClassName();
 
-        if ( arguments.getNamespace() == null ) {
+        if (arguments.getNamespace() == null) {
             namespace = getOntologyUri();
         } else {
             namespace = arguments.getNamespace();
@@ -88,15 +85,15 @@ public class SchemaGen {
     }
 
     private String getOntologyUri() {
-        Iterator<Triple> ontologyTriples = schemaGraph.filter( null, RDF.type, OWL.Ontology );
+        Iterator<Triple> ontologyTriples = schemaGraph.filter(null, RDF.type, OWL.Ontology);
         String result;
-        if ( ontologyTriples.hasNext() ) {
-            result = ( ( IRI ) ontologyTriples.next().getSubject() ).getUnicodeString();
+        if (ontologyTriples.hasNext()) {
+            result = ((IRI) ontologyTriples.next().getSubject()).getUnicodeString();
         } else {
-            throw new RuntimeException( "No OWL Ontology found!" );
+            throw new RuntimeException("No OWL Ontology found!");
         }
-        if ( ontologyTriples.hasNext() ) {
-            throw new RuntimeException( "More than one OWL Ontology found!" );
+        if (ontologyTriples.hasNext()) {
+            throw new RuntimeException("More than one OWL Ontology found!");
         }
         return result;
     }
@@ -108,167 +105,167 @@ public class SchemaGen {
      * @param out The print writer to write the transformation to.
      * @throws IllegalArgumentException If out is <code>null</code>.
      */
-    public void writeClass( PrintWriter out ) {
-        if ( out == null ) {
-            throw new IllegalArgumentException( "Invalid out: out" );
+    public void writeClass(PrintWriter out) {
+        if (out == null) {
+            throw new IllegalArgumentException("Invalid out: out");
         }
-        out.print( "// Generated by " );
-        out.println( getClass().getName() );
+        out.print("// Generated by ");
+        out.println(getClass().getName());
         String packageName = getPackageName();
-        if ( packageName != null ) {
-            out.print( "package " );
-            out.print( packageName );
-            out.println( ';' );
+        if (packageName != null) {
+            out.print("package ");
+            out.print(packageName);
+            out.println(';');
         }
         out.println();
-        out.println( "import org.apache.clerezza.IRI;" );
+        out.println("import org.apache.clerezza.IRI;");
         out.println();
-        out.print( "public class " );
-        out.print( getSimpleName() );
-        out.println( " {" );
+        out.print("public class ");
+        out.print(getSimpleName());
+        out.println(" {");
 
         SortedSet<OntologyResource> ontClasses = new TreeSet<>();
-        ontClasses.addAll( getResourcesOfType( RDFS.Class ) );
-        ontClasses.addAll( getResourcesOfType( RDFS.Datatype ) );
-        ontClasses.addAll( getResourcesOfType( OWL.Class ) );
+        ontClasses.addAll(getResourcesOfType(RDFS.Class));
+        ontClasses.addAll(getResourcesOfType(RDFS.Datatype));
+        ontClasses.addAll(getResourcesOfType(OWL.Class));
 
-        if ( ontClasses.size() > 0 ) {
-            out.println( "\t// Classes" );
-            printResources( ontClasses.iterator(), out );
+        if (ontClasses.size() > 0) {
+            out.println("\t// Classes");
+            printResources(ontClasses.iterator(), out);
         }
         SortedSet<OntologyResource> ontProperties = new TreeSet<>();
         //some ontologies defining things that are both classes
         //and properties, like image in RSS 1.0 - so we remove those
-        ontProperties.addAll( getResourcesOfType( RDF.Property, ontClasses ) );
-        ontProperties.addAll( getResourcesOfType( OWL.ObjectProperty, ontClasses ) );
-        ontProperties.addAll( getResourcesOfType( OWL.DatatypeProperty, ontClasses ) );
+        ontProperties.addAll(getResourcesOfType(RDF.Property, ontClasses));
+        ontProperties.addAll(getResourcesOfType(OWL.ObjectProperty, ontClasses));
+        ontProperties.addAll(getResourcesOfType(OWL.DatatypeProperty, ontClasses));
 
-        if ( ontProperties.size() > 0 ) {
+        if (ontProperties.size() > 0) {
             out.println();
-            out.println( "\t// Properties" );
-            printResources( ontProperties.iterator(), out );
+            out.println("\t// Properties");
+            printResources(ontProperties.iterator(), out);
         }
 
         //create a set of classes and properties. Everything else should be instances
-        ontClasses.addAll( ontProperties );
-        Collection<OntologyResource> instances = getResourcesOfType( null, ontClasses );
+        ontClasses.addAll(ontProperties);
+        Collection<OntologyResource> instances = getResourcesOfType(null, ontClasses);
 
-        if ( instances.size() > 0 ) {
+        if (instances.size() > 0) {
             out.println();
-            out.println( "\t// Properties" );
-            printResources( instances.iterator(), out );
+            out.println("\t// Properties");
+            printResources(instances.iterator(), out);
         }
 
-        out.println( "}" );
+        out.println("}");
     }
 
-    private void printResources( Iterator<OntologyResource> iterator,
-                                 PrintWriter out ) {
-        while ( iterator.hasNext() ) {
+    private void printResources(Iterator<OntologyResource> iterator,
+                                PrintWriter out) {
+        while (iterator.hasNext()) {
             OntologyResource ontologyResource = iterator.next();
             String description = ontologyResource.getDescription();
-            if ( description != null ) {
+            if (description != null) {
                 out.println();
-                out.println( "\t/**" );
-                out.print( "\t * " );
-                out.println( description );
-                out.println( "\t */" );
+                out.println("\t/**");
+                out.print("\t * ");
+                out.println(description);
+                out.println("\t */");
             }
-            out.print( "\tpublic static final IRI " );
-            out.print( ontologyResource.getLocalName() );
-            out.print( " = new IRI(\"" );
-            out.print( ontologyResource.getUriString() );
-            out.println( "\");" );
+            out.print("\tpublic static final IRI ");
+            out.print(ontologyResource.getLocalName());
+            out.print(" = new IRI(\"");
+            out.print(ontologyResource.getUriString());
+            out.println("\");");
         }
 
     }
 
-    private Collection<OntologyResource> getResourcesOfType( IRI type ) {
-        return getResourcesOfType( type, null );
+    private Collection<OntologyResource> getResourcesOfType(IRI type) {
+        return getResourcesOfType(type, null);
     }
 
     /**
      * @param type   the type of the class, or null for all things that are declared to be of a type
      * @param ignore a set things to ignore
-     * @return result
+     * @return       the result set of things
      */
-    private Collection<OntologyResource> getResourcesOfType( IRI type, Collection<OntologyResource> ignore ) {
+    private Collection<OntologyResource> getResourcesOfType(IRI type, Collection<OntologyResource> ignore) {
         Set<OntologyResource> result = new HashSet<>();
-        Iterator<Triple> classStatement = schemaGraph.filter( null, RDF.type,
-                type );
-        while ( classStatement.hasNext() ) {
-            Triple triple = classStatement.next();
+        Iterator<Triple> classStatements = schemaGraph.filter(null, RDF.type,
+                type);
+        while (classStatements.hasNext()) {
+            Triple triple = classStatements.next();
             BlankNodeOrIRI classResource = triple.getSubject();
-            if ( classResource instanceof BlankNode ) {
-                if ( type != null )
-                    System.err.println( "Ignoring anonymous resource of type " + type.getUnicodeString() );
-                else System.err.println( "Ignoring anonymous resource" );
-                for ( Triple contextTriple : getNodeContext( classResource, schemaGraph ) ) {
-                    System.err.println( contextTriple );
+            if (classResource instanceof BlankNode) {
+                if (type != null)
+                    System.err.println("Ignoring anonymous resource of type " + type.getUnicodeString());
+                else System.err.println("Ignoring anonymous resource");
+                for (Triple contextTriple : getNodeContext(classResource, schemaGraph)) {
+                    System.err.println(contextTriple);
                 }
                 continue;
             }
 
             // Test if the given resource belongs to the ontology
-            final IRI classUri = ( IRI ) classResource;
+            final IRI classUri = (IRI) classResource;
             final String strClassUri = classUri.getUnicodeString();
-            if ( strClassUri.startsWith( namespace ) ) {
+            if (strClassUri.startsWith(namespace)) {
                 // The remaining part of the class URI must not contain
                 // a slash '/' or a hash '#' character. Otherwise we assume
                 // that is belongs to another ontology.
                 final int offset = namespace.length();
-                int idxSlash = strClassUri.indexOf( '/', offset );
-                int idxHash = strClassUri.indexOf( '#', offset );
+                int idxSlash = strClassUri.indexOf('/', offset);
+                int idxHash = strClassUri.indexOf('#', offset);
 
                 // Note that we generously ignore the first character of the
                 // remaining part that may be a '/' or a '#' because the
                 // namespace may not end with such a character.
-                if ( idxSlash <= offset && idxHash <= offset ) {
+                if (idxSlash <= offset && idxHash <= offset) {
                     OntologyResource ontologyResource =
-                            new OntologyResource( classUri, schemaGraph );
-                    if ( ignore == null || !ignore.contains( ontologyResource ) )
-                        result.add( ontologyResource );
+                            new OntologyResource(classUri, schemaGraph);
+                    if (ignore == null || !ignore.contains(ontologyResource))
+                        result.add(ontologyResource);
                 }
             }
         }
         return result;
     }
 
-    private ImmutableGraph getNodeContext( BlankNodeOrIRI resource, Graph graph ) {
+    private ImmutableGraph getNodeContext(BlankNodeOrIRI resource, Graph graph) {
         final HashSet<BlankNode> dontExpand = new HashSet<>();
-        if ( resource instanceof BlankNode ) {
-            dontExpand.add( ( BlankNode ) resource );
+        if (resource instanceof BlankNode) {
+            dontExpand.add((BlankNode) resource);
         }
-        return getContextOf( resource, dontExpand, graph ).getImmutableGraph();
+        return getContextOf(resource, dontExpand, graph).getImmutableGraph();
 
     }
 
-    private Graph getContextOf( BlankNodeOrIRI node, Set<BlankNode> dontExpand,
-                                Graph graph ) {
+    private Graph getContextOf(BlankNodeOrIRI node, Set<BlankNode> dontExpand,
+                               Graph graph) {
         Graph result = new SimpleGraph();
-        Iterator<Triple> forwardProperties = graph.filter( node, null, null );
-        while ( forwardProperties.hasNext() ) {
+        Iterator<Triple> forwardProperties = graph.filter(node, null, null);
+        while (forwardProperties.hasNext()) {
             Triple triple = forwardProperties.next();
-            result.add( triple );
+            result.add(triple);
             RDFTerm object = triple.getObject();
-            if ( object instanceof BlankNode ) {
-                BlankNode bNodeObject = ( BlankNode ) object;
-                if ( !dontExpand.contains( bNodeObject ) ) {
-                    dontExpand.add( bNodeObject );
-                    result.addAll( getContextOf( bNodeObject, dontExpand, graph ) );
+            if (object instanceof BlankNode) {
+                BlankNode bNodeObject = (BlankNode) object;
+                if (!dontExpand.contains(bNodeObject)) {
+                    dontExpand.add(bNodeObject);
+                    result.addAll(getContextOf(bNodeObject, dontExpand, graph));
                 }
             }
         }
-        Iterator<Triple> backwardProperties = graph.filter( null, null, node );
-        while ( backwardProperties.hasNext() ) {
+        Iterator<Triple> backwardProperties = graph.filter(null, null, node);
+        while (backwardProperties.hasNext()) {
             Triple triple = backwardProperties.next();
-            result.add( triple );
+            result.add(triple);
             BlankNodeOrIRI subject = triple.getSubject();
-            if ( subject instanceof BlankNode ) {
-                BlankNode bNodeSubject = ( BlankNode ) subject;
-                if ( !dontExpand.contains( bNodeSubject ) ) {
-                    dontExpand.add( bNodeSubject );
-                    result.addAll( getContextOf( bNodeSubject, dontExpand, graph ) );
+            if (subject instanceof BlankNode) {
+                BlankNode bNodeSubject = (BlankNode) subject;
+                if (!dontExpand.contains(bNodeSubject)) {
+                    dontExpand.add(bNodeSubject);
+                    result.addAll(getContextOf(bNodeSubject, dontExpand, graph));
                 }
             }
         }
@@ -276,27 +273,24 @@ public class SchemaGen {
     }
 
     private String getSimpleName() {
-        int lastDotPos = className.lastIndexOf( '.' );
-        if ( lastDotPos == -1 ) {
+        int lastDotPos = className.lastIndexOf('.');
+        if (lastDotPos == -1) {
             return className;
         }
-        return className.substring( lastDotPos + 1 );
+        return className.substring(lastDotPos + 1);
     }
 
     private String getPackageName() {
-        int lastDotPos = className.lastIndexOf( '.' );
-        if ( lastDotPos == -1 ) {
+        int lastDotPos = className.lastIndexOf('.');
+        if (lastDotPos == -1) {
             return null;
         }
-        return className.substring( 0, lastDotPos );
+        return className.substring(0, lastDotPos);
     }
 
     private static class OntologyResource implements
             Comparable<OntologyResource> {
 
-        final Graph graph;
-        final IRI uri;
-
         static final List<String> reservedWords = Arrays.asList(
                 "abstract", "assert", "boolean", "break", "byte", "case",
                 "catch", "char", "class", "const", "continue", "default",
@@ -306,23 +300,26 @@ public class SchemaGen {
                 "new", "null", "package", "private", "protected", "public",
                 "return", "short", "static", "strictfp", "super", "switch",
                 "synchronized", "this", "throw", "throws", "transient",
-                "true", "try", "void", "volatile", "while" );
+                "true", "try", "void", "volatile", "while");
 
-        OntologyResource( IRI uri, Graph graph ) {
+        final Graph graph;
+        final IRI uri;
+
+        OntologyResource(IRI uri, Graph graph) {
             this.uri = uri;
             this.graph = graph;
         }
 
         String getLocalName() {
             String uriValue = uri.getUnicodeString();
-            int hashPos = uriValue.lastIndexOf( '#' );
-            int slashPos = uriValue.lastIndexOf( '/' );
-            int delimiter = Math.max( hashPos, slashPos );
-            String val = uriValue.substring( delimiter + 1 );
-            if ( val.length() == 0 ) return "THIS_ONTOLOGY";
+            int hashPos = uriValue.lastIndexOf('#');
+            int slashPos = uriValue.lastIndexOf('/');
+            int delimiter = Math.max(hashPos, slashPos);
+            String val = uriValue.substring(delimiter + 1);
+            if (val.length() == 0) return "THIS_ONTOLOGY";
             //replace bad characters...
-            val = val.replace( '-', '_' ).replace( '.', '_' );
-            return reservedWords.contains( val ) ? val + "_" : val;
+            val = val.replace('-', '_').replace('.', '_');
+            return reservedWords.contains(val) ? val + "_" : val;
         }
 
         String getUriString() {
@@ -332,66 +329,66 @@ public class SchemaGen {
         String getDescription() {
             StringBuilder result = new StringBuilder();
             Iterator<Triple> titleStatements = graph.filter(
-                    uri, DCTERMS.title, null );
-            while ( titleStatements.hasNext() ) {
+                    uri, DCTERMS.title, null);
+            while (titleStatements.hasNext()) {
                 RDFTerm object = titleStatements.next().getObject();
-                if ( object instanceof Literal ) {
-                    result.append( "title: " );
-                    result.append( ( ( Literal ) object ).getLexicalForm() );
-                    result.append( "\n" );
+                if (object instanceof Literal) {
+                    result.append("title: ");
+                    result.append(((Literal) object).getLexicalForm());
+                    result.append("\n");
                 }
             }
             Iterator<Triple> descriptionStatements = graph.filter(
-                    uri, DCTERMS.description, null );
-            while ( descriptionStatements.hasNext() ) {
+                    uri, DCTERMS.description, null);
+            while (descriptionStatements.hasNext()) {
                 RDFTerm object = descriptionStatements.next().getObject();
-                if ( object instanceof Literal ) {
-                    result.append( "description: " );
-                    result.append( ( ( Literal ) object ).getLexicalForm() );
-                    result.append( "\n" );
+                if (object instanceof Literal) {
+                    result.append("description: ");
+                    result.append(((Literal) object).getLexicalForm());
+                    result.append("\n");
                 }
             }
             Iterator<Triple> skosDefStatements = graph.filter(
-                    uri, SKOS.definition, null );
-            while ( skosDefStatements.hasNext() ) {
+                    uri, SKOS.definition, null);
+            while (skosDefStatements.hasNext()) {
                 RDFTerm object = skosDefStatements.next().getObject();
-                if ( object instanceof Literal ) {
-                    result.append( "definition: " );
-                    result.append( ( ( Literal ) object ).getLexicalForm() );
-                    result.append( "\n" );
+                if (object instanceof Literal) {
+                    result.append("definition: ");
+                    result.append(((Literal) object).getLexicalForm());
+                    result.append("\n");
                 }
             }
             Iterator<Triple> rdfsCommentStatements = graph.filter(
-                    uri, RDFS.comment, null );
-            while ( rdfsCommentStatements.hasNext() ) {
+                    uri, RDFS.comment, null);
+            while (rdfsCommentStatements.hasNext()) {
                 RDFTerm object = rdfsCommentStatements.next().getObject();
-                if ( object instanceof Literal ) {
-                    result.append( "comment: " );
-                    result.append( ( ( Literal ) object ).getLexicalForm() );
-                    result.append( "\n" );
+                if (object instanceof Literal) {
+                    result.append("comment: ");
+                    result.append(((Literal) object).getLexicalForm());
+                    result.append("\n");
                 }
             }
             Iterator<Triple> skosNoteStatements = graph.filter(
-                    uri, SKOS.note, null );
-            while ( skosNoteStatements.hasNext() ) {
+                    uri, SKOS.note, null);
+            while (skosNoteStatements.hasNext()) {
                 RDFTerm object = skosNoteStatements.next().getObject();
-                if ( object instanceof Literal ) {
-                    result.append( "note: " );
-                    result.append( ( ( Literal ) object ).getLexicalForm() );
-                    result.append( "\n" );
+                if (object instanceof Literal) {
+                    result.append("note: ");
+                    result.append(((Literal) object).getLexicalForm());
+                    result.append("\n");
                 }
             }
             Iterator<Triple> skosExampleStatements = graph.filter(
-                    uri, SKOS.example, null );
-            while ( skosExampleStatements.hasNext() ) {
+                    uri, SKOS.example, null);
+            while (skosExampleStatements.hasNext()) {
                 RDFTerm object = skosExampleStatements.next().getObject();
-                if ( object instanceof Literal ) {
-                    result.append( "example: " );
-                    result.append( ( ( Literal ) object ).getLexicalForm() );
-                    result.append( "\n" );
-                } else if ( object instanceof IRI ) {
-                    result.append( "see <a href=" ).append( ( ( IRI ) object ).getUnicodeString() ).append( ">example</a>" );
-                    result.append( "\n" );
+                if (object instanceof Literal) {
+                    result.append("example: ");
+                    result.append(((Literal) object).getLexicalForm());
+                    result.append("\n");
+                } else if (object instanceof IRI) {
+                    result.append("see <a href=").append(((IRI) object).getUnicodeString()).append(">example</a>");
+                    result.append("\n");
                 }
             }
             return result.toString();
@@ -403,21 +400,21 @@ public class SchemaGen {
         }
 
         @Override
-        public boolean equals( Object obj ) {
-            if ( obj == null ) {
+        public boolean equals(Object obj) {
+            if (obj == null) {
                 return false;
-            } else if ( obj == this ) {
+            } else if (obj == this) {
                 return true;
-            } else if ( OntologyResource.class.equals( obj.getClass() ) ) {
-                final OntologyResource other = ( OntologyResource ) obj;
-                return getUriString().equals( other.getUriString() );
+            } else if (OntologyResource.class.equals(obj.getClass())) {
+                final OntologyResource other = (OntologyResource) obj;
+                return getUriString().equals(other.getUriString());
             }
             return false;
         }
 
         @Override
-        public int compareTo( OntologyResource o ) {
-            return getUriString().compareTo( o.getUriString() );
+        public int compareTo(OntologyResource o) {
+            return getUriString().compareTo(o.getUriString());
         }
 
     }
@@ -430,56 +427,40 @@ public class SchemaGen {
      * OWL Ontology.
      */
     private static class OWL {
-
         private static final String NS = "http://www.w3.org/2002/07/owl#";
-        private static final IRI Class =
-                new IRI( NS + "Class" );
-        public static final RDFTerm Ontology = new IRI( NS + "Ontology" );
-        private static final IRI DatatypeProperty =
-                new IRI( NS + "DatatypeProperty" );
-        private static final IRI ObjectProperty =
-                new IRI( NS + "ObjectProperty" );
-
+        public static final RDFTerm Ontology = new IRI(NS + "Ontology");
+        private static final IRI Class = new IRI(NS + "Class");
+        private static final IRI DatatypeProperty = new IRI(NS + "DatatypeProperty");
+        private static final IRI ObjectProperty = new IRI(NS + "ObjectProperty");
     }
 
     /**
      * RDFS Ontology.
      */
     private static class RDFS {
-
-        private static final String NS =
-                "http://www.w3.org/2000/01/rdf-schema#";
-        private static final IRI Class = new IRI( NS + "Class" );
-        private static final IRI Datatype = new IRI( NS + "Datatype" );
-        private static final IRI comment = new IRI( NS + "comment" );
-
+        private static final String NS = "http://www.w3.org/2000/01/rdf-schema#";
+        private static final IRI Class = new IRI(NS + "Class");
+        private static final IRI Datatype = new IRI(NS + "Datatype");
+        private static final IRI comment = new IRI(NS + "comment");
     }
 
     /**
      * RDF Ontology.
      */
     private static class RDF {
-
-        private static final String NS =
-                "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
-        private static final IRI Property = new IRI( NS + "Property" );
-        private static final IRI type = new IRI( NS + "type" );
-
+        private static final String NS = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+        private static final IRI Property = new IRI(NS + "Property");
+        private static final IRI type = new IRI(NS + "type");
     }
 
     private static class SKOS {
-
-        static final IRI definition = new IRI( "http://www.w3.org/2008/05/skos#definition" );
-        static final IRI note = new IRI( "http://www.w3.org/2004/02/skos/core#note" );
-        static final IRI example = new IRI( "http://www.w3.org/2004/02/skos/core#example" );
-
+        static final IRI definition = new IRI("http://www.w3.org/2008/05/skos#definition");
+        static final IRI note = new IRI("http://www.w3.org/2004/02/skos/core#note");
+        static final IRI example = new IRI("http://www.w3.org/2004/02/skos/core#example");
     }
 
     private static class DCTERMS {
-
-        public static final IRI title = new IRI( "http://purl.org/dc/terms/title" );
-        public static final IRI description = new IRI( "http://purl.org/dc/terms/description" );
-
+        public static final IRI title = new IRI("http://purl.org/dc/terms/title");
+        public static final IRI description = new IRI("http://purl.org/dc/terms/description");
     }
-
 }
diff --git a/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGenArguments.java b/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGenArguments.java
index 0738771..ecdc1fd 100644
--- a/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGenArguments.java
+++ b/schemagen/main/src/main/java/org/apache/clerezza/schemagen/SchemaGenArguments.java
@@ -1,20 +1,19 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor  license  agreements.  See the NOTICE file distributed
+ * with this work  for  additional  information  regarding  copyright
+ * ownership.  The ASF  licenses  this file to you under  the  Apache
+ * License, Version 2.0 (the "License"); you may not  use  this  file
+ * except in compliance with the License.  You may obtain  a copy  of
+ * the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless  required  by  applicable law  or  agreed  to  in  writing,
+ * software  distributed  under  the  License  is  distributed  on an
+ * "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR  CONDITIONS  OF ANY KIND,
+ * either  express  or implied.  See  the License  for  the  specific
+ * language governing permissions and limitations under  the License.
  */
 package org.apache.clerezza.schemagen;
 
@@ -24,26 +23,25 @@ import org.wymiwyg.commons.util.arguments.CommandLine;
 
 
 /**
- * 
  * @author reto
  */
 public interface SchemaGenArguments {
     // comments omitted as redundant with description
 
-    @CommandLine(longName = "schema", shortName = { "S" }, required = true, 
+    @CommandLine(longName = "schema", shortName = {"S"}, required = true,
             description = "The URL from which the vocabulary can be retrieved")
     URL getSchemaUrl();
 
-    @CommandLine(longName = "namespace", shortName = { "N" },
+    @CommandLine(longName = "namespace", shortName = {"N"},
             description = "Namespace of the vocabulary, by default it uses the URI of a resource of type owl:Ontology found in the vocabulary")
     String getNamespace();
 
-    @CommandLine(longName = "format", shortName = { "F" },
+    @CommandLine(longName = "format", shortName = {"F"},
             description = "The RDF content-type of the schema (Content-Type in an HTTP-Response is ignored)",
             defaultValue = "application/rdf+xml")
     String getFormatIdentifier();
-    
-    @CommandLine(longName = "classname", shortName = { "C" }, required = true, 
+
+    @CommandLine(longName = "classname", shortName = {"C"}, required = true,
             description = "The fully qualified class name of the class to be created")
     String getClassName();
 }
diff --git a/schemagen/maven-plugin/LICENSE b/schemagen/maven-plugin/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/schemagen/maven-plugin/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/schemagen/maven-plugin/pom.xml b/schemagen/maven-plugin/pom.xml
index 91b78b6..c212bb7 100644
--- a/schemagen/maven-plugin/pom.xml
+++ b/schemagen/maven-plugin/pom.xml
@@ -1,46 +1,42 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor  license  agreements.  See the NOTICE file distributed
+  with this work  for  additional  information  regarding  copyright
+  ownership.  The ASF  licenses  this file to you under  the  Apache
+  License, Version 2.0 (the "License"); you may not  use  this  file
+  except in compliance with the License.  You may obtain  a copy  of
+  the License at
 
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
+    http://www.apache.org/licenses/LICENSE-2.0
 
+  Unless  required  by  applicable law  or  agreed  to  in  writing,
+  software  distributed  under  the  License  is  distributed  on an
+  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR  CONDITIONS  OF ANY KIND,
+  either  express  or implied.  See  the License  for  the  specific
+  language governing permissions and limitations under  the License.
 -->
-
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <artifactId>clerezza</artifactId>
         <groupId>org.apache.clerezza</groupId>
+        <artifactId>clerezza</artifactId>
         <version>9-SNAPSHOT</version>
         <relativePath>../../parent/pom.xml</relativePath>
     </parent>
-    <artifactId>maven-ontologies-plugin</artifactId>
+    <artifactId>ontologies-maven-plugin</artifactId>
     <packaging>maven-plugin</packaging>
     <version>2.0.0-SNAPSHOT</version>
-    <name>Clerezza - RDF - SchemaGen: Maven Ontologies Plugin</name>
+    <name>Clerezza - SchemaGen: Ontologies Maven Plugin</name>
     <dependencies>
         <dependency>
             <groupId>org.apache.maven</groupId>
             <artifactId>maven-plugin-api</artifactId>
-            <version>3.8.1</version>
         </dependency>
-          <dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-simple</artifactId>
-              <version>1.7.30</version>
         </dependency>
         <dependency>
             <groupId>org.apache.clerezza</groupId>
@@ -48,9 +44,8 @@
             <version>2.0.0-SNAPSHOT</version>
         </dependency>
         <dependency>
-             <groupId>org.apache.maven</groupId>
-             <artifactId>maven-project</artifactId>
-             <version>2.0.9</version>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-project</artifactId>
         </dependency>
     </dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/schemagen/maven-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java b/schemagen/maven-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
index 71fe302..058d714 100644
--- a/schemagen/maven-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
+++ b/schemagen/maven-plugin/src/main/java/org/apache/clerezza/ontologiesplugin/OntologyJavaClassCreatorMojo.java
@@ -1,20 +1,19 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor  license  agreements.  See the NOTICE file distributed
+ * with this work  for  additional  information  regarding  copyright
+ * ownership.  The ASF  licenses  this file to you under  the  Apache
+ * License, Version 2.0 (the "License"); you may not  use  this  file
+ * except in compliance with the License.  You may obtain  a copy  of
+ * the License at
  *
  *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless  required  by  applicable law  or  agreed  to  in  writing,
+ * software  distributed  under  the  License  is  distributed  on an
+ * "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR  CONDITIONS  OF ANY KIND,
+ * either  express  or implied.  See  the License  for  the  specific
+ * language governing permissions and limitations under  the License.
  */
 package org.apache.clerezza.ontologiesplugin;
 
@@ -26,6 +25,7 @@ import org.apache.maven.project.MavenProject;
 
 import java.io.*;
 import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
@@ -44,7 +44,7 @@ public class OntologyJavaClassCreatorMojo extends AbstractMojo {
     /**
      * Path to the root directory
      *
-     * @parameter expression="${basedir}"
+     * @parameter property="basedir"
      */
     private String baseDir;
 
@@ -71,7 +71,7 @@ public class OntologyJavaClassCreatorMojo extends AbstractMojo {
     private File[] sources;
 
     /**
-     * @parameter expression="${project}"
+     * @parameter property="project"
      * @required
      * @readonly
      */
@@ -81,78 +81,78 @@ public class OntologyJavaClassCreatorMojo extends AbstractMojo {
 
     @Override
     public void execute() throws MojoExecutionException {
-        supportedFormats.put( ".nt", "application/n-triples" );
-        supportedFormats.put( ".n3", "text/rdf+n3" );
-        supportedFormats.put( ".rdf", "application/rdf+xml" );
-        supportedFormats.put( ".ttl", "text/turtle" );
-        supportedFormats.put( ".turtle", "text/turtle" );
+        supportedFormats.put(".nt", "application/n-triples");
+        supportedFormats.put(".n3", "text/rdf+n3");
+        supportedFormats.put(".rdf", "application/rdf+xml");
+        supportedFormats.put(".ttl", "text/turtle");
+        supportedFormats.put(".turtle", "text/turtle");
         File file;
 
-        if ( resourcePath == null ) {
+        if (resourcePath == null) {
             resourcePath = baseDir + File.separator + "src" + File.separator
                     + "main" + File.separator + "ontologies";
-        } else if ( resourcePath.contains( "/" ) ) {
-            resourcePath = resourcePath.replace( "/", File.separator );
-        } else if ( resourcePath.contains( "\\" ) ) {
-            resourcePath = resourcePath.replace( "\\", File.separator );
+        } else if (resourcePath.contains("/")) {
+            resourcePath = resourcePath.replace("/", File.separator);
+        } else if (resourcePath.contains("\\")) {
+            resourcePath = resourcePath.replace("\\", File.separator);
         }
-        file = new File( resourcePath );
-        checkDir( file );
-        if ( sources != null ) {
-            for ( File source : sources ) {
-                project.addCompileSourceRoot( source.getAbsolutePath() );
-                getLog().info( "Source directory: " + source + " added." );
+        file = new File(resourcePath);
+        checkDir(file);
+        if (sources != null) {
+            for (File source : sources) {
+                project.addCompileSourceRoot(source.getAbsolutePath());
+                getLog().info("Source directory: " + source + " added.");
             }
         }
     }
 
-    private void checkDir( File ontologiesDir ) {
-        for ( File file : ontologiesDir.listFiles() ) {
-            if ( file.isDirectory() ) {
-                checkDir( file );
+    private void checkDir(File ontologiesDir) {
+        for (File file : ontologiesDir.listFiles()) {
+            if (file.isDirectory()) {
+                checkDir(file);
             } else {
                 String fileName = file.getName();
-                int indexOfLastDot = fileName.lastIndexOf( "." );
-                if ( indexOfLastDot != -1 ) {
-                    String fileEnding = fileName.substring( indexOfLastDot );
-                    if ( supportedFormats.containsKey( fileEnding ) ) {
-                        createJavaClassFile( file, fileEnding );
+                int indexOfLastDot = fileName.lastIndexOf(".");
+                if (indexOfLastDot != -1) {
+                    String fileEnding = fileName.substring(indexOfLastDot);
+                    if (supportedFormats.containsKey(fileEnding)) {
+                        createJavaClassFile(file, fileEnding);
                     }
                 }
             }
         }
     }
 
-    private void createJavaClassFile( final File file, final String fileEnding ) {
+    private void createJavaClassFile(final File file, final String fileEnding) {
         final String fileName = file.getName();
         final String absolutePath = file.getAbsolutePath();
-        final String className = fileName.replace( fileEnding, "" ).toUpperCase();
+        final String className = fileName.replace(fileEnding, "").toUpperCase();
         final String pathToJavaClass = absolutePath.substring(
-                absolutePath.indexOf( resourcePath ) + resourcePath.length() + 1 )
-                .replace( fileName, "" );
-        final String packageName = pathToJavaClass.replace( File.separator, "." )
+                absolutePath.indexOf(resourcePath) + resourcePath.length() + 1)
+                .replace(fileName, "");
+        final String packageName = pathToJavaClass.replace(File.separator, ".")
                 + className;
         SchemaGenArguments arguments = new SchemaGenArguments() {
 
             public URL getSchemaUrl() {
                 try {
                     return file.toURI().toURL();
-                } catch ( MalformedURLException e ) {
-                    getLog().error( e.getMessage(), e );
+                } catch (MalformedURLException e) {
+                    getLog().error(e.getMessage(), e);
                 }
                 return null;
             }
 
             public String getNamespace() {
-                if ( namespaceOfOntology != null
-                        && namespaceOfOntology.containsKey( fileName ) ) {
-                    return namespaceOfOntology.getProperty( fileName );
+                if (namespaceOfOntology != null
+                        && namespaceOfOntology.containsKey(fileName)) {
+                    return namespaceOfOntology.getProperty(fileName);
                 }
                 return null;
             }
 
             public String getFormatIdentifier() {
-                return supportedFormats.get( fileEnding );
+                return supportedFormats.get(fileEnding);
             }
 
             public String getClassName() {
@@ -162,31 +162,30 @@ public class OntologyJavaClassCreatorMojo extends AbstractMojo {
 
         SchemaGen schemaGen;
         try {
-            schemaGen = new SchemaGen( arguments );
-        } catch ( IOException e ) {
-            getLog().error( e.getMessage(), e );
+            schemaGen = new SchemaGen(arguments);
+        } catch (IOException | URISyntaxException e) {
+            getLog().error(e.getMessage(), e);
             return;
         }
         String rootPath = baseDir + File.separator + "target"
                 + File.separator + "generated-sources" + File.separator
                 + "main" + File.separator + "java" + File.separator;
-        File dir = new File( rootPath + pathToJavaClass );
+        File dir = new File(rootPath + pathToJavaClass);
         dir.mkdirs();
         PrintWriter out;
         try {
-            out = new PrintWriter( rootPath + pathToJavaClass + className + ".java", "utf-8" );
-        } catch ( FileNotFoundException e ) {
-            getLog().error( e.getMessage(), e );
+            out = new PrintWriter(new File(rootPath + pathToJavaClass + className + ".java"), "utf-8");
+        } catch (FileNotFoundException e) {
+            getLog().error(e.getMessage(), e);
             return;
-        } catch ( UnsupportedEncodingException e ) {
-            getLog().error( e.getMessage(), e );
-            throw new RuntimeException( "utf-8 not supported!" );
+        } catch (UnsupportedEncodingException e) {
+            getLog().error(e.getMessage(), e);
+            throw new RuntimeException("utf-8 not supported!");
         }
         try {
-            schemaGen.writeClass( out );
+            schemaGen.writeClass(out);
         } finally {
             out.flush();
         }
     }
-
 }