Ejemplo n.º 1
0
        public void sendRelevationAppendRequest(Relevation relevation)
        {
            fileManager = new DataSourceManager();

            String journalingString = prepareString(relevation);
            String requestResponse = fileManager.sendRequest(myClassID, Configuration.MethodsID.AppendRelevation, journalingString);
        }
        public void SetRelevationAttributes(Relevation relevation)
        {
            this.newRelevation = relevation;

            this.structureValidationResult = ValidateStructure(newRelevation.getRelevationString());
            this.consistencyValidationResult = ValidateConsistency(structureValidationResult, radioactivityLevels, temperatureLevels);

            this.maxRadioactivityLevel = CalculateMaximumValue(radioactivityLevels);
            this.maxTemperatureLevel = CalculateMaximumValue(temperatureLevels);

            this.radioactivityInterpretation = setInterpretation(maxRadioactivityLevel, Configuration.RADIOACTIVITY_THRESHOLD, structureValidationResult);
            this.temperatureInterpretation = setInterpretation(maxTemperatureLevel, Configuration.TEMPERATURE_THRESHOLD, structureValidationResult);

            newRelevation.setRoomCode(roomCode);
            newRelevation.setDate(date);
            newRelevation.setTime(time);

            newRelevation.SetRadioactivityLevels(this.radioactivityLevels);
            newRelevation.setMaxRadioactivityLevel(this.maxRadioactivityLevel);
            newRelevation.setRadioactivityFaults(this.radioactivityFaults);
            newRelevation.setradioactivityInterpretation(this.radioactivityInterpretation);

            newRelevation.setTemperatureLevels(this.temperatureLevels);
            newRelevation.setMaxTemperatureLevel(this.maxTemperatureLevel);
            newRelevation.setTemperatureFaults(this.temperatureFaults);
            newRelevation.SetTemperatureInterpretation(this.temperatureInterpretation);

            newRelevation.setStructureValidation(this.structureValidationResult);
            newRelevation.setConsistencyValidation(this.consistencyValidationResult);
        }
Ejemplo n.º 3
0
        public void dispatchRelevation(Relevation relevation)
        {
            this.sendRelevationToStateManager(relevation); // Send to RelevationStateManager

            if (relevation.getStructureValidation() == "OK")
                        this.sendRelevationToMetatagManager(relevation);  // Send to MetatagManager

                    this.sendRelevationToJournalingManager(relevation); // Send to JournalingManager
        }
Ejemplo n.º 4
0
        private String prepareString(Relevation newRelevation)
        {
            String relevation = newRelevation.getRelevationString().Replace("~", "");

            relevation += "|" + newRelevation.getStructureValidation() + "|" +
                               	            newRelevation.getConsistencyValidation() + "|" +
                                            newRelevation.getMaxRadioactivityLevel() + "|" +
                                            newRelevation.getRadioactivityInterpretation() + "|" +
                                            newRelevation.getStructureValidation() + "|" +
                                            newRelevation.getConsistencyValidation() + "|" +
                                            newRelevation.getMaxTemperatureLevel() + "|" +
                                            newRelevation.getTemperatureInterpretation()+ "|";

                    return relevation;
        }
Ejemplo n.º 5
0
 private void sendRelevationToStateManager(Relevation relevation)
 {
     newRelevationManager = new RelevationStateManager();
             newRelevationManager.setRelevationAttributes(relevation);
 }
Ejemplo n.º 6
0
 private void sendRelevationToMetatagManager(Relevation relevation)
 {
     newMetatagManager = new MetatagManager();
             newMetatagManager.setMetatagAttributes(relevation);
 }
Ejemplo n.º 7
0
 private void sendRelevationToJournalingManager(Relevation relevation)
 {
     newJournalingManager = new JournalingRelevation();
             newJournalingManager.sendRelevationAppendRequest(relevationilevazione);
 }
Ejemplo n.º 8
0
 public void SetMetatagAttributes(Relevation relevation
 {
Ejemplo n.º 9
0
        private Relevation createRelevation(String relevation)
        {
            Relevation newRelevation = new Relevation(relevation);

                    return newRelevation;
        }