SLDocumentAnnotation.sleela
lib/sldocument/SLDocumentAnnotation.sleela · 87 line(s) · sleela
<< lib/sldocument/SLDocumentAnnotation.sleela
SLeeLa Standard Library Definition.
Definition: Defines SLDocumentAnnotation, the annotation vocabulary that marks
how an .sldocument step is named and ordered.
A step's method may be annotated to indicate its order, its function, or it
may simply be named as the method itself. The three annotation kinds:
ORDER โ @order(n): an explicit 1-based position in the top-down run.
FUNCTION โ @function("name"): the step's declared role/purpose, independent
of its identifier.
METHOD โ no annotation: the method name itself is the step's name, and its
order is its textual position in the document (top-down).
When ORDER is present it governs; otherwise textual order governs. A FUNCTION
annotation never changes order, only the step's declared purpose.
Family: sldocument. Native VM/OS work crosses an explicit bridge. >>
#sleela 2.5
material;
< Unified SLeeLa standard-library front-end object. >
class SLDocumentAnnotation {
< ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
<< Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
or catalog can read and (where appropriate) override this record.
Values are faithful to the subject's real origin where publicly known. >>
String metaVersion = "1.0.0";
int metaId = 10069;
String metaAuthor = "Kiro Agent";
String metaDate = "2026-10-16";
String metaCopyright = "SLeeLa project";
String metaTrademark = "none";
String metaCorporation = "none";
< metaOrigin: National | <nation> | International | Galactic >
String metaOrigin = "International";
String metaBirthDate = "2026-10-05";
< metaScienceRating: maturity/robustness on a 1..10 scale >
int metaScienceRating = 9;
< metaNationalSchedule: a real, citable instrument or "none" >
String metaNationalSchedule = "none";
String getMetaVersion() { return metaVersion; }
void setMetaVersion(String v) { metaVersion = v; }
int getMetaId() { return metaId; }
void setMetaId(int v) { metaId = v; }
String getAuthor() { return metaAuthor; }
void setAuthor(String v) { metaAuthor = v; }
String getDate() { return metaDate; }
void setDate(String v) { metaDate = v; }
String getCopyright() { return metaCopyright; }
void setCopyright(String v) { metaCopyright = v; }
String getTrademark() { return metaTrademark; }
void setTrademark(String v) { metaTrademark = v; }
String getCorporation() { return metaCorporation; }
void setCorporation(String v) { metaCorporation = v; }
String getOrigin() { return metaOrigin; }
void setOrigin(String v) { metaOrigin = v; }
String getBirthDate() { return metaBirthDate; }
void setBirthDate(String v) { metaBirthDate = v; }
int getScienceRating() { return metaScienceRating; }
void setScienceRating(int v) { metaScienceRating = v; }
String getNationalSchedule() { return metaNationalSchedule; }
void setNationalSchedule(String v) { metaNationalSchedule = v; }
< bare method name; order = textual position >
static final int METHOD = 0;
< @order(n) >
static final int ORDER = 1;
< @function("name") >
static final int FUNCTION = 2;
int kind;
< meaningful when kind == ORDER >
int order;
< meaningful when kind == FUNCTION >
String role;
String methodName;
void asMethod(String name) { kind = METHOD; methodName = name; order = -1; role = ""; }
void asOrder(String name, int n) { kind = ORDER; methodName = name; order = n; role = ""; }
void asFunction(String name, String functionRole) { kind = FUNCTION; methodName = name; role = functionRole; order = -1; }
int kindOf() { return kind; }
int orderValue() { return order; }
String role_() { return role; }
String method() { return methodName; }
boolean hasExplicitOrder() { return kind == ORDER && order >= 1; }
}