Skip to content

Commit daab29a

Browse files
committed
Update README.
Update the README to (1) point to the home page (now that it is online) and (2) replace the list of requirements for the generated code by a link to the corresponding page in the documentation, which is more complete.
1 parent 7136f45 commit daab29a

1 file changed

Lines changed: 9 additions & 32 deletions

File tree

README.md

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,36 +40,16 @@ Currently, using the runtime supposes that the Java code representing
4040
the LinkML-defined model is already available. Typically, it would have
4141
been 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;
6747
hopefully it will soon provide an option to also automatically meet all
68-
the other requirements.
48+
of them.
6949

7050
Assuming 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
7555
YAMLLoader loader = new YAMLLoader();
@@ -84,14 +64,11 @@ define a top-level object, as for example with the
8464
List<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-
9067
Homepage and repository
9168
-----------------------
9269
The 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

9673
Copying
9774
-------

0 commit comments

Comments
 (0)