|
From: <gun...@us...> - 2007-09-07 10:42:41
|
Revision: 4963
http://dcm4che.svn.sourceforge.net/dcm4che/?rev=4963&view=rev
Author: gunterze
Date: 2007-09-07 03:42:40 -0700 (Fri, 07 Sep 2007)
Log Message:
-----------
[#DCMEE-528] Support coercion of received MPPS N-CREATE and MPPS N-SET requests
Modified Paths:
--------------
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-mppsscp-xmbean.xml
dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/mppsscp/MPPSScp.java
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-mppsscp-xmbean.xml
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-mppsscp-xmbean.xml 2007-09-07 10:00:19 UTC (rev 4962)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/etc/conf/xmdesc/dcm4chee-mppsscp-xmbean.xml 2007-09-07 10:42:40 UTC (rev 4963)
@@ -115,8 +115,12 @@
<attribute access="read-write"
getMethod="getCoerceConfigDir"
setMethod="setCoerceConfigDir">
- <description><![CDATA[Directory where configuration files for
- attribute coercion are located. A relative path name is resolved relative to
+ <description><![CDATA[Directory where configuration files for attribute
+ coercion are located: if XSL stylesheet "mpps-ncreaterq.xsl" or
+ "mpps-nsetrq.xsl" exists in this directory or in a sub-directory equal
+ to the AE Title of a MPPS SCU, attributes of MPPS N-CREATE or MPPS N-SET
+ requests from this SCU will be coerced according these stylesheets.
+ A relative path name is resolved relative to
<i>archive-install-directory</i>/server/default/.]]>
</description>
<name>CoerceConfigDirectory</name>
Modified: dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/mppsscp/MPPSScp.java
===================================================================
--- dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/mppsscp/MPPSScp.java 2007-09-07 10:00:19 UTC (rev 4962)
+++ dcm4chee/dcm4chee-arc/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/dcm/mppsscp/MPPSScp.java 2007-09-07 10:42:40 UTC (rev 4963)
@@ -67,6 +67,9 @@
*/
class MPPSScp extends DcmServiceBase {
+ private static final String CREATE_XSL = "mpps-ncreaterq.xsl";
+ private static final String SET_XSL = "mpps-nsetrq.xsl";
+
private static final int[] TYPE1_NCREATE_ATTR = {
Tags.ScheduledStepAttributesSeq, Tags.PPSID,
Tags.PerformedStationAET, Tags.PPSStartDate, Tags.PPSStartTime,
@@ -104,6 +107,10 @@
}
log.debug("Creating MPPS:\n");
log.debug(mpps);
+ Dataset coerce = service.getCoercionAttributesFor(as, CREATE_XSL, mpps);
+ if (coerce != null) {
+ service.coerceAttributes(mpps, coerce);
+ }
checkCreateAttributs(mpps);
service.supplementIssuerOfPatientID(mpps, callingAET);
service.generatePatientID(mpps, mpps.getItem(Tags.ScheduledStepAttributesSeq));
@@ -135,11 +142,16 @@
protected Dataset doNSet(ActiveAssociation assoc, Dimse rq, Command rspCmd)
throws IOException, DcmServiceException {
+ Association as = assoc.getAssociation();
final Command cmd = rq.getCommand();
final Dataset mpps = rq.getDataset();
final String iuid = cmd.getRequestedSOPInstanceUID();
log.debug("Set MPPS:\n");
log.debug(mpps);
+ Dataset coerce = service.getCoercionAttributesFor(as, SET_XSL, mpps);
+ if (coerce != null) {
+ service.coerceAttributes(mpps, coerce);
+ }
checkSetAttributs(mpps);
mpps.putUI(Tags.SOPInstanceUID, iuid);
updateMPPS(mpps);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|