owlcs / ont-api

ONT-API (OWL-API over Apache Jena)
44 stars 5 forks source link

2.0.0: Rename public API classes and other refactoring #4

Closed sszuev closed 4 years ago

sszuev commented 5 years ago

Since the root package and the artifact names have been changed, there is an idea to change names of several major classes as well (for coming release 2.0.0).

Currently this proposition includes the following changes:

1) com.github.owlcs.ontapi.OntologyModel (former ru.avicomp.ontapi.OntologyModel) -> com.github.owlcs.ontapi.Ontology. Why ? The suffix 'Model' is absent in OWL-API. Also it is a part name of graph-model (the current OntGraphModel). To distinguish RDF-view and OWL-view, better to leave suffix 'Model' for things from the first category.

2) ONT-API top components:

3) com.github.owlcs.ontapi.jena.model.OntGraphModel (former ru.avicom.ontapi.jena.model.OntGraphModel) -> com.github.owlcs.ontapi.jena.model.OntModel. Why? Because the name OntModel is shorter, and therefore better. It makes no sense to emphasize it is a Graph model, since this fact is already encoded in the full class name (the package is *.jena.model.*). Any model in Jena is a graph model. The main argument why such a name (i.e. OntGraphModel) was chosen was desire to distinguish our model with jena org.apache.jena.ontology.OntModel.
Now I think, this was not quit correct - both models hardly can live in one snippet simultaneously, and it would be better for clients to use only one model, either Jena’s or ours. Well, they actually can mix whatever they want, but it is just a marker of poor design. In functional sense, there should not be anything that org.apache.jena.ontology.OntModel could do, but our model (com.github.owlcs.ontapi.jena.model.OntModel) could not. Well, with except of inference. And we could not use the prefix Owl or OWL : the first one is just incorrect, and the second one is reserved by OWL-API. The prefix ONT is also incorrect - it is abbreviation, not acronym. So, the only right prefix is Ont, which leads to the same name - OntModel

4) Jena Ontology API (RDF Model components) refactoring, see https://github.com/owlcs/ont-api/issues/8

5) Move/rename com.github.owlcs.ontapi.jena.utils.BuiltIIn ( -> com.github.owlcs.ontapi.jena.OntVocabulary as analogue of org.semanticweb.owlapi.vocab.OWLRDFVocabulary ) + rename methods (add get prefix for methods returning collections, i.e. for all)

6) com.github.owlcs.ontapi.transforms.Transform refactoring: get rid of Transform abstraction, that accept model/graph as constructor parameter, instead there should be stateless interface (currently it is GraphTransforms.Maker - but this is a bad name)

sszuev commented 4 years ago

close