HedSchemaEntry¶
- class HedSchemaEntry(name, section)[source]
A single node in a HedSchema.
The structure contains all the node information including attributes and properties.
Methods
|
Constructor for HedSchemaEntry. |
Return True if attribute has property. |
|
|
Called once after loading to set internal state. |
|
Checks for the existence of an attribute in this entry. |
Attributes
- HedSchemaEntry.__init__(name, section)[source]¶
Constructor for HedSchemaEntry.
- Parameters:
name (str) – The name of the entry.
section (HedSchemaSection) – The section to which it belongs.
- HedSchemaEntry.attribute_has_property(attribute, property_name)[source]¶
Return True if attribute has property.
- Parameters:
attribute (str) – Attribute name to check for property_name.
property_name (str) – The property value to return.
- Returns:
Returns True if this entry has the property.
- Return type:
bool
- HedSchemaEntry.finalize_entry(schema)[source]¶
Called once after loading to set internal state.
- Parameters:
schema (HedSchema) – The schema that holds the rules.
- HedSchemaEntry.has_attribute(attribute, return_value=False)[source]¶
Checks for the existence of an attribute in this entry.
- Parameters:
attribute (str) – The attribute to check for.
return_value (bool) – If True, returns the actual value of the attribute. If False, returns a boolean indicating the presence of the attribute.
- Returns:
If return_value is False, returns True if the attribute exists and False otherwise. If return_value is True, returns the value of the attribute if it exists, else returns None.
- Return type:
bool or any
Notes
The existence of an attribute does not guarantee its validity.
- HedSchemaEntry.section_key¶