File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,6 +278,39 @@ \section{Why do we need a LinkML runtime library for Java?}
278278 \end {itemize }
279279\end {frame }
280280
281+ \begin {frame }[fragile]
282+ \frametitle {Alternative to a runtime library?}
283+
284+ Generated code is not enough? Then let us generate \emph {more } code!
285+
286+ \begin {Verbatim }[frame=single,fontsize=\scriptsize]
287+ public class Point {
288+ String name;
289+ int x;
290+ int y;
291+
292+ public static Point fromJSON(File f) {
293+ // All code required to load a Point from a JSON file
294+ }
295+
296+ public void toJSON(File f) {
297+ // All code required to dump a Point to a JSON file
298+ }
299+ }
300+ \end {Verbatim }
301+
302+ \begin {block }{Not sustainable}
303+ \begin {itemize }
304+ \item Java code embedded within a Jinja2 template in the middle of
305+ a Python project
306+ \item A bug in the loading or dumping code? Re-generate everything
307+ \item Better to keep the generated code minimal and deport the
308+ logic elsewhere
309+ \end {itemize }
310+ \end {block }
311+
312+ \end {frame }
313+
281314\section {Design decisions for the LinkML-Java runtime }
282315
283316\begin {frame }
You can’t perform that action at this time.
0 commit comments