<commit_before>package generator.parser

import generator.model.diagram.action.{ActionGroup, ActionInclude, Action}
import generator.model.diagram.edge.Edge
import generator.model.diagram.methodes.{ActionBlock, OnDelete, OnCreate, OnUpdate}
import generator.model.diagram.node.{DiaShape, Node}
import generator.model.diagram.Diagram
import generator.model.shapecontainer.connection.Connection
import generator.model.shapecontainer.shape.Shape
import generator.model.shapecontainer.shape.geometrics._
import generator.model.style.Style
import models.metaModel.MetaModel
import models.metaModel.mCore.{MReference, MClass}
import parser._

/**
 * Created by julian on 23.10.15.
 * offers functions like parseRawShape/Style, which parses style or shape strings to instances
 */
class SprayParser(c: Cache = Cache(), val metaModel:MetaModel) extends CommonParserMethods {
  implicit val cache = c
  type diaConnection = generator.model.diagram.edge.Connection
  private val metaMapMClass = metaModel.definition.mObjects.collect {
      case (name, x) if x.isInstanceOf[MClass] => (name, x.asInstanceOf[MClass])
    }
  private val metaMapMReference = metaModel.definition.mObjects.collect {<commit_msg>used new concept field of metamodel instead of definition which no longer exists<commit_after>package generator.parser

import generator.model.diagram.action.{ActionGroup, ActionInclude, Action}
import generator.model.diagram.edge.Edge
import generator.model.diagram.methodes.{ActionBlock, OnDelete, OnCreate, OnUpdate}
import generator.model.diagram.node.{DiaShape, Node}
import generator.model.diagram.Diagram
import generator.model.shapecontainer.connection.Connection
import generator.model.shapecontainer.shape.Shape
import generator.model.shapecontainer.shape.geometrics._
import generator.model.style.Style
import models.metaModel.MetaModel
import models.metaModel.mCore.{MReference, MClass}
import parser._

/**
 * Created by julian on 23.10.15.
 * offers functions like parseRawShape/Style, which parses style or shape strings to instances
 */
class SprayParser(c: Cache = Cache(), val metaModel:MetaModel) extends CommonParserMethods {
  implicit val cache = c
  type diaConnection = generator.model.diagram.edge.Connection
  private val metaMapMClass = metaModel.concept.elements.collect{
      case (name, x) if x.isInstanceOf[MClass] => (name, x.asInstanceOf[MClass])
    }
  private val metaMapMReference = metaModel.concept.elements.collect {
{'fraction_non_alphanumeric': 0.09127954360228199, 'fraction_numerical': 0.004889975550122249, 'mean_word_length': 5.7445054945054945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3129034', 'n_tokens_mistral': 692, 'n_tokens_neox': 679, 'n_words': 172}