Class: OData::PropertyMetadata
- Inherits:
-
Object
- Object
- OData::PropertyMetadata
- Defined in:
- lib/ruby_odata/property_metadata.rb
Overview
Internally used helper class for storing an entity property's metadata. This class shouldn't be used directly.
Instance Attribute Summary collapse
-
#association ⇒ Object
Applies only to navigation properties; the association corresponding to the property.
-
#fc_keep_in_content ⇒ Object
readonly
Should the property appear in both the mapped schema path and the properties collection.
-
#fc_target_path ⇒ Object
readonly
Feed customization target path.
-
#is_key ⇒ Object
Applies to the primary key(s).
-
#name ⇒ Object
readonly
The property name.
-
#nav_prop ⇒ Object
readonly
Is the property a navigation property?.
-
#nullable ⇒ Object
readonly
Is the property nullable?.
-
#type ⇒ Object
readonly
The property EDM type.
Instance Method Summary collapse
-
#initialize(property_element) ⇒ PropertyMetadata
constructor
Creates a new instance of the Class Property class.
Constructor Details
#initialize(property_element) ⇒ PropertyMetadata
Creates a new instance of the Class Property class
25 26 27 28 29 30 31 32 33 |
# File 'lib/ruby_odata/property_metadata.rb', line 25 def initialize(property_element) @name = property_element['Name'] @type = property_element['Type'] @nullable = ((property_element['Nullable'] && property_element['Nullable'] == "true") || property_element.name == 'NavigationProperty') || false @fc_target_path = Helpers.get_namespaced_attribute(property_element, 'FC_TargetPath', 'm') keep_in_content = Helpers.get_namespaced_attribute(property_element, 'FC_KeepInContent', 'm') @fc_keep_in_content = (keep_in_content) ? (keep_in_content == "true") : nil @nav_prop = property_element.name == 'NavigationProperty' end |
Instance Attribute Details
#association ⇒ Object
Applies only to navigation properties; the association corresponding to the property
17 18 19 |
# File 'lib/ruby_odata/property_metadata.rb', line 17 def association @association end |
#fc_keep_in_content ⇒ Object (readonly)
Should the property appear in both the mapped schema path and the properties collection
13 14 15 |
# File 'lib/ruby_odata/property_metadata.rb', line 13 def fc_keep_in_content @fc_keep_in_content end |
#fc_target_path ⇒ Object (readonly)
Feed customization target path
11 12 13 |
# File 'lib/ruby_odata/property_metadata.rb', line 11 def fc_target_path @fc_target_path end |
#is_key ⇒ Object
Applies to the primary key(s)
19 20 21 |
# File 'lib/ruby_odata/property_metadata.rb', line 19 def is_key @is_key end |
#name ⇒ Object (readonly)
The property name
5 6 7 |
# File 'lib/ruby_odata/property_metadata.rb', line 5 def name @name end |
#nav_prop ⇒ Object (readonly)
Is the property a navigation property?
15 16 17 |
# File 'lib/ruby_odata/property_metadata.rb', line 15 def nav_prop @nav_prop end |
#nullable ⇒ Object (readonly)
Is the property nullable?
9 10 11 |
# File 'lib/ruby_odata/property_metadata.rb', line 9 def nullable @nullable end |
#type ⇒ Object (readonly)
The property EDM type
7 8 9 |
# File 'lib/ruby_odata/property_metadata.rb', line 7 def type @type end |