Class ModelInfoGenerator
java.lang.Object
network.ike.foundation.ike.model.ModelInfoGenerator
Writes a family of IKE's own patterns as model information (IKE-Network/ike-issues#1115),
so that a library can be written against IKE's own knowledge. A pattern that carries the
class mark for the model becomes a class whose identifier is the pattern's identity, so an
import resolves it back to the pattern rather than making a concept; each field becomes an
element whose type follows from the field's data type, a string to System's String, a
boolean to Boolean, an integer to Integer, a decimal to Decimal, a concept to Code, a list
of components to a list of Any, and anything else to Any; the mark says whether the class is
retrievable and which field carries its code. The file requires the System model.
-
Constructor Summary
ConstructorsConstructorDescriptionModelInfoGenerator(dev.ikm.tinkar.coordinate.stamp.calculator.StampCalculator calculator) Creates a generator over a view. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether a pattern carries a mark for a model.nameOf(long nid) The regular name of a component on this generator's view, for gates that compare an element with its field.Writes the model information of a model of IKE's own.
-
Constructor Details
-
ModelInfoGenerator
public ModelInfoGenerator(dev.ikm.tinkar.coordinate.stamp.calculator.StampCalculator calculator) Creates a generator over a view.- Parameters:
calculator- the view that decides which versions count
-
-
Method Details
-
write
-
isMarked
Whether a pattern carries a mark for a model.- Parameters:
patternNid- the patternmodelName- the model- Returns:
- true when marked
-
nameOf
-