Mercurial > hg > amuse
view base/datasets/functions.lisp @ 262:2284dbc7d51a
fix missing description value in mtp-compositions
author | Jamie Forth <j.forth@gold.ac.uk> |
---|---|
date | Sun, 10 Apr 2011 10:23:04 +0100 |
parents | 6a3adca16910 |
children |
line wrap: on
line source
(cl:in-package #:amuse-datasets) (defun make-composition-identifiers-from-file (package pathname) "This reads a file that contains one id per line, and returns a list of composition-identifiers (specialised on package). It is useful for reading files that have been exported from the database, for use with the above functions." (with-open-file (stream pathname :direction :input) (loop for id = (read stream nil) while id collect (make-composition-identifier package id)))) (defun assign-compositions-to-dataset (composition-identifiers dataset-identifier) "This could be done more sensibly, at least for datasets stored in the database." (loop for identifier in composition-identifiers do (assign-composition-to-dataset identifier dataset-identifier)))