streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Blackmon <>
Subject Re: POJOs
Date Mon, 31 Jul 2017 20:38:59 GMT
I pushed a branch depicting how we could approach Phase 1.  It specifies objects and generates beans the same way we do with activity
streams objects, just imagine every object specified and fields fully

I think it’s potentially possible to create schema files and basic content
by processing one or more of the files kept here:


On July 31, 2017 at 2:12:39 PM, sblackmon ( wrote:

Good to know there are others interested in this effort.

As Craig noted, there are public repositories on github supporting development, but none that I found are both a) JVM and b) easily
inter-operable with the rest of the Streams codebase.

To get us rolling, I created an improvement page on the wiki on which I
invite your comments.

Craig, I’ve given you edit permissions on the Streams wiki.

Aaron, i didn’t see your cwiki account - LMK once you’ve created a handle
and I’ll add you as well.

Or reply with comment in-line.  The current text of that page is included



   1. Pages
   2.  Streams Home
   3.  Improvement Initiatives

Skip to end of banner


Go to start of banner
<> support
Skip to end of metadata

   - Created by Steve Blackmon
   <> 27 minutes

Go to start of metadata

This is a multi-stage proposal for supporting documents in
Streams.  Activity Streams 2.0 explicitly supports types as
first class citizens.  While Apache Streams supports only Activity Streams
1.0 as of this writing, using will be an incentive to adopt AS
2.0 and preparation for that support can begin prior to full AS 2.0

A developer building with streams should be able to:

   1. Instantiate and then modify POJOs for core [1]
   2. Assign them to the actor, provider, object, and target fields of an
   3. Expect proper serialization and deserialization of application/json
   type documents
   4. Implement a conversion between an activity streams object and a object


Phase 1: model core objects using json-schema in a new project
module.  generate and publish POJOs in maven artifacts

Phase 2: implement unit tests that demonstrate proper serialization and
deserialization of json-formatted documents

Phase 3: provide a way to swap ActivityObject and Thing java classes in an
intelligent way, and for management of activities with any class that
extends Thing assignable to any field that currently requires an

Phase 4: support serialization to and from JSON-LD

Phase X: implement the extended vocabularies as well

   - streams-plugin-pojo does not currently support the jsonschema oneOf or
   anyOf syntax introduced with jsonschema v4. some fields can
   one one of several possible types.  we'll have to figure out a way to deal
   with this challenge at each phase
   - DateTimes - specifies datetimes using ISO 8601 whereas
   activity streams uses RFC3339.
   - Other libraries - we should be able to demonstrate compatibility with
   google's schemaorg-java library.  This will probably require adding
   optional GSON support to streams-pojo and streams-plugin-pojo.







On July 27, 2017 at 8:37:09 AM, James Bognar ( wrote:

I'm very interested but work on Juneau (and my real job) are pretty much
consuming me right now.

Good luck though!

On Thu, Jul 27, 2017 at 9:17 AM, Aaron Coburn <> wrote:

> Hello Steve,
> I would be happy to help with this as well. I am quite familiar with Java,
> Maven and the class hierarchy.
> Regards,
> Aaron
> > On Jul 26, 2017, at 6:19 PM, Craig Russell <> wrote:
> >
> > Hi Steve
> >
> > I'm interested in participating. It looks like the open source project
> at github is focused on python. Is this right?
> >
> > I have no experience with either the model or usage but I
> have used maven and java.
> >
> > Craig
> >
> >> On Jul 26, 2017, at 8:20 AM, sblackmon <> wrote:
> >>
> >> As you may know, Activity Streams 2.0 was written to explicitly support
> types as first class citizens. Given that, I’ve been thinking
> we should work to support throughout the project.
> >>
> >> The data model is a hierarchical class inheritance
> framework with properties inherited from parent class - which will be
> straightforward to implement by creating jsonschemas and generating beans
> the same way we do for the activity streams schemas.
> >>
> >> I looked for a maven-enabled OSS licensed implementation of the full
> set of pojos, but didn’t find anything, which leads me to
> believe such a thing would potentially be useful to the java community.
> >>
> >> Is anyone interesting in collaborating to make this happen? There are
> just under 600 total entities to model and they are organized such that it
> would be simple to sub-divide the effort among several or many
> >
> > Craig L Russell
> >
> >

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message