Skip navigation links

Oracle Multimedia DICOM Java API Reference
11g Release 1 (11.1)

Part No. B28417-01


oracle.ord.dicom
Class OrdDicom

java.lang.Object
  extended by oracle.ord.dicom.OrdDicomBase
      extended by oracle.ord.dicom.OrdDicom

All Implemented Interfaces:
oracle.jdbc.internal.ObjectData, oracle.jdbc.internal.ObjectDataFactory, oracle.sql.CustomDatum, oracle.sql.ORAData, oracle.sql.ORADataFactory

public class OrdDicom
extends oracle.ord.dicom.OrdDicomBase

The OrdDicom class is used to represent an instance of the ORDSYS.ORDDicom database object type in a Java application. The OrdDicom class includes a set of methods to get object attributes, as well as a set of methods to perform various operations on an OrdDicom Java object. Users of this class should be familiar with Oracle Multimedia DICOM Developer's Guide.


Field Summary

 

Fields inherited from class oracle.ord.dicom.OrdDicomBase
_SQL_NAME, _SQL_TYPECODE

 

Method Summary
 oracle.xdb.XMLType extractMetadata(java.lang.String extractOption, java.lang.String docName)
          Executes the corresponding extractMetadata method in the database to get DICOM metadata in XML code for a specified mapping document.
 java.lang.String getAttributeByName(java.lang.String attributeName, java.lang.String definerName)
          Returns a DICOM attribute, as a String.
 java.lang.String getAttributeByTag(java.lang.String tag, java.lang.String definerName)
          Returns a DICOM attribute, as a String.
 oracle.sql.BLOB getContent()
          Returns the BLOB locator of the embedded DICOM binary data stored in the source attribute of the OrdDicom Java object.
 int getContentLength()
          Returns the value of the contentLength attribute of the OrdDicom Java object.
static oracle.sql.ORADataFactory getORADataFactory()
          Returns the OrdDicom ORADataFactory interface for use by the getORAData method.
 java.lang.String getSeriesInstanceUid()
          Returns the value of the SERIES_INSTANCE_UID attribute of the OrdDicom Java object.
 java.lang.String getSOPClassUid()
          Returns the value of the SOP_CLASS_UID attribute of the OrdDicom Java object.
 java.lang.String getSOPInstanceUid()
          Returns the value of the SOP_INSTANCE_UID attribute of the OrdDicom Java object.
 java.lang.String getSourceInformation()
          Returns the source information as a URL in the form sourceType://sourceLocation/sourceName.
 java.lang.String getSourceLocation()
          Returns the source location of the OrdDicom Java object.
 java.lang.String getSourceName()
          Returns the source name of the OrdDicom Java object.
 java.lang.String getSourceType()
          Returns the source type of the OrdDicom Java object.
 java.lang.String getStudyInstanceUid()
          Returns the value of the STUDY_INSTANCE_UID attribute of the OrdDicom Java object.
 boolean isAnonymous(java.lang.String anonymityDocName)
          Checks if the embedded DICOM binary data is anonymous based on the specified anonymity definition document.
 boolean isConformanceValid(java.lang.String constraintName)
          Checks if the embedded DICOM binary data is valid against a specific set of conformance constraints identified by the input parameter constraintName.
 boolean isConnectionNull()
          Returns whether the underlying database connection is null.
 boolean isLocal()
          Indicates if the DICOM data is stored locally in the database in a BLOB, or externally in the file system.
 boolean loadContent(java.io.File inputFile, boolean setProperties)
          Loads data from a file object into the database BLOB within the OrdDicom Java object.
 boolean loadContent(java.io.InputStream inputStream, boolean setProperties)
          Loads data from an InputStream object into the database BLOB within the OrdDicom Java object.
 void makeAnonymous(java.lang.String dest_SOP_INSTANCE_UID, OrdDicom dest, java.lang.String anonymityDocName)
          Produces an anonymous OrdDicom Java object by copying the original OrdDicom Java object into a destination OrdDicom Java object and then processing the destination OrdDicom Java object based on the specified anonymity definition document.
 oracle.sql.BLOB processCopy(java.lang.String command, oracle.sql.BLOB dest)
          Produces a new BLOB containing DICOM binary data by copying an existing OrdDicom image into the destination BLOB and performing the specified processing commands.
 oracle.ord.im.OrdImage processCopy(java.lang.String command, oracle.ord.im.OrdImage dest)
          Produces a new OrdImage object by copying an existing OrdDicom image into the destination OrdImage object and performing the specified processing commands.
 OrdDicom processCopy(java.lang.String command, java.lang.String dest_SOP_INSTANCE_UID, OrdDicom dest, oracle.xdb.XMLType metadata)
          Produces a new OrdDicom Java object by copying an existing OrdDicom image into the destination OrdDicom Java object and performing the specified processing commands.
 void setProperties()
          Sets the attributes of the OrdDicom Java object.
 void write(java.io.OutputStream outStream)
          Writes the data from the database BLOB within the OrdDicom Java object, or from the file source to which the OrdDicom Java object points, to the specified OutputStream object.
 void writeMetadata(oracle.xdb.XMLType metadata, OrdDicom dest)
          Produces a new OrdDicom Java object by copying an existing OrdDicom Java object and writing the metadata provided into the metadata attribute of the specified destination OrdDicom Java object.

 

