From: Sebastian H. <ha...@us...> - 2001-11-23 14:57:34
|
Update of /cvsroot/dcm4che/dcm4chex-web/src/main/org/tiani/dcm4chex/experimental/web/helper In directory usw-pr-cvs1:/tmp/cvs-serv11816/helper Modified Files: Homer.java MWLQuery.java Added Files: CodeSAXDefaultHandler.java Utils.java Removed Files: Configurator.java ConfiguratorMBean.java MBeanManager.java Log Message: Added more sources from the tiani source tree to dcm4che and changed some of the structure. New packages are: org.tiani.dcm4chex.experimental.web.logic - for all the ejb access and stuff org.tiani.dcm4chex.experimental.web.management - for all jmx related stuff --- NEW FILE: CodeSAXDefaultHandler.java --- /* * $Id: CodeSAXDefaultHandler.java,v 1.1 2001/11/23 14:57:31 hauer Exp $ * Created on November 22, 2001, 1:18 PM * * Copyright 2001 by TIANI MEDGRAPH AG. */ /* * CodeSAXDefaultHandler.java * * Created on November 22, 2001, 1:18 PM */ package org.tiani.dcm4chex.experimental.web.helper; //dcm4che imports import org.dcm4che.iod.macro.CodeItem; //sax imports import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.SAXException; import org.xml.sax.Attributes; //java imports import java.util.Collection; //other imports import org.apache.log4j.Category; /** * * @author Sebastian Hauer * @version 0.1 */ public class CodeSAXDefaultHandler extends DefaultHandler { private final Category log = Category.getInstance(CodeSAXDefaultHandler.class.getName()); private Collection codeItemList = new java.util.LinkedList(); private boolean newCode = false; private StringBuffer codingSchemeDesignator = null; private boolean newCodingSchemeDesignator = false; private StringBuffer codingSchemeVersion = null; private boolean newCodingSchemeVersion = false; private StringBuffer codeValue = null; private boolean newCodeValue = false; private StringBuffer codeMeaning = null; private boolean newCodeMeaning = false; /** * Creates new CodeSAXDefaultHandler */ public CodeSAXDefaultHandler() { } public Collection getCodeItemList() { return codeItemList; } public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (localName.equals("Code")) { newCode = true; codingSchemeDesignator = new StringBuffer(); codingSchemeVersion = new StringBuffer(); codeValue = new StringBuffer(); codeMeaning = new StringBuffer(); } else if (localName.equals("CodingSchemeDesignator")) { newCodingSchemeDesignator = true; } else if (localName.equals("CodingSchemeVersion")) { newCodingSchemeVersion = true; } else if (localName.equals("CodeValue")) { newCodeValue = true; } else if (localName.equals("CodeMeaning")) { newCodeMeaning = true; } } public void endElement(String uri, String localName, String qName) throws SAXException { if (localName.equals("Code")) { newCode = false; CodeItem codeItem = new CodeItem(); String codingSchemeDesignatorString = codingSchemeDesignator.toString().trim(); String codingSchemeVersionString = codingSchemeVersion.toString().trim(); String codeValueString = codeValue.toString().trim(); String codeMeaningString = codeMeaning.toString().trim(); codeItem.codingSchemeDesignator = codingSchemeDesignatorString.length() > 0 ? codingSchemeDesignatorString : null; log.debug("codeItem.codingSchemeDesignator = #" + codeItem.codingSchemeDesignator + "#"); codeItem.codingSchemeVersion = codingSchemeVersionString.length() > 0 ? codingSchemeVersionString : null; log.debug("codeItem.codingSchemeVersion = #" + codeItem.codingSchemeVersion + "#"); codeItem.codeValue = codeValueString.length() > 0 ? codeValueString : null; log.debug("codeItem.codeValue = #" + codeItem.codeValue + "#"); codeItem.codeMeaning = codeMeaningString.length() > 0 ? codeMeaningString : null; log.debug("codeItem.codeMeaning = #" + codeItem.codeMeaning + "#"); codeItemList.add(codeItem); } else if (localName.equals("CodingSchemeDesignator")) { newCodingSchemeDesignator = false; } else if (localName.equals("CodingSchemeVersion")) { newCodingSchemeVersion = false; } else if (localName.equals("CodeValue")) { newCodeValue = false; } else if (localName.equals("CodeMeaning")) { newCodeMeaning = false; } } public void characters(char[] ch, int start, int length) throws SAXException { if (newCodingSchemeDesignator) { codingSchemeDesignator.append(ch, start, length); } else if (newCodingSchemeVersion) { codingSchemeVersion.append(ch, start, length); } else if (newCodeValue) { codeValue.append(ch, start, length); } else if (newCodeMeaning) { codeMeaning.append(ch, start, length); } } }//end class CodeSAXDefaultHandler --- NEW FILE: Utils.java --- /* * $Id: Utils.java,v 1.1 2001/11/23 14:57:31 hauer Exp $ * Created on November 20, 2001, 3:53 PM * * Copyright 2001 by TIANI MEDGRAPH AG * All rights reserved. */ /* * Utils.java * * Created on November 20, 2001, 3:53 PM */ package org.tiani.dcm4chex.experimental.web.helper; //java imports import java.util.Date; import java.text.SimpleDateFormat; import java.text.ParseException; import java.util.Calendar; /** * * @author Sebastian Hauer * @version 0.1 */ public class Utils { private static final SimpleDateFormat dicomDateFormat = new SimpleDateFormat("yyyyMMdd"); private static final SimpleDateFormat dicomOldDateFormat = new SimpleDateFormat("yyyy.MM.dd"); private static final SimpleDateFormat dicomTimeFormat = new SimpleDateFormat("hhmmss"); private static final SimpleDateFormat dicomOldTimeFormat = new SimpleDateFormat("hh:mm:ss"); private final static SimpleDateFormat dateFormat = new SimpleDateFormat("ddMMyyyy"); public static String createProperYearString(String year) { String newYear = year != null ? year.trim() : ""; if (newYear.length() == 1) { newYear = "200" + newYear; } else if (newYear.length() == 2) { newYear = "19" + newYear; } return newYear; } private static String padZeroToString(int newStringSize, String origString) { String newString = origString != null ? origString.trim() : ""; int origStringLength = newString.length(); for (int i = 0; i < (newStringSize - origStringLength); i++) { newString = "0" + newString; } return newString; } public static String[] createStringDate(Date date) { if (date == null) return null; Calendar cal = Calendar.getInstance(); cal.setTime(date); String day = "" + cal.get(Calendar.DAY_OF_MONTH); String month = "" + (cal.get(Calendar.MONTH) + 1); String year = "" + cal.get(Calendar.YEAR); return new String[] {day, month, year}; }//end createStringDate() public static String[] createStringTime(Date date) { if (date == null) return null; Calendar cal = Calendar.getInstance(); cal.setTime(date); String hour = "" + cal.get(Calendar.HOUR_OF_DAY); String min = "" + cal.get(Calendar.MINUTE); String sec = "" + cal.get(Calendar.SECOND); return new String[] {hour, min, sec}; }//end createStringTime() public static Date createDateFromString(String day, String month, String year, String hour, String min, String sec) { int nDay = -1; int nMonth = -1; int nYear = -1; int nHour = -1; int nMin = -1; int nSec = -1; Calendar cal = Calendar.getInstance(); try { nDay = Integer.parseInt(day); nMonth = Integer.parseInt(month); nYear = Integer.parseInt(year); cal.set(Calendar.DAY_OF_MONTH, nDay); cal.set(Calendar.MONTH, nMonth - 1); cal.set(Calendar.YEAR, nYear); try { nHour = Integer.parseInt(hour); nMin = Integer.parseInt(min); nSec = Integer.parseInt(sec); cal.set(Calendar.HOUR_OF_DAY, nHour); cal.set(Calendar.MINUTE, nMin); cal.set(Calendar.SECOND, nSec); } catch (NumberFormatException e) {} } catch (NumberFormatException e) { return null; } return cal.getTime(); }//end createDateFromString() public static Date createDICOMDate(String day, String month, String year) throws ParseException { Date dicomDate = null; dicomDate = dateFormat.parse(padZeroToString(2, day) + padZeroToString(2, month) + createProperYearString(year)); return dicomDate; }//end createDICOMDate() public static Date convDAtoDate(String dicomDate) { try { if (dicomDate.length() == 10) { return dicomDateFormat.parse(dicomDate); } else if (dicomDate.length() == 12) { return dicomOldDateFormat.parse(dicomDate); } } catch (Exception e) {} return null; }//end convDAtoDate() public static Date convTMtoDate(String dicomTime) { String time = dicomTime; try { if (time.indexOf(":") != -1) { switch (time.length()) { case 2: //"hh" time += ":00:00"; break; case 5: //"hh:mm" time += ":00"; break; case 8: //"hh:mm:ss" break; default: if (time.length() > 8) { time = time.substring(0, 8); } } return dicomOldTimeFormat.parse(time); } else { switch (time.length()) { case 2: time += "0000"; break; case 4: time += "00"; break; case 6: break; default: if (time.length() > 6) { time = time.substring(0, 6); } } return dicomTimeFormat.parse(time); } } catch (Exception e) {} return null; }//end convTMtoDate() }//end class Utils Index: Homer.java =================================================================== RCS file: /cvsroot/dcm4che/dcm4chex-web/src/main/org/tiani/dcm4chex/experimental/web/helper/Homer.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Homer.java 2001/11/01 20:35:10 1.1.1.1 --- Homer.java 2001/11/23 14:57:31 1.2 *************** *** 31,35 **** import org.tiani.dcm4chex.ejb.ClientContext; - import org.tiani.dcm4chex.ejb.study.StudyHome; import org.tiani.dcm4chex.ejb.series.SeriesHome; --- 31,34 ---- *************** *** 44,56 **** import org.tiani.dcm4chex.ejb.visit.VisitHome; import org.tiani.dcm4chex.ejb.mwl.SPSHome; /** * ! * @author ha...@ps... (Sebastian Hauer) ! * @version 0.1 */ public class Homer { private StudyHome studyHome; private SeriesHome seriesHome; --- 43,66 ---- import org.tiani.dcm4chex.ejb.visit.VisitHome; import org.tiani.dcm4chex.ejb.mwl.SPSHome; + import org.tiani.dcm4chex.ejb.mwl.ImagingServiceRequestHome; + import org.tiani.dcm4chex.ejb.mwl.RequestedProcedureHome; + import org.tiani.dcm4chex.ejb.mwl.ProcedureTypeHome; + import org.tiani.dcm4chex.ejb.mwl.ProtocolHome; + import org.tiani.dcm4chex.ejb.mwl.ProcedurePlanHome; + import org.tiani.dcm4chex.ejb.code.CodeHome; + import org.apache.log4j.Category; /** * ! * @author Sebastian Hauer ! * @version 0.5 ! * $Date$ */ public class Homer { + private final Category log = + Category.getInstance(Homer.class.getName()); + private StudyHome studyHome; private SeriesHome seriesHome; *************** *** 64,67 **** --- 74,84 ---- private VisitHome visitHome; private SPSHome spsHome; + private ImagingServiceRequestHome isrHome; + private RequestedProcedureHome rpHome; + private ProcedureTypeHome procedureTypeHome; + private ProtocolHome protocolHome; + private ProcedurePlanHome procedurePlanHome; + private CodeHome protocolCodeHome; + private CodeHome procedureTypeCodeHome; /** *************** *** 74,112 **** --- 91,176 ---- */ protected Homer() throws IOException, NamingException { + log.debug("Trying to get JNDI client context"); + ClientContext ctx = new ClientContext(); + log.debug("Got JNDI client context"); studyHome = (StudyHome)PortableRemoteObject .narrow(ctx.lookup("ejb/Study"), StudyHome.class); + log.debug("Got StudyHome"); seriesHome = (SeriesHome)PortableRemoteObject .narrow(ctx.lookup("ejb/Series"), SeriesHome.class); + log.debug("Got SeriesHome"); patientHome = (PatientHome)PortableRemoteObject .narrow(ctx.lookup("ejb/Patient"), PatientHome.class); + log.debug("Got PatientHome"); srDocumentHome = (SRDocumentHome)PortableRemoteObject .narrow(ctx.lookup("ejb/SRDocument"), SRDocumentHome.class); + log.debug("Got SRDocumentHome"); queryHome = (QueryHome)PortableRemoteObject .narrow(ctx.lookup("ejb/Query"), QueryHome.class); + log.debug("Got QueryHome"); imageHome = (ImageHome)PortableRemoteObject .narrow(ctx.lookup("ejb/Image"), ImageHome.class); + log.debug("Got ImageHome"); queryMWLHome = (QueryMWLHome)PortableRemoteObject .narrow(ctx.lookup("ejb/QueryMWL"), QueryMWLHome.class); + log.debug("Got QueryMWLHome"); ppsHome = (PPSHome)PortableRemoteObject .narrow(ctx.lookup("ejb/PPS"), PPSHome.class); + log.debug("Got PPSHome"); removeHome = (RemoveHome)PortableRemoteObject .narrow(ctx.lookup("ejb/Remove"), RemoveHome.class); + log.debug("Got RemoveHome"); visitHome = (VisitHome)PortableRemoteObject .narrow(ctx.lookup("ejb/Visit"), VisitHome.class); + log.debug("Got VisitHome"); spsHome = (SPSHome)PortableRemoteObject .narrow(ctx.lookup("ejb/SPS"), SPSHome.class); + log.debug("Got SPSHome"); + + isrHome = (ImagingServiceRequestHome)PortableRemoteObject + .narrow(ctx.lookup("ejb/ImagingServiceRequest"), + ImagingServiceRequestHome.class); + log.debug("Got ImagingServiceRequestHome"); + + rpHome = (RequestedProcedureHome)PortableRemoteObject + .narrow(ctx.lookup("ejb/RequestedProcedure"), + RequestedProcedureHome.class); + log.debug("Got RequestedProcedureHome"); + + procedureTypeHome = (ProcedureTypeHome)PortableRemoteObject + .narrow(ctx.lookup("ejb/ProcedureType"), + ProcedureTypeHome.class); + log.debug("Got ProcedureTypeHome"); + + protocolHome = (ProtocolHome)PortableRemoteObject + .narrow(ctx.lookup("ejb/Protocol"), + ProtocolHome.class); + log.debug("Got ProtocolHome"); + + procedurePlanHome = (ProcedurePlanHome)PortableRemoteObject + .narrow(ctx.lookup("ejb/ProcedurePlan"), ProcedurePlanHome.class); + log.debug("Got ProcedurePlanHome"); + + protocolCodeHome = (CodeHome)PortableRemoteObject + .narrow(ctx.lookup("ejb/ProtocolCode"), CodeHome.class); + log.debug("Got ProtocolCodeHome"); + + procedureTypeCodeHome = (CodeHome)PortableRemoteObject + .narrow(ctx.lookup("ejb/ProcedureCode"), CodeHome.class); + log.debug("Got ProcedureTypeCodeHome"); + log.debug("Got all home interfaces"); }//end constructor *************** *** 220,223 **** } ! }//end class Homer --- 284,347 ---- } + /** + * Getter for property isrHome. + * The ImagingServiceRequestHome. + * + * @return Value of property isrHome. + */ + public ImagingServiceRequestHome getIsrHome() { + return isrHome; + } ! /** ! * Getter for property rpHome. ! * The RequestedProcedureHome. ! * ! * @return Value of property isrHome. ! */ ! public RequestedProcedureHome getRpHome() { ! return rpHome; ! } ! ! /** ! * Getter for property ProcedureTypeHome. ! * ! * @return Value of property ProcedureTypeHome. ! */ ! public ProcedureTypeHome getProcedureTypeHome() { ! return procedureTypeHome; ! } ! ! /** ! * Getter for property protocolHome. ! * @return Value of property protocolHome. ! */ ! public ProtocolHome getProtocolHome() { ! return protocolHome; ! } ! ! /** Getter for property procedurePlanHome. ! * @return Value of property procedurePlanHome. ! */ ! public ProcedurePlanHome getProcedurePlanHome() { ! return procedurePlanHome; ! } ! ! /** ! * Getter for property protocolCodeHome. ! * @return Value of property protocolCodeHome. ! */ ! public CodeHome getProtocolCodeHome() { ! return protocolCodeHome; ! } ! ! /** ! * Getter for property procedureTypeCodeHome. ! * @return Value of property procedureTypeCodeHome. ! */ ! public CodeHome getProcedureTypeCodeHome() { ! return procedureTypeCodeHome; ! } ! ! ! }//end class Homer \ No newline at end of file Index: MWLQuery.java =================================================================== RCS file: /cvsroot/dcm4che/dcm4chex-web/src/main/org/tiani/dcm4chex/experimental/web/helper/MWLQuery.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MWLQuery.java 2001/11/01 20:35:10 1.1.1.1 --- MWLQuery.java 2001/11/23 14:57:31 1.2 *************** *** 3,23 **** * Created at 1. October 2001 * ! * Copyright 2001 by TIANI MEDGRAPH AG (gun...@ti...). ! * ! * This file is part of dcm4che. ! * ! * dcm4che is free software; you can redistribute it and/or modify ! * it under the terms of the GNU Lesser General Public License as ! * published by the Free Software Foundation; either version 2 of ! * the License, or (at your option) any later version. ! * ! * dcm4che is distributed in the hope that it will be useful, ! * but WITHOUT ANY WARRANTY; without even the implied warranty of ! * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! * GNU Lesser General Public License for more details. ! * ! * You should have received a copy of the GNU Lesser General Public License ! * along with dcm4che; if not, write to the Free Software ! * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ --- 3,7 ---- * Created at 1. October 2001 * ! * Copyright 2001 by TIANI MEDGRAPH AG. */ *************** *** 27,33 **** import org.tiani.dcm4chex.experimental.web.bean.SPSDataBean; import org.tiani.dcm4chex.experimental.web.helper.Homer; ! ! import org.tiani.dcm4chex.ejb.querymwl.QueryMWL; ! import org.tiani.dcm4chex.ejb.Utils; import org.dcm4che.iod.query.ModalityWorklistKeys; --- 11,15 ---- import org.tiani.dcm4chex.experimental.web.bean.SPSDataBean; import org.tiani.dcm4chex.experimental.web.helper.Homer; ! import org.tiani.dcm4chex.experimental.web.helper.Utils; import org.dcm4che.iod.query.ModalityWorklistKeys; *************** *** 39,46 **** import org.dcm4che.iod.module.study.ImagingServiceRequestModule; import java.util.Collection; import java.util.Iterator; import java.util.Date; - import java.text.SimpleDateFormat; import java.io.IOException; --- 21,29 ---- import org.dcm4che.iod.module.study.ImagingServiceRequestModule; + import org.tiani.dcm4chex.ejb.querymwl.QueryMWL; + import java.util.Collection; import java.util.Iterator; import java.util.Date; import java.io.IOException; *************** *** 50,72 **** import javax.naming.NamingException; /** * ! * @author ha...@ps... (Sebastian Hauer) * @version 0.1 */ public class MWLQuery { - - private static final SimpleDateFormat dicomDateFormat = - new SimpleDateFormat("yyyyMMdd"); - - private static final SimpleDateFormat dicomOldDateFormat = - new SimpleDateFormat("yyyy.MM.dd"); ! private static final SimpleDateFormat dicomTimeFormat = ! new SimpleDateFormat("hhmmss"); ! private static final SimpleDateFormat dicomOldTimeFormat = ! new SimpleDateFormat("hh:mm:ss"); ! /** * Returns a list of SPSDataBean instances. --- 33,50 ---- import javax.naming.NamingException; + //other imports + import org.apache.log4j.Category; + /** * ! * @author Sebastian Hauer * @version 0.1 */ public class MWLQuery { ! private final static Category log = ! Category.getInstance(MWLQuery.class.getName()); ! /** * Returns a list of SPSDataBean instances. *************** *** 122,139 **** spsData.setScheduledStationAET(rKeys.spsSeq[0].scheduledStationAET); spsData.setScheduledStationName(rKeys.spsSeq[0].scheduledStationName); ! spsData.setDateSpsStartDate(convDAtoDate(rKeys.spsSeq[0].spsStartDate)); ! spsData.setDateSpsStartTime(convTMtoDate(rKeys.spsSeq[0].spsStartTime)); spsData.setSpsID(rKeys.spsSeq[0].spsID); ! System.out.println("MWLQuery: spsID: " + spsID); ! System.out.println("MWLQuery: setSpsID: " + rKeys.spsSeq[0].spsID); spsData.setModality(rKeys.spsSeq[0].modality); spsData.setRequestedProcedureID(rKeys.requestedProcedure ! .requestedProcedureID); spsData.setStudyInstanceUID(rKeys.requestedProcedure.studyInstanceUID); spsData.setRpDescription(rKeys.requestedProcedure ! .requestedProcedureDescription); spsData.setRpCodeMeaning(rKeys.requestedProcedure ! .requestedProcedureCodeSeq[0].codeMeaning); spsData.setAdmissionID(rKeys.visitIdentification.admissionID); spsData.setAccessionNumber(rKeys.imagingServiceRequest.accessionNumber); --- 100,120 ---- spsData.setScheduledStationAET(rKeys.spsSeq[0].scheduledStationAET); spsData.setScheduledStationName(rKeys.spsSeq[0].scheduledStationName); ! spsData.setDateSpsStartDate(Utils ! .convDAtoDate(rKeys.spsSeq[0].spsStartDate)); ! ! spsData.setDateSpsStartTime(Utils ! .convTMtoDate(rKeys.spsSeq[0].spsStartTime)); spsData.setSpsID(rKeys.spsSeq[0].spsID); ! log.debug("MWLQuery: spsID: " + spsID); ! log.debug("MWLQuery: setSpsID: " + rKeys.spsSeq[0].spsID); spsData.setModality(rKeys.spsSeq[0].modality); spsData.setRequestedProcedureID(rKeys.requestedProcedure ! .requestedProcedureID); spsData.setStudyInstanceUID(rKeys.requestedProcedure.studyInstanceUID); spsData.setRpDescription(rKeys.requestedProcedure ! .requestedProcedureDescription); spsData.setRpCodeMeaning(rKeys.requestedProcedure ! .requestedProcedureCodeSeq[0].codeMeaning); spsData.setAdmissionID(rKeys.visitIdentification.admissionID); spsData.setAccessionNumber(rKeys.imagingServiceRequest.accessionNumber); *************** *** 141,157 **** CodeItem[] ais = rKeys.spsSeq[0].scheduledProtocolCodeSeq; if (ais != null) { ! System.out.println("scheduledProtocolCodeSeq not null"); String[] sai = new String[ais.length]; for (int i = 0; i < sai.length; i++) { sai[i] = ais[i].codeMeaning; ! System.out.println("scheduledProtocolCode[" + i + "]=" ! + sai[i]); } spsData.setScheduledProtocolCodes(sai); } else { ! System.out.println("scheduledProtocolCodeSeq is null"); } ! Collection ppsList = Homer.getInstance().getPpsHome().findBySPSID(rKeys.spsSeq[0].spsID); spsData.setPpsNumber(ppsList.size()); --- 122,138 ---- CodeItem[] ais = rKeys.spsSeq[0].scheduledProtocolCodeSeq; if (ais != null) { ! log.debug("scheduledProtocolCodeSeq not null"); String[] sai = new String[ais.length]; for (int i = 0; i < sai.length; i++) { sai[i] = ais[i].codeMeaning; ! log.debug("scheduledProtocolCode[" + i + "]=" + sai[i]); } spsData.setScheduledProtocolCodes(sai); } else { ! log.debug("scheduledProtocolCodeSeq is null"); } ! Collection ppsList = Homer.getInstance() ! .getPpsHome().findBySPSID(rKeys.spsSeq[0].spsID); spsData.setPpsNumber(ppsList.size()); *************** *** 162,217 **** }//end query() - - public static Date convDAtoDate(String dicomDate) { - try { - if (dicomDate.length() == 10) { - return dicomDateFormat.parse(dicomDate); - } else if (dicomDate.length() == 12) { - return dicomOldDateFormat.parse(dicomDate); - } - } catch (Exception e) {} - return null; - } - - - public static Date convTMtoDate(String dicomTime) { - String time = dicomTime; - try { - if (time.indexOf(":") != -1) { - switch (time.length()) { - case 2: //"hh" - time += ":00:00"; - break; - case 5: //"hh:mm" - time += ":00"; - break; - case 8: //"hh:mm:ss" - break; - default: - if (time.length() > 8) { - time = time.substring(0, 8); - } - } - return dicomOldTimeFormat.parse(time); - } else { - switch (time.length()) { - case 2: - time += "0000"; - break; - case 4: - time += "00"; - break; - case 6: - break; - default: - if (time.length() > 6) { - time = time.substring(0, 6); - } - } - return dicomTimeFormat.parse(time); - } - } catch (Exception e) {} - return null; - } - }//end class MWLQuery --- 143,145 ---- --- Configurator.java DELETED --- --- ConfiguratorMBean.java DELETED --- --- MBeanManager.java DELETED --- |