Class DslRawRepository


  • public final class DslRawRepository
    extends Object
    Espace de nommage. Les éléments de la grammaire à savoir les définitions sont ajoutées à la volée. Les définitions doivent respecter une métagrammaire définie préalablement dans DynamicNameSpace.
    Author:
    pchretien
    • Constructor Detail

      • DslRawRepository

        public DslRawRepository​(DslSketchFactory sketchFactory)
        Constructor.
        Parameters:
        sketchFactory - DynamicDefinitionHandler
    • Method Detail

      • getGrammar

        public DslGrammar getGrammar()
        Returns:
        Grammar
      • contains

        public boolean contains​(DslRawKey rawKey)
        Returns true if a definition to which the specified name is mapped.
        Parameters:
        sketchName - name of the definitionClé de la définition
        Returns:
        Si la définition a déjà été enregistrée
      • getRaw

        public DslRaw getRaw​(DslRawKey rawKey)
        Récupération d'une définition par sa clé -Soit la clé n'existe pas -Soit la clé existe mais sans aucune définition -Soit la clé raméne une définition.
        Parameters:
        sketchName - Name of the definition
        Returns:
        DynamicDefinition Définition correspondante ou null.
      • solve

        public Stream<Sketch> solve​(Notebook notebook)
        Résolution des références de définitions.
        Parameters:
        notebook - Space where all the models are stored
        Returns:
        a list of DefinitionSuppliers
      • addRaw

        public void addRaw​(DslRaw raw)
        Adds a sketch.
        Parameters:
        raw - sketch
      • addPartialSketch

        public void addPartialSketch​(DslRaw partial)
        adds a partial sketch.
        Parameters:
        partial - the part of a sketch