Methods inherited from class oracle.ord.dicom.OrdDicomBase
create, getFactory, toDatum, toDatum

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Method Detail

getORADataFactory

public static oracle.sql.ORADataFactory getORADataFactory()
Returns the OrdDicom ORADataFactory interface for use by the getORAData method. Specify the getORADataFactory method as the factory parameter of the getORAData method when retrieving an OrdDicom object from an OracleResultSet or OracleCallableStatement object.
Returns:
the OrdDicom implementation of the ORADataFactory interface.

getStudyInstanceUid

public java.lang.String getStudyInstanceUid()
                                     throws java.sql.SQLException
Returns the value of the STUDY_INSTANCE_UID attribute of the OrdDicom Java object. This value is null if the metadata was never extracted. Call the setProperties() method to populate this attribute.
Returns:
the value of the STUDY_INSTANCE_UID attribute, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the STUDY_INSTANCE_UID attribute.

getSeriesInstanceUid

public java.lang.String getSeriesInstanceUid()
                                      throws java.sql.SQLException
Returns the value of the SERIES_INSTANCE_UID attribute of the OrdDicom Java object. This value is null if the metadata was never extracted. Call the setProperties() method to populate this attribute.
Returns:
the value of the SERIES_INSTANCE_UID attribute, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the SERIES_INSTANCE_UID attribute.

getSOPInstanceUid

public java.lang.String getSOPInstanceUid()
                                   throws java.sql.SQLException
Returns the value of the SOP_INSTANCE_UID attribute of the OrdDicom Java object. This value is null if the metadata was never extracted. Call the setProperties() method to populate this attribute.
Returns:
the value of the SOP_INSTANCE_UID attribute, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the SOP_INSTANCE_UID attribute.

getSOPClassUid

public java.lang.String getSOPClassUid()
                                throws java.sql.SQLException
Returns the value of the SOP_CLASS_UID attribute of the OrdDicom Java object. This value is null if the metadata was never extracted. Call the setProperties() method to populate this attribute.
Returns:
the value of the SOP_CLASS_UID attribute, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the SOP_CLASS_UID attribute.

getContentLength

public int getContentLength()
                     throws java.sql.SQLException
Returns the value of the contentLength attribute of the OrdDicom Java object. This value is 0 if the setProperties was never called. Call the setProperties() method to populate this attribute.
Returns:
the value of the contentLength attribute, as an integer (int).
Throws:
java.sql.SQLException - if an error occurs accessing the contentLength attribute.

getContent

public oracle.sql.BLOB getContent()
                           throws java.sql.SQLException
