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

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

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

origin: org.dcm4che/dcm4chee-xds2-ws

private void checkMimetype(ExtrinsicObjectType obj, String[] mimes)
    throws XDSException {
  String mime = obj.getMimeType();
  boolean unknownMime = true;
  for (int j = 0; j < mimes.length ; j++) {
    if (mimes[j].equals(mime)) {
      unknownMime = false;
      break;
    }
  }
  if (unknownMime) {
    throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, 
        "Mimetype is not suppoerted! mimetype:"+mime, null);
  }
}
origin: org.dcm4che/dcm4chee-xds2-infoset

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

public DocumentEntry(PnRRequest pnrReq, String uniqueID, byte[] content, String mime) {
  this.pnrRequest = pnrReq;
  doc = PnRRequest.iheFactory.createProvideAndRegisterDocumentSetRequestTypeDocument();
  ProvideAndRegisterDocumentSetRequestType pnr = pnrRequest.getProvideAndRegisterDocumentSetRequest();
  pnr.getDocument().add(doc);
  id = pnrReq.nextDocumentID();
  doc.setId(id);
  doc.setValue(content);
  metadata = Util.rimFactory.createExtrinsicObjectType();
  metadata.setObjectType(XDSConstants.UUID_XDSDocumentEntry);
  metadata.setId(id);
  metadata.setMimeType(mime);
  List<JAXBElement<? extends IdentifiableType>> list = pnrRequest.getRegistryObjectList().getIdentifiable();
  list.add(Util.rimFactory.createExtrinsicObject(metadata));
  metadata.getExternalIdentifier().add(Util.createExternalIdentifier(pnrRequest.nextID(), XDSConstants.UUID_XDSDocumentEntry_patientId, 
      id, pnrRequest.getPatientID(), XDS_DOCUMENT_ENTRY_PATIENT_ID));
  metadata.getSlot().add(pnrRequest.getSrcPatIDSlot());
  if (pnrRequest.getSrcPatInfo() != null) {
    metadata.getSlot().add(pnrRequest.getSrcPatInfo());
  }
  metadata.getExternalIdentifier().add(Util.createExternalIdentifier(pnrRequest.nextID(), XDSConstants.UUID_XDSDocumentEntry_uniqueId, 
      id, uniqueID, XDS_DOCUMENT_ENTRY_UNIQUE_ID));
  this.uniqueID = uniqueID;
  assoc = pnrReq.addAssociation(PnRRequest.SUBMISSION_SET_ID, id, XDSConstants.HAS_MEMBER);
}
origin: org.dcm4che/dcm4chee-xds2-ws

