Tabnine Logo
RegistryPackageType
Code IndexAdd Tabnine to your IDE (free)

How to use
RegistryPackageType
in
org.dcm4chee.xds2.infoset.rim

Best Java code snippets using org.dcm4chee.xds2.infoset.rim.RegistryPackageType (Showing top 12 results out of 315)

origin: org.dcm4che/dcm4chee-xds2-src-base

private boolean isSubmissionSet(String sourceID) {
  return sourceID!=null && sourceID.equals(submissionSet.getId());
}
origin: org.dcm4che/dcm4chee-xds2-infoset

/**
 * Create an instance of {@link RegistryPackageType }
 * 
 */
public RegistryPackageType createRegistryPackageType() {
  return new RegistryPackageType();
}
origin: org.dcm4che/dcm4chee-xds2-src-base

public XDSFolder(PnRRequest pnrReq, String uniqueID) {
  this.pnrRequest = pnrReq;
  id = pnrReq.nextFolderID();
  metadata = Util.rimFactory.createRegistryPackageType();
  metadata.setId(id);
  List<JAXBElement<? extends IdentifiableType>> list = pnrRequest.getRegistryObjectList().getIdentifiable();
  list.add(Util.rimFactory.createRegistryPackage(metadata));
  metadata.getExternalIdentifier().add(Util.createExternalIdentifier(pnrRequest.nextID(), XDSConstants.UUID_XDSFolder_patientId, 
      id, pnrRequest.getPatientID(), XDS_FOLDER_PATIENT_ID));
  metadata.getExternalIdentifier().add(Util.createExternalIdentifier(pnrRequest.nextID(), XDSConstants.UUID_XDSFolder_uniqueId, 
      id, uniqueID, XDS_FOLDER_UNIQUE_ID));
  metadata.getClassification().add(Util.createClassification(pnrReq.nextID(), XDSConstants.UUID_XDSFolder, id));
  this.uniqueID = uniqueID;
  assoc = pnrReq.addAssociation(PnRRequest.SUBMISSION_SET_ID, id, XDSConstants.HAS_MEMBER);
}
origin: org.dcm4che/dcm4chee-xds2-repository-ws

private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) {
  String[] result = new String[2];
  List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable();
  IdentifiableType obj;
  whole: for (int i=0,len=objs.size() ; i < len ; i++) {
    obj = objs.get(i).getValue();
    if (obj instanceof RegistryPackageType) {
      List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier();
      if (list != null) {
        for (ExternalIdentifierType eiType : list) {
          if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) {
            result[1] = eiType.getValue();
          } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) {
            result[0] = eiType.getValue();
          } else {
            continue;
          }
          if (result[0] != null && result[1] != null)
            break whole;
        }
      }
    }
  }
  return result;
}
origin: org.dcm4che/dcm4chee-xds2-src-base

public PnRRequest(String sourceID, String submissionSetUID, String patID, String srcPatID) {
  if (sourceID == null || submissionSetUID == null || patID == null || srcPatID == null) {
    StringBuilder sb = new StringBuilder();
    sb.append("Parameter values must not be null! (");
    if (sourceID == null) sb.append("sourceID,");
    if (submissionSetUID == null) sb.append("submissionSetUID,");
    if (patID == null) sb.append("patID,");
    if (srcPatID == null) sb.append("srcPatID,");
    sb.setCharAt(sb.length()-1, ')');
    throw new IllegalArgumentException(sb.toString());
  }
  this.submissionSetUID = submissionSetUID;
  patientID = patID;
  srcPatIDSlot = Util.createSlot(XDSConstants.SLOT_NAME_SOURCE_PATIENT_ID, null, srcPatID);
  provideAndRegisterDocumentSetRequest = iheFactory.createProvideAndRegisterDocumentSetRequestType();
  SubmitObjectsRequest sor = Util.rimFactory.createSubmitObjectsRequest();
  registryObjectList = Util.rimFactory.createRegistryObjectListType();
  sor.setRegistryObjectList(registryObjectList);
  provideAndRegisterDocumentSetRequest.setSubmitObjectsRequest(sor);
  submissionSet = Util.rimFactory.createRegistryPackageType();
  submissionSet.setId(SUBMISSION_SET_ID);
  submissionSet.getExternalIdentifier().add(Util.createExternalIdentifier(nextID(), XDSConstants.UUID_XDSSubmissionSet_uniqueId, 
      SUBMISSION_SET_ID, submissionSetUID, "XDSSubmissionSet.uniqueId"));
  submissionSet.getExternalIdentifier().add(Util.createExternalIdentifier(nextID(), XDSConstants.UUID_XDSSubmissionSet_patientId, 
      SUBMISSION_SET_ID, patID, "XDSSubmissionSet.patientId"));
  submissionSet.getExternalIdentifier().add(Util.createExternalIdentifier(nextID(), XDSConstants.UUID_XDSSubmissionSet_sourceId, 
      SUBMISSION_SET_ID, sourceID, "XDSSubmissionSet.sourceId"));
  registryObjectList.getIdentifiable().add(Util.rimFactory.createRegistryPackage(submissionSet));
  submissionSet.getClassification().add(Util.createClassification(nextID(), XDSConstants.UUID_XDSSubmissionSet, SUBMISSION_SET_ID));
}
origin: org.dcm4che/dcm4chee-xds2-ws