Returns the BLOB locator of the embedded DICOM binary data stored in the source attribute of the OrdDicom Java object.
Returns:
the content, as an oracle.sql.BLOB locator.
Throws:
java.sql.SQLException - if an error occurs accessing the source attribute.

getSourceInformation

public java.lang.String getSourceInformation()
                                      throws java.sql.SQLException
Returns the source information as a URL in the form sourceType://sourceLocation/sourceName. The source information is assembled from the attributes of the embedded source attribute of the OrdDicom Java object.
Returns:
the source information, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the attributes of the embedded source object.

getSourceType

public java.lang.String getSourceType()
                               throws java.sql.SQLException
Returns the source type of the OrdDicom Java object.
Returns:
the source type, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the sourceType attribute.

getSourceLocation

public java.lang.String getSourceLocation()
                                   throws java.sql.SQLException
Returns the source location of the OrdDicom Java object.
Returns:
the source location, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the sourceLocation attribute.

getSourceName

public java.lang.String getSourceName()
                               throws java.sql.SQLException
Returns the source name of the OrdDicom Java object.
Returns:
the source name, as a String.
Throws:
java.sql.SQLException - if an error occurs accessing the sourceName attribute.

isLocal

public boolean isLocal()
                throws java.sql.SQLException
Indicates if the DICOM data is stored locally in the database in a BLOB, or externally in the file system.
Returns:
true if the data is stored locally in the database in a BLOB; false if the data is stored externally.
Throws:
java.sql.SQLException - if the nested OrdDataSource object is null, or if an error occurs accessing the local attribute.

setProperties

public void setProperties()
                   throws java.sql.SQLException
Sets the attributes of the OrdDicom Java object. This method executes the corresponding setProperties method in the database, and then synchronizes the OrdDicom Java object with the database object. This method sets all the attributes, including the metadata attribute of the OrdDicom Java object.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding setProperties method in the database.

extractMetadata

public oracle.xdb.XMLType extractMetadata(java.lang.String extractOption,
                                          java.lang.String docName)
                                   throws java.sql.SQLException
Executes the corresponding extractMetadata method in the database to get DICOM metadata in XML code for a specified mapping document. Using a value of ALL for the extractOption parameter, with a null value for the docName parameter, this method extracts all the metadata attributes of the embedded DICOM binary data. This method does not change the state of the metadata attribute of the OrdDicom Java object.
Parameters:
extractOption - a string that specifies the types of metadata to extract from the DICOM binary data. Valid values are ALL, MAPPED, and STANDARD. If the value is ALL (the default), all the metadata attributes of the DICOM binary data are extracted. If the value is MAPPED, only the mapped attributes are extracted. If the value is STANDARD, only the DICOM standard attributes and the mapped attributes are extracted.
docName - the name of the mapping document. The default mapping document ordcmmp.xml is loaded during installation. It refers to the default metadata namespace http://xmlns.oracle.com/ord/dicom/metadata_1_0
Returns:
the extracted metadata, as a value of type oracle.xdb.XMLType.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding extractMetadata method in the database.

getAttributeByName

public java.lang.String getAttributeByName(java.lang.String attributeName,
                                           java.lang.String definerName)
                                    throws java.sql.SQLException
Returns a DICOM attribute, as a String. Use this method to get a single attribute from the embedded DICOM binary data. This method extracts the attribute from the local metadata attribute of the OrdDicom Java object. Call the setProperties() method before calling this method. This method executes the corresponding getAttributeByName method in the database.
Parameters:
attributeName - the name of the attribute.
definerName - the name of the attribute definer. The default value is DICOM.
Returns:
the value of the attribute, as a String. The return value is null if the attribute is not found in the metadata.
Throws:
java.sql.SQLException - if an error occurs accessing the metadata attribute, extracting the attribute from the metadata attribute, or executing the corresponding getAttributeByName method in the database.

getAttributeByTag

public java.lang.String getAttributeByTag(java.lang.String tag,
                                          java.lang.String definerName)
                                   throws java.sql.SQLException
