public class PatientStudySeriesConcatenationInstanceModel extends DicomDatabaseInformationModel
The PatientStudySeriesConcatenationInstanceModel
class
supports a simple DICOM Patient/Study/Series/Concatenation/Instance model.
Attributes of other DICOM entities than Patient, Study, Series, Concatenation and Instance are included at the appropriate lower level entity.
derivedAcquisitionDateTimeColumnName, derivedContentDateTimeColumnName, derivedLossyImageCompressionColumnName, derivedSeriesDateTimeColumnName, derivedStudyDateTimeColumnName
additionalIndexMapOfColumnsToTables, databaseConnection, databaseRootName, defaultDatabaseRootName, dictionary, externalServerInstance, FILE_COPIED, FILE_REFERENCED, listsOfAttributesByInformationEntity, localFileName, localFileReferenceTypeColumnName, localParentReferenceColumnName, localPrimaryKeyColumnName, localRecordInsertionTimeColumnName, personNameCanonicalColumnNamePrefix, personNameCanonicalColumnNameSuffix, personNamePhoneticCanonicalColumnNamePrefix, personNamePhoneticCanonicalColumnNameSuffix, rootInformationEntity, userColumnName1, userColumnName2, userColumnName3, userColumnName4
Constructor and Description |
---|
PatientStudySeriesConcatenationInstanceModel(String databaseFileName)
Construct a model with the attributes from the default dictionary.
|
PatientStudySeriesConcatenationInstanceModel(String databaseFileName,
DicomDictionary dictionary)
Construct a model with the attributes from the specified dictionary.
|
PatientStudySeriesConcatenationInstanceModel(String databaseFileName,
String databaseServerName)
Construct a model with the attributes from the default dictionary allowing external SQL access.
|
PatientStudySeriesConcatenationInstanceModel(String databaseFileName,
String databaseServerName,
DicomDictionary dictionary)
Construct a model with the attributes from the specified dictionary allowing external SQL access.
|
PatientStudySeriesConcatenationInstanceModel(String databaseFileName,
String databaseServerName,
DicomDictionary dictionary,
String databaseRootName)
Construct a model with the attributes from the specified dictionary allowing external SQL access.
|
PatientStudySeriesConcatenationInstanceModel(String databaseFileName,
String databaseServerName,
String databaseRootName)
Construct a model with the attributes from the default dictionary allowing external SQL access.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createAdditionalIndexes()
Create additional indexes on UIDs to optimize queries.
|
protected void |
extendCreateStatementStringWithAnyExtraAttributes(StringBuffer b,
InformationEntity ie)
Extend a SQL CREATE TABLE statement in the process of being constructed with any additional attributes (columns) that the model requires.
|
protected void |
extendStatementStringWithMatchingAttributesForSelectedInformationEntity(StringBuffer b,
AttributeList list,
InformationEntity ie)
Extend a SQL SELECT statement in the process of being constructed with matching clauses for the unique keys of the entity and all its parents.
|
InformationEntity |
getChildTypeForParent(InformationEntity ie)
For an information entity (regardless of a particular instance), find the next information entity lower down in the information model hierarchy in the general case.
|
InformationEntity |
getChildTypeForParent(InformationEntity ie,
AttributeList list)
For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.
|
InformationEntity |
getChildTypeForParent(InformationEntity ie,
boolean concatenation)
For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.
|
String |
getDescriptiveColumnName(InformationEntity ie)
For a particular information entity, find the name of the column in the entity's database table containing the first of three descriptive attributes for the entity.
|
String |
getOtherDescriptiveColumnName(InformationEntity ie)
For a particular information entity, find the name of the column in the entity's database table containing the second of three descriptive attributes for the entity.
|
String |
getOtherOtherDescriptiveColumnName(InformationEntity ie)
For a particular information entity, find the name of the column in the entity's database table containing the third of three descriptive attributes for the entity.
|
String |
getUIDColumnNameForInformationEntity(InformationEntity ie)
For a particular information entity, find the name of the column in the entity's database table containing the DICOM UID for the entity.
|
protected boolean |
isInformationEntityInModel(InformationEntity ie)
Is the entity in the information model ?
|
static void |
main(String[] arg)
For unit test
purposes.
|
createPrimaryKeyForSelectedInformationEntity, extendCreateStatementStringWithDerivedAttributes, extendInsertStatementStringWithAttributeNamesForSelectedInformationEntity, extendInsertStatementStringWithAttributeValuesForSelectedInformationEntity, extendInsertStatementStringWithDerivedAttributeNamesForSelectedInformationEntity, extendInsertStatementStringWithDerivedAttributeValuesForSelectedInformationEntity, extendInsertStatementStringWithPersonNameSearchColumnsForSelectedInformationEntity, extendInsertStatementStringWithPersonNameSearchValuesForSelectedInformationEntity, getDateFromDicomDateAndTime, getDateFromDicomDateAndTime, getNametoDescribeThisInstanceOfInformationEntity, getQueryResponseGeneratorFactory, getQuotedEscapedSingleStringValueOrNull, getQuotedSingleStringValueOrNull, getQuotedUnescapedSingleStringValueOrNull, getQuotedValueOrNULL, getRetrieveResponseGeneratorFactory, getTimestampFromDate, getTimestampFromDicomDateAndTime, getTimestampFromDicomDateAndTime
appendExactOrIsNullMatch, close, deleteRecord, doCommonConstructorStuff, extendCreateStatementStringWithUserColumns, finalize, findAllAttributeValuesForAllRecordsForThisInformationEntity, findAllAttributeValuesForAllRecordsForThisInformationEntityWithMatchingParent, findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedKeyValue, findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedParent, findAllAttributeValuesForAllRecordsForThisInformationEntityWithSpecifiedUID, findAllAttributeValuesForSelectedRecord, findSelectedAttributeValuesForSelectedRecord, getAttributeTagFromDatabaseColumnName, getDatabaseColumnNameFromDicomName, getDatabaseColumnNameFromDicomTag, getDicomNameFromDatabaseColumnName, getInformationEntityFromTag, getLocalFileNameColumnName, getLocalFileReferenceTypeColumnName, getLocalParentReferenceColumnName, getLocalPrimaryKeyColumnName, getLocalRecordInsertionTimeColumnName, getSQLTypeFromDicomValueRepresentation, getTableNameForInformationEntity, insertObject, isInformationEntityInModel, toString, updateSelectedRecord
public PatientStudySeriesConcatenationInstanceModel(String databaseFileName) throws DicomException
Construct a model with the attributes from the default dictionary.
The dictionary DicomDictionaryForPatientStudySeriesConcatenationInstanceModel
is used.
databaseFileName
- DicomException
public PatientStudySeriesConcatenationInstanceModel(String databaseFileName, DicomDictionary dictionary) throws DicomException
Construct a model with the attributes from the specified dictionary.
databaseFileName
- dictionary
- DicomException
public PatientStudySeriesConcatenationInstanceModel(String databaseFileName, String databaseServerName) throws DicomException
Construct a model with the attributes from the default dictionary allowing external SQL access.
The dictionary DicomDictionaryForPatientStudySeriesConcatenationInstanceModel
is used.
databaseFileName
- databaseServerName
- DicomException
public PatientStudySeriesConcatenationInstanceModel(String databaseFileName, String databaseServerName, DicomDictionary dictionary) throws DicomException
Construct a model with the attributes from the specified dictionary allowing external SQL access.
databaseFileName
- databaseServerName
- dictionary
- DicomException
public PatientStudySeriesConcatenationInstanceModel(String databaseFileName, String databaseServerName, DicomDictionary dictionary, String databaseRootName) throws DicomException
Construct a model with the attributes from the specified dictionary allowing external SQL access.
databaseFileName
- databaseServerName
- dictionary
- databaseRootName
- DicomException
public PatientStudySeriesConcatenationInstanceModel(String databaseFileName, String databaseServerName, String databaseRootName) throws DicomException
Construct a model with the attributes from the default dictionary allowing external SQL access.
The dictionary DicomDictionaryForPatientStudySeriesConcatenationInstanceModel
is used.
databaseFileName
- databaseServerName
- databaseRootName
- DicomException
protected void createAdditionalIndexes() throws DicomException
Create additional indexes on UIDs to optimize queries.
createAdditionalIndexes
in class DatabaseInformationModel
DicomException
protected void extendCreateStatementStringWithAnyExtraAttributes(StringBuffer b, InformationEntity ie)
DatabaseInformationModel
Extend a SQL CREATE TABLE statement in the process of being constructed with any additional 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 a DICOM attribute that is defined to be in a particular information
entity in the dictionary (for example InstanceNumber is at the concatenation level), but for
the convenience of the user of tree and table browsers it may be nice to replicate it into
the tables for lower levels of the information model as well; hence this method might add
InstanceNumber at the instance level. Once created, such attributes will automatically be
included during database inserts. See also
PatientStudySeriesConcatenationInstanceModel
for example.
extendCreateStatementStringWithAnyExtraAttributes
in class DatabaseInformationModel
b
- ie
- protected void extendStatementStringWithMatchingAttributesForSelectedInformationEntity(StringBuffer b, AttributeList list, InformationEntity ie) throws DicomException
DatabaseInformationModel
Extend a SQL SELECT statement in the process of being constructed with matching clauses for the unique keys of the entity and all its parents.
For example, a model might specify the unique key for the patient to be PatientID
,
the study to be StudyInstanceUID
, the series to be SeriesInstanceUID
and so on. A
match requested at the series level would then require PatientID
, StudyInstanceUID
and SeriesInstanceUID
to match what was in the supplied AttributeList
Called when inserting a new record for an instance of the entity.
Specific to each concrete information model extending DatabaseInformationModel
.
extendStatementStringWithMatchingAttributesForSelectedInformationEntity
in class DatabaseInformationModel
b
- list
- ie
- DicomException
public InformationEntity getChildTypeForParent(InformationEntity ie)
DatabaseInformationModel
For an information entity (regardless of a particular instance), find the next information entity lower down in the information model hierarchy in the general case.
For a patient, this might be a study.
For a series, this might be a concatenation or an instance, depending on the information model.
This method essentially returns the most complex model possible and is used when building the database table schema.
getChildTypeForParent
in class DatabaseInformationModel
ie
- the parent information entitypublic InformationEntity getChildTypeForParent(InformationEntity ie, AttributeList list)
DatabaseInformationModel
For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.
For a patient, this might be a study. For a series, this might be a concatenation or an instance, depending on both the information model and the contents of the instance itself.
This method may return a simpler view than the more general method, and is used when traversing the database tables.
getChildTypeForParent
in class DatabaseInformationModel
ie
- the parent information entitylist
- an AttributeList, in which ConcatenationUID may or may not be present,as a flag to use concatenations in the model or notpublic InformationEntity getChildTypeForParent(InformationEntity ie, boolean concatenation)
DatabaseInformationModel
For a particular instance of an information entity, find the next information entity lower down in the information model hierarchy.
For a patient, this might be a study. For a series, this might be a concatenation or an instance, depending on both the information model and whether concatenations are to be considered in the model.
This method may return a simpler view than the more general method, and is used when traversing the database tables.
getChildTypeForParent
in class DatabaseInformationModel
ie
- the parent information entityconcatenation
- true if concatenations are to be considered in the modelpublic String getDescriptiveColumnName(InformationEntity ie)
DatabaseInformationModel
For a particular information entity, find the name of the column in the entity's database table containing the first of three descriptive attributes for the entity.
For example, for an instance (e.g. an image), this might be the InstanceNumber
.
For a patient, this might be the PatientName
.
getDescriptiveColumnName
in class DatabaseInformationModel
ie
- the information entitypublic String getOtherDescriptiveColumnName(InformationEntity ie)
DatabaseInformationModel
For a particular information entity, find the name of the column in the entity's database table containing the second of three descriptive attributes for the entity.
For example, for an instance (e.g. an image), this might be the InConcatenationNumber
.
Frequently null for other entities.
getOtherDescriptiveColumnName
in class DatabaseInformationModel
ie
- the information entitypublic String getOtherOtherDescriptiveColumnName(InformationEntity ie)
DatabaseInformationModel
For a particular information entity, find the name of the column in the entity's database table containing the third of three descriptive attributes for the entity.
For example, for an instance (e.g. an image), this might be the ImageComments
.
For a patient, this might be the PatientID
.
getOtherOtherDescriptiveColumnName
in class DatabaseInformationModel
ie
- the information entitypublic String getUIDColumnNameForInformationEntity(InformationEntity ie)
DatabaseInformationModel
For a particular information entity, find the name of the column in the entity's database table containing the DICOM UID for the entity.
For example, for an instance (e.g. an image), this might be the name of the column corresponding to the SOP Instance UID.
getUIDColumnNameForInformationEntity
in class DatabaseInformationModel
ie
- the information entityprotected boolean isInformationEntityInModel(InformationEntity ie)
DatabaseInformationModel
Is the entity in the information model ?
Will be specific to a particular concrete information model.
isInformationEntityInModel
in class DatabaseInformationModel
ie
- the information entitypublic static void main(String[] arg)
For unit test purposes.
Reads the DICOM files listed on the command line, loads them into the model and pops up a browser for viewing the tree hierarchy of the model and the values of each instance of an entity.
arg
- a list of DICOM file names