private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) {
  String[] result = new String[2];
  List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable();
  IdentifiableType obj;
  whole: for (int i=0,len=objs.size() ; i < len ; i++) {
    obj = objs.get(i).getValue();
    if (obj instanceof RegistryPackageType) {
      List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier();
      if (list != null) {
        for (ExternalIdentifierType eiType : list) {
          if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) {
            result[1] = eiType.getValue();
          } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) {
            result[0] = eiType.getValue();
          } else {
            continue;
          }
          if (result[0] != null && result[1] != null)
            break whole;
        }
      }
    
    }
  }
  return result;
}
origin: org.dcm4che/dcm4chee-xds2-ws

public static void checkFolderMetadata(RegistryPackageType rpType) throws XDSException {
  if (rpType.getId() == null || rpType.getId().trim().length() == 1) {
    throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, 
        "Folder: Missing entryUUID attribute!", null);
  }
  
  checkCodes(rpType, toList(XDSConstants.UUID_XDSFolder_codeList));
  checkExternalIdentifiers(rpType, toList(XDSConstants.UUID_XDSFolder_patientId,
      XDSConstants.UUID_XDSFolder_uniqueId));
}
origin: org.dcm4che/dcm4chee-xds2-ws

private String[] getSubmissionUIDandPatID(SubmitObjectsRequest req) {
  String[] result = new String[]{UNKNOWN, UNKNOWN};
  List<JAXBElement<? extends IdentifiableType>> objs = req.getRegistryObjectList().getIdentifiable();
  IdentifiableType obj;
  whole: for (int i=0,len=objs.size() ; i < len ; i++) {
    obj = objs.get(i).getValue();
    if (obj instanceof RegistryPackageType) {
      List<ExternalIdentifierType> list = ((RegistryPackageType)obj).getExternalIdentifier();
      if (list != null) {
        for (ExternalIdentifierType eiType : list) {
          if (XDSConstants.UUID_XDSSubmissionSet_patientId.equals(eiType.getIdentificationScheme())) {
            if (eiType.getValue() != null)
              result[1] = eiType.getValue();
          } else if (XDSConstants.UUID_XDSSubmissionSet_uniqueId.equals(eiType.getIdentificationScheme())) {
            if (eiType.getValue() != null)
              result[0] = eiType.getValue();
          } else {
            continue;
          }
          if (result[0] != UNKNOWN && result[1] != UNKNOWN)
            break whole;
        }
      }
    
    }
  }
  return result;
}
 
origin: org.dcm4che/dcm4chee-xds2-infoset

public static RegistryPackageType getRegistryPackage(SubmitObjectsRequest sor, String classificationUUID) {
  List<JAXBElement<? extends IdentifiableType>> list = sor.getRegistryObjectList().getIdentifiable();
  String id = null;
  IdentifiableType identifiable;
  if ( classificationUUID != null ) {
    ClassificationType ct;
    for ( int i = 0, len = list.size() ; i < len ; i++) {
      identifiable = list.get(i).getValue();
      if ( identifiable instanceof ClassificationType) {
        ct = (ClassificationType) identifiable;
        if ( classificationUUID.equals( ct.getClassificationNode())) {
          id = ct.getClassifiedObject();
          break;
        }
      }
    }
  }
  RegistryPackageType rp;
  for ( int i = 0, len = list.size() ; i < len ; i++ ) {
    identifiable = list.get(i).getValue();
    if ( identifiable instanceof RegistryPackageType) {
      rp = (RegistryPackageType) identifiable;
      if ( id == null || id.equals( rp.getId())) {
        return rp;
      }
    }
  }
  return null;
}
origin: org.dcm4che/dcm4chee-xds2-ws

