コミットグラフ

187 コミット

作成者 SHA1 メッセージ 日付
Cory Slep
0530121039 Progress on implementing the schema ontology.
- can process name
- can process url
- properties can have examples
- id no longer requires a thing to be set on (may need to be revisited)
2018-12-02 22:37:43 +01:00
Cory Slep
e508425ddb Remove leftover print call 2018-12-02 22:36:43 +01:00
Cory Slep
676dc64dbb Allow a node to hijack the rest of the recursive descent.
Also, fixed a bug where errors were not getting propagated properly from
RDFNodes back to the apply process.
2018-12-02 22:35:46 +01:00
Cory Slep
e13d837405 Add alias to name in spec 2018-12-02 22:35:23 +01:00
Cory Slep
503e95e52e Add alias for url 2018-12-02 20:07:01 +01:00
Cory Slep
30f9f6a16b Fix aliasing specific elements.
Also adds some placeholders for the schema ontology.

Eliminated some dead code in the RDF manager thing.

Next step is to get mainEntity parsing to ignore the rest of the values,
which should be easier to do, maybe.
2018-12-02 20:04:56 +01:00
Cory Slep
caa2e4d2fa Expand the as alias to the ActivityStreams URI 2018-12-02 13:56:36 +01:00
Cory Slep
90b12d43aa Fix bugs for handling aliased nodes and containers
Implemented the beginning of the container and index handling, but have
not yet completed it.
2018-12-02 13:55:29 +01:00
Cory Slep
b657bd2307 Add some OWL ontology implementations 2018-12-01 18:31:35 +01:00
Cory Slep
c61bd2d129 Add rdf ontology nodes, make processing mandatory. 2018-12-01 16:36:33 +01:00
Cory Slep
94569ca549 Setup applying RDF node understanding.
Next, the actual nodes need to be created in order to construct the
proper intermediate form and translate the parsed data into a meaningful
structure that can be used to generate code.

Ideally, this could also potentially allow code generation in other
languages too. And different ways to read in ActivityStreams
specifications and extensions. But that would be way off in the future.
2018-11-29 22:53:48 +01:00
Cory Slep
68f6602ebb Fix fork imports and rearrange parsing functions 2018-11-29 01:22:56 +01:00
Cory Slep
0470f8e603 Add internal parsed RDF definition data types.
This is an evolution of the old tools/defs/types.go file which
essentially had these data structs manually defined in a static go file.
Now, the parser should be able to construct this data structure on the
fly from input files and reference files.
2018-11-28 23:50:07 +01:00
Cory Slep
8b4f9fc81c Prepare tool for ingesting JSON LD context defs. 2018-11-28 21:40:11 +01:00
Cory Slep
2709d26229 Ran gofmt in props dir 2018-11-28 21:39:11 +01:00
Cory Slep
9cae676dd9 Add activitystreams specification definition.
Credit for the file goes to:
https://github.com/gobengo/activitystreams2-spec-scraped/blob/master/data/activitystreams-vocabulary/1528589057.json
2018-11-28 21:38:40 +01:00
Cory Slep
ff0fcb60f3 Update README and CHANGELOG in preparation for v0.4.0 release 2018-11-17 17:17:38 +01:00
Cory Slep
31482f867e Add constructors for the streams package. 2018-11-17 16:59:49 +01:00
Cory Slep
2d4695e969 Update Write.as to WriteFreely in README 2018-11-17 16:43:32 +01:00
Cory Slep
8795587007 Experimental: Add RDF package for JSONLD context definitions.
This package will be the frontend for reading the JSONLD context
descriptions that specify ActivityStreams vocabularies. This will allow
ingesting publicly hosted or manually-created vocabularies and
generating an internal representation for later code generation.
2018-11-17 16:33:42 +01:00
Cory Slep
137c1d51fb Remove unnecessary whitespace 2018-11-17 16:33:21 +01:00
Cory Slep
7f8b7a6723 experimental: Add disjoint type function
Also fix a bug where the Name() method was being called on a string.
2018-11-04 19:20:42 +01:00
Cory Slep
2ebd905f76 experimental: More type improvements.
- Fixed extendedBy generated method behaving like extends
- Add the extends generated method
- Extends / extendedBy examine the parent / children as well
- Properties and types cache their generated structs, only creating the
  codegen types once
- Create convenience constructor methods
2018-11-04 19:05:56 +01:00
Cory Slep
d08cc46275 experimental: Add ActivityPub types.
This begins adding types as standalone compositions of properties, along
with helper functions to manage the hierarchy better than the current v0
implementation.

I think it will still need to be focused on flexibility at compile time
over runtime; but this will still allow extensions to be generated
easily from existing code.

