2020-01-27 17:04:45 +01:00
|
|
|
package org.gcube.informationsystem.resourceregistry.types.relations;
|
2020-01-23 17:15:02 +01:00
|
|
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
2020-01-27 17:07:37 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext;
|
2020-01-27 17:04:45 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.types.entities.FacetTypeDefinitionManagement;
|
2020-01-30 11:04:16 +01:00
|
|
|
import org.gcube.informationsystem.types.reference.entities.FacetType;
|
|
|
|
import org.gcube.informationsystem.types.reference.relations.ConsistsOfType;
|
2020-01-23 17:15:02 +01:00
|
|
|
|
|
|
|
import com.orientechnologies.orient.core.db.document.ODatabaseDocument;
|
|
|
|
|
2021-01-20 17:08:59 +01:00
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
|
|
*/
|
2020-01-23 17:15:02 +01:00
|
|
|
public class ConsistsOfTypeDefinitionManagement
|
2020-01-30 11:04:16 +01:00
|
|
|
extends RelationTypeDefinitionManagement<FacetTypeDefinitionManagement,FacetType> {
|
2020-01-23 17:15:02 +01:00
|
|
|
|
|
|
|
public ConsistsOfTypeDefinitionManagement() {
|
2020-01-30 11:04:16 +01:00
|
|
|
super(FacetType.class);
|
|
|
|
this.elementType = ConsistsOfType.NAME;
|
2020-01-23 17:15:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public ConsistsOfTypeDefinitionManagement(SecurityContext securityContext, ODatabaseDocument oDatabaseDocument)
|
|
|
|
throws ResourceRegistryException {
|
2020-01-30 11:04:16 +01:00
|
|
|
super(securityContext, oDatabaseDocument, FacetType.class);
|
|
|
|
this.elementType = ConsistsOfType.NAME;
|
2020-01-23 17:15:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected FacetTypeDefinitionManagement newTargetEntityManagement() throws ResourceRegistryException {
|
2021-02-10 15:54:52 +01:00
|
|
|
FacetTypeDefinitionManagement ftdm = new FacetTypeDefinitionManagement();
|
|
|
|
ftdm.setWorkingContext(getWorkingContext());
|
|
|
|
ftdm.setoDatabaseDocument(oDatabaseDocument);
|
|
|
|
return ftdm;
|
2020-01-23 17:15:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|