private static Dimse[] dimseArray(Preferences prefs, String key) { int n = prefs.getInt(key + ".#", 0); if (n == 0) return new Dimse[] {}; Dimse[] dimse = new Dimse[n]; for (int i = 0; i < n; i++) dimse[i] = Dimse.valueOf(prefs.get(key + '.' + (i + 1), null)); return dimse; }
private Dimse[] dimseArray(Attribute attr) throws NamingException { if (attr == null) return new Dimse[] {}; Dimse[] dimse = new Dimse[attr.size()]; for (int i = 0; i < dimse.length; i++) dimse[i] = Dimse.valueOf((String) attr.get(i)); return dimse; }
private Dimse dimseOf(Attributes cmd) throws AAbort { try { return Dimse.valueOf(cmd.getInt(Tag.CommandField, 0)); } catch (IllegalArgumentException e) { Dimse.LOG.info("{}: illegal DIMSE:", as); Dimse.LOG.info("\n{}", cmd); throw new AAbort(); } }
private Dimse dimseOf(Attributes cmd) throws AAbort { try { return Dimse.valueOf(cmd.getInt(Tag.CommandField, 0)); } catch (IllegalArgumentException e) { Dimse.LOG.info("{}: illegal DIMSE:", as); Dimse.LOG.info("\n{}", cmd); throw new AAbort(); } }
public boolean tryWriteDimseRSP(PresentationContext pc, Attributes cmd, Attributes data) { try { writeDimseRSP(pc, cmd, data); return true; } catch (IOException e) { LOG.warn("{} << {} failed: {}", new Object[] { this, Dimse.valueOf(cmd.getInt(Tag.CommandField, 0)), e.getMessage() }); return false; } }
public boolean tryWriteDimseRSP(PresentationContext pc, Attributes cmd, Attributes data) { try { writeDimseRSP(pc, cmd, data); return true; } catch (IOException e) { LOG.warn("{} << {} failed: {}", new Object[] { this, Dimse.valueOf(cmd.getInt(Tag.CommandField, 0)), e.getMessage() }); return false; } }
public void load(AttributeCoercions acs, String dn) throws NamingException { NamingEnumeration<SearchResult> ne = search(dn, "(objectclass=dcmAttributeCoercion)"); try { while (ne.hasMore()) { SearchResult sr = ne.next(); Attributes attrs = sr.getAttributes(); acs.add(new AttributeCoercion( LdapUtils.stringValue(attrs.get("cn"), null), LdapUtils.stringArray(attrs.get("dcmSOPClass")), Dimse.valueOf(LdapUtils.stringValue(attrs.get("dcmDIMSE"), null)), TransferCapability.Role.valueOf( LdapUtils.stringValue(attrs.get("dicomTransferRole"), null)), LdapUtils.stringArray(attrs.get("dcmAETitle")), LdapUtils.stringValue(attrs.get("dcmURI"), null))); } } finally { LdapUtils.safeClose(ne); } }
public void load(AttributeCoercions acs, String dn) throws NamingException { NamingEnumeration<SearchResult> ne = search(dn, "(objectclass=dcmAttributeCoercion)"); try { while (ne.hasMore()) { SearchResult sr = ne.next(); Attributes attrs = sr.getAttributes(); acs.add(new AttributeCoercion( LdapUtils.stringValue(attrs.get("cn"), null), LdapUtils.stringArray(attrs.get("dcmSOPClass")), Dimse.valueOf(LdapUtils.stringValue(attrs.get("dcmDIMSE"), null)), TransferCapability.Role.valueOf( LdapUtils.stringValue(attrs.get("dicomTransferRole"), null)), LdapUtils.stringArray(attrs.get("dcmAETitle")), LdapUtils.stringValue(attrs.get("dcmURI"), null))); } } finally { LdapUtils.safeClose(ne); } }
int pcid = pc.getPCID(); String tsuid = pc.getTransferSyntax(); Dimse dimse = Dimse.valueOf(cmd.getInt(Tag.CommandField, -1)); if (!dimse.isRSP() || !Status.isPending(cmd.getInt(Tag.Status, -1))) as.incSentCount(dimse);
int pcid = pc.getPCID(); String tsuid = pc.getTransferSyntax(); Dimse dimse = Dimse.valueOf(cmd.getInt(Tag.CommandField, -1)); if (!dimse.isRSP() || !Status.isPending(cmd.getInt(Tag.Status, -1))) as.incSentCount(dimse);