public RegistryPackage toRegistryPackage(RegistryPackageType rpType) throws XDSException {
  RegistryPackage rp = null;
  List<ExternalIdentifierType> list = rpType.getExternalIdentifier();
  if (list != null) {
    for (ExternalIdentifierType eiType : list) {
origin: org.dcm4che/dcm4chee-xds2-ws

public static void checkSubmissionSetMetadata(RegistryPackageType rpType) throws XDSException {
  if (rpType.getId() == null || rpType.getId().trim().length() == 1) {
    throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, 
        "SubmissionSet: Missing entryUUID attribute!", null);
  }
  
  checkSlots(rpType, toList(XDSConstants.SLOT_NAME_SUBMISSION_TIME));
  
  checkCodes(rpType, toList(XDSConstants.UUID_XDSSubmissionSet_contentTypeCode));
  checkExternalIdentifiers(rpType, toList(
      XDSConstants.UUID_XDSSubmissionSet_patientId,
      XDSConstants.UUID_XDSSubmissionSet_uniqueId,
      XDSConstants.UUID_XDSSubmissionSet_sourceId
      ));
}
origin: org.dcm4che/dcm4chee-xds2-repository-ws

private List<ExtrinsicObjectType> checkRequest(ProvideAndRegisterDocumentSetRequestType req) throws XDSException {
  SubmitObjectsRequest sor = req.getSubmitObjectsRequest();
  RegistryPackageType submissionSet = InfosetUtil.getRegistryPackage(sor, XDSConstants.UUID_XDSSubmissionSet);
  if ( submissionSet == null ) {
    log.error("No RegistryPackage id=SubmissionSet found!");
    throw new XDSException( XDSException.XDS_ERR_REPOSITORY_ERROR, 
        XDSException.XDS_ERR_MISSING_REGISTRY_PACKAGE, null);
  } else if (submissionSet.getId() == null || submissionSet.getId().trim().length() == 0) {
    throw new XDSException(XDSException.XDS_ERR_REPOSITORY_METADATA_ERROR, "Missing XDSSubmissionSet.entryUUID!", null);
  }
  List<ExtrinsicObjectType> extrObjs = InfosetUtil.getExtrinsicObjects(req.getSubmitObjectsRequest());
  checkPatientIDs(req, submissionSet, extrObjs);
  Map<String, Document> docs = InfosetUtil.getDocuments(req);
  if ( extrObjs.size() > docs.size() ) {
    log.warn("Missing Documents! Found more ExtrinsicObjects("+extrObjs.size()+") than Documents("+docs.size()+")!");
    throw new XDSException(XDSException.XDS_ERR_MISSING_DOCUMENT,
        "", null);
  } else if ( extrObjs.size() < docs.size() ) {
    log.warn("Missing Document Metadata! Found less ExtrinsicObjects("+extrObjs.size()+") than Documents("+docs.size()+")!");
    throw new XDSException(XDSException.XDS_ERR_MISSING_DOCUMENT_METADATA,
        "", null);
  }
  return extrObjs;
}
org.dcm4chee.xds2.infoset.rimRegistryPackageType

Javadoc

RegistryPackage is the mapping of the same named interface in ebRIM. It extends RegistryObject. A RegistryPackage is a named collection of objects.

Java class for RegistryPackageType complex type.

The following schema fragment specifies the expected content contained within this class.

 
<complexType name="RegistryPackageType"> 
<complexContent> 
<extension base="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}RegistryObjectType"> 
<sequence> 
<element ref="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}RegistryObjectList" minOccurs="0"/> 
</sequence> 
</extension> 
</complexContent> 
</complexType> 

Most used methods

  • getId
  • getExternalIdentifier
  • <init>
  • getClassification
  • setId

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • getContentResolver (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JTextField (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now