public static void checkDocumentEntryMetadata(ExtrinsicObjectType eoType) throws XDSException {
  if (eoType.getId() == null || eoType.getId().trim().length() < 2) {
    throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, 
        "DocumentEntry: Missing entryUUID attribute!", null);
  if (eoType.getMimeType() == null || eoType.getMimeType().trim().length() < 2) {
    throw new XDSException(XDSException.XDS_ERR_REGISTRY_METADATA_ERROR, 
        "DocumentEntry: Missing mimeType attribute! ExtrinsicObject:"+eoType.getId(), null);
origin: org.dcm4che/dcm4chee-xds2-ws

public ExtrinsicObject toExtrinsicObject(ExtrinsicObjectType eoType) throws XDSException {
  ExtrinsicObject eo;
  XDSDocumentEntry doc = null;
  if (XDSConstants.UUID_XDSDocumentEntry.equals(eoType.getObjectType())) {
    XDSValidator.checkDocumentEntryMetadata(eoType);
    doc = new XDSDocumentEntry();
    eo = doc;
    List<ExternalIdentifierType> list = eoType.getExternalIdentifier();
    if (list != null) {
      for (ExternalIdentifierType eiType : list) {
        if (XDSConstants.UUID_XDSDocumentEntry_patientId.equals(eiType.getIdentificationScheme())) {
          doc.setPatient(getPatient(eiType));
        } else if (XDSConstants.UUID_XDSDocumentEntry_uniqueId.equals(eiType.getIdentificationScheme())) {
          XDSValidator.checkAlreadyExists(eiType.getValue(), eoType, session);
          doc.setUniqueId(eiType.getValue());
        }
      }
    }
    doc.setSourcePatient(getPatient(getSlotValue(eoType, XDSConstants.SLOT_NAME_SOURCE_PATIENT_ID), true));
  } else {
    eo = new ExtrinsicObject();
  }
  toPersistenceObj(eoType, eo);
  eo.setMimeType(eoType.getMimeType());
  return eo;
}
origin: org.dcm4che/dcm4chee-xds2-ws

private JAXBElement<? extends IdentifiableType> toJAXBExtrinsicObject(
    ExtrinsicObject eo) {
  ExtrinsicObjectType eoType = factory.createExtrinsicObjectType();
  toEbXmlObj(eo, eoType);
  eoType.setMimeType(eo.getMimeType());
  eoType.setIsOpaque(eo.isOpaque());
  return factory.createExtrinsicObject(eoType);
}
private JAXBElement<? extends IdentifiableType> toJAXBRegistryPackage(
origin: org.dcm4che/dcm4chee-xds2-repository-ws

private String checkPatientIDs(ProvideAndRegisterDocumentSetRequestType req, RegistryPackageType submissionSet, List<ExtrinsicObjectType> extrObjs) throws XDSException {
  String submissionPatId = InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSSubmissionSet_patientId, submissionSet);
  String docPatId;
  ExtrinsicObjectType eo;
  for ( int i = 0, len = extrObjs.size() ; i < len ; i++ ) {
    eo = extrObjs.get(i);
    docPatId = InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSDocumentEntry_patientId, eo);
    if ( docPatId != null && !docPatId.equals(submissionPatId)) {
      String msg = "XDSDocumentEntry.patientId ("+docPatId+")and XDSSubmissionSet.patientId ("+submissionPatId+") doesn't match! ExtrinsicObject.Id:"+eo.getId();
      log.warn(msg);
      throw new XDSException(XDSException.XDS_ERR_PATID_DOESNOT_MATCH,
          msg, null);
    }
  }
  RegistryPackageType folder = InfosetUtil.getRegistryPackage(req.getSubmitObjectsRequest(), XDSConstants.UUID_XDSFolder);
  String folderPatId = folder == null ? null : InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSFolder_patientId, folder);
  if ( folderPatId != null && !folderPatId.equals(submissionPatId)) {
    String msg = "XDSFolder.patientId ("+folderPatId+")and XDSSubmissionSet.patientId ("+submissionPatId+") doesn't match!";
    log.warn(msg);
    throw new XDSException(XDSException.XDS_ERR_PATID_DOESNOT_MATCH,
        msg, null);
  }
  return submissionPatId;
}
origin: org.dcm4che/dcm4chee-xds2-ws

public static void checkAlreadyExists(String uniqueId, ExtrinsicObjectType eoType, XDSRegistryBean session) throws XDSException {
  List<XDSDocumentEntry> docs = session.getDocumentEntriesByUniqueId(uniqueId);
  if (docs.size() > 0) {
    List<String> hash1 = getSlotTypeValues(eoType.getSlot(), "hash");;
    if (hash1 == null || hash1.isEmpty()) {
      throw new XDSException(XDSException.XDS_ERR_REGISTRY_ERROR, 
          "Slot 'hash' missing in DocumentEntry uniqueId:"+uniqueId, null);
    } else if (!hash1.get(0).equals(docs.get(0).getHash())) {
      throw new XDSException(XDSException.XDS_ERR_NON_IDENTICAL_HASH, 
          "DocumentEntry uniqueId:"+uniqueId+
          " already exists but has different hash value! hash:'"+hash1+
          "' vs. '"+docs.get(0).getHash()+"'", null);
    }
  }
}
origin: org.dcm4che/dcm4chee-xds2-ws

