Integrating tom_som_java_v0

tom_som_java_v0 is the typed TomSpecs object-model facade for Java. It depends on tom_som_java_runtime. Both are versioned to the TomSpecs model version (currently 1.3.2) — pin to that version so your document reads and writes match the model the facade was generated from.

Quick start

Add tom_som_java_v0 (group io.github.al-the-bear) to your Maven pom.xml, then:

import tom_som_runtime.SpecDocument;
import tom_som_java_v0.TomSomV0;

// A typed Solution Blueprint over a fresh document.
SpecDocument doc = new SpecDocument();
TomSomV0.D00SolutionBlueprint blueprint = new TomSomV0.D00SolutionBlueprint(doc);

blueprint.content("A platform that unifies our fragmented order systems.");
blueprint.currentLandscape()
    .content("Three legacy systems with no shared customer record.");

System.out.println(blueprint.content());

Dependency routes

From a Maven repository

Declare the dependency (it pulls in tom_som_java_runtime):

<dependency>
  <groupId>io.github.al-the-bear</groupId>
  <artifactId>tom_som_java_v0</artifactId>
  <version>1.3.2</version>
</dependency>

Local install (mvn install)

When the SOM projects sit alongside your build, install both into your local ~/.m2 repository, runtime first:

cd ../tom_som_java_runtime && mvn install
cd ../tom_som_java_v0 && mvn install

JAR fallback (no Maven)

On a JDK-only host, build the JARs with the bundled scripts (runtime first — the facade compiles against it):

cd ../tom_som_java_runtime && ./build_jar.sh
cd ../tom_som_java_v0 && ./build_jar.sh

Each writes build/<artifact>-<version>.jar. Put both on your javac/java classpath.

Pinning the version

Both tom_som_java_runtime and tom_som_java_v0 carry version 1.3.2, taken from the TomSpecs model version. When you upgrade the model, regenerate and move to the new matching version so the facade and your stored documents stay in step.

Building from source

Regenerate the facade and build the JARs from the workspace:

dart run tom_specs_clitool/bin/generate_som.dart
# Maven, if available:
cd tom_som_java_v0 && mvn package
# or the JDK-only fallback (runtime first):
cd tom_som_java_runtime && ./build_jar.sh
cd ../tom_som_java_v0 && ./build_jar.sh

Further documentation

DocumentCovers
README.md What this package is, its document roots, and how to use them.
doc/tutorial.md A Java walkthrough end to end — install, open a document, read and edit a section, validate it, and serialize to *.docspecs.yaml and Markdown.
examples/README.md The runnable samples.
tom_specs_model/doc/som_multiplatform_spec_model.md The SOM authority: the model, the formats, and SOM §17 — the packaging rules this guide implements.
tom_specs_model/doc/index.md The catalogue of every TomSpecs subject-matter document.
tom_som_java_runtime The generic runtime this facade depends on.