Core Attribute Provider
Quick Facts
| Property | Value |
|---|---|
| Class | OlpCorePythonAttributeProvider |
| Module | cenpyolpcore.OlpCorePythonAttributeProvider |
| Package | cenpyolpcore |
| Release | R2025.2.4 |
| Methods | 17 |
| Subclasses | Core Item, Core Program Component |
Inheritance
Quick Start
# Boilerplate Example
coreAttributeProvider = ... # obtained from the runtime context
result = coreAttributeProvider.GetAttributes()Method Index
| Method | Returns | Summary |
|---|---|---|
GetAttributes | list | Gets all attributes |
GetIntegerAttribute | OlpCorePythonIntegerAttribute | Gets the first integer attribute with the given name. |
GetDoubleAttribute | OlpCorePythonDoubleAttribute | Gets the first double attribute with the given name. |
GetStringAttribute | OlpCorePythonStringAttribute | Gets the first string attribute with the given name. |
GetBoolAttribute | OlpCorePythonBoolAttribute | Gets the first bool attribute with the given name. |
GetIntegerArrayAttribute | OlpCorePythonIntegerArrayAttribute | Gets the first integer array attribute with the given name. |
GetDoubleArrayAttribute | OlpCorePythonDoubleArrayAttribute | Gets the first double array attribute with the given name. |
GetStringArrayAttribute | OlpCorePythonStringArrayAttribute | Gets the first string array attribute with the given name. |
GetLiteralAttribute | OlpCorePythonLiteralAttribute | Gets the first literal attribute with the given name. |
GetInteger | int | Gets the value of the first integer attribute found with the given attribute name |
GetDouble | float | Gets the value of the first double attribute found with the given attribute name |
GetString | str | Gets the value of the first string attribute found with the given attribute name |
GetBool | bool | Gets the value of the first bool attribute found with the given attribute name |
GetIntegerArray | list | Gets the values of the first integer array attribute found with the given attribute name |
GetDoubleArray | list | Gets the values of the first double array attribute found with the given attribute name |
GetStringArray | list | Gets the values of the first string array attribute found with the given attribute name |
GetLiteral | str | Gets the value of the first literal attribute found with the given attribute name |
Query Methods
GetAttributes
def GetAttributes() -> listGets all attributes
Returns: list — Returns a list containing all attributes of this provider
GetIntegerAttribute
def GetIntegerAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonIntegerAttributeGets the first integer attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonIntegerAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetDoubleAttribute
def GetDoubleAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonDoubleAttributeGets the first double attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonDoubleAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetStringAttribute
def GetStringAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonStringAttributeGets the first string attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonStringAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetBoolAttribute
def GetBoolAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonBoolAttributeGets the first bool attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonBoolAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetIntegerArrayAttribute
def GetIntegerArrayAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonIntegerArrayAttributeGets the first integer array attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonIntegerArrayAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetDoubleArrayAttribute
def GetDoubleArrayAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonDoubleArrayAttributeGets the first double array attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonDoubleArrayAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetStringArrayAttribute
def GetStringArrayAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonStringArrayAttributeGets the first string array attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonStringArrayAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetLiteralAttribute
def GetLiteralAttribute(attributeName: str, bubbleUp: bool) -> OlpCorePythonLiteralAttributeGets the first literal attribute with the given name.
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: OlpCorePythonLiteralAttribute — returns the first attribute with the given name, None if no matching attribute was found
GetInteger
def GetInteger(attributeName: str, bubbleUp: bool) -> intGets the value of the first integer attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: int — returns the first attribute value with the given name, min() if no matching attribute was found
GetDouble
def GetDouble(attributeName: str, bubbleUp: bool) -> floatGets the value of the first double attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: float — returns the first attribute value with the given name, NaN if no matching attribute was found
GetString
def GetString(attributeName: str, bubbleUp: bool) -> strGets the value of the first string attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: str — returns the first attribute value with the given name, empty string if no matching attribute was found
GetBool
def GetBool(attributeName: str, bubbleUp: bool) -> boolGets the value of the first bool attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: bool — returns the first attribute value with the given name, False if no matching attribute was found
GetIntegerArray
def GetIntegerArray(attributeName: str, bubbleUp: bool) -> listGets the values of the first integer array attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: list — returns a list with the values of the first attribute found. If no attribute was found, the list is empty
GetDoubleArray
def GetDoubleArray(attributeName: str, bubbleUp: bool) -> listGets the values of the first double array attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: list — returns a list with the values of the first attribute found. If no attribute was found, the list is empty
GetStringArray
def GetStringArray(attributeName: str, bubbleUp: bool) -> listGets the values of the first string array attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: list — returns a list with the values of the first attribute found. If no attribute was found, the list is empty
GetLiteral
def GetLiteral(attributeName: str, bubbleUp: bool) -> strGets the value of the first literal attribute found with the given attribute name
Parameters:
| Name | Type | Description |
|---|---|---|
attributeName | str | name of the attribute |
bubbleUp | bool | bubble up the parents if possible |
Returns: str — returns the first attribute value with the given name, empty string if no matching attribute was found
Related Types
- Integer Attribute
- Double Attribute
- String Attribute
- Bool Attribute
- Integer Array Attribute
- Double Array Attribute
- String Array Attribute
- Literal Attribute
Version Notes
This class is documented as of release R2025.2.4.