@@ -40,36 +40,16 @@ Currently, using the runtime supposes that the Java code representing
4040the LinkML-defined model is already available. Typically, it would have
4141been generated by LinkML-Py’s tool (` linkml generate java ` ).
4242
43- Importantly, for the runtime to work properly the code must satisfy the
44- following constraints:
45-
46- * All classes must have a publicly accessible no-argument constructor
47- (they may have additional constructors, but the no-argument one must
48- be present and public).
49-
50- * All classes must have predictable read/write accessors (` getX ` /` setX `
51- methods) for every single LinkML slot.
52-
53- * The name of the field representing a slot may differ from the name of
54- the original LinkML slot (this is typically done so that the code
55- looks more “Java-ish”), but in that case the field must be annotated
56- with a ` @SlotName ` annotation providing the original name.
57-
58- * If a class has an identifier slot or a key slot, that slot must be
59- annotated with a ` @Identifier ` or a ` @Identifier(isGlobal=false) `
60- annotation, respectively.
61-
62- * If the value of a slot is expected to be inlined, that slot must be
63- annotated with a ` @Inlined ` or ` @Inlined(asList=true) ` annotation.
64-
65- LinkML-Py’s own code generator already meets the first two requirements
66- (through the use of [ Lombok] ( https://projectlombok.org ) annotations);
43+ Importantly, for the runtime to work properly the code must satisfy
44+ specific requirements, as [ outlined in the
45+ documentation] ( https://incenp.org/dvlpt/linkml-java/linkml-core/codegen.html ) .
46+ LinkML-Py’s own code generator already meets some of those requirements;
6747hopefully it will soon provide an option to also automatically meet all
68- the other requirements .
48+ of them .
6949
7050Assuming you have a LinkML-defined model with a root class named ` Foo ` ,
71- and that you have generated code meeting the above requirements , you can
72- read an instance of ` Foo ` from a YAML file as follows:
51+ once you have generated the corresponding code , you can read an instance
52+ of ` Foo ` from a YAML file as follows:
7353
7454``` java
7555YAMLLoader loader = new YAMLLoader ();
@@ -84,14 +64,11 @@ define a top-level object, as for example with the
8464List<Change > kgclChangeset = loader. loadObjects(new File (" changes.kgcl" ), Change . class);
8565```
8666
87- (More documentation will come soon. Also please note that the interface
88- of ` YAMLLoader ` is not definitive yet.)
89-
9067Homepage and repository
9168-----------------------
9269The project is currently located at
93- < https://github.com/gouttegd /linkml-java > , which both hosts the
94- repository and acts as a temporary home page .
70+ < https://incenp.org/dvlpt /linkml-java/ > . The source code is available in
71+ a Git repository at < https://github.com/gouttegd/linkml-java > .
9572
9673Copying
9774-------
0 commit comments