odata 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,12 +5,15 @@ module OData
5
5
  ::OData::Railtie.setup_service_registry!
6
6
  end
7
7
 
8
+ # Looks for config/odata.yml and loads the configuration.
8
9
  def self.load_configuration!
9
- # load environment config from config/odata.yml
10
+ # TODO Implement Rails configuration loading
10
11
  end
11
12
 
13
+ # Examines the loaded configuration and populates the
14
+ # OData::ServiceRegistry accordingly.
12
15
  def self.setup_service_registry!
13
- # use configuration to setup registry of OData::Services
16
+ # TODO Populate OData::ServiceRegistry based on configuration
14
17
  end
15
18
  end
16
19
  end
@@ -32,8 +32,18 @@ module OData
32
32
  end
33
33
 
34
34
  # Returns a list of entities exposed by the service
35
- def entities
36
- @entities ||= metadata.xpath('//EntityType').collect {|entity| entity.attributes['Name'].value}
35
+ def entity_types
36
+ @entity_types ||= metadata.xpath('//EntityType').collect {|entity| entity.attributes['Name'].value}
37
+ end
38
+
39
+ # Returns a hash of EntitySet names keyed to their respective EntityType name
40
+ def entity_sets
41
+ @entity_sets ||= metadata.xpath('//EntityContainer/EntitySet').collect {|entity|
42
+ [
43
+ entity.attributes['EntityType'].value.gsub("#{namespace}.", ''),
44
+ entity.attributes['Name'].value
45
+ ]
46
+ }.to_h
37
47
  end
38
48
 
39
49
  # Returns a list of ComplexTypes used by the service
@@ -69,6 +79,53 @@ module OData
69
79
  feed.xpath('//entry').collect {|entry| parse_model_from_feed(model, entry)}
70
80
  end
71
81
 
82
+ # Retrieves the EntitySet associated with a specific EntityType by name
83
+ #
84
+ # @param entity_type_name [to_s] the name of the EntityType you want the EntitySet of
85
+ # @return [OData::EntitySet] an OData::EntitySet to query
86
+ def [](entity_type_name)
87
+ xpath_query = "//EntityContainer/EntitySet[@EntityType='#{namespace}.#{entity_type_name}']"
88
+ entity_set_node = metadata.xpath(xpath_query).first
89
+ set_name = entity_set_node.attributes['Name'].value
90
+ container_name = entity_set_node.parent.attributes['Name'].value
91
+ OData::EntitySet.new(name: set_name, namespace: namespace, type: entity_type_name.to_s, container: container_name)
92
+ end
93
+
94
+ def execute(url_chunk, additional_options = {})
95
+ request = ::Typhoeus::Request.new(
96
+ "#{service_url}/#{url_chunk}",
97
+ options[:typhoeus].merge({
98
+ method: :get
99
+ }).merge(additional_options)
100
+ )
101
+ request.run
102
+ request.response
103
+ end
104
+
105
+ def find_node(results, node_name)
106
+ document = ::Nokogiri::XML(results.body)
107
+ document.remove_namespaces!
108
+ document.xpath("//#{node_name}").first
109
+ end
110
+
111
+ def find_entities(results)
112
+ document = ::Nokogiri::XML(results.body)
113
+ document.remove_namespaces!
114
+ document.xpath('//entry')
115
+ end
116
+
117
+ def get_property_type(entity_name, property_name)
118
+ metadata.xpath("//EntityType[@Name='#{entity_name}']/Property[@Name='#{property_name}']").first.attributes['Type'].value
119
+ end
120
+
121
+ def get_title_property_name(entity_name)
122
+ metadata.xpath("//EntityType[@Name='#{entity_name}']/Property[@FC_TargetPath='SyndicationTitle']").first.attributes['Name'].value
123
+ end
124
+
125
+ def get_summary_property_name(entity_name)
126
+ metadata.xpath("//EntityType[@Name='#{entity_name}']/Property[@FC_TargetPath='SyndicationSummary']").first.attributes['Name'].value
127
+ end
128
+
72
129
  private
73
130
 
74
131
  def default_options