This is a natural extension of the v0 philosophy: many folks still
cannot understand the similarity that to deploy new meaningful behaviors
with interpreted javascript/python/etc then code still needs to be
written and deployed, just as this go code will need to be regenerated,
written against, and deployed.

Code generation plus type system means a lot of the heavy lifting and
potential errors are already thought through for an ActivityPub
developer.
2018-11-03 16:56:09 +01:00
Cory Slep
e834879207 Experimental: restructure directories 2018-10-19 22:44:13 +02:00
Cory Slep
c4425ee50e experimental: Keep single-type special-case API
After deliberating on the APIs for properties that can have a single
type vs multiple types, I've decided to keep the distinctly separate
APIs for the single-type properties. This means humans reading the APIs
will use simpler and more reasonable getters/setters, etc. However, by
default the two kinds of properties will not be able to satisfy the same
interface.

If this is needed, in the future we can auto-generate thin-wrapper types
around single-type properties that cause them to have a shared API with
the multi-type properties. But that won't be tackled for now, as its
expected use case is small.
2018-10-16 22:08:10 +02:00
Cory Slep
4f628f1b7e Support natual language maps for properties. 2018-10-16 22:00:18 +02:00
Cory Slep
c91db1e4ae Support unknown property types when serializing and deserializing 2018-10-11 12:15:55 +02:00
Cory Slep
3a9b9812b5 Fix spacing in generated comment 2018-10-11 11:38:46 +02:00
Cory Slep
4a35079fd0 Add comments, clean up code 2018-10-10 00:32:37 +02:00
Cory Slep
eb09223588 Make code generation more robust 2018-10-08 22:19:10 +02:00
Cory Slep
c8431878da Now that core fundamentals are working, begin refactoring 2018-09-25 23:21:07 +02:00
Cory Slep
1426f30be1 Add comments to nonfunctional properties. 2018-09-20 19:24:20 +02:00
Cory Slep
d0c1e6a3e3 Add comments to functional properties.
Also, clean up the spacing for generated code so it is pleasing to look at.
2018-09-18 23:00:08 +02:00
Cory Slep
87032d3af9 Add serialization/deserialization generated code. 2018-09-16 00:02:11 +02:00
Cory Slep
c3ec4d5344 More exprimentation with property-oriented code generation 2018-09-12 22:45:59 +02:00
Cory Slep
1a1c50acfb Experimental directory for v1 code generation. 2018-09-04 23:44:16 +02:00
Cory Slep
3076a5410a Add nascent idea to static + dynamic plugin system
This is on the road for v1: enabling plugins for vocabulary extensions
and either supporting them in static or dynamic scenarios.

This new as/ folder is temporary to play around with, it is expected to
fold back into the pub area once I am making more sweeping changes for v1.
2018-09-01 20:03:51 +02:00
Cory Slep
806c037e3b Add note to self to check Follow edge case 2018-09-01 20:03:40 +02:00
Cory Slep
3b3c8efdd1 Add Read.as to the list of client applications 2018-08-28 20:24:53 +02:00
Cory Slep
a7d2d52351 Add multiply-typed unknown property methods to vocab interfaces. 2018-08-21 22:26:13 +02:00
Cory Slep
9e2efad733 Update README and CHANGELOG for v0.3.0 2018-08-21 20:56:34 +02:00
Cory Slep
012f23e435 Update CHANGELOG 2018-08-21 20:53:18 +02:00
Cory Slep
83277d57c9 Announce activities now add to shares collections on objects. 2018-08-21 20:49:24 +02:00
Cory Slep
2071460bc1 Update CHANGELOG 2018-08-21 19:07:14 +02:00
Cory Slep
bd6369d284 Add the missing 'shares' property to streams.Object 2018-08-21 19:01:16 +02:00
Cory Slep
befab36c29 Add the missing 'shares' property to vocab.Object 2018-08-21 18:59:18 +02:00
Cory Slep
c430c8af1d Update CHANGELOG 2018-08-20 23:19:43 +02:00
Cory Slep
1252727ca8 Add tests for Callbacker extensions 2018-08-20 23:11:33 +02:00
Cory Slep
1c057922ca Fix intransitive activity generated code in vocab.
The sub-types of Intransitive Activity (Arrive, etc) would not satisfy
the vocab.IntransitiveActivityType interface, due to not accounting for
the parent WithoutProperties definition.

This fixes that code generation, so that all Activity subtypes will be
able to be properly converted to vocab.ActivityType or
vocab.IntransitiveActivityType.

Updated the PostOutbox code path to properly handle this distinction
when receiving a C2S IntransitiveActivity.
2018-08-20 23:08:02 +02:00