Returns a DICOM attribute, as a String. Use this method to get a single attribute of the embedded DICOM binary data. Call the setProperties() method before calling this method. This method executes the corresponding getAttributeByTag method in the database.
Parameters:
tag - the attribute or item tag, as a hexadecimal string. For example: 00080100.
definerName - the name of the tag definer. The default value is DICOM.
Returns:
the value of the attribute, as a String. The return value is null if the attribute is not found in the metadata.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding getAttributeByTag method in the database.

writeMetadata

public void writeMetadata(oracle.xdb.XMLType metadata,
                          OrdDicom dest)
                   throws java.sql.SQLException
Produces a new OrdDicom Java object by copying an existing OrdDicom Java object and writing the metadata provided into the metadata attribute of the specified destination OrdDicom Java object. This method executes the corresponding writeMetadata method in the database.
Parameters:
metadata - the input metadata, as a value of type oracle.xdb.XMLType.
dest - an empty OrdDicom Java object to be populated with a copy of the original DICOM binary data, including the new metadata embedded within the object.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding writeMetadata method in the database.

processCopy

public oracle.ord.im.OrdImage processCopy(java.lang.String command,
                                          oracle.ord.im.OrdImage dest)
                                   throws java.sql.SQLException
Produces a new OrdImage object by copying an existing OrdDicom image into the destination OrdImage object and performing the specified processing commands. This method executes the corresponding processCopy method in the database.
Parameters:
command - the process verb string value that specifies the command to perform. Valid values include cut, scale, rotate, and so on.
dest - an empty OrdImage object to be populated with the processed DICOM image, not including the DICOM metadata.
Returns:
the destination OrdImage object populated with the processed DICOM image, not including the DICOM metadata.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding processCopy method in the database.

processCopy

public OrdDicom processCopy(java.lang.String command,
                            java.lang.String dest_SOP_INSTANCE_UID,
                            OrdDicom dest,
                            oracle.xdb.XMLType metadata)
                     throws java.sql.SQLException
Produces a new OrdDicom Java object by copying an existing OrdDicom image into the destination OrdDicom Java object and performing the specified processing commands. This method executes the corresponding processCopy method in the database.
Parameters:
command - the process verb string value that specifies the command to perform. Valid values include cut, scale, rotate, and so on.
dest_SOP_INSTANCE_UID - a String value that specifies the SOP_INSTANCE_UID attribute of the new OrdDicom Java object.
dest - an empty OrdDicom Java object to be populated with the processed DICOM image and the specified metadata.
metadata - a value of type oracle.xdb.XMLType that specifies the metadata to be written into the new OrdDicom Java object.
Returns:
the destination OrdDicom object populated with the processed DICOM image and the specified metadata
Throws:
java.sql.SQLException - if an error occurs executing the corresponding processCopy method in the database.

processCopy

public oracle.sql.BLOB processCopy(java.lang.String command,
                                   oracle.sql.BLOB dest)
                            throws java.sql.SQLException
Produces a new BLOB containing DICOM binary data by copying an existing OrdDicom image into the destination BLOB and performing the specified processing commands. This method executes the corresponding processCopy method in the database.
Parameters:
command - the process verb string value that specifies the command to perform. Valid values include cut, scale, rotate, and so on.
dest - the destination BLOB to be populated with the processed DICOM image.
Returns:
the destination BLOB populated with the processed DICOM image.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding processCopy method in the database.

makeAnonymous

public void makeAnonymous(java.lang.String dest_SOP_INSTANCE_UID,
                          OrdDicom dest,
                          java.lang.String anonymityDocName)
                   throws java.sql.SQLException
Produces an anonymous OrdDicom Java object by copying the original OrdDicom Java object into a destination OrdDicom Java object and then processing the destination OrdDicom Java object based on the specified anonymity definition document. This method executes the corresponding makeAnonymous method in the database.
Parameters:
dest_SOP_INSTANCE_UID - a String value that specifies the SOP_INSTANCE_UID attribute of the new destination OrdDicom Java object.
dest - an empty OrdDicom Java object to be populated with the anonymous DICOM binary data and the anonymous metadata.
anonymityDocName - the name of the anonymity definition document. If the value is null, the default anonymity document will be used.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding makeAnonymous method in the database.

