Commit Graph

501 Commits

Author SHA1 Message Date
Cory Slep db98736f28 Add Usage help text to the experimental tool. 2019-01-27 16:20:45 +01:00
Cory Slep ed1a715571 Remove 'prefix' and create autodetecting 'path' flag. 2019-01-27 15:25:49 +01:00
Cory Slep 1f7f42e4cc Remove 'individual' flag.
Clean up and comment the main file for the exp tool.

go fmt also rearranged the imports in a lot of files.
2019-01-27 12:16:56 +01:00
Cory Slep 5ac1ebd79e Remove old TODOs 2019-01-26 22:09:23 +01:00
Cory Slep 9c2c99588f Switch from cjslep fork to go-fed in exp tool 2019-01-26 21:36:04 +01:00
Cory Slep 5d21a35f8f Remove as directory 2019-01-26 21:30:03 +01:00
Cory J Slep e00b7d8d58
Merge pull request #80 from cjslep/dev
Experimental tool code-generation complete.
2019-01-26 19:49:59 +01:00
Cory Slep 248a464c02 Add property constructors. 2019-01-26 19:46:25 +01:00
Cory Slep da710a6bfd Add resolver generated comments 2019-01-26 19:00:06 +01:00
Cory Slep 929831f6e2 Code generate all kind of resolvers. 2019-01-26 12:48:06 +01:00
Cory Slep 355e2bd106 Initial resolver outline.
Need to:
- Hook into convert package
- Add comments everywhere to generated code
- Add version that supports navigating AS hierarchy (or applies
  interface-first instead of type-first).
2019-01-20 00:01:54 +01:00
Cory Slep 694c0e6898 Add TODOs for alias normalization when adding types and properties. 2019-01-19 17:59:11 +01:00
Cory Slep 8942794712 Vocab alias autodetected at generation time.
Default aliases no longer used at deserialization time.
2019-01-19 17:57:20 +01:00
Cory Slep ac87264b54 @context aliasing handled in generated serialization code. 2019-01-19 16:56:19 +01:00
Cory Slep a2a8775265 First pass at @context management.
Needs several improvements:
- private alias member for each type/property
- New constructor function sets this to be code-generated default
- Modify deserialize to also accept an @context alias map to override
  default if needed.
- Add utility function in root package to turn @context into an alias
  map, which will be needed by resolvers.
2019-01-19 15:17:39 +01:00
Cory Slep b349761fbc Multiple specs now build successfully after being generated. 2019-01-18 23:35:23 +01:00
Cory Slep bb777571c8 Put interfaces from different vocabularies together. 2019-01-18 21:49:55 +01:00
Cory Slep c3b9686d1f Fix init generation for multiple vocabularies. 2019-01-18 21:22:07 +01:00
Cory Slep a40bd3129f Also generate refrenced vocabularies. 2019-01-18 20:45:52 +01:00
Cory Slep ceb542ffd3 Multiple specs now generates, but generated code is borked.
The interfaces need to all be generated together, or else vocabularies
could have cyclic dependencies.

Package documentation will need to reflect each of the vocabularies'
documentation.

References' types and properties need to be generated.
2019-01-17 22:40:52 +01:00
Cory Slep c12e854487 Slightly saner internal function 2019-01-16 21:53:36 +01:00
Cory Slep 920144aba6 Multiple specs supported by RDF parser.
However, the converter still cannot handle converting it to generators
and then files.
2019-01-16 21:43:36 +01:00
Cory Slep 4582f88848 Add custom_spec.json. Populate Vocab name from spec document. 2019-01-14 22:06:03 +01:00
Cory Slep e2eed869af Code generate the comments in the type and property GoDoc. 2019-01-13 23:04:24 +01:00
Cory Slep d3a4507a2a Newline after main program says done. 2019-01-13 22:34:29 +01:00
Cory Slep ad06a07dfa Improve comments and add iterator methods.
Begin, End, Empty, Next, Prev were added. Clarified about concurrent
access not being a thing. Also added "should not use" or "do not use"
comments to the methods that needed it.
2019-01-13 22:17:43 +01:00
Cory Slep 648d7fb7b3 Add Set functions to non-functional property. 2019-01-13 18:17:54 +01:00
Cory Slep d14128bc0b Add package-level documentation, code generated. 2019-01-13 18:01:50 +01:00
Cory Slep 2527b47493 Generate root-level package documentation. 2019-01-12 22:34:27 +01:00
Cory Slep 730135b307 Lower case filenames for consistency. 2019-01-12 21:41:09 +01:00
Cory Slep 7b4fadd871 Use upper casing in function name for vocabularies. 2019-01-12 21:28:58 +01:00
Cory Slep e6160858f0 Remove ValueRoot and comment all direct code.
Still need to review the comments on all code-generated code.
2019-01-12 20:53:00 +01:00
Cory Slep 1f12842eeb Rename 'props' package to 'gen'. 2019-01-12 15:28:21 +01:00
Cory Slep ffd18e29d0 Individual package names prefixed with type or property 2019-01-12 15:21:40 +01:00
Cory Slep 3dbad22900 Add flag for generating with individual package policy. 2019-01-12 14:37:37 +01:00
Cory Slep 6d12549b18 Clean up duplicated code in package generators. 2019-01-12 14:34:19 +01:00
Cory Slep 884cbd8693 Expose extends, disjoint, and extendedBy in root package. 2019-01-12 14:02:13 +01:00
Cory Slep caf1e8943f Hook up managers at init time. 2019-01-12 12:52:48 +01:00
Cory Slep a93c6aa678 Add constructors in pkg and for types. 2019-01-12 12:30:08 +01:00
Cory Slep c8cec42c57 Make property members private. 2019-01-08 20:47:55 +01:00
Cory Slep a4f90ff8e0 Address two TODOs 2019-01-08 20:37:04 +01:00
Cory Slep f2c70191ab Fix bad formatting in comments. 2019-01-07 22:50:07 +01:00
Cory Slep 1a6a1213a5 Make comments look slick. 2019-01-07 22:39:30 +01:00
Cory Slep 9df52c8c45 Prepare comments to be auto-truncated at write time.
This changes comments to only be strings passed around between the
codegen package and its clients. This lets codegen in the future limit
how long a comment line is when generating the code.
2019-01-07 22:06:32 +01:00
Cory Slep 9369a8ad79 Ensure all interfaces have comments from the spec. 2019-01-07 21:31:36 +01:00
Cory Slep b7ec140c66 Non-functional property interfaces now have breathing room. 2019-01-07 21:26:04 +01:00
Cory Slep e8fb31437e Print interface, struct, and typedef methods and functions in alphabetical order 2019-01-07 21:22:01 +01:00
Cory Slep 1b0ceb8344 Add IRI methods to properties. 2019-01-07 20:33:03 +01:00
Cory Slep 7ac133d101 Add IRI support and fix all build errors.
Generated code now will also compile, for the first time in forever!
2019-01-06 22:15:07 +01:00
Cory Slep ea8af5c968 Prep for IRIs, no more circular deps, added getters/setters.
A lot of stuff just happened for the better.
2019-01-06 19:44:24 +01:00