-
Notifications
You must be signed in to change notification settings - Fork 0
RenderingService class
This class can create the string representation of
- OWL entities
- Differences between entities
And it can create OWL entities from rendering strings.
- OWLDataFactory - to create OWL object
- Engine - this calculates the differences between OWL objects, using the most appropriate algorythm.
- sourceRenderer and targetRenderer - this two ar object of a deprecated class which can do the renderings
- surceWriter and targetWriter - this two are object of an inner class
- targetNameToEntityMap - this Map contains String - OWLEntity pairs
- static RenderingService get (Engine) - it returns a new RenderingService with the given engine. It's not a constructor.
- static List getDefaultLanguages - it returns a list thatcontains the default language of the locale of the running JVM instance and english.
- methods, which give a short form to the given ontology
- setters to the renderer objects
- renderer methods, which render OWLObjects, and EntityBasedDiffs (it contains the difference between entities)
- getRenderer, which returns a renderer object
I think there is some code which are not the best.
Inner class WriterDelegate is useless
It contains a StringWriter object, and it extends Writer class. In every overrided method it only call the same method in the StringWriter object, but it doesn't add only one extra functionality, it has a reset method. This inner class is private and used only in RenderingService class. I looked over all the usages if it, and I see, that the class could use a simple StringWriter objet instead of this WriterDelegate, and a simple reset method. I made the changes and created a pull request for it.
ManchesterOWLSyntaxObjectRenderer class is deprecated
SourceRenderer and targetRenderer are object of this deprecated class. I looked for any solution to change it, but I didn't find anything. The problem is, that the documentation of this class don't really help what it really do. I see, that it is a visitor class, but it implements too much interface, so it's not the good way to write an own class to replace with it.