---
title: Image
summary: API reference for Image.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Domain
reference_type: package
---

# Image

`Image` is the abstract base every imaged-document wrapper in the domain derives from ([OP-DOM-20](../../operations-processes.md#op-dom-20)), providing the shared `Id` and IFN-URL-building behaviour needed to link back to the imaging system, plus the static translation between the imaging system's numeric document-set (`ifnDs`) codes and their human-readable production/development identifiers ([DOM-BR-210](../../business-rules.md#dom-br-210-image-conversion)).

## Purpose
- Builds the `IFN:` display URL for a wrapped image by resolving its image system and mapping the system's `ifnDs` value to a readable identifier, returning an empty string when no image system is found.
- Translates known `ifnDs` values between their numeric form and their `"387/4"`/`"388/2"` string form (production and development document sets respectively), returning an empty/zero value for any unrecognized input ([DOM-BR-210](../../business-rules.md#dom-br-210-image-conversion)).

## Context
- Namespace: `SAIF.Domain.Model.Imaging`
- Assembly/package: `SAIF.Domain` (packaged in `SAIF.SAIFCode.Core`)
- This is an abstract class; both constructors are `protected` and only usable by derived types, so it has no public constructors of its own.

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| Id | `public long Id { get; }` | The wrapped image's identifier. |
| IfnUrl | `public string IfnUrl { get; }` | The display string `"IFN: {ifnDs}-{ifnId}"` for the wrapped image's image system, or an empty string when the image has no associated image system. |
| ConvertIfnDs (long overload) | `public static string ConvertIfnDs(long ifnDs)` | Maps a numeric `ifnDs` value to its readable form (`"387/4"` for the production value, `"388/2"` for the development value); an empty string for any other value ([DOM-BR-210](../../business-rules.md#dom-br-210-image-conversion)). |
| ConvertIfnDs (string overload) | `public static long ConvertIfnDs(string ifnDs)` | Maps the readable form (`"387/4"` or `"388/2"`) back to its numeric value; `0` for any other value ([DOM-BR-210](../../business-rules.md#dom-br-210-image-conversion)). |

## Inherited public members

Members in this section are inherited from `DomainBase<TItem>` in `SAIF.Domain`. They are available on this type through inheritance (via the intermediate `DomainRepositoryBase<TItem>` base).

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| HasData | `public virtual bool HasData { get; }` | Reports whether the wrapped image entity is present, evaluated as `!DataItem.IsNull()`. | `SAIF.Domain` — `DomainBase<TItem>` |

## Behavioral notes
- A commented-out `CreateImageAffiliation` method remains in source, suggesting affiliation-creation support was planned or removed but never completed*.
- The protected `GetAffilliatedImages` method (note the source's non-standard "Affilliated" spelling, explicitly suppressed via `CA1704`) is available to derived types but is not part of this type's public surface.

## Constraints and usage notes
- Because both constructors are `protected`, `Image` can only be instantiated through a concrete derived class; this page documents the base behaviour every such derived type inherits.
- `ConvertIfnDs` only recognizes the two hard-coded production/development document-set values; any other imaging environment's `ifnDs` value round-trips to an empty/zero result rather than throwing.

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- `Domain/SAIF.Domain/Model/Imaging/Image.cs`
- `Domain/SAIF.Domain/DomainBase.cs`
- `Domain/SAIF.Domain/DomainRepositoryBase.cs`
