5.0.0.20 (Apr 7, 2013)
Juno 5.0.0.20 is a major update.
Core API changes
-
New Jena-based {@link oaj.jena.RdfSerializer} for serializing POJOs to RDF/XML, RDF/XML-ABBREV, N-Triple, Turtle, and N3.
Serializes ANY POJOs to RDF, even simple objects and primitives.
-
New Jena-based {@link oaj.jena.RdfParser} for parsing RDF/XML, RDF/XML-ABBREV, N3, Turtle, and N-Triple back into POJOs.
-
XmlSerializerContext.XML_autoDetectNamespaces default changed to true.
The old default value would cause XML with unmapped namespaces if you didn't manually specify them via the XmlSerializerContext.XML_namespaces annotation.
While setting the default to true is somewhat slower (since the serializer must crawl the POJO tree to find namespaces), the benefits of having it work out-of-the-box outweighs the performance concerns.
For developers concerned about performance, they can always change it back to false and specify the namespaces themselves.
REST server API changes
-
Allow inheritance of @RestResource annotation.
Serializers, parsers, filters, properties , guards, and converters definitions are automatically inherited from parent classes and interfaces.
-
Enhancements to {@link oajr.annotation.RestMethod @RestMethod} annotation:
-
New RestMethod.filters() annotation for defining POJO filters at the method level.
-
New RestMethod.serializersInherit() and RestMethod.parsersInherit() annotations for controlling how serializers and parsers (and associated filters and properties) are inherited from the class.
This replaces the previous addSerializers and addParsers annotations.
-
New RestServletJenaDefault servlet that includes serialization/parsing support for all Jena-based serializers and parsers.
-
New DefaultJenaProvider JAX-RS provider that includes serialization/parsing support for all Jena-based serializers and parsers.
-
Eliminated RestServletChild class.
It's redundant with the introduction of inheritable annotations.
-
New methods on {@link oajr.RestServlet}:
- RestServlet.createConfigFactory()
- RestServlet.createSerializers()
- RestServlet.createParsers()
These augment the existing getBeanContext() / getSerializers() / getParsers() methods.
REST client API changes
-
New RestCall.setDateHeader(String,Object) method for setting ISO8601 datetime headers.