@@ -1,3 +1,3 @@
1
1
  module OData
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'rspec', '~> 3.0.0'
26
26
  spec.add_development_dependency 'webmock', '~> 1.18.0'
27
27
 
28
+ spec.add_dependency 'backports', '~> 3.6.0'
28
29
  spec.add_dependency 'nokogiri', '~> 1.6.2'
29
30
  spec.add_dependency 'activesupport', '>= 3.0.0'
30
31
  spec.add_dependency 'typhoeus', '~> 0.6.8'
@@ -0,0 +1,171 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xml:base="http://services.odata.org/OData/OData.svc/" xmlns="http://www.w3.org/2005/Atom"
3
+ xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
4
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
5
+ xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
6
+ <m:count>11</m:count>
7
+ <id>http://services.odata.org/OData/OData.svc/Products</id>
8
+ <title type="text">Products</title>
9
+ <updated>2014-06-30T17:30:22Z</updated>
10
+ <link rel="self" title="Products" href="Products"/>
11
+ <entry>
12
+ <id>http://services.odata.org/OData/OData.svc/Products(0)</id>
13
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
14
+ <link rel="edit" title="Product" href="Products(0)"/>
15
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
16
+ type="application/atom+xml;type=feed" title="Categories" href="Products(0)/Categories"/>
17
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
18
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(0)/Supplier"/>
19
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
20
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(0)/ProductDetail"/>
21
+ <title type="text">Bread</title>
22
+ <summary type="text">Whole grain bread</summary>
23
+ <updated>2014-06-30T17:30:22Z</updated>
24
+ <author>
25
+ <name/>
26
+ </author>
27
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
28
+ title="Categories" href="Products(0)/$links/Categories"/>
29
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
30
+ title="Supplier" href="Products(0)/$links/Supplier"/>
31
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
32
+ title="ProductDetail" href="Products(0)/$links/ProductDetail"/>
33
+ <content type="application/xml">
34
+ <m:properties>
35
+ <d:ID m:type="Edm.Int32">0</d:ID>
36
+ <d:ReleaseDate m:type="Edm.DateTime">1992-01-01T00:00:00</d:ReleaseDate>
37
+ <d:DiscontinuedDate m:null="true"/>
38
+ <d:Rating m:type="Edm.Int16">4</d:Rating>
39
+ <d:Price m:type="Edm.Double">2.5</d:Price>
40
+ </m:properties>
41
+ </content>
42
+ </entry>
43
+ <entry>
44
+ <id>http://services.odata.org/OData/OData.svc/Products(1)</id>
45
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
46
+ <link rel="edit" title="Product" href="Products(1)"/>
47
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
48
+ type="application/atom+xml;type=feed" title="Categories" href="Products(1)/Categories"/>
49
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
50
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(1)/Supplier"/>
51
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
52
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(1)/ProductDetail"/>
53
+ <title type="text">Milk</title>
54
+ <summary type="text">Low fat milk</summary>
55
+ <updated>2014-06-30T17:30:22Z</updated>
56
+ <author>
57
+ <name/>
58
+ </author>
59
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
60
+ title="Categories" href="Products(1)/$links/Categories"/>
61
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
62
+ title="Supplier" href="Products(1)/$links/Supplier"/>
63
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
64
+ title="ProductDetail" href="Products(1)/$links/ProductDetail"/>
65
+ <content type="application/xml">
66
+ <m:properties>
67
+ <d:ID m:type="Edm.Int32">1</d:ID>
68
+ <d:ReleaseDate m:type="Edm.DateTime">1995-10-01T00:00:00</d:ReleaseDate>
69
+ <d:DiscontinuedDate m:null="true"/>
70
+ <d:Rating m:type="Edm.Int16">3</d:Rating>
71
+ <d:Price m:type="Edm.Double">3.5</d:Price>
72
+ </m:properties>
73
+ </content>
74
+ </entry>
75
+ <entry>
76
+ <id>http://services.odata.org/OData/OData.svc/Products(2)</id>
77
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
78
+ <link rel="edit" title="Product" href="Products(2)"/>
79
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
80
+ type="application/atom+xml;type=feed" title="Categories" href="Products(2)/Categories"/>
81
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
82
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(2)/Supplier"/>
83
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
84
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(2)/ProductDetail"/>
85
+ <title type="text">Vint soda</title>
86
+ <summary type="text">Americana Variety - Mix of 6 flavors</summary>
87
+ <updated>2014-06-30T17:30:22Z</updated>
88
+ <author>
89
+ <name/>
90
+ </author>
91
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
92
+ title="Categories" href="Products(2)/$links/Categories"/>
93
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
94
+ title="Supplier" href="Products(2)/$links/Supplier"/>
95
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
96
+ title="ProductDetail" href="Products(2)/$links/ProductDetail"/>
97
+ <content type="application/xml">
98
+ <m:properties>
99
+ <d:ID m:type="Edm.Int32">2</d:ID>
100
+ <d:ReleaseDate m:type="Edm.DateTime">2000-10-01T00:00:00</d:ReleaseDate>
101
+ <d:DiscontinuedDate m:null="true"/>
102
+ <d:Rating m:type="Edm.Int16">3</d:Rating>
103
+ <d:Price m:type="Edm.Double">20.9</d:Price>
104
+ </m:properties>
105
+ </content>
106
+ </entry>
107
+ <entry>
108
+ <id>http://services.odata.org/OData/OData.svc/Products(3)</id>
109
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
110
+ <link rel="edit" title="Product" href="Products(3)"/>
111
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
112
+ type="application/atom+xml;type=feed" title="Categories" href="Products(3)/Categories"/>
113
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
114
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(3)/Supplier"/>
115
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
116
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(3)/ProductDetail"/>
117
+ <title type="text">Havina Cola</title>
118
+ <summary type="text">The Original Key Lime Cola</summary>
119
+ <updated>2014-06-30T17:30:22Z</updated>
120
+ <author>
121
+ <name/>
122
+ </author>
123
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
124
+ title="Categories" href="Products(3)/$links/Categories"/>
125
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
126
+ title="Supplier" href="Products(3)/$links/Supplier"/>
127
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
128
+ title="ProductDetail" href="Products(3)/$links/ProductDetail"/>
129
+ <content type="application/xml">
130
+ <m:properties>
131
+ <d:ID m:type="Edm.Int32">3</d:ID>
132
+ <d:ReleaseDate m:type="Edm.DateTime">2005-10-01T00:00:00</d:ReleaseDate>
133
+ <d:DiscontinuedDate m:type="Edm.DateTime">2006-10-01T00:00:00</d:DiscontinuedDate>
134
+ <d:Rating m:type="Edm.Int16">3</d:Rating>
135
+ <d:Price m:type="Edm.Double">19.9</d:Price>
136
+ </m:properties>
137
+ </content>
138
+ </entry>
139
+ <entry>
140
+ <id>http://services.odata.org/OData/OData.svc/Products(4)</id>
141
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
142
+ <link rel="edit" title="Product" href="Products(4)"/>
143
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
144
+ type="application/atom+xml;type=feed" title="Categories" href="Products(4)/Categories"/>
145
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
146
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(4)/Supplier"/>
147
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
148
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(4)/ProductDetail"/>
149
+ <title type="text">Fruit Punch</title>
150
+ <summary type="text">Mango flavor, 8.3 Ounce Cans (Pack of 24)</summary>
151
+ <updated>2014-06-30T17:30:22Z</updated>
152
+ <author>
153
+ <name/>
154
+ </author>
155
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
156
+ title="Categories" href="Products(4)/$links/Categories"/>
157
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
158
+ title="Supplier" href="Products(4)/$links/Supplier"/>
159
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
160
+ title="ProductDetail" href="Products(4)/$links/ProductDetail"/>
161
+ <content type="application/xml">
162
+ <m:properties>
163
+ <d:ID m:type="Edm.Int32">4</d:ID>
164
+ <d:ReleaseDate m:type="Edm.DateTime">2003-01-05T00:00:00</d:ReleaseDate>
165
+ <d:DiscontinuedDate m:null="true"/>
166
+ <d:Rating m:type="Edm.Int16">3</d:Rating>
167
+ <d:Price m:type="Edm.Double">22.99</d:Price>
168
+ </m:properties>
169
+ </content>
170
+ </entry>
171
+ </feed>
@@ -0,0 +1,51 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xml:base="http://services.odata.org/OData/OData.svc/" xmlns="http://www.w3.org/2005/Atom"
3
+ xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
4
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
5
+ xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
6
+ <m:count>11</m:count>
7
+ <id>http://services.odata.org/OData/OData.svc/Products</id>
8
+ <title type="text">Products</title>
9
+ <updated>2014-06-30T17:31:37Z</updated>
10
+ <link rel="self" title="Products" href="Products"/>
11
+ <entry>
12
+ <id>http://services.odata.org/OData/OData.svc/Products(10)</id>
13
+ <category term="ODataDemo.FeaturedProduct" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
14
+ <link rel="edit" title="Product" href="Products(10)/ODataDemo.FeaturedProduct"/>
15
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
16
+ type="application/atom+xml;type=feed" title="Categories"
17
+ href="Products(10)/ODataDemo.FeaturedProduct/Categories"/>
18
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
19
+ type="application/atom+xml;type=entry" title="Supplier"
20
+ href="Products(10)/ODataDemo.FeaturedProduct/Supplier"/>
21
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
22
+ type="application/atom+xml;type=entry" title="ProductDetail"
23
+ href="Products(10)/ODataDemo.FeaturedProduct/ProductDetail"/>
24
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Advertisement"
25
+ type="application/atom+xml;type=entry" title="Advertisement"
26
+ href="Products(10)/ODataDemo.FeaturedProduct/Advertisement"/>
27
+ <title type="text">Coffee</title>
28
+ <summary type="text">Bulk size can of instant coffee</summary>
29
+ <updated>2014-06-30T17:31:37Z</updated>
30
+ <author>
31
+ <name/>
32
+ </author>
33
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
34
+ title="Categories" href="Products(10)/ODataDemo.FeaturedProduct/$links/Categories"/>
35
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
36
+ title="Supplier" href="Products(10)/ODataDemo.FeaturedProduct/$links/Supplier"/>
37
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
38
+ title="ProductDetail" href="Products(10)/ODataDemo.FeaturedProduct/$links/ProductDetail"/>
39
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Advertisement" type="application/xml"
40
+ title="Advertisement" href="Products(10)/ODataDemo.FeaturedProduct/$links/Advertisement"/>
41
+ <content type="application/xml">
42
+ <m:properties>
43
+ <d:ID m:type="Edm.Int32">10</d:ID>
44
+ <d:ReleaseDate m:type="Edm.DateTime">1982-12-31T00:00:00</d:ReleaseDate>
45
+ <d:DiscontinuedDate m:null="true"/>
46
+ <d:Rating m:type="Edm.Int16">1</d:Rating>
47
+ <d:Price m:type="Edm.Double">6.99</d:Price>
48
+ </m:properties>
49
+ </content>
50
+ </entry>
51
+ </feed>
@@ -0,0 +1,179 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <feed xml:base="http://services.odata.org/OData/OData.svc/" xmlns="http://www.w3.org/2005/Atom"
3
+ xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
4
+ xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
5
+ xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
6
+ <m:count>11</m:count>
7
+ <id>http://services.odata.org/OData/OData.svc/Products</id>
8
+ <title type="text">Products</title>
9
+ <updated>2014-06-30T17:31:21Z</updated>
10
+ <link rel="self" title="Products" href="Products"/>
11
+ <entry>
12
+ <id>http://services.odata.org/OData/OData.svc/Products(5)</id>
13
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
14
+ <link rel="edit" title="Product" href="Products(5)"/>
15
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
16
+ type="application/atom+xml;type=feed" title="Categories" href="Products(5)/Categories"/>
17
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
18
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(5)/Supplier"/>
19
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
20
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(5)/ProductDetail"/>
21
+ <title type="text">Cranberry Juice</title>
22
+ <summary type="text">16-Ounce Plastic Bottles (Pack of 12)</summary>
23
+ <updated>2014-06-30T17:31:21Z</updated>
24
+ <author>
25
+ <name/>
26
+ </author>
27
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
28
+ title="Categories" href="Products(5)/$links/Categories"/>
29
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
30
+ title="Supplier" href="Products(5)/$links/Supplier"/>
31
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
32
+ title="ProductDetail" href="Products(5)/$links/ProductDetail"/>
33
+ <content type="application/xml">
34
+ <m:properties>
35
+ <d:ID m:type="Edm.Int32">5</d:ID>
36
+ <d:ReleaseDate m:type="Edm.DateTime">2006-08-04T00:00:00</d:ReleaseDate>
37
+ <d:DiscontinuedDate m:null="true"/>
38
+ <d:Rating m:type="Edm.Int16">3</d:Rating>
39
+ <d:Price m:type="Edm.Double">22.8</d:Price>
40
+ </m:properties>
41
+ </content>
42
+ </entry>
43
+ <entry>
44
+ <id>http://services.odata.org/OData/OData.svc/Products(6)</id>
45
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
46
+ <link rel="edit" title="Product" href="Products(6)"/>
47
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
48
+ type="application/atom+xml;type=feed" title="Categories" href="Products(6)/Categories"/>
49
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
50
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(6)/Supplier"/>
51
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
52
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(6)/ProductDetail"/>
53
+ <title type="text">Pink Lemonade</title>
54
+ <summary type="text">36 Ounce Cans (Pack of 3)</summary>
55
+ <updated>2014-06-30T17:31:21Z</updated>
56
+ <author>
57
+ <name/>
58
+ </author>
59
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
60
+ title="Categories" href="Products(6)/$links/Categories"/>
61
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
62
+ title="Supplier" href="Products(6)/$links/Supplier"/>
63
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
64
+ title="ProductDetail" href="Products(6)/$links/ProductDetail"/>
65
+ <content type="application/xml">
66
+ <m:properties>
67
+ <d:ID m:type="Edm.Int32">6</d:ID>
68
+ <d:ReleaseDate m:type="Edm.DateTime">2006-11-05T00:00:00</d:ReleaseDate>
69
+ <d:DiscontinuedDate m:null="true"/>
70
+ <d:Rating m:type="Edm.Int16">3</d:Rating>
71
+ <d:Price m:type="Edm.Double">18.8</d:Price>
72
+ </m:properties>
73
+ </content>
74
+ </entry>
75
+ <entry>
76
+ <id>http://services.odata.org/OData/OData.svc/Products(7)</id>
77
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
78
+ <link rel="edit" title="Product" href="Products(7)"/>
79
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
80
+ type="application/atom+xml;type=feed" title="Categories" href="Products(7)/Categories"/>
81
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
82
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(7)/Supplier"/>
83
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
84
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(7)/ProductDetail"/>
85
+ <title type="text">DVD Player</title>
86
+ <summary type="text">1080P Upconversion DVD Player</summary>
87
+ <updated>2014-06-30T17:31:21Z</updated>
88
+ <author>
89
+ <name/>
90
+ </author>
91
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
92
+ title="Categories" href="Products(7)/$links/Categories"/>
93
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
94
+ title="Supplier" href="Products(7)/$links/Supplier"/>
95
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
96
+ title="ProductDetail" href="Products(7)/$links/ProductDetail"/>
97
+ <content type="application/xml">
98
+ <m:properties>
99
+ <d:ID m:type="Edm.Int32">7</d:ID>
100
+ <d:ReleaseDate m:type="Edm.DateTime">2006-11-15T00:00:00</d:ReleaseDate>
101
+ <d:DiscontinuedDate m:null="true"/>
102
+ <d:Rating m:type="Edm.Int16">5</d:Rating>
103
+ <d:Price m:type="Edm.Double">35.88</d:Price>
104
+ </m:properties>
105
+ </content>
106
+ </entry>
107
+ <entry>
108
+ <id>http://services.odata.org/OData/OData.svc/Products(8)</id>
109
+ <category term="ODataDemo.Product" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
110
+ <link rel="edit" title="Product" href="Products(8)"/>
111
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
112
+ type="application/atom+xml;type=feed" title="Categories" href="Products(8)/Categories"/>
113
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
114
+ type="application/atom+xml;type=entry" title="Supplier" href="Products(8)/Supplier"/>
115
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
116
+ type="application/atom+xml;type=entry" title="ProductDetail" href="Products(8)/ProductDetail"/>
117
+ <title type="text">LCD HDTV</title>
118
+ <summary type="text">42 inch 1080p LCD with Built-in Blu-ray Disc Player</summary>
119
+ <updated>2014-06-30T17:31:21Z</updated>
120
+ <author>
121
+ <name/>
122
+ </author>
123
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
124
+ title="Categories" href="Products(8)/$links/Categories"/>
125
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
126
+ title="Supplier" href="Products(8)/$links/Supplier"/>
127
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
128
+ title="ProductDetail" href="Products(8)/$links/ProductDetail"/>
129
+ <content type="application/xml">
130
+ <m:properties>
131
+ <d:ID m:type="Edm.Int32">8</d:ID>
132
+ <d:ReleaseDate m:type="Edm.DateTime">2008-05-08T00:00:00</d:ReleaseDate>
133
+ <d:DiscontinuedDate m:null="true"/>
134
+ <d:Rating m:type="Edm.Int16">3</d:Rating>
135
+ <d:Price m:type="Edm.Double">1088.8</d:Price>
136
+ </m:properties>
137
+ </content>
138
+ </entry>
139
+ <entry>
140
+ <id>http://services.odata.org/OData/OData.svc/Products(9)</id>
141
+ <category term="ODataDemo.FeaturedProduct" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
142
+ <link rel="edit" title="Product" href="Products(9)/ODataDemo.FeaturedProduct"/>
143
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Categories"
144
+ type="application/atom+xml;type=feed" title="Categories"
145
+ href="Products(9)/ODataDemo.FeaturedProduct/Categories"/>
146
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Supplier"
147
+ type="application/atom+xml;type=entry" title="Supplier"
148
+ href="Products(9)/ODataDemo.FeaturedProduct/Supplier"/>
149
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ProductDetail"
150
+ type="application/atom+xml;type=entry" title="ProductDetail"
151
+ href="Products(9)/ODataDemo.FeaturedProduct/ProductDetail"/>
152
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Advertisement"
153
+ type="application/atom+xml;type=entry" title="Advertisement"
154
+ href="Products(9)/ODataDemo.FeaturedProduct/Advertisement"/>
155
+ <title type="text">Lemonade</title>
156
+ <summary type="text">Classic, refreshing lemonade (Single bottle)</summary>
157
+ <updated>2014-06-30T17:31:21Z</updated>
158
+ <author>
159
+ <name/>
160
+ </author>
161
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Categories" type="application/xml"
162
+ title="Categories" href="Products(9)/ODataDemo.FeaturedProduct/$links/Categories"/>
163
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Supplier" type="application/xml"
164
+ title="Supplier" href="Products(9)/ODataDemo.FeaturedProduct/$links/Supplier"/>
165
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/ProductDetail" type="application/xml"
166
+ title="ProductDetail" href="Products(9)/ODataDemo.FeaturedProduct/$links/ProductDetail"/>
167
+ <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/Advertisement" type="application/xml"
168
+ title="Advertisement" href="Products(9)/ODataDemo.FeaturedProduct/$links/Advertisement"/>
169
+ <content type="application/xml">
170
+ <m:properties>
171
+ <d:ID m:type="Edm.Int32">9</d:ID>
172
+ <d:ReleaseDate m:type="Edm.DateTime">1970-01-01T00:00:00</d:ReleaseDate>
173
+ <d:DiscontinuedDate m:null="true"/>
174
+ <d:Rating m:type="Edm.Int16">7</d:Rating>
175
+ <d:Price m:type="Edm.Double">1.01</d:Price>
176
+ </m:properties>
177
+ </content>
178
+ </entry>
179
+ </feed>