Class ElmImporter
java.lang.Object
network.ike.foundation.ike.elm.ElmImporter
Imports an ELM library document into the running store (IKE-Network/ike-issues#1112): the
library concept, one definition semantic per definition, ordered lists where order carries
meaning, and a reference semantic for every distinct thing a definition names, a quantity's
unit among them: a CQL calendar word means IKE's unit of time, a UCUM code the unit's own
concept or a composed unit made on demand (IKE-Network/ike-issues#1114). Every name is
resolved before anything is written; an unresolvable name, or a unit code that cannot be
read, stops the import with its place named. Importing the same document again writes
nothing; a changed document appends versions where it changed and retires what it dropped.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionElmImporter(ElmCatalog catalog, dev.ikm.tinkar.coordinate.stamp.calculator.StampCalculator calculator) Creates an importer over a catalog and a view. -
Method Summary
Modifier and TypeMethodDescriptionimportDocument(ElmDocument document, dev.ikm.tinkar.entity.builder.Stamp stamp) Imports a document under a stamp.
-
Constructor Details
-
ElmImporter
public ElmImporter(ElmCatalog catalog, dev.ikm.tinkar.coordinate.stamp.calculator.StampCalculator calculator) Creates an importer over a catalog and a view.- Parameters:
catalog- the catalogcalculator- the view that decides which existing versions count
-
-
Method Details
-
importDocument
public ElmImporter.Report importDocument(ElmDocument document, dev.ikm.tinkar.entity.builder.Stamp stamp) Imports a document under a stamp. The store keeps one version per stamp, so each import that should leave its own mark carries its own stamp; an import under an earlier stamp replaces that stamp's versions rather than appending.- Parameters:
document- the library documentstamp- the stamp every new version is written under- Returns:
- what was done
- Throws:
ElmImportException- if a name cannot be resolved or an included library is missing; nothing has been written
-