use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.StereotypePtr in project legend-engine by finos.
the class DomainParseTreeWalker method visitStereotypes.
private List<StereotypePtr> visitStereotypes(DomainParserGrammar.StereotypesContext ctx) {
return ListIterate.collect(ctx.stereotype(), stereotypeContext -> {
StereotypePtr stereotypePtr = new StereotypePtr();
stereotypePtr.profile = PureGrammarParserUtility.fromQualifiedName(stereotypeContext.qualifiedName().packagePath() == null ? Collections.emptyList() : stereotypeContext.qualifiedName().packagePath().identifier(), stereotypeContext.qualifiedName().identifier());
stereotypePtr.value = PureGrammarParserUtility.fromIdentifier(stereotypeContext.identifier());
stereotypePtr.profileSourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext.qualifiedName());
stereotypePtr.sourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext);
return stereotypePtr;
});
}
use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.StereotypePtr in project legend-engine by finos.
the class DataParseTreeWalker method visitStereotypes.
private List<StereotypePtr> visitStereotypes(DataParserGrammar.StereotypesContext ctx) {
return ListIterate.collect(ctx.stereotype(), stereotypeContext -> {
StereotypePtr stereotypePtr = new StereotypePtr();
stereotypePtr.profile = PureGrammarParserUtility.fromQualifiedName(stereotypeContext.qualifiedName().packagePath() == null ? Collections.emptyList() : stereotypeContext.qualifiedName().packagePath().identifier(), stereotypeContext.qualifiedName().identifier());
stereotypePtr.value = PureGrammarParserUtility.fromIdentifier(stereotypeContext.identifier());
stereotypePtr.profileSourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext.qualifiedName());
stereotypePtr.sourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext);
return stereotypePtr;
});
}
use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.StereotypePtr in project legend-engine by finos.
the class ServiceParseTreeWalker method visitStereotypes.
private List<StereotypePtr> visitStereotypes(ServiceParserGrammar.StereotypesContext ctx) {
return ListIterate.collect(ctx.stereotype(), stereotypeContext -> {
StereotypePtr stereotypePtr = new StereotypePtr();
stereotypePtr.profile = PureGrammarParserUtility.fromQualifiedName(stereotypeContext.qualifiedName().packagePath() == null ? Collections.emptyList() : stereotypeContext.qualifiedName().packagePath().identifier(), stereotypeContext.qualifiedName().identifier());
stereotypePtr.value = PureGrammarParserUtility.fromIdentifier(stereotypeContext.identifier());
stereotypePtr.profileSourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext.qualifiedName());
stereotypePtr.sourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext);
return stereotypePtr;
});
}
use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.StereotypePtr in project legend-engine by finos.
the class DataSpaceParseTreeWalker method visitStereotypes.
private List<StereotypePtr> visitStereotypes(DataSpaceParserGrammar.StereotypesContext ctx) {
return ListIterate.collect(ctx.stereotype(), stereotypeContext -> {
StereotypePtr stereotypePtr = new StereotypePtr();
stereotypePtr.profile = PureGrammarParserUtility.fromQualifiedName(stereotypeContext.qualifiedName().packagePath() == null ? Collections.emptyList() : stereotypeContext.qualifiedName().packagePath().identifier(), stereotypeContext.qualifiedName().identifier());
stereotypePtr.value = PureGrammarParserUtility.fromIdentifier(stereotypeContext.identifier());
stereotypePtr.profileSourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext.qualifiedName());
stereotypePtr.sourceInformation = this.walkerSourceInformation.getSourceInformation(stereotypeContext);
return stereotypePtr;
});
}
use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.StereotypePtr in project legend-engine by finos.
the class QueryStoreManager method documentToQuery.
private static Query documentToQuery(Document document) {
Query query = new Query();
query.id = document.getString("id");
query.name = document.getString("name");
query.description = document.getString("description");
query.groupId = document.getString("groupId");
query.artifactId = document.getString("artifactId");
query.versionId = document.getString("versionId");
query.mapping = document.getString("mapping");
query.runtime = document.getString("runtime");
query.content = document.getString("content");
query.owner = document.getString("owner");
if (document.get("taggedValues") != null) {
query.taggedValues = ListIterate.collect(document.getList("taggedValues", Document.class), _doc -> {
TaggedValue taggedValue = new TaggedValue();
taggedValue.tag = new TagPtr();
taggedValue.tag.profile = _doc.getEmbedded(Lists.fixedSize.of("tag", "profile"), String.class);
taggedValue.tag.value = _doc.getEmbedded(Lists.fixedSize.of("tag", "value"), String.class);
taggedValue.value = _doc.getString("value");
return taggedValue;
});
}
if (document.get("stereotypes") != null) {
query.stereotypes = ListIterate.collect(document.getList("stereotypes", Document.class), _doc -> {
StereotypePtr stereotypePtr = new StereotypePtr();
stereotypePtr.profile = _doc.getString("profile");
stereotypePtr.value = _doc.getString("value");
return stereotypePtr;
});
}
return query;
}
Aggregations