use of org.iobserve.model.privacy.EncapsulatedDataSource in project iobserve-analysis by research-iobserve.
the class DataProtectionWarner method clearAndFillQueryMaps.
/**
* Fills the hash maps used for queries.
*
* @throws DBException
* @throws InvocationException
*/
private void clearAndFillQueryMaps() throws InvocationException, DBException {
DeploymentLock.lock();
this.vertices.clear();
this.geolocations.clear();
this.stereotypes.clear();
this.parameterprivacy.clear();
this.returntypeprivacy.clear();
this.interfaces.clear();
for (final GeoLocation location : this.privacyRootElement.getResourceContainerLocations()) {
this.geolocations.put(this.resourceEnvironmentResource.resolve(location.getResourceContainer()).getId(), location);
}
for (final EncapsulatedDataSource stereotype : this.privacyRootElement.getEncapsulatedDataSources()) {
if (stereotype != null) {
final BasicComponent resolvedComponent = this.repositoryResource.resolve(stereotype.getComponent());
this.stereotypes.put(resolvedComponent.getId(), stereotype);
} else {
this.logger.debug("missing {}", stereotype);
}
}
for (final IDataProtectionAnnotation dataProectionAnnocation : this.privacyRootElement.getDataProectionLevels()) {
if (dataProectionAnnocation instanceof ParameterDataProtection) {
final ParameterDataProtection parameterDataProtection = (ParameterDataProtection) dataProectionAnnocation;
final Parameter parameter = this.repositoryResource.resolve(parameterDataProtection.getParameter());
this.parameterprivacy.put(parameter.getParameterName(), parameterDataProtection);
}
if (dataProectionAnnocation instanceof ReturnTypeDataProtection) {
final ReturnTypeDataProtection returnTypeDataProection = (ReturnTypeDataProtection) dataProectionAnnocation;
this.returntypeprivacy.put(this.repositoryResource.resolve(returnTypeDataProection.getOperationSignature()).getId(), returnTypeDataProection);
}
}
for (final Interface inf : this.repositoryRootElement.getInterfaces__Repository()) {
if (inf instanceof OperationInterface) {
this.interfaces.put(inf.getEntityName(), (OperationInterface) inf);
}
}
DeploymentLock.unlock();
}
Aggregations