isAnonymous

public boolean isAnonymous(java.lang.String anonymityDocName)
                    throws java.sql.SQLException
Checks if the embedded DICOM binary data is anonymous based on the specified anonymity definition document. This method executes the corresponding isAnonymous method in the database.
Parameters:
anonymityDocName - the name of the anonymity definition document. If the value is null, the default anonymity document ordcman.xml will be used.
Returns:
true if the embedded DICOM binary data is anonymous; false otherwise.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding isAnonymous method in the database.

isConformanceValid

public boolean isConformanceValid(java.lang.String constraintName)
                           throws java.sql.SQLException
Checks if the embedded DICOM binary data is valid against a specific set of conformance constraints identified by the input parameter constraintName. This method executes the corresponding isConformanceValid method in the database.
Parameters:
constraintName - the name of the constraint.
Returns:
true if conformance is valid; false otherwise.
Throws:
java.sql.SQLException - if an error occurs executing the corresponding isConformanceValid method in the database.

loadContent

public boolean loadContent(java.io.File inputFile,
                           boolean setProperties)
                    throws java.sql.SQLException,
                           java.io.IOException
Loads data from a file object into the database BLOB within the OrdDicom Java object. Use this method to populate an empty OrdDicom Java object. If this method is called on a nonempty OrdDicom Java object, the local content will be overwritten. This is a convenience method that exists only in the OrdDicom Java object. There is no corresponding database object method.
Parameters:
inputFile - the name of the input file object from which to load the data.
setProperties - a Boolean value that indicates whether or not to call the setProperties() method after the content is loaded.
Returns:
true if the data is loaded successfully; false if the data is not local (if the isLocal() method returns false).
Throws:
java.sql.SQLException - if an error occurs accessing an object attribute or writing to the database BLOB.
java.io.IOException - if an error occurs reading the file object.

loadContent

public boolean loadContent(java.io.InputStream inputStream,
                           boolean setProperties)
                    throws java.sql.SQLException,
                           java.io.IOException
Loads data from an InputStream object into the database BLOB within the OrdDicom Java object. Use this method to populate an empty OrdDicom Java object. If this method is called on a nonempty OrdDicom Java object, the local content will be overwritten. This is a convenience method that exists only in the OrdDicom Java object. There is no corresponding database object method.
Parameters:
inputStream - the name of the InputStream object (a value of type java.io.InputStream) from which to load the data.
setProperties - a Boolean value that indicates whether or not to call the setProperties() method after the content is loaded.
Returns:
true if the data is loaded successfully; otherwise, an exception is raised if an error occurs.
Throws:
java.sql.SQLException - if an error occurs accessing an object attribute or writing to the database BLOB.
java.io.IOException - if an error occurs reading the InputStream object.

write

public void write(java.io.OutputStream outStream)
           throws java.sql.SQLException,
                  java.io.IOException
Writes the data from the database BLOB within the OrdDicom Java object, or from the file source to which the OrdDicom Java object points, to the specified OutputStream object. This is a convenience method that exists only in the OrdDicom Java object. There is no corresponding database object method.
Parameters:
outStream - the name of the OutputStream object to which the data is written.
Throws:
java.sql.SQLException - if an error occurs reading the data in the database BLOB or the external database source, the OutputStream object is null, the BLOB within the OrdDicom Java object is null, or the BFILE within the OrdDicom Java object is null.
java.io.IOException - if an error occurs writing data to the OutputStream object.

isConnectionNull

public boolean isConnectionNull()
                         throws java.sql.SQLException
Returns whether the underlying database connection is null.
Returns:
true if the underlying database connection is null; false otherwise.
Throws:
java.sql.SQLException - if an error occurs accessing the connection.

Skip navigation links

Oracle Multimedia DICOM Java API Reference
11g Release 1 (11.1)

Part No. B28417-01


Copyright © 2006, 2007, Oracle. All rights reserved.