From e9edb006f0b509b5b0650aff2ac3d942cfd855ca Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Wed, 25 Mar 2015 14:25:59 +0000 Subject: [PATCH] SSDM-1621: Same basic Javadoc for EntityGraphManager. SVN: 33733 --- .../entitygraph/EntityGraphManager.java | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/entitygraph/EntityGraphManager.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/entitygraph/EntityGraphManager.java index 6f33ccd7599..bd69747e127 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/entitygraph/EntityGraphManager.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/entitygraph/EntityGraphManager.java @@ -71,7 +71,32 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier; /** * Helper class which creates a graph of entities of kind experiment, sample, and data set based on a - * textual description. A simple language defines the entities and its relations. + * textual description. A simple language defines the entities (experiments, samples, and data sets) and its relations. + * From the textual definition of the graph real entities are created in the database. The actual graph of + * entities as stored in the data base can be rendered in the same language used for parsing. This allows to + * checked expected changes after some (re-)assignment between the entities has been performed. It is also + * possible to checked whether the entities have been modified (i.e. modifier and modification date have been changed) + * or not. Here is an example: + * <pre> + * EntityGraphGenerator g = entityGraphManager.parseAndCreateGraph("E1, data sets: DS4\n" + + "S1, data sets: DS1[NECT] DS2[NECT]\n" + + "S2\n" + + "S3, data sets: DS3[NET]\n" + + "DS1[NECT], components: DS2[NECT] DS3[NET]\n" + + "DS2[NECT], components: DS4"); + + reassignToSample(g.ds(1), g.s(2)); + + assertEquals("E1, data sets: DS4\n" + + "S2, data sets: DS1[NECT] DS2[NECT]\n" + + "S3, data sets: DS3[NET]\n" + + "DS1[NECT], components: DS2[NECT] DS3[NET]\n" + + "DS2[NECT], components: DS4\n", entityGraphManager.renderGraph(g)); + entityGraphManager.assertModified(g.s(1), g.s(2)); + entityGraphManager.assertModified(g.ds(1), g.ds(2)); + entityGraphManager.assertUnmodified(g); + * </pre> + * * * @author Franz-Josef Elmer */ -- GitLab