88
99import java .util .List ;
1010
11- import static cz .muni .fi .cpm .template .deserialization .embrc .transform .cpm .Dataset2Transformer .PROCESSED_SAMPLE_CON ;
11+ import static cz .muni .fi .cpm .template .deserialization .embrc .transform .cpm .Dataset2Transformer .PROCESSING ;
1212import static cz .muni .fi .cpm .template .deserialization .embrc .transform .cpm .Dataset3Transformer .IDENTIFIED_SPECIES_CON ;
13- import static cz .muni .fi .cpm .template .deserialization .embrc .transform .cpm .Dataset4Transformer .FILTERED_SEQUENCES_CON ;
13+ import static cz .muni .fi .cpm .template .deserialization .embrc .transform .cpm .Dataset3Transformer .SPECIES_IDENTIFICATION ;
14+ import static cz .muni .fi .cpm .template .deserialization .embrc .transform .cpm .Dataset4Transformer .DNA_SEQUENCING ;
1415
1516public class Dataset1Transformer extends DatasetTransformer {
16- static final String SAMPLING = "sampling" ;
17- static final String STORED_SAMPLE = "stored-sample-" ;
18- static final String STORED_SAMPLE_CON = "stored-sample-con-" ;
19- static final String STORED_SAMPLE_CON_R1 = STORED_SAMPLE_CON + "r1" ;
20- static final String STORED_SAMPLE_CON_R2_3UM = STORED_SAMPLE_CON + "r2-3um" ;
17+ static final String SAMPLING = "Sampling" ;
18+
19+ static final String STORED_SAMPLE = "StoredSample" ;
20+ static final String STORED_SAMPLE_R1 = STORED_SAMPLE + "_r1" ;
21+ static final String STORED_SAMPLE_R2_3UM = STORED_SAMPLE + "_r2_3um" ;
22+
23+ static final String STORED_SAMPLE_CON = "StoredSampleCon" ;
24+ static final String STORED_SAMPLE_CON_R1 = STORED_SAMPLE_CON + "_r1" ;
25+ static final String STORED_SAMPLE_CON_R2_3UM = STORED_SAMPLE_CON + "_r2_3um" ;
2126
2227 private static final String STORING_ACTIVITY_R1 = "09a6f65fe087c3806631e8926fa3cae8e049cfdfa2b0b63fe6de04bc88144e80" ;
2328 private static final String STORING_ACTIVITY_R2_3um = "67c557a442ca2446b987928fb47c4bbbd59c54395e61f01949d76c06e0106925" ;
@@ -32,7 +37,7 @@ public Dataset1Transformer(ProvFactory pF, ICpmProvFactory cPF) {
3237 @ Override
3338 protected Document createTI (IndexedDocument indexedDS ) {
3439 TraversalInformation ti = new TraversalInformation ();
35- ti .setBundleName (newQNWithBlankNS (SAMPLING + "-bundle " ));
40+ ti .setBundleName (newQNWithBlankNS (SAMPLING + "Bundle " ));
3641
3742 MainActivity mA = new MainActivity (newQNWithBlankNS (SAMPLING ));
3843 ti .setMainActivity (mA );
@@ -41,40 +46,46 @@ protected Document createTI(IndexedDocument indexedDS) {
4146
4247 ForwardConnector fcR1 = new ForwardConnector (newQNWithBlankNS (STORED_SAMPLE_CON_R1 ));
4348
44- SpecializationOf specR1 = pF .newSpecializationOf (newQNWithBlankNS (STORED_SAMPLE + "r1" ), fcR1 .getId ());
49+ ForwardConnector fcR1Spec = new ForwardConnector (newQNWithBlankNS (STORED_SAMPLE_CON_R1 + "_Spec" ));
50+ fcR1Spec .setReferencedBundleId (newQNWithBlankNS (PROCESSING + "Bundle" ));
51+ fcR1Spec .setSpecializationOf (fcR1 .getId ());
52+
53+ SpecializationOf specR1 = pF .newSpecializationOf (newQNWithBlankNS (STORED_SAMPLE_R1 ), fcR1 .getId ());
4554 indexedDS .add (specR1 );
4655
4756 ForwardConnector fcR23UM = new ForwardConnector (newQNWithBlankNS (STORED_SAMPLE_CON_R2_3UM ));
4857
49- SpecializationOf specR23UM = pF .newSpecializationOf (newQNWithBlankNS (STORED_SAMPLE + "r2_3um" ), fcR23UM .getId ());
58+ ForwardConnector fcR23UMSpec = new ForwardConnector (newQNWithBlankNS (STORED_SAMPLE_CON_R2_3UM + "_Spec" ));
59+ fcR23UMSpec .setReferencedBundleId (newQNWithBlankNS (DNA_SEQUENCING + "Bundle" ));
60+ fcR23UMSpec .setSpecializationOf (fcR23UM .getId ());
61+
62+ SpecializationOf specR23UM = pF .newSpecializationOf (newQNWithBlankNS (STORED_SAMPLE_R2_3UM ), fcR23UM .getId ());
5063 indexedDS .add (specR23UM );
5164
5265 mA .setGenerated (List .of (fcR1 .getId (), fcR23UM .getId ()));
5366
54- ForwardConnector fCProc = new ForwardConnector (newQNWithBlankNS (PROCESSED_SAMPLE_CON ));
55- fCProc .setDerivedFrom (List .of (fcR1 .getId ()));
56-
5767 ForwardConnector fCIden = new ForwardConnector (newQNWithBlankNS (IDENTIFIED_SPECIES_CON ));
58- fCIden .setDerivedFrom (List .of (fCProc .getId ()));
68+ fCIden .setDerivedFrom (List .of (fcR1 .getId ()));
5969
60- ForwardConnector fCFil = new ForwardConnector (newQNWithBlankNS (FILTERED_SEQUENCES_CON ));
61- fCFil .setDerivedFrom (List .of (fcR23UM .getId ()));
70+ ForwardConnector fCIdenSpec = new ForwardConnector (newQNWithBlankNS (IDENTIFIED_SPECIES_CON + "Spec" ));
71+ fCIdenSpec .setReferencedBundleId (newQNWithBlankNS (SPECIES_IDENTIFICATION + "Bundle" ));
72+ fCIdenSpec .setSpecializationOf (fCIden .getId ());
6273
63- ti .getForwardConnectors ().addAll (List .of (fcR1 , fcR23UM , fCProc , fCIden , fCFil ));
74+ ti .getForwardConnectors ().addAll (List .of (fcR1 , fcR1Spec , fcR23UM , fcR23UMSpec , fCIden , fCIdenSpec ));
6475
6576 return mapper .map (ti );
6677 }
6778
6879 @ Override
6980 protected void modifyDS (IndexedDocument indexedDS ) {
70- Entity storedR1 = pF .newEntity (newQNWithBlankNS (STORED_SAMPLE + "r1" ));
81+ Entity storedR1 = pF .newEntity (newQNWithBlankNS (STORED_SAMPLE_R1 ));
7182 storedR1 .getType ().addAll (indexedDS .getEntity (newQNWithBlankNS (SAMPLE_R1 )).getType ());
7283 indexedDS .add (storedR1 );
7384
7485 WasGeneratedBy storingGenR1 = pF .newWasGeneratedBy (null , storedR1 .getId (), newQnWithGenNS (STORING_ACTIVITY_R1 ));
7586 indexedDS .add (storingGenR1 );
7687
77- Entity storedR23UM = pF .newEntity (newQNWithBlankNS (STORED_SAMPLE + "r2_3um" ));
88+ Entity storedR23UM = pF .newEntity (newQNWithBlankNS (STORED_SAMPLE_R2_3UM ));
7889 storedR23UM .getType ().addAll (indexedDS .getEntity (newQNWithBlankNS (SAMPLE_R2_3UM )).getType ());
7990 indexedDS .add (storedR23UM );
8091
0 commit comments