|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pixelmed.database.DatabaseInformationModel
com.pixelmed.database.DicomDatabaseInformationModel
public abstract class DicomDatabaseInformationModel
The DicomDatabaseInformationModel class
is an abstract class that specializes DatabaseInformationModel
by adding methods specific to a typical DICOM composite object information model.
These methods include support for naming the standard DICOM information entities, building insert statements using all the dictionary attributes for a partcular DICOM information entity, and generating local primary keys.
| Field Summary | |
|---|---|
protected static String |
derivedAcquisitionDateTimeColumnName
|
protected static String |
derivedContentDateTimeColumnName
|
protected static String |
derivedLossyImageCompressionColumnName
|
protected static String |
derivedSeriesDateTimeColumnName
|
protected static String |
derivedStudyDateTimeColumnName
|
| Constructor Summary | |
|---|---|
DicomDatabaseInformationModel(String databaseFileName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary)
|
|
DicomDatabaseInformationModel(String databaseFileName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary,
String databaseRootName)
|
|
DicomDatabaseInformationModel(String databaseFileName,
String databaseServerName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary)
|
|
DicomDatabaseInformationModel(String databaseFileName,
String databaseServerName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary,
String databaseRootName)
|
|
| Method Summary | |
|---|---|
protected String |
createPrimaryKeyForSelectedInformationEntity(InformationEntity ie)
Create a new unique key which may be used to identify a new instance of an entity. |
protected void |
extendCreateStatementStringWithDerivedAttributes(StringBuffer b,
InformationEntity ie)
Extend a SQL CREATE TABLE statement in the process of being constructed with any derived attributes (columns) that the model requires. |
protected void |
extendInsertStatementStringWithAttributeNamesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
Extend a SQL INSERT statement in the process of being constructed with the names of the attributes in the instance for the entity. |
protected void |
extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie,
String fileName)
Deprecated. use extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity() instead |
protected void |
extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie,
String fileName,
String fileReferenceType)
Extend a SQL INSERT statement in the process of being constructed with the values of the attributes in the instance for the entity. |
protected void |
extendInsertStatementStringWithDerivedAttributeNamesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
Extend a SQL INSERT statement in the process of being constructed with the names of the derived attributes in the instance for the entity. |
protected void |
extendInsertStatementStringWithDerivedAttributeValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
Extend a SQL INSERT statement in the process of being constructed with the values of the derived attributes in the instance for the entity. |
protected void |
extendInsertStatementStringWithPersonNameSearchColumnsForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
Extend a SQL INSERT statement in the process of being constructed with the names of the additional search columns derived from person name attributes in the instance for the entity. |
protected void |
extendInsertStatementStringWithPersonNameSearchValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
Extend a SQL INSERT statement in the process of being constructed with the values of the additional search columns derived from person name attributes in the instance for the entity. |
Date |
getDateFromDicomDateAndTime(String dateTime)
|
Date |
getDateFromDicomDateAndTime(String date,
String time,
String timezone)
|
String |
getNametoDescribeThisInstanceOfInformationEntity(InformationEntity ie,
Map returnedAttributes)
For a particular instance of an information entity, find a descriptive name for the entity suitable for rendering. |
QueryResponseGeneratorFactory |
getQueryResponseGeneratorFactory(int debugLevel)
Get a factory to manufacture a query response generator capable of performing a query and returning the results. |
static String |
getQuotedEscapedSingleStringValueOrNull(Attribute a)
Make a quoted string value suitable for using in a SQL statement from a DICOM attribute. |
static String |
getQuotedSingleStringValueOrNull(Attribute a,
boolean escapeSpecialCharacters)
Make a quoted string value suitable for using in a SQL statement from a DICOM attribute. |
static String |
getQuotedUnescapedSingleStringValueOrNull(Attribute a)
Make a quoted string value suitable for using in a SQL statement from a DICOM attribute. |
static String |
getQuotedValueOrNULL(String value)
Make a quoted string value suitable for using in a SQL statement from a (possibly null or empty) string. |
RetrieveResponseGeneratorFactory |
getRetrieveResponseGeneratorFactory(int debugLevel)
Get a factory to manufacture a retrieve response generator capable of performing a retrieve and returning the results. |
Timestamp |
getTimestampFromDate(Date javaDate)
|
Timestamp |
getTimestampFromDicomDateAndTime(String sdatetime)
|
Timestamp |
getTimestampFromDicomDateAndTime(String date,
String time,
String timezone)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final String derivedStudyDateTimeColumnName
protected static final String derivedSeriesDateTimeColumnName
protected static final String derivedContentDateTimeColumnName
protected static final String derivedAcquisitionDateTimeColumnName
protected static final String derivedLossyImageCompressionColumnName
| Constructor Detail |
|---|
public DicomDatabaseInformationModel(String databaseFileName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary)
throws DicomException
databaseFileName - rootInformationEntity - dictionary -
DicomException
public DicomDatabaseInformationModel(String databaseFileName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary,
String databaseRootName)
throws DicomException
databaseFileName - rootInformationEntity - dictionary - databaseRootName -
DicomException
public DicomDatabaseInformationModel(String databaseFileName,
String databaseServerName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary)
throws DicomException
databaseFileName - rootInformationEntity - dictionary -
DicomException
public DicomDatabaseInformationModel(String databaseFileName,
String databaseServerName,
InformationEntity rootInformationEntity,
DicomDictionary dictionary,
String databaseRootName)
throws DicomException
databaseFileName - rootInformationEntity - dictionary - databaseRootName -
DicomException| Method Detail |
|---|
public String getNametoDescribeThisInstanceOfInformationEntity(InformationEntity ie,
Map returnedAttributes)
DatabaseInformationModelFor a particular instance of an information entity, find a descriptive name for the entity suitable for rendering.
For a patient, this might be the name Patient.
For an instance, this will depend on the SOPClassUID, and might be an Image, a Waveform, etc.
getNametoDescribeThisInstanceOfInformationEntity in class DatabaseInformationModelie - returnedAttributes -
protected void extendInsertStatementStringWithPersonNameSearchColumnsForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
throws DicomException
Extend a SQL INSERT statement in the process of being constructed with the names of the additional search columns derived from person name attributes in the instance for the entity.
Called when inserting a new record for an instance of the entity.
Specific to each concrete information model extending DatabaseInformationModel.
extendInsertStatementStringWithPersonNameSearchColumnsForSelectedInformationEntity in class DatabaseInformationModelb - the statement being constructedlist - the DICOM attributes of a composite object, containing the attributes describing this instance of the entityie - the InformationEntity for which a select statement is being constructed
DicomException - thrown if there are problems extracting the DICOM attributes
protected void extendInsertStatementStringWithPersonNameSearchValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
throws DicomException
Extend a SQL INSERT statement in the process of being constructed with the values of the additional search columns derived from person name attributes in the instance for the entity.
Called when inserting a new record for an instance of the entity.
Specific to each concrete information model extending DatabaseInformationModel.
extendInsertStatementStringWithPersonNameSearchValuesForSelectedInformationEntity in class DatabaseInformationModelb - the statement being constructedlist - the DICOM attributes of a composite object, containing the attributes describing this instance of the entityie - the InformationEntity for which a select statement is being constructed
DicomException - thrown if there are problems extracting the DICOM attributes
protected void extendInsertStatementStringWithAttributeNamesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
throws DicomException
Extend a SQL INSERT statement in the process of being constructed with the names of the attributes in the instance for the entity.
Called when inserting a new record for an instance of the entity.
The default implementation adds values for all attributes that are present in the database tables and present in the instance.
At the INSTANCE level, InstanceNumber is always added.
At the INSTANCE level, ImageOrientationPatient within PlaneOrientationSequence within SharedFunctionalGroupsSequence is always added, if present.
extendInsertStatementStringWithAttributeNamesForSelectedInformationEntity in class DatabaseInformationModelb - the statement being constructedlist - the DICOM attributes of a composite object, containing the attributes describing this instance of the entityie - the InformationEntity for which an insert statement is being constructed
DicomException - thrown if there are problems extracting the DICOM attributes
protected void extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie,
String fileName)
throws DicomException
extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity() instead
Extend a SQL INSERT statement in the process of being constructed with the values of the attributes in the instance for the entity.
Called when inserting a new record for an instance of the entity.
The default implementation adds values for all attributes that are present in the database tables and present in the instance.
At the INSTANCE level, InstanceNumber is always added.
At the INSTANCE level, ImageOrientationPatient within PlaneOrientationSequence within SharedFunctionalGroupsSequence is always added, if present.
At the INSTANCE level, the file reference type is left empty since unknown.
extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity in class DatabaseInformationModelb - the statement being constructedlist - the DICOM attributes of a composite object, containing the attributes describing this instance of the entityie - the InformationEntity for which an insert statement is being constructedfileName - the local filename, which may be non-null for INSTANCE level insertions
DicomException - thrown if there are problems extracting the DICOM attributes
protected void extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie,
String fileName,
String fileReferenceType)
throws DicomException
Extend a SQL INSERT statement in the process of being constructed with the values of the attributes in the instance for the entity.
Called when inserting a new record for an instance of the entity.
The default implementation adds values for all attributes that are present in the database tables and present in the instance.
At the INSTANCE level, InstanceNumber is always added.
At the INSTANCE level, ImageOrientationPatient within PlaneOrientationSequence within SharedFunctionalGroupsSequence is always added, if present.
extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity in class DatabaseInformationModelb - the statement being constructedlist - the DICOM attributes of a composite object, containing the attributes describing this instance of the entityie - the InformationEntity for which an insert statement is being constructedfileName - the local filename, which may be non-null for INSTANCE level insertionsfileReferenceType - "C" for copied (i.e., delete on purge), "R" for referenced (i.e., do not delete on purge)
DicomException - thrown if there are problems extracting the DICOM attributes
protected void extendInsertStatementStringWithDerivedAttributeNamesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
throws DicomException
Extend a SQL INSERT statement in the process of being constructed with the names of the derived attributes in the instance for the entity.
Called when inserting a new record for an instance of the entity.
Specific to each concrete information model extending DatabaseInformationModel.
extendInsertStatementStringWithDerivedAttributeNamesForSelectedInformationEntity in class DatabaseInformationModelb - the statement being constructedlist - the DICOM attributes of a composite object, containing the attributes describing this instance of the entityie - the InformationEntity for which an insert statement is being constructed
DicomException - thrown if there are problems extracting the DICOM attributespublic Timestamp getTimestampFromDate(Date javaDate)
public Date getDateFromDicomDateAndTime(String date,
String time,
String timezone)
public Date getDateFromDicomDateAndTime(String dateTime)
public Timestamp getTimestampFromDicomDateAndTime(String date,
String time,
String timezone)
public Timestamp getTimestampFromDicomDateAndTime(String sdatetime)
protected void extendInsertStatementStringWithDerivedAttributeValuesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
throws DicomException
Extend a SQL INSERT statement in the process of being constructed with the values of the derived attributes in the instance for the entity.
Called when inserting a new record for an instance of the entity.
Specific to each concrete information model extending DatabaseInformationModel.
extendInsertStatementStringWithDerivedAttributeValuesForSelectedInformationEntity in class DatabaseInformationModelb - the statement being constructedlist - the DICOM attributes of a composite object, containing the attributes describing this instance of the entityie - the InformationEntity for which an insert statement is being constructed
DicomException - thrown if there are problems extracting the DICOM attributes
protected void extendCreateStatementStringWithDerivedAttributes(StringBuffer b,
InformationEntity ie)
Extend a SQL CREATE TABLE statement in the process of being constructed with any derived attributes (columns) that the model requires.
Called when creating the tables for a new database.
Specific to each concrete information model extending DatabaseInformationModel.
Defaults to adding no extra columns if not overridden (i.e. it is not abstract).
For example, there may be dates and times derived from DICOM attributes.
extendCreateStatementStringWithDerivedAttributes in class DatabaseInformationModelb - the statement being constructedie - the InformationEntity for which a create table statement is being constructedprotected String createPrimaryKeyForSelectedInformationEntity(InformationEntity ie)
DatabaseInformationModelCreate a new unique key which may be used to identify a new instance of an entity.
Called when inserting a new record for an instance of the entity.
createPrimaryKeyForSelectedInformationEntity in class DatabaseInformationModelie -
public static String getQuotedValueOrNULL(String value)
Make a quoted string value suitable for using in a SQL statement from a (possibly null or empty) string.
No attenpt at escaping specially characters is made ... this is assumed already done.
value - the string, which may be null or zero length
DicomException
public static String getQuotedEscapedSingleStringValueOrNull(Attribute a)
throws DicomException
Make a quoted string value suitable for using in a SQL statement from a DICOM attribute.
Special characters should be escaped (actually they are just replaced with a hyphen).
Multiple values are collapsed and separated by the usual DICOM backslash delimiter character (which doesn't bother SQL).
a - the DICOM attribute, which may be null, zero length or multi-valued
DicomException
public static String getQuotedUnescapedSingleStringValueOrNull(Attribute a)
throws DicomException
Make a quoted string value suitable for using in a SQL statement from a DICOM attribute.
Does NOT escape special characters.
Multiple values are collapsed and separated by the usual DICOM backslash delimiter character (which doesn't bother SQL).
a - the DICOM attribute, which may be null, zero length or multi-valued
DicomException
public static String getQuotedSingleStringValueOrNull(Attribute a,
boolean escapeSpecialCharacters)
throws DicomException
Make a quoted string value suitable for using in a SQL statement from a DICOM attribute.
Special characters may be escaped (actually they are just replaced with a hyphen).
Multiple values are collapsed and separated by the usual DICOM backslash delimiter character (which doesn't bother SQL).
a - the DICOM attribute, which may be null, zero length or multi-valuedescapeSpecialCharacters - whether or not to escape special characters (currently only single quote)
DicomExceptionpublic QueryResponseGeneratorFactory getQueryResponseGeneratorFactory(int debugLevel)
Get a factory to manufacture a query response generator capable of performing a query and returning the results.
getQueryResponseGeneratorFactory in class DatabaseInformationModeldebugLevel - zero for no debugging messages, higher values more verbose messages
public RetrieveResponseGeneratorFactory getRetrieveResponseGeneratorFactory(int debugLevel)
Get a factory to manufacture a retrieve response generator capable of performing a retrieve and returning the results.
getRetrieveResponseGeneratorFactory in class DatabaseInformationModeldebugLevel - zero for no debugging messages, higher values more verbose messages
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||