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)
-
- (Object) association
Applies only to navigation properties; the association corresponding to the property.
-
- (Object) fc_keep_in_content
readonly
Should the property appear in both the mapped schema path and the properties collection.
-
- (Object) fc_target_path
readonly
Feed customization target path.
-
- (Object) name
readonly
The property name.
-
- (Object) nav_prop
readonly
Is the property a navigation property?.
-
- (Object) nullable
readonly
Is the property nullable?.
-
- (Object) type
readonly
The property EDM type.
Instance Method Summary (collapse)
-
- (PropertyMetadata) initialize(property_element)
constructor
Creates a new instance of the Class Property class.
Constructor Details
- (PropertyMetadata) initialize(property_element)
Creates a new instance of the Class Property class
23 24 25 26 27 28 29 30 31 |
# File 'lib/ruby_odata/property_metadata.rb', line 23 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
- (Object) association
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 |
- (Object) fc_keep_in_content (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 |
- (Object) fc_target_path (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 |
- (Object) name (readonly)
The property name
5 6 7 |
# File 'lib/ruby_odata/property_metadata.rb', line 5 def name @name end |
- (Object) nav_prop (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 |
- (Object) nullable (readonly)
Is the property nullable?
9 10 11 |
# File 'lib/ruby_odata/property_metadata.rb', line 9 def nullable @nullable end |
- (Object) type (readonly)
The property EDM type
7 8 9 |
# File 'lib/ruby_odata/property_metadata.rb', line 7 def type @type end |