Ejemplo n.º 1
0
    def fromYAML(self, domain_type, primary_key, filename):
        """Load a table from a yaml file. The domain type provides the context for
       this data, the key idicates the name used for the context in the
       file.
       Parameters:
         domain_type    a SubDomain type or corresponding to the primary key
                        of this table
         primary_key    the string key used in the file for the primary domain
         filename       the name of the yaml file
    """

        import YamlLoader as yl

        self._domainType = domain_type
        self._key = primary_key

        self._data = yl.load_yaml(filename)
Ejemplo n.º 2
0
  def fromYAML(self,domain_type,primary_key, filename):
    """Load a table from a yaml file. The domain type provides the context for
       this data, the key idicates the name used for the context in the
       file.
       Parameters:
         domain_type    a SubDomain type or corresponding to the primary key
                        of this table
         primary_key    the string key used in the file for the primary domain
         filename       the name of the yaml file
    """

    import YamlLoader as yl

    self._domainType = domain_type
    self._key = primary_key

    self._data = yl.load_yaml(filename)