1- package  cz .muni .fi .cpm .template .deserialization .mou .transform .store ;
1+ package  cz .muni .fi .cpm .template .deserialization .mou .transform .storage ;
22
33import  cz .muni .fi .cpm .constants .CpmType ;
44import  cz .muni .fi .cpm .model .CpmUtilities ;
1919import  static  cz .muni .fi .cpm .constants .DctNamespaceConstants .DCT_NS ;
2020import  static  cz .muni .fi .cpm .constants .DctNamespaceConstants .DCT_PREFIX ;
2121import  static  cz .muni .fi .cpm .template .deserialization .mou .constants .NameConstants .ACQUISITION_CON ;
22- import  static  cz .muni .fi .cpm .template .deserialization .mou .constants .NameConstants .STORE_CON ;
22+ import  static  cz .muni .fi .cpm .template .deserialization .mou .constants .NameConstants .STOR_CON ;
2323
24- public  abstract  class  StoreTransformer  extends  PatientTransformer  implements  ProvTemplateHandler  {
25-     public  StoreTransformer (Patient  patient , ProvFactory  pF , ICpmProvFactory  cPF , PbmFactory  pbmF ) {
24+ public  abstract  class  StorageTransformer  extends  PatientTransformer  implements  ProvTemplateHandler  {
25+     public  StorageTransformer (Patient  patient , ProvFactory  pF , ICpmProvFactory  cPF , PbmFactory  pbmF ) {
2626        super (patient , pF , cPF , pbmF );
2727    }
2828
29-     private  void  addStoreDSToDocument (Document  doc , String  suffix , String  sampleId , Function <Entity , Void > populateStore ) {
29+     private  void  addStorageDSToDocument (Document  doc , String  suffix , String  sampleId , Function <Entity , Void > populateStor ) {
3030        Type  sampleType  = pbmF .newType (PbmType .SAMPLE );
3131
3232        QualifiedName  patientQN  = pF .newQualifiedName (BBMRI_NS , "patient-"  + patient .getId (), BBMRI_PREFIX );
@@ -51,26 +51,26 @@ private void addStoreDSToDocument(Document doc, String suffix, String sampleId,
5151
5252        WasGeneratedBy  transGeneratedBy  = pF .newWasGeneratedBy (null , sampleTransQN , transActivity );
5353
54-         QualifiedName  storeActivity  = pF .newQualifiedName (BBMRI_NS , "storeAct "  + suffix , BBMRI_PREFIX );
55-         Activity  storeAc  = pF .newActivity (storeActivity );
56-         storeAc .getType ().add (pbmF .newType (PbmType .STORAGE_ACTIVITY ));
54+         QualifiedName  storActivity  = pF .newQualifiedName (BBMRI_NS , "storageAct "  + suffix , BBMRI_PREFIX );
55+         Activity  storAc  = pF .newActivity (storActivity );
56+         storAc .getType ().add (pbmF .newType (PbmType .STORAGE_ACTIVITY ));
5757
58-         Used  storeUsed  = pF .newUsed (storeActivity , sampleTransQN );
58+         Used  storUsed  = pF .newUsed (storActivity , sampleTransQN );
5959
60-         Other  sampleIdStoreOther  = newOther ("sampleId" , sampleId );
61-         QualifiedName  sampleStoreQN  = pF .newQualifiedName (BBMRI_NS , "sampleStore "  + suffix , BBMRI_PREFIX );
62-         Entity  sampleStore  = pF .newEntity (sampleStoreQN , List .of (sampleType , sampleIdStoreOther ));
60+         Other  sampleIdStorOther  = newOther ("sampleId" , sampleId );
61+         QualifiedName  sampleStorQN  = pF .newQualifiedName (BBMRI_NS , "sampleStorage "  + suffix , BBMRI_PREFIX );
62+         Entity  sampleStor  = pF .newEntity (sampleStorQN , List .of (sampleType , sampleIdStorOther ));
6363
64-         WasDerivedFrom  sampleStoreDer  = pF .newWasDerivedFrom (sampleStoreQN , patientQN );
64+         WasDerivedFrom  sampleStorDer  = pF .newWasDerivedFrom (sampleStorQN , patientQN );
6565
66-         populateStore .apply (sampleStore );
66+         populateStor .apply (sampleStor );
6767
68-         WasGeneratedBy  storeGeneratedBy  = pF .newWasGeneratedBy (null , sampleStoreQN ,  storeActivity );
68+         WasGeneratedBy  storGeneratedBy  = pF .newWasGeneratedBy (null , sampleStorQN ,  storActivity );
6969
70-         SpecializationOf  fcSpec  = pF .newSpecializationOf (sampleStoreQN , doc .getNamespace ().qualifiedName (BBMRI_PREFIX , STORE_CON  + suffix , pF ));
70+         SpecializationOf  fcSpec  = pF .newSpecializationOf (sampleStorQN , doc .getNamespace ().qualifiedName (BBMRI_PREFIX , STOR_CON  + suffix , pF ));
7171
7272        Bundle  bundle  = (Bundle ) doc .getStatementOrBundle ().getFirst ();
73-         bundle .getStatement ().addAll (List .of (bcSpec , trans , sampleTrans , transGeneratedBy , storeAc ,  storeUsed ,  sampleStore ,  storeGeneratedBy , fcSpec , patientE , sampleTransDer , sampleStoreDer ));
73+         bundle .getStatement ().addAll (List .of (bcSpec , trans , sampleTrans , transGeneratedBy , storAc ,  storUsed ,  sampleStor ,  storGeneratedBy , fcSpec , patientE , sampleTransDer , sampleStorDer ));
7474
7575        for  (Statement  s  : bundle .getStatement ()) {
7676            if  (CpmUtilities .hasCpmType (s , CpmType .MAIN_ACTIVITY )) {
@@ -81,15 +81,15 @@ private void addStoreDSToDocument(Document doc, String suffix, String sampleId,
8181                        pF .getName ().PROV_QUALIFIED_NAME ));
8282                mainActivity .getOther ().add (pF .newOther (
8383                        pF .newQualifiedName (DCT_NS , HAS_PART , DCT_PREFIX ),
84-                         storeActivity ,
84+                         storActivity ,
8585                        pF .getName ().PROV_QUALIFIED_NAME ));
8686            }
8787        }
8888    }
8989
9090    @ Override 
9191    protected  void  addTissueDSToDoc (Document  doc , String  suffix , Tissue  tissue ) {
92-         addStoreDSToDocument (doc , suffix , tissue .getSampleId (), entity  ->
92+         addStorageDSToDocument (doc , suffix , tissue .getSampleId (), entity  ->
9393        {
9494            entity .getType ().add (pF .newType (
9595                    pF .newQualifiedName (BBMRI_NS , "tissue" , BBMRI_PREFIX ),
@@ -111,7 +111,7 @@ protected void addTissueDSToDoc(Document doc, String suffix, Tissue tissue) {
111111
112112    @ Override 
113113    protected  void  addDMDSToDoc (Document  doc , String  suffix , DiagnosisMaterial  dM ) {
114-         addStoreDSToDocument (doc , suffix , dM .getSampleId (), entity  ->
114+         addStorageDSToDocument (doc , suffix , dM .getSampleId (), entity  ->
115115        {
116116            entity .getType ().add (pF .newType (
117117                    pF .newQualifiedName (BBMRI_NS , "diagnosticMaterial" , BBMRI_PREFIX ),
0 commit comments