Package be.uclouvain.orthanc
Class StorageArea
- java.lang.Object
-
- be.uclouvain.orthanc.StorageArea
-
public class StorageArea extends java.lang.Object
Storage area plugin
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StorageArea(long self)
Construct a Java object wrapping a C object that is managed by Orthanc.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create(java.lang.String uuid, byte[] content, long size, ContentType type)
Create a file inside the storage area.protected long
getSelf()
Return the C object that is associated with this Java wrapper.byte[]
read(java.lang.String uuid, ContentType type)
Read a file from the storage area.void
reconstructMainDicomTags(ResourceType level)
Reconstruct the main DICOM tags.void
remove(java.lang.String uuid, ContentType type)
Remove a file from the storage area.
-
-
-
Method Detail
-
getSelf
protected long getSelf()
Return the C object that is associated with this Java wrapper.- Returns:
- Pointer to the C object.
-
create
public void create(java.lang.String uuid, byte[] content, long size, ContentType type)
Create a file inside the storage area. This function creates a new file inside the storage area that is currently used by Orthanc. Warning: This function will result in a "not implemented" error on versions of the Orthanc core above 1.12.6.- Parameters:
uuid
- The identifier of the file to be created.content
- The content to store in the newly created file.size
- The size of the content.type
- The type of the file content.
-
read
public byte[] read(java.lang.String uuid, ContentType type)
Read a file from the storage area. This function reads the content of a given file from the storage area that is currently used by Orthanc. Warning: This function will result in a "not implemented" error on versions of the Orthanc core above 1.12.6.- Parameters:
uuid
- The identifier of the file to be read.type
- The type of the file content.- Returns:
- The resulting memory buffer.
-
remove
public void remove(java.lang.String uuid, ContentType type)
Remove a file from the storage area. This function removes a given file from the storage area that is currently used by Orthanc. Warning: This function will result in a "not implemented" error on versions of the Orthanc core above 1.12.6.- Parameters:
uuid
- The identifier of the file to be removed.type
- The type of the file content.
-
reconstructMainDicomTags
public void reconstructMainDicomTags(ResourceType level)
Reconstruct the main DICOM tags. This function requests the Orthanc core to reconstruct the main DICOM tags of all the resources of the given type. This function can only be used as a part of the upgrade of a custom database back-end. A database transaction will be automatically setup.- Parameters:
level
- The type of the resources of interest.
-
-