001/** 002 * Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ 003 * 004 * This file is part of Dicoogle/dicoogle. 005 * 006 * Dicoogle/dicoogle is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Dicoogle/dicoogle is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with Dicoogle. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package pt.ua.dicoogle.rGUI.server.controllers; 020 021import java.rmi.RemoteException; 022import java.util.AbstractMap.SimpleEntry; 023import java.util.ArrayList; 024import java.util.List; 025import java.util.concurrent.Semaphore; 026import org.slf4j.Logger; 027import org.slf4j.LoggerFactory; 028import org.slf4j.Logger; 029import org.slf4j.LoggerFactory; 030import org.dcm4che2.data.UID; 031import pt.ua.dicoogle.rGUI.interfaces.controllers.ISOPClass; 032import pt.ua.dicoogle.server.SOPList; 033import pt.ua.dicoogle.server.TransfersStorage; 034 035/** 036 * Controller of SOP Class Settings 037 * 038 * @author Samuel Campos <samuelcampos@ua.pt> 039 */ 040@Deprecated 041public class SOPClass implements ISOPClass { 042 043 private SOPList list; 044 private TransfersStorage localTS; 045 046 private ArrayList<String> SOPClassList; 047 private ArrayList<SimpleEntry<String, String>> TS; 048 private static Semaphore sem = new Semaphore(1, true); 049 private static SOPClass instance = null; 050 051 public static synchronized SOPClass getInstance() { 052 try { 053 sem.acquire(); 054 if (instance == null) { 055 instance = new SOPClass(); 056 } 057 sem.release(); 058 } catch (InterruptedException ex) { 059 LoggerFactory.getLogger(QRServers.class).error(ex.getMessage(), ex); 060 } 061 return instance; 062 } 063 064 private SOPClass() { 065 066 list = SOPList.getInstance(); 067 068 initSOPClassList(); 069 initTS(); 070 } 071 072 private void initTS() { 073 TS = new ArrayList<SimpleEntry<String, String>>(); 074 075 TS.add(new SimpleEntry(UID.ImplicitVRLittleEndian, "ImplicitVRLittleEndian")); 076 TS.add(new SimpleEntry(UID.ExplicitVRLittleEndian, "ExplicitVRLittleEndian")); 077 TS.add(new SimpleEntry(UID.DeflatedExplicitVRLittleEndian, "DeflatedExplicitVRLittleEndian")); 078 TS.add(new SimpleEntry(UID.ExplicitVRBigEndian, "ExplicitVRBigEndian")); 079 TS.add(new SimpleEntry(UID.JPEGLossless, "JPEG Lossless")); 080 TS.add(new SimpleEntry(UID.JPEGLSLossless, "JPEG Lossless LS")); 081 TS.add(new SimpleEntry(UID.JPEGLosslessNonHierarchical14, "JPEG Lossless, Non-Hierarchical (Process 14) ")); 082 TS.add(new SimpleEntry(UID.JPEG2000LosslessOnly, "JPEG2000 Lossless Only")); 083 TS.add(new SimpleEntry(UID.JPEGBaseline1, "JPEG Baseline 1")); 084 TS.add(new SimpleEntry(UID.JPEGExtended24, "JPEG Extended (Process 2 & 4)")); 085 TS.add(new SimpleEntry(UID.JPEGLSLossyNearLossless, "JPEG LS Lossy Near Lossless")); 086 TS.add(new SimpleEntry(UID.JPEG2000, "JPEG2000")); 087 TS.add(new SimpleEntry(UID.RLELossless, "RLE Lossless")); 088 TS.add(new SimpleEntry(UID.MPEG2, "MPEG2")); 089 } 090 091 private void initSOPClassList() { 092 SOPClassList = new ArrayList<String>(); 093 094 SOPClassList.add("BasicStudyContentNotification (Retired)"); 095 SOPClassList.add("StoredPrintStorage (Retired)"); 096 SOPClassList.add("HardcopyGrayscaleImageStorage (Retired)"); 097 SOPClassList.add("HardcopyColorImageStorage (Retired)"); 098 SOPClassList.add("ComputedRadiographyImageStorage"); 099 SOPClassList.add("DigitalXRayImageStorageForPresentation"); 100 SOPClassList.add("DigitalXRayImageStorageForProcessing"); 101 SOPClassList.add("DigitalMammographyXRayImageStorageForPresentation"); 102 SOPClassList.add("DigitalMammographyXRayImageStorageForProcessing"); 103 SOPClassList.add("DigitalIntraoralXRayImageStorageForPresentation"); 104 SOPClassList.add("DigitalIntraoralXRayImageStorageForProcessing"); 105 SOPClassList.add("StandaloneModalityLUTStorage (Retired)"); 106 SOPClassList.add("EncapsulatedPDFStorage"); 107 SOPClassList.add("StandaloneVOILUTStorage (Retired)"); 108 SOPClassList.add("GrayscaleSoftcopyPresentationStateStorage"); 109 SOPClassList.add("ColorSoftcopyPresentationStateStorage"); 110 SOPClassList.add("PseudoColorSoftcopyPresentationStateStorage"); 111 SOPClassList.add("BlendingSoftcopyPresentationStateStorage"); 112 SOPClassList.add("XRayAngiographicImageStorage"); 113 SOPClassList.add("EnhancedXAImageStorage"); 114 SOPClassList.add("XRayRadiofluoroscopicImageStorage"); 115 SOPClassList.add("EnhancedXRFImageStorage"); 116 SOPClassList.add("XRayAngiographicBiPlaneImageStorage (Retired)"); 117 SOPClassList.add("PositronEmissionTomographyImageStorage"); 118 SOPClassList.add("StandalonePETCurveStorage (Retired)"); 119 SOPClassList.add("CTImageStorage"); 120 SOPClassList.add("EnhancedCTImageStorage"); 121 SOPClassList.add("NuclearMedicineImageStorage"); 122 SOPClassList.add("UltrasoundMultiframeImageStorage (Retired)"); 123 SOPClassList.add("UltrasoundMultiframeImageStorage"); 124 SOPClassList.add("MRImageStorage"); 125 SOPClassList.add("EnhancedMRImageStorage"); 126 SOPClassList.add("MRSpectroscopyStorage"); 127 SOPClassList.add("RTImageStorage"); 128 SOPClassList.add("RTDoseStorage"); 129 SOPClassList.add("RTStructureSetStorage"); 130 SOPClassList.add("RTBeamsTreatmentRecordStorage"); 131 SOPClassList.add("RTPlanStorage"); 132 SOPClassList.add("RTBrachyTreatmentRecordStorage"); 133 SOPClassList.add("RTTreatmentSummaryRecordStorage"); 134 SOPClassList.add("NuclearMedicineImageStorage (Retired)"); 135 SOPClassList.add("UltrasoundImageStorage (Retired)"); 136 SOPClassList.add("UltrasoundImageStorage"); 137 SOPClassList.add("RawDataStorage"); 138 SOPClassList.add("SpatialRegistrationStorage"); 139 SOPClassList.add("SpatialFiducialsStorage"); 140 SOPClassList.add("RealWorldValueMappingStorage"); 141 SOPClassList.add("SecondaryCaptureImageStorage"); 142 SOPClassList.add("MultiframeSingleBitSecondaryCaptureImageStorage"); 143 SOPClassList.add("MultiframeGrayscaleByteSecondaryCaptureImageStorage"); 144 SOPClassList.add("MultiframeGrayscaleWordSecondaryCaptureImageStorage"); 145 SOPClassList.add("MultiframeTrueColorSecondaryCaptureImageStorage"); 146 SOPClassList.add("VLImageStorage (Retired)"); 147 SOPClassList.add("VLEndoscopicImageStorage"); 148 SOPClassList.add("VideoEndoscopicImageStorage"); 149 SOPClassList.add("VLMicroscopicImageStorage"); 150 SOPClassList.add("VideoMicroscopicImageStorage"); 151 SOPClassList.add("VLSlideCoordinatesMicroscopicImageStorage"); 152 SOPClassList.add("VLPhotographicImageStorage"); 153 SOPClassList.add("VideoPhotographicImageStorage"); 154 SOPClassList.add("OphthalmicPhotography8BitImageStorage"); 155 SOPClassList.add("OphthalmicPhotography16BitImageStorage"); 156 SOPClassList.add("StereometricRelationshipStorage"); 157 SOPClassList.add("VLMultiframeImageStorage (Retired)"); 158 SOPClassList.add("StandaloneOverlayStorage (Retired)"); 159 SOPClassList.add("BasicTextSR"); 160 SOPClassList.add("EnhancedSR"); 161 SOPClassList.add("ComprehensiveSR"); 162 SOPClassList.add("ProcedureLogStorage"); 163 SOPClassList.add("MammographyCADSR"); 164 SOPClassList.add("KeyObjectSelectionDocument"); 165 SOPClassList.add("ChestCADSR"); 166 SOPClassList.add("StandaloneCurveStorage (Retired)"); 167 SOPClassList.add("12leadECGWaveformStorage"); 168 SOPClassList.add("GeneralECGWaveformStorage"); 169 SOPClassList.add("AmbulatoryECGWaveformStorage"); 170 SOPClassList.add("HemodynamicWaveformStorage"); 171 SOPClassList.add("CardiacElectrophysiologyWaveformStorage"); 172 SOPClassList.add("BasicVoiceAudioWaveformStorage"); 173 SOPClassList.add("HangingProtocolStorage"); 174 SOPClassList.add("SiemensCSANonImageStorage"); 175 } 176 177 /** 178 * 179 * @return the list with the names of SOP Classes 180 * @throws RemoteException 181 */ 182 @Override 183 public ArrayList<String> getSOPClassList() throws RemoteException { 184 return SOPClassList; 185 } 186 187 @Override 188 public ArrayList<SimpleEntry<String, String>> getTransferSyntax() throws RemoteException { 189 return TS; 190 } 191 192 /** 193 * Get the UID from SOP Class Name 194 * @param sopClass 195 * @return UID corresponding to the SOP Class Name 196 * @throws RemoteException 197 */ 198 @Override 199 public String getUID(String sopClass) throws RemoteException { 200 if(sopClass.equals("BasicStudyContentNotification (Retired)")) 201 return UID.BasicStudyContentNotificationSOPClassRetired; 202 203 if(sopClass.equals("StoredPrintStorage (Retired)")) 204 return UID.StoredPrintStorageSOPClassRetired; 205 206 if(sopClass.equals("HardcopyGrayscaleImageStorage (Retired)")) 207 return UID.HardcopyGrayscaleImageStorageSOPClassRetired; 208 209 if(sopClass.equals("HardcopyColorImageStorage (Retired)")) 210 return UID.HardcopyColorImageStorageSOPClassRetired; 211 212 if(sopClass.equals("ComputedRadiographyImageStorage")) 213 return UID.ComputedRadiographyImageStorage; 214 215 if(sopClass.equals("DigitalXRayImageStorageForPresentation")) 216 return UID.DigitalXRayImageStorageForPresentation; 217 218 219 if(sopClass.equals("DigitalXRayImageStorageForProcessing")) 220 return UID.DigitalXRayImageStorageForProcessing; 221 222 if(sopClass.equals("DigitalMammographyXRayImageStorageForPresentation")) 223 return UID.DigitalMammographyXRayImageStorageForPresentation; 224 225 if(sopClass.equals("DigitalMammographyXRayImageStorageForProcessing")) 226 return UID.DigitalMammographyXRayImageStorageForProcessing; 227 228 if(sopClass.equals("DigitalIntraoralXRayImageStorageForPresentation")) 229 return UID.DigitalIntraOralXRayImageStorageForPresentation; 230 231 if(sopClass.equals("DigitalIntraoralXRayImageStorageForProcessing")) 232 return UID.DigitalIntraOralXRayImageStorageForProcessing; 233 234 if(sopClass.equals("StandaloneModalityLUTStorage (Retired)")) 235 return UID.StandaloneModalityLUTStorageRetired; 236 237 if(sopClass.equals("EncapsulatedPDFStorage")) 238 return UID.EncapsulatedPDFStorage; 239 240 if(sopClass.equals("StandaloneVOILUTStorage (Retired)")) 241 return UID.StandaloneVOILUTStorageRetired; 242 243 if(sopClass.equals("GrayscaleSoftcopyPresentationStateStorage")) 244 return UID.GrayscaleSoftcopyPresentationStateStorageSOPClass; 245 246 if(sopClass.equals("ColorSoftcopyPresentationStateStorage")) 247 return UID.ColorSoftcopyPresentationStateStorageSOPClass; 248 249 if(sopClass.equals("PseudoColorSoftcopyPresentationStateStorage")) 250 return UID.PseudoColorSoftcopyPresentationStateStorageSOPClass; 251 252 if(sopClass.equals("BlendingSoftcopyPresentationStateStorage")) 253 return UID.BlendingSoftcopyPresentationStateStorageSOPClass; 254 255 if(sopClass.equals("XRayAngiographicImageStorage")) 256 return UID.XRayAngiographicImageStorage; 257 258 if(sopClass.equals("EnhancedXAImageStorage")) 259 return UID.EnhancedXAImageStorage; 260 261 if(sopClass.equals("XRayRadiofluoroscopicImageStorage")) 262 return UID.XRayRadiofluoroscopicImageStorage; 263 264 if(sopClass.equals("EnhancedXRFImageStorage")) 265 return UID.EnhancedXRFImageStorage; 266 267 if(sopClass.equals("XRayAngiographicBiPlaneImageStorage (Retired)")) 268 return UID.XRayAngiographicBiPlaneImageStorageRetired; 269 270 if(sopClass.equals("PositronEmissionTomographyImageStorage")) 271 return UID.PositronEmissionTomographyImageStorage; 272 273 if(sopClass.equals("StandalonePETCurveStorage (Retired)")) 274 return UID.StandalonePETCurveStorageRetired; 275 276 if(sopClass.equals("CTImageStorage")) 277 return UID.CTImageStorage; 278 279 if(sopClass.equals("EnhancedCTImageStorage")) 280 return UID.EnhancedCTImageStorage; 281 282 if(sopClass.equals("NuclearMedicineImageStorage")) 283 return UID.NuclearMedicineImageStorage; 284 285 if(sopClass.equals("UltrasoundMultiframeImageStorage (Retired)")) 286 return UID.UltrasoundMultiFrameImageStorageRetired; 287 288 if(sopClass.equals("UltrasoundMultiframeImageStorage")) 289 return UID.UltrasoundMultiFrameImageStorage; 290 291 if(sopClass.equals("MRImageStorage")) 292 return UID.MRImageStorage; 293 294 if(sopClass.equals("EnhancedMRImageStorage")) 295 return UID.EnhancedMRImageStorage; 296 297 if(sopClass.equals("MRSpectroscopyStorage")) 298 return UID.MRSpectroscopyStorage; 299 300 if(sopClass.equals("RTImageStorage")) 301 return UID.RTImageStorage; 302 303 if(sopClass.equals("RTDoseStorage")) 304 return UID.RTDoseStorage; 305 306 if(sopClass.equals("RTStructureSetStorage")) 307 return UID.RTStructureSetStorage; 308 309 if(sopClass.equals("RTBeamsTreatmentRecordStorage")) 310 return UID.RTBeamsTreatmentRecordStorage; 311 312 if(sopClass.equals("RTPlanStorage")) 313 return UID.RTPlanStorage; 314 315 if(sopClass.equals("RTBrachyTreatmentRecordStorage")) 316 return UID.RTBrachyTreatmentRecordStorage; 317 318 if(sopClass.equals("RTTreatmentSummaryRecordStorage")) 319 return UID.RTTreatmentSummaryRecordStorage; 320 321 if(sopClass.equals("NuclearMedicineImageStorage (Retired)")) 322 return UID.NuclearMedicineImageStorageRetired; 323 324 if(sopClass.equals("UltrasoundImageStorage (Retired)")) 325 return UID.UltrasoundImageStorageRetired; 326 327 if(sopClass.equals("UltrasoundImageStorage")) 328 return UID.UltrasoundImageStorage; 329 330 if(sopClass.equals("RawDataStorage")) 331 return UID.RawDataStorage; 332 333 if(sopClass.equals("SpatialRegistrationStorage")) 334 return UID.SpatialRegistrationStorage; 335 336 if(sopClass.equals("SpatialFiducialsStorage")) 337 return UID.SpatialFiducialsStorage; 338 339 if(sopClass.equals("RealWorldValueMappingStorage")) 340 return UID.RealWorldValueMappingStorage; 341 342 if(sopClass.equals("SecondaryCaptureImageStorage")) 343 return UID.SecondaryCaptureImageStorage; 344 345 if(sopClass.equals("MultiframeSingleBitSecondaryCaptureImageStorage")) 346 return UID.MultiFrameSingleBitSecondaryCaptureImageStorage; 347 348 if(sopClass.equals("MultiframeGrayscaleByteSecondaryCaptureImageStorage")) 349 return UID.MultiFrameGrayscaleByteSecondaryCaptureImageStorage; 350 351 if(sopClass.equals("MultiframeGrayscaleWordSecondaryCaptureImageStorage")) 352 return UID.MultiFrameGrayscaleWordSecondaryCaptureImageStorage; 353 354 if(sopClass.equals("MultiframeTrueColorSecondaryCaptureImageStorage")) 355 return UID.MultiFrameTrueColorSecondaryCaptureImageStorage; 356 357 if(sopClass.equals("VLImageStorage (Retired)")) 358 ///return UID.VLImageStorageRetired); 359 /** Update to new version from dcm4che */ 360 return UID.VLImageStorageTrialRetired; 361 362 if(sopClass.equals("VLEndoscopicImageStorage")) 363 return UID.VLEndoscopicImageStorage; 364 365 if(sopClass.equals("VideoEndoscopicImageStorage")) 366 return UID.VideoEndoscopicImageStorage; 367 368 if(sopClass.equals("VLMicroscopicImageStorage")) 369 return UID.VLMicroscopicImageStorage; 370 371 if(sopClass.equals("VideoMicroscopicImageStorage")) 372 return UID.VideoMicroscopicImageStorage; 373 374 if(sopClass.equals("VLSlideCoordinatesMicroscopicImageStorage")) 375 return UID.VLSlideCoordinatesMicroscopicImageStorage; 376 377 if(sopClass.equals("VLPhotographicImageStorage")) 378 return UID.VLPhotographicImageStorage; 379 380 if(sopClass.equals("VideoPhotographicImageStorage")) 381 return UID.VideoPhotographicImageStorage; 382 383 if(sopClass.equals("OphthalmicPhotography8BitImageStorage")) 384 return UID.OphthalmicPhotography8BitImageStorage; 385 386 if(sopClass.equals("OphthalmicPhotography16BitImageStorage")) 387 return UID.OphthalmicPhotography16BitImageStorage; 388 389 if(sopClass.equals("StereometricRelationshipStorage")) 390 return UID.StereometricRelationshipStorage; 391 392 if(sopClass.equals("VLMultiframeImageStorage (Retired)")) 393 ///return UID.VLMultiframeImageStorageRetired); 394 /** Update to new version from dcm4che */ 395 return UID.VLMultiFrameImageStorageTrialRetired; 396 397 if(sopClass.equals("StandaloneOverlayStorage (Retired)")) 398 return UID.StandaloneOverlayStorageRetired; 399 400 if(sopClass.equals("BasicTextSR")) 401 ///return UID.BasicTextSR); 402 /* update to new version from dcm4che */ 403 return UID.BasicTextSRStorage; 404 405 if(sopClass.equals("EnhancedSR")) 406 ///return UID.EnhancedSR); 407 /* update to new version from dcm4che */ 408 return UID.EnhancedSRStorage; 409 410 if(sopClass.equals("ComprehensiveSR")) 411 ///return UID.ComprehensiveSR); 412 /* update to new version from dcm4che */ 413 return UID.ComprehensiveSRStorage; 414 415 if(sopClass.equals("ProcedureLogStorage")) 416 return UID.ProcedureLogStorage; 417 418 if(sopClass.equals("MammographyCADSR")) 419 ///return UID.MammographyCADSR); 420 /* update to new version from dcm4che */ 421 return UID.MammographyCADSRStorage; 422 423 if(sopClass.equals("KeyObjectSelectionDocument")) 424 ///return UID.KeyObjectSelectionDocument); 425 /* update to new version from dcm4che */ 426 return UID.MammographyCADSRStorage; 427 428 if(sopClass.equals("ChestCADSR")) 429 ///return UID.ChestCADSR); 430 /* update to new version from dcm4che */ 431 return UID.ChestCADSRStorage; 432 433 if(sopClass.equals("StandaloneCurveStorage (Retired)")) 434 return UID.StandaloneCurveStorageRetired; 435 436 //if(sopClass.equals("12leadECGWaveformStorage")) 437 //return UID._12leadECGWaveformStorage; 438 439 if(sopClass.equals("GeneralECGWaveformStorage")) 440 return UID.GeneralECGWaveformStorage; 441 442 if(sopClass.equals("AmbulatoryECGWaveformStorage")) 443 return UID.AmbulatoryECGWaveformStorage; 444 445 if(sopClass.equals("HemodynamicWaveformStorage")) 446 return UID.HemodynamicWaveformStorage; 447 448 if(sopClass.equals("CardiacElectrophysiologyWaveformStorage")) 449 return UID.CardiacElectrophysiologyWaveformStorage; 450 451 if(sopClass.equals("BasicVoiceAudioWaveformStorage")) 452 return UID.BasicVoiceAudioWaveformStorage; 453 454 if(sopClass.equals("HangingProtocolStorage")) 455 return UID.HangingProtocolStorage; 456 457 if(sopClass.equals("SiemensCSANonImageStorage")) 458 return UID.SiemensCSANonImageStorage; 459 460 return null; 461 } 462 463 @Override 464 public boolean[] getTS(String UID) throws RemoteException { 465 localTS = list.getTS(UID); 466 return localTS.getTS(); 467 } 468 469 @Override 470 public boolean getAccepted(String UID) throws RemoteException { 471 localTS = list.getTS(UID); 472 return localTS.getAccepted(); 473 } 474 475 @Override 476 public boolean[] setDefault() throws RemoteException { 477 localTS.setAccepted(true); 478 localTS.setTS(true,0); 479 localTS.setTS(true,1); 480 localTS.setTS(false,2); 481 localTS.setTS(false,3); 482 localTS.setTS(true,4); 483 localTS.setTS(false,5); 484 localTS.setTS(false,6); 485 localTS.setTS(false,7); 486 localTS.setTS(true,8); 487 localTS.setTS(false,9); 488 localTS.setTS(false,10); 489 localTS.setTS(false,11); 490 localTS.setTS(false,12); 491 localTS.setTS(false,13); 492 493 return localTS.getTS(); 494 } 495 496 @Override 497 public boolean[] clearAll() throws RemoteException { 498 localTS.setAccepted(false); 499 localTS.setTS(false,0); 500 localTS.setTS(false,1); 501 localTS.setTS(false,2); 502 localTS.setTS(false,3); 503 localTS.setTS(false,4); 504 localTS.setTS(false,5); 505 localTS.setTS(false,6); 506 localTS.setTS(false,7); 507 localTS.setTS(false,8); 508 localTS.setTS(false,9); 509 localTS.setTS(false,10); 510 localTS.setTS(false,11); 511 localTS.setTS(false,12); 512 localTS.setTS(false,13); 513 514 return localTS.getTS(); 515 } 516 517 @Override 518 public boolean[] setAll() throws RemoteException { 519 localTS.setAccepted(true); 520 localTS.setTS(true,0); 521 localTS.setTS(true,1); 522 localTS.setTS(true,2); 523 localTS.setTS(true,3); 524 localTS.setTS(true,4); 525 localTS.setTS(true,5); 526 localTS.setTS(true,6); 527 localTS.setTS(true,7); 528 localTS.setTS(true,8); 529 localTS.setTS(true,9); 530 localTS.setTS(true,10); 531 localTS.setTS(true,11); 532 localTS.setTS(true,12); 533 localTS.setTS(true,13); 534 535 return localTS.getTS(); 536 } 537 538 @Override 539 public void setTS(String UID, boolean status, int number) throws RemoteException { 540 localTS = list.getTS(UID); 541 542 localTS.setTS(status, number); 543 } 544 545 @Override 546 public void saveLocalTS(String UID) throws RemoteException { 547 list.updateTS(UID, localTS.getTS(), localTS.getAccepted()); 548 } 549 550 @Override 551 public void saveAllTS() throws RemoteException { 552 List l = list.getKeys(); 553 for (int i = 0; i < l.size(); i++) { 554 list.updateTS(l.get(i).toString(), localTS.getTS(), localTS.getAccepted()); 555 } 556 } 557 558 @Override 559 public void setAccepted(String UID, boolean value) throws RemoteException { 560 localTS = list.getTS(UID); 561 localTS.setAccepted(value); 562 } 563}