streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sblackmon <sblack...@apache.org>
Subject Re: schema.org POJOs
Date Mon, 31 Jul 2017 19:12:38 GMT
Good to know there are others interested in this effort.  

As Craig noted, there are public repositories on github supporting schema.org 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.

https://cwiki.apache.org/confluence/display/STREAMS/Schema.org+support

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 below.

Thanks!
Steve

——

Pages Streams Home Improvement Initiatives
Skip to end of banner
Go to start of banner

Schema.org support
Skip to end of metadata
Created by Steve Blackmon 27 minutes ago
Go to start of metadata
Summary
This is a multi-stage proposal for supporting schema.org documents in Streams.  Activity
Streams 2.0 explicitly supports schema.org types as first class citizens.  While Apache
Streams supports only Activity Streams 1.0 as of this writing, using schema.org will be an
incentive to adopt AS 2.0 and preparation for that support can begin prior to full AS 2.0
support. 
Objectives
A developer building with streams should be able to:
Instantiate and then modify POJOs for core schema.org [1]
Assign them to the actor, provider, object, and target fields of an activity
Expect proper serialization and deserialization of application/json type documents
Implement a conversion between an activity streams object and a schema.org object
Proposal
Phase 1: model core schema.org 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 schema.org 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 ActivityObject
Phase 4: support serialization to and from JSON-LD
Phase X: implement the extended vocabularies as well
Considerations
streams-plugin-pojo does not currently support the jsonschema oneOf or anyOf syntax introduced
with jsonschema v4. some schema.org 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 - schema.org 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.
References
[1] http://schema.org/docs/schemas.html
[2] https://github.com/json-schema-org/json-schema-org.github.io
[3] http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.26
[4] http://schema.org/DateTime
[5] https://github.com/google/schemaorg-java

On July 27, 2017 at 8:37:09 AM, James Bognar (jamesbognar@apache.org) 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 <acoburn@apache.org> wrote:  

> Hello Steve,  
>  
> I would be happy to help with this as well. I am quite familiar with Java,  
> Maven and the schema.org class hierarchy.  
>  
> Regards,  
> Aaron  
>  
>  
> > On Jul 26, 2017, at 6:19 PM, Craig Russell <apache.clr@gmail.com> 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 schema.org model or usage but I  
> have used maven and java.  
> >  
> > Craig  
> >  
> >> On Jul 26, 2017, at 8:20 AM, sblackmon <sblackmon@apache.org> wrote: 

> >>  
> >> As you may know, Activity Streams 2.0 was written to explicitly support  
> schema.org types as first class citizens. Given that, I’ve been thinking  
> we should work to support schema.org throughout the project.  
> >>  
> >> The schema.org 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 schema.org 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 participants.  
> >  
> > Craig L Russell  
> > clr@apache.org  
> >  
>  
>  

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