use of org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.extension.ProfileInstance in project legend-pure by finos.
the class AntlrContextToM3CoreInstance method profile.
private ProfileInstance profile(ProfileContext ctx) {
PackageInstance packageInstance = this.buildPackage(ctx.qualifiedName().packagePath());
String profileName = ctx.qualifiedName().identifier().getText();
ProfileInstance profileInstance = ProfileInstance.createPersistent(this.repository, profileName);
profileInstance._package(packageInstance);
packageInstance._childrenAdd(profileInstance);
profileInstance._name(profileName);
profileInstance.setSourceInformation(this.sourceInformation.getPureSourceInformation(ctx.getStart(), ctx.qualifiedName().getStop(), ctx.getStop()));
profileInstance._p_stereotypes(this.buildStereoTypes(ctx.stereotypeDefinitions(), profileInstance));
profileInstance._p_tags(this.buildTags(ctx.tagDefinitions(), profileInstance));
return profileInstance;
}
Aggregations