2019-03-22 15:51:44 +01:00
/ * *
*
* /
package org.gcube.resourcemanagement.model.reference.entities.facets ;
2023-05-15 16:49:51 +02:00
import java.io.IOException ;
2019-03-22 15:51:44 +01:00
import java.util.List ;
2023-05-15 16:49:51 +02:00
import org.gcube.com.fasterxml.jackson.core.JsonParseException ;
import org.gcube.com.fasterxml.jackson.databind.JsonMappingException ;
2023-04-26 21:41:57 +02:00
import org.gcube.informationsystem.base.reference.Element ;
2023-04-28 11:41:02 +02:00
import org.gcube.informationsystem.base.reference.IdentifiableElement ;
2023-04-18 17:51:33 +02:00
import org.gcube.informationsystem.model.impl.properties.MetadataImpl ;
2023-05-12 17:56:30 +02:00
import org.gcube.informationsystem.model.reference.ModelElement ;
2019-03-22 15:51:44 +01:00
import org.gcube.informationsystem.model.reference.entities.Facet ;
import org.gcube.informationsystem.model.reference.entities.Resource ;
2023-04-18 17:51:33 +02:00
import org.gcube.informationsystem.model.reference.properties.Metadata ;
2019-03-22 15:51:44 +01:00
import org.gcube.informationsystem.model.reference.relations.ConsistsOf ;
2023-02-06 18:58:41 +01:00
import org.gcube.informationsystem.serialization.ElementMapper ;
2019-03-22 15:51:44 +01:00
import org.gcube.resourcemanagement.model.impl.entities.resources.EServiceImpl ;
import org.gcube.resourcemanagement.model.impl.entities.resources.HostingNodeImpl ;
import org.gcube.resourcemanagement.model.impl.relations.isrelatedto.ActivatesImpl ;
import org.gcube.resourcemanagement.model.reference.entities.resources.EService ;
import org.gcube.resourcemanagement.model.reference.entities.resources.HostingNode ;
import org.gcube.resourcemanagement.model.reference.relations.isrelatedto.Activates ;
2023-04-28 17:16:46 +02:00
import org.junit.Assert ;
2019-03-22 15:51:44 +01:00
import org.junit.Test ;
import org.slf4j.Logger ;
import org.slf4j.LoggerFactory ;
/ * *
* @author Luca Frosini ( ISTI - CNR )
* /
public class PolymorphismTest {
private static Logger logger = LoggerFactory
. getLogger ( PolymorphismTest . class ) ;
2023-05-12 17:56:30 +02:00
public static final String NYESERVICE = " { \" " + Element . TYPE_PROPERTY + " \" : \" EService \" , \" " + IdentifiableElement . ID_PROPERTY + " \" : \" 3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4 \" , \" metadata \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" Metadata \" , \" creator \" :null, \" creationTime \" :null, \" lastUpdateTime \" :null}, \" consistsOf \" :[{ \" " + Element . TYPE_PROPERTY + " \" : \" IsIdentifiedBy \" , \" metadata \" :null, \" target \" :{ \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" , \" Entity \" ], \" " + Element . TYPE_PROPERTY + " \" : \" MySoftwareFacet \" , \" metadata \" :null, \" name \" : \" WhnManager \" , \" group \" : \" VREManagement \" , \" version \" : \" 2.0.0-SNAPSHOT \" , \" description \" : \" Web Hosting Node Service \" , \" qualifier \" :null, \" optional \" :false}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" whnmanager \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager \" , \" protocol \" :null, \" description \" :null, \" authorization \" : { \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" WhnManager-remote-management \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}}], \" isRelatedTo \" :[]} " ;
public static final String MYESERVICE = " { \" " + Element . TYPE_PROPERTY + " \" : \" EService \" , \" " + IdentifiableElement . ID_PROPERTY + " \" : \" 3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4 \" , \" metadata \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" Metadata \" , \" creator \" :null, \" creationTime \" :null, \" lastUpdateTime \" :null}, \" consistsOf \" :[{ \" " + Element . TYPE_PROPERTY + " \" : \" IsIdentifiedBy \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" MySoftwareFacet \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" , \" Entity \" ], \" metadata \" :null, \" name \" : \" WhnManager \" , \" group \" : \" VREManagement \" , \" version \" : \" 2.0.0-SNAPSHOT \" , \" description \" : \" Web Hosting Node Service \" , \" qualifier \" :null, \" optional \" :false}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" Facet \" , \" Entity \" ], \" metadata \" :null, \" entryName \" : \" whnmanager \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager \" , \" protocol \" :null, \" description \" :null, \" authorization \" : { \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" WhnManager-remote-management \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}}], \" isRelatedTo \" :[]} " ;
public static final String MYOTHERESERVICE = " { \" " + Element . TYPE_PROPERTY + " \" : \" EService \" , \" " + IdentifiableElement . ID_PROPERTY + " \" : \" 3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4 \" , \" metadata \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" Metadata \" , \" creator \" :null, \" creationTime \" :null, \" lastUpdateTime \" :null}, \" consistsOf \" :[{ \" " + Element . TYPE_PROPERTY + " \" : \" IsIdentifiedBy \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" MySoftwareFacet \" , \" metadata \" :null, \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" , \" Entity \" ], \" name \" : \" WhnManager \" , \" group \" : \" VREManagement \" , \" version \" : \" 2.0.0-SNAPSHOT \" , \" description \" : \" Web Hosting Node Service \" , \" qualifier \" :null, \" optional \" :false}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" whnmanager \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager \" , \" protocol \" :null, \" description \" :null, \" authorization \" : { \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" WhnManager-remote-management \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}}], \" isRelatedTo \" :[]} " ;
public static final String MYANOTHERESERVICE = " { \" " + Element . TYPE_PROPERTY + " \" : \" EService \" , \" " + IdentifiableElement . ID_PROPERTY + " \" : \" 3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4 \" , \" metadata \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" Metadata \" , \" creator \" :null, \" creationTime \" :null, \" lastUpdateTime \" :null}, \" consistsOf \" :[{ \" " + Element . TYPE_PROPERTY + " \" : \" IsIdentifiedBy \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" MySoftwareFacet \" , \" metadata \" :null, \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" , \" Entity \" ], \" name \" : \" WhnManager \" , \" group \" : \" VREManagement \" , \" version \" : \" 2.0.0-SNAPSHOT \" , \" description \" : \" Web Hosting Node Service \" , \" qualifier \" :null, \" optional \" :false}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" whnmanager \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager \" , \" protocol \" :null, \" description \" :null, \" authorization \" : { \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" WhnManager-remote-management \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}}], \" isRelatedTo \" :[]} " ;
2019-03-22 15:51:44 +01:00
2023-05-12 17:56:30 +02:00
public static final String NYESERVICE2 = " { \" " + Element . TYPE_PROPERTY + " \" : \" MyEService \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" EService \" , \" Service \" , \" Resource \" ], \" " + IdentifiableElement . ID_PROPERTY + " \" : \" 3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4 \" , \" metadata \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" Metadata \" , \" creator \" :null, \" creationTime \" :null, \" lastUpdateTime \" :null}, \" consistsOf \" :[{ \" " + Element . TYPE_PROPERTY + " \" : \" IsIdentifiedBy \" , \" metadata \" :null, \" target \" :{ \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" , \" Entity \" ], \" " + Element . TYPE_PROPERTY + " \" : \" MySoftwareFacet \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" , \" Entity \" ], \" metadata \" :null, \" name \" : \" WhnManager \" , \" group \" : \" VREManagement \" , \" version \" : \" 2.0.0-SNAPSHOT \" , \" description \" : \" Web Hosting Node Service \" , \" qualifier \" :null, \" optional \" :false}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" whnmanager \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager \" , \" protocol \" :null, \" description \" :null, \" authorization \" : { \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" WhnManager-remote-management \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}}], \" isRelatedTo \" :[]} " ;
public static final String MYANOTHERESERVICE2 = " { \" " + Element . TYPE_PROPERTY + " \" : \" MyEService \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" EService \" , \" Service \" , \" Resource \" ], \" " + IdentifiableElement . ID_PROPERTY + " \" : \" 3ace4bd0-e5cd-49a3-97a8-a0a9468ce6d4 \" , \" metadata \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" Metadata \" , \" creator \" :null, \" creationTime \" :null, \" lastUpdateTime \" :null}, \" consistsOf \" :[{ \" " + Element . TYPE_PROPERTY + " \" : \" IsIdentifiedBy \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" MySoftwareFacet \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" , \" Entity \" ], \" metadata \" :null, \" name \" : \" WhnManager \" , \" group \" : \" VREManagement \" , \" version \" : \" 2.0.0-SNAPSHOT \" , \" description \" : \" Web Hosting Node Service \" , \" qualifier \" :null, \" optional \" :false}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" whnmanager \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/vremanagement/ws/whnmanager \" , \" protocol \" :null, \" description \" :null, \" authorization \" : { \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}},{ \" " + Element . TYPE_PROPERTY + " \" : \" ConsistsOf \" , \" metadata \" :null, \" target \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" AccessPointFacet \" , \" metadata \" :null, \" entryName \" : \" WhnManager-remote-management \" , \" endpoint \" : \" https://pc-frosini.isti.cnr.it:8080/whn-manager/gcube/resource \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" " + Element . TYPE_PROPERTY + " \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}, \" properties \" :null}}], \" isRelatedTo \" :[]} " ;
2019-03-22 15:51:44 +01:00
2023-04-28 17:16:46 +02:00
public static final String MY_SOFTWARE_FACET_TYPE = " MySoftwareFacetTest " ;
2023-05-12 17:56:30 +02:00
public static final String MY_TEST_FACET = " { \" " + Element . TYPE_PROPERTY + " \" : \" " + MY_SOFTWARE_FACET_TYPE + " \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" SoftwareFacet \" , \" Facet \" ], \" name \" : \" WhnManager \" , \" group \" : \" VREManagement \" , \" version \" : \" 2.0.0-SNAPSHOT \" , \" description \" : \" Web Hosting Node Service \" , \" qualifier \" :null, \" optional \" :false} " ;
2019-03-22 15:51:44 +01:00
2023-04-28 17:16:46 +02:00
public static final String MY_IS_IDENTIFIED_BY_TYPE = " MyIsIdentifiedByTest " ;
2023-05-12 17:56:30 +02:00
public static final String MY_CONSISTS_OF = " { \" " + Element . TYPE_PROPERTY + " \" : \" " + MY_IS_IDENTIFIED_BY_TYPE + " \" , \" " + ModelElement . SUPERTYPES_PROPERTY + " \" :[ \" IsIdentifiedBy \" , \" ConsistsOf \" ], \" target \" : " + MY_TEST_FACET + " } " ;
2019-03-22 15:51:44 +01:00
@Test
public void testER ( ) throws Exception {
2023-04-28 17:16:46 +02:00
logger . debug ( MY_TEST_FACET ) ;
2020-02-03 10:53:24 +01:00
Facet f = ElementMapper . unmarshal ( Facet . class , MY_TEST_FACET ) ;
2023-04-28 17:16:46 +02:00
logger . debug ( " {} {} " , f . getTypeName ( ) , f ) ;
Assert . assertTrue ( f . getExpectedtype ( ) ! = null ) ;
Assert . assertTrue ( f . getExpectedtype ( ) . compareTo ( MY_SOFTWARE_FACET_TYPE ) = = 0 ) ;
2019-03-22 15:51:44 +01:00
2023-04-28 17:16:46 +02:00
logger . debug ( MY_CONSISTS_OF ) ;
2021-03-08 18:46:21 +01:00
ConsistsOf < ? , ? > c = ElementMapper . unmarshal ( ConsistsOf . class , MY_CONSISTS_OF ) ;
2023-04-28 17:16:46 +02:00
logger . debug ( " {} {} " , c . getTypeName ( ) , c ) ;
Assert . assertTrue ( c . getExpectedtype ( ) ! = null ) ;
Assert . assertTrue ( c . getExpectedtype ( ) . compareTo ( MY_IS_IDENTIFIED_BY_TYPE ) = = 0 ) ;
2019-03-22 15:51:44 +01:00
String [ ] eServices = new String [ ] { NYESERVICE , MYESERVICE , MYOTHERESERVICE , MYANOTHERESERVICE , NYESERVICE2 , MYANOTHERESERVICE2 } ;
2023-04-28 17:16:46 +02:00
// String[] eServices = new String[]{NYESERVICE2, MYANOTHERESERVICE2};
2023-04-28 17:50:34 +02:00
// String[] eServices = new String[]{NYESERVICE};
2023-04-28 17:16:46 +02:00
// String[] eServices = new String[]{};
2019-03-22 15:51:44 +01:00
for ( String eService : eServices ) {
2020-07-02 18:51:59 +02:00
logger . debug ( " Going to unmarshal {} " , eService ) ;
2020-02-03 10:53:24 +01:00
Resource resource = ElementMapper . unmarshal ( Resource . class , eService ) ;
2019-03-22 15:51:44 +01:00
logger . debug ( " {} {} " , resource . getClass ( ) . getSimpleName ( ) , resource ) ;
List < ConsistsOf < ? extends Resource , ? extends Facet > > consistsOfs = resource . getConsistsOf ( ) ;
for ( ConsistsOf < ? extends Resource , ? extends Facet > consistsOf : consistsOfs ) {
logger . debug ( " {} " , consistsOf ) ;
Facet facet = consistsOf . getTarget ( ) ;
logger . debug ( " {} {} " , facet . getClass ( ) . getSimpleName ( ) , facet ) ;
}
}
}
2020-07-02 18:51:59 +02:00
@Test
2019-03-22 15:51:44 +01:00
public void testRelation ( ) throws Exception {
HostingNode hostingNode = new HostingNodeImpl ( ) ;
2023-04-18 17:51:33 +02:00
Metadata metadataHn = new MetadataImpl ( ) ;
hostingNode . setMetadata ( metadataHn ) ;
2019-03-22 15:51:44 +01:00
EService eService = new EServiceImpl ( ) ;
2023-04-18 17:51:33 +02:00
Metadata metadataES = new MetadataImpl ( ) ;
eService . setMetadata ( metadataES ) ;
2019-03-22 15:51:44 +01:00
Activates < HostingNode , EService > activates = new ActivatesImpl < HostingNode , EService > ( hostingNode , eService , null ) ;
hostingNode . attachResource ( activates ) ;
2020-02-03 10:53:24 +01:00
String string = ElementMapper . marshal ( activates ) ;
2019-03-22 15:51:44 +01:00
logger . debug ( string ) ;
}
2023-05-15 16:49:51 +02:00
public static final String AUX = " { \" type \" : \" Activates \" , \" id \" : \" 6f727f32-4c2d-477f-997b-1f792168875f \" , \" propagationConstraint \" :{ \" type \" : \" PropagationConstraint \" , \" add \" : \" propagate \" , \" delete \" : \" cascade \" , \" remove \" : \" cascade \" }, \" source \" :{ \" type \" : \" HostingNode \" , \" supertypes \" :[ \" Service \" , \" GCubeResource \" , \" Resource \" ], \" id \" : \" 1c7e980d-cbd0-4a97-a7b7-2e6f530864c4 \" }, \" target \" :{ \" type \" : \" EService \" , \" id \" : \" 18854a80-7f72-4655-82cc-22884c912bfe \" , \" consistsOf \" :[{ \" type \" : \" IsIdentifiedBy \" , \" id \" :null, \" propagationConstraint \" :{ \" type \" : \" PropagationConstraint \" , \" add \" : \" propagate \" , \" delete \" : \" cascade \" , \" remove \" : \" cascade \" }, \" source \" :{ \" type \" : \" EService \" , \" id \" : \" 18854a80-7f72-4655-82cc-22884c912bfe \" }, \" target \" :{ \" type \" : \" SoftwareFacet \" , \" id \" :null, \" name \" : \" gcat \" , \" group \" : \" org.gcube.data-catalogue \" , \" version \" : \" 2.5.1-SNAPSHOT \" , \" description \" : \" This service allows any client to publish on the gCube Catalogue. \" , \" qualifier \" :null, \" optional \" :false}},{ \" type \" : \" ConsistsOf \" , \" id \" :null, \" propagationConstraint \" :{ \" type \" : \" PropagationConstraint \" , \" add \" : \" propagate \" , \" delete \" : \" cascade \" , \" remove \" : \" cascade \" }, \" source \" :{ \" type \" : \" EService \" , \" id \" : \" 18854a80-7f72-4655-82cc-22884c912bfe \" }, \" target \" :{ \" type \" : \" AccessPointFacet \" , \" id \" :null, \" entryName \" : \" org.gcube.gcat.ResourceInitializer \" , \" endpoint \" : \" http://gcat.dev.int.d4science.net:80/gcat \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" type \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}}},{ \" type \" : \" ConsistsOf \" , \" id \" :null, \" propagationConstraint \" :{ \" type \" : \" PropagationConstraint \" , \" add \" : \" propagate \" , \" delete \" : \" cascade \" , \" remove \" : \" cascade \" }, \" source \" :{ \" type \" : \" EService \" , \" id \" : \" 18854a80-7f72-4655-82cc-22884c912bfe \" }, \" target \" :{ \" type \" : \" AccessPointFacet \" , \" id \" :null, \" entryName \" : \" gcat-remote-management \" , \" endpoint \" : \" http://gcat.dev.int.d4science.net:80/gcat/gcube/resource \" , \" protocol \" :null, \" description \" :null, \" authorization \" :{ \" type \" : \" ValueSchema \" , \" value \" : \" gcube-token \" , \" schema \" :null}}},{ \" type \" : \" ConsistsOf \" , \" id \" :null, \" propagationConstraint \" :{ \" type \" : \" PropagationConstraint \" , \" add \" : \" propagate \" , \" delete \" : \" cascade \" , \" remove \" : \" cascade \" }, \" source \" :{ \" type \" : \" EService \" , \" id \" : \" 18854a80-7f72-4655-82cc-22884c912bfe \" }, \" target \" :{ \" type \" : \" StateFacet \" , \" id \" :null, \" value \" : \" started \" , \" date \" : \" 2023-05-15 12:36:47.299 +0200 \" }},{ \" type \" : \" ConsistsOf \" , \" id \" :null, \" propagationConstraint \" :{ \" type \" : \" PropagationConstraint \" , \" add \" : \" propagate \" , \" delete \" : \" cascade \" , \" remove \" : \" cascade \" }, \" source \" :{ \" type \" : \" EService \" , \" id \" : \" 18854a80-7f72-4655-82cc-22884c912bfe \" }, \" target \" :{ \" type \" : \" EventFacet \" , \" id \" :null, \" date \" : \" 2023-05-15 10:36:47.299 +0000 \" , \" event \" : \" started \" }}], \" isRelatedTo \" :[]}} " ;
@Test
public void testUnmarshalling ( ) throws JsonParseException , JsonMappingException , IOException {
ElementMapper . unmarshal ( Activates . class , AUX ) ;
}
2019-03-22 15:51:44 +01:00
}