for (int i = 0, len = extrObjs.size() ; i < len ; i++ ) {
  eo = extrObjs.get(i);
  doc = docs.get(eo.getId());
  docUID = InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSDocumentEntry_uniqueId, eo);
  if (mimetypes != null) {
    boolean unsupportedMimetype = true;
    for (int j = 0 ; j < mimetypes.length ; j++) {
      if (mimetypes[j].equals(eo.getMimeType())) {
        unsupportedMimetype = false;
        break;
        throw new XDSException(XDSException.XDS_ERR_REPOSITORY_METADATA_ERROR, "Mimetype not supported:"+eo.getMimeType(), null);
    xdsDoc = (XDSDocument) ManagementFactory.getPlatformMBeanServer().invoke(new ObjectName("dcm4chee.xds2:service=Store"),
        "storeDocument", 
        new Object[]{docUID, doc.getValue(), eo.getMimeType()}, 
        new String[]{String.class.getName(), byte[].class.getName(), String.class.getName()});
    if ( xdsDoc != null ) {
origin: org.dcm4che/dcm4chee-xds2-ws

private String checkPatientIDs(ProvideAndRegisterDocumentSetRequestType req, RegistryPackageType submissionSet, List<ExtrinsicObjectType> extrObjs) throws XDSException {
  String submissionPatId = InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSSubmissionSet_patientId, submissionSet);
  String docPatId;
  ExtrinsicObjectType eo;
  for ( int i = 0, len = extrObjs.size() ; i < len ; i++ ) {
    eo = extrObjs.get(i);
    docPatId = InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSDocumentEntry_patientId, eo);
    if ( docPatId != null && !docPatId.equals(submissionPatId)) {
      String msg = "XDSDocumentEntry.patientId ("+docPatId+")and XDSSubmissionSet.patientId ("+submissionPatId+") doesn't match! ExtrinsicObject.Id:"+eo.getId();
      log.warn(msg);
      throw new XDSException(XDSException.XDS_ERR_PATID_DOESNOT_MATCH,
          msg, null);
    }
  }
  RegistryPackageType folder = InfosetUtil.getRegistryPackage(req.getSubmitObjectsRequest(), XDSConstants.UUID_XDSFolder);
  String folderPatId = InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSFolder_patientId, folder);
  if ( folderPatId != null && !folderPatId.equals(submissionPatId)) {
    String msg = "XDSFolder.patientId ("+folderPatId+")and XDSSubmissionSet.patientId ("+submissionPatId+") doesn't match!";
    log.warn(msg);
    throw new XDSException(XDSException.XDS_ERR_PATID_DOESNOT_MATCH,
        msg, null);
  }
  return submissionPatId;
}
origin: org.dcm4che/dcm4chee-xds2-repository-ws

for (int i = 0, len = extrObjs.size() ; i < len ; i++ ) {
  eo = extrObjs.get(i);
  if (eo.getId() == null || eo.getId().trim().length() == 0)
    throw new XDSException(XDSException.XDS_ERR_REPOSITORY_METADATA_ERROR, "Missing XDSDocumentEntry.entryUUID!", null);
  doc = docs.get(eo.getId());
  docUID = InfosetUtil.getExternalIdentifierValue(XDSConstants.UUID_XDSDocumentEntry_uniqueId, eo);
  if (docUID == null)
    boolean unsupportedMimetype = true;
    for (int j = 0 ; j < mimetypes.length ; j++) {
      if (mimetypes[j].equals(eo.getMimeType())) {
        unsupportedMimetype = false;
        break;
      throw new XDSException(XDSException.XDS_ERR_REPOSITORY_METADATA_ERROR, "Mimetype not supported:"+eo.getMimeType(), null);
    storedDocs[i] = storage.storeDocument(groupID, docUID, doc.getValue(), eo.getMimeType());
    if (storedDocs[i].isCommitted()) {
      log.warn("Document already exists! docUid:"+docUID);
org.dcm4chee.xds2.infoset.rimExtrinsicObjectType

Javadoc

ExtrinsicObject is the mapping of the same named interface in ebRIM. It extends RegistryObject.

Java class for ExtrinsicObjectType complex type.

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

 
<complexType name="ExtrinsicObjectType"> 
<complexContent> 
<extension base="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}RegistryObjectType"> 
<sequence> 
<element name="ContentVersionInfo" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}VersionInfoType" minOccurs="0"/> 
</sequence> 
<attribute name="mimeType" type="{urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0}LongName" default="application/octet-stream" /> 
<attribute name="isOpaque" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> 
</extension> 
</complexContent> 
</complexType> 

Most used methods

  • getExternalIdentifier
  • getId
  • getMimeType
    Gets the value of the mimeType property.
  • getSlot
  • setMimeType
    Sets the value of the mimeType property.
  • <init>
  • getObjectType
  • setId
  • setIsOpaque
    Sets the value of the isOpaque property.
  • setObjectType

Popular in Java

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • setContentView (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JList (javax.swing)
  • Top 12 Jupyter Notebook extensions
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