use of org.whole.lang.commons.builders.ICommonsBuilder in project whole by wholeplatform.
the class AttributesMatcherFactory method getQualifiedRefAttrPattern.
private static IEntity getQualifiedRefAttrPattern() {
if (qualifiedRefAttrPattern == null) {
ModelBuilderOperation mop = new ModelBuilderOperation();
IXmlBuilder xb = (IXmlBuilder) mop.wGetBuilder(XmlLanguageKit.URI);
ICommonsBuilder cb = (ICommonsBuilder) mop.wGetBuilder(CommonsLanguageKit.URI);
xb.Attribute_();
xb.QualifiedName_();
cb.Variable_();
cb.VarType("http://lang.whole.org/Xml#NameSpace");
cb.VarName("xmlns");
cb.Quantifier("!");
cb._Variable();
xb.Name("ref");
xb._QualifiedName();
cb.Variable_();
cb.VarType("http://lang.whole.org/Xml#Value");
cb.VarName("value");
cb.Quantifier("!");
cb._Variable();
xb._Attribute();
qualifiedRefAttrPattern = mop.wGetResult();
}
return qualifiedRefAttrPattern;
}
use of org.whole.lang.commons.builders.ICommonsBuilder in project whole by wholeplatform.
the class AttributesMatcherFactory method getNsDeclPattern.
private static IEntity getNsDeclPattern() {
if (nsDeclPattern == null) {
ModelBuilderOperation mop = new ModelBuilderOperation();
IXmlBuilder xb = (IXmlBuilder) mop.wGetBuilder(XmlLanguageKit.URI);
ICommonsBuilder cb = (ICommonsBuilder) mop.wGetBuilder(CommonsLanguageKit.URI);
xb.Attribute_();
xb.QualifiedName_();
xb.NameSpace("xmlns");
cb.Variable_();
cb.VarType(XmlEntityDescriptorEnum.Name);
cb.VarName("xmlns");
cb.Quantifier(QuantifierEnum.MANDATORY);
cb._Variable();
xb._QualifiedName();
cb.Variable_();
cb.VarType(XmlEntityDescriptorEnum.Value);
cb.VarName("uri");
cb.Quantifier(QuantifierEnum.MANDATORY);
cb._Variable();
xb._Attribute();
nsDeclPattern = mop.wGetResult();
}
return nsDeclPattern;
}
use of org.whole.lang.commons.builders.ICommonsBuilder in project whole by wholeplatform.
the class MatcherTest method buildArtifactsPattern.
public IEntity buildArtifactsPattern(boolean isPattern) {
ModelBuilderOperation op = new ModelBuilderOperation();
IArtifactsBuilder b0 = (IArtifactsBuilder) op.wGetBuilder(ArtifactsLanguageKit.URI);
ICommonsBuilder cb = (ICommonsBuilder) op.wGetBuilder(CommonsLanguageKit.URI);
b0.PackageArtifact_();
b0.Name("org.whole.lang.models");
cb.Resolver();
b0.Artifacts_(1);
b0.FileArtifact_();
cb.Resolver();
b0.Metadata_();
b0.Copyright("Copyright 2004-2016 Riccardo Solmi.");
if (isPattern)
cb.Variable("licenseText", ArtifactsEntityDescriptorEnum.License, QuantifierEnum.MANDATORY);
else
b0.License("LGPL");
b0.Author("Riccardo Solmi");
b0._Metadata();
cb.Resolver();
b0._FileArtifact();
b0._Artifacts();
b0._PackageArtifact();
return op.wGetResult();
}
use of org.whole.lang.commons.builders.ICommonsBuilder in project whole by wholeplatform.
the class ModelPattern method apply.
public void apply(IBuilderOperation op) {
IModelsBuilder b0 = (IModelsBuilder) op.wGetBuilder(ModelsLanguageKit.URI);
ICommonsBuilder cb = (ICommonsBuilder) op.wGetBuilder(CommonsLanguageKit.URI);
b0.Model_();
b0.SimpleName("Model1");
b0.TypeRelations();
b0.ModelDeclarations_(3);
b0.SimpleEntity_();
b0.EntityModifiers();
b0.SimpleName("Entity1");
b0.Types();
b0.Features_(1);
b0.Feature_();
b0.FeatureModifiers();
cb.Variable("dataEntity", "http://lang.whole.org/Models#SimpleName", "MANDATORY");
b0.SimpleName("data1");
b0._Feature();
b0._Features();
b0._SimpleEntity();
b0.DataEntity_();
b0.EntityModifiers();
cb.Variable("dataEntity", "http://lang.whole.org/Models#SimpleName", "MANDATORY");
b0.Types();
cb.Variable("dataType", "http://lang.whole.org/Models#DataType", "MANDATORY");
b0._DataEntity();
cb.Variable("modelDeclaration", "http://lang.whole.org/Models#ModelDeclaration", "ZERO_OR_MORE_GREEDY");
b0._ModelDeclarations();
b0._Model();
}
use of org.whole.lang.commons.builders.ICommonsBuilder in project whole by wholeplatform.
the class SimpleEntityPattern method apply.
public void apply(IBuilderOperation op) {
IModelsBuilder b0 = (IModelsBuilder) op.wGetBuilder(ModelsLanguageKit.URI);
ICommonsBuilder cb = (ICommonsBuilder) op.wGetBuilder(CommonsLanguageKit.URI);
b0.SimpleEntity_();
b0.EntityModifiers();
cb.Variable("entityName", "http://lang.whole.org/Models#SimpleName", "MANDATORY");
b0.Types_();
cb.Variable("type", "http://lang.whole.org/Models#SimpleName", "ZERO_OR_MORE_GREEDY");
b0._Types();
b0.Features_();
cb.Variable("feature", "http://lang.whole.org/Models#Feature", "ZERO_OR_MORE_GREEDY");
b0._Features();
b0._SimpleEntity();
}
Aggregations