streams-dev mailing list archives

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

https://github.com/steveblackmon/incubator-streams/tree/schemaorg/streams-schemas/streams-schema-schemaorg

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

https://github.com/schemaorg/schemaorg/tree/master/data/releases/3.2

Steve

On July 31, 2017 at 2:12:39 PM, sblackmon (sblackmon@apache.org) wrote:

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

——


   1. Pages
   <https://cwiki.apache.org/confluence/collector/pages.action?key=STREAMS&src=breadcrumbs-collector>
   2.  Streams Home
   <https://cwiki.apache.org/confluence/display/STREAMS/Streams+Home?src=breadcrumbs>
   3.  Improvement Initiatives
   <https://cwiki.apache.org/confluence/display/STREAMS/Improvement+Initiatives?src=breadcrumbs-parent>

Skip to end of banner
<https://cwiki.apache.org/confluence/display/STREAMS/Schema.org+support#page-banner-end>

   -

Go to start of banner
<https://cwiki.apache.org/confluence/display/STREAMS/Schema.org+support#page-banner-start>

Schema.org support
<https://cwiki.apache.org/confluence/display/STREAMS/Schema.org+support>
Skip to end of metadata
<https://cwiki.apache.org/confluence/display/STREAMS/Schema.org+support#page-metadata-end>

   - Created by Steve Blackmon
   <https://cwiki.apache.org/confluence/display/~steveblackmon> 27 minutes
   ago
   <https://cwiki.apache.org/confluence/pages/viewpreviousversions.action?pageId=73631822>

Go to start of metadata
<https://cwiki.apache.org/confluence/display/STREAMS/Schema.org+support#page-metadata-start>
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:

   1. Instantiate and then modify POJOs for core schema.org [1]
   2. Assign them to the actor, provider, object, and target fields of an
   activity
   3. Expect proper serialization and deserialization of application/json
   type documents
   4. 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