@groovy.transform.CompileStatic class BidsEntity extends java.lang.Object
Represents a single BIDS entity (key–value pair such as sub-01 or ses-BL).
Stores the entity in its short form (e.g. "sub") regardless of whether
the long form (e.g. "subject") was supplied on construction.
Equality and hash-code are based on normalised name and sanitised value, so
"flip-02" equals "flip-2".
The static utility methods normalizeName, normalizeValue, and sanitizeValue are used throughout the grouping handlers for consistent entity comparison.
| Modifiers | Name | Description |
|---|---|---|
static java.util.List<java.lang.String> |
LONG_ENTITIES |
|
static java.util.List<java.lang.String> |
SHORT_ENTITIES |
|
static java.util.Map<java.lang.String, java.lang.String> |
SHORT_ENTITY_MAPPING |
| Constructor and description |
|---|
BidsEntity(java.lang.String name, java.lang.String value)Construct a BIDS entity. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
boolean |
equals(java.lang.Object obj) |
|
int |
hashCode() |
|
boolean |
isKnownEntity()Check if this entity name is a known BIDS entity |
|
boolean |
isValidName()Validate entity name format (alphanumeric, no special chars except underscore) |
|
boolean |
isValidValue()Validate entity value format (alphanumeric) |
|
static final boolean |
longEntityExists(java.lang.String entityName) |
|
boolean |
nameMatches(BidsEntity other) |
|
static final java.lang.String |
normalizeName(java.lang.String entityName) |
|
static final java.lang.String |
normalizeValue(java.lang.String value)Normalize entity value for comparison |
|
static final java.lang.String |
sanitizeValue(java.lang.String value) |
|
static final boolean |
shortEntityExists(java.lang.String entityName) |
|
java.lang.String |
toString() |
|
boolean |
valueMatches(BidsEntity other) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait() |
Construct a BIDS entity.
The name is normalised to its short form via normalizeName.
name or value is null or emptyname - entity key in long or short form (e.g. "subject" or "sub")value - entity value without prefix (e.g. "01")Check if this entity name is a known BIDS entity
Validate entity name format (alphanumeric, no special chars except underscore)
Validate entity value format (alphanumeric)
Normalize entity value for comparison Removes leading zeros from numeric parts: "flip-02" → "flip-2" or "02" → "2"
value - Entity value to normalizeGroovy Documentation