olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [1/2] olingo-odata4 git commit: [OLINGO-562] Initial contribution from Thierry
Date Mon, 15 Jun 2015 07:26:16 GMT
Repository: olingo-odata4
Updated Branches:
  refs/heads/OLINGO-562_SpringExtension [created] f4a1f4345


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f4a1f434/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-beans.xml
----------------------------------------------------------------------
diff --git a/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-beans.xml
b/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-beans.xml
new file mode 100644
index 0000000..3bebfed
--- /dev/null
+++ b/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-beans.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:olingo="http://olingo.apache.org/schema/spring-olingo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/spring-olingo
+                http://olingo.apache.org/schema/olingo/spring-olingo.xsd">
+
+	<!-- bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+		<property name="customEditors">
+			<map>
+				<entry key="org.apache.olingo.commons.api.edm.FullQualifiedName"
+					value="org.apache.olingo.ext.spring.editor.FullQualifiedNameEditor" />
+			</map>
+		</property>
+	</bean-->
+
+	<bean id="edmProvider" class="org.apache.olingo.ext.spring.edm.GenericEdmProvider">
+		<property name="schemas">
+			<list>
+				<bean class="org.apache.olingo.server.api.edm.provider.Schema">
+					<property name="namespace" value="test" />
+					<property name="entityContainer">
+						<bean class="org.apache.olingo.server.api.edm.provider.EntityContainer">
+							<property name="entitySets">
+								<list>
+									<bean class="org.apache.olingo.server.api.edm.provider.EntitySet">
+										<property name="name" value="sources1" />
+										<property name="type">
+											<bean class="org.apache.olingo.commons.api.edm.FullQualifiedName">
+												<constructor-arg value="ns.sources1"/>
+											</bean>
+										</property>
+									</bean>
+								</list>
+							</property>
+						</bean>
+					</property>
+					<property name="entityTypes">
+						<list>
+							<bean class="org.apache.olingo.server.api.edm.provider.EntityType">
+								<property name="name" value="sources1" />
+								<property name="key">
+									<list>
+										<bean class="org.apache.olingo.server.api.edm.provider.PropertyRef">
+											<property name="propertyName" value="field1" />
+										</bean>
+									</list>
+								</property>
+								<property name="properties">
+									<list>
+										<bean class="org.apache.olingo.server.api.edm.provider.Property">
+											<property name="name" value="field1" />
+											<property name="type" value="Edm.String" />
+										</bean>
+									</list>
+								</property>
+							</bean>
+						</list>
+					</property>
+				</bean>
+			</list>
+		</property>
+	</bean>
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f4a1f434/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-namespace.xml
----------------------------------------------------------------------
diff --git a/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-namespace.xml
b/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-namespace.xml
new file mode 100644
index 0000000..32f86b1
--- /dev/null
+++ b/ext/olingo-ext-spring/src/test/resources/applicationContext-edm-provider-namespace.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:olingo="http://olingo.apache.org/schema/olingo/spring-olingo"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo/spring-olingo
+                http://olingo.apache.org/schema/olingo/spring-olingo.xsd">
+
+	<olingo:edm-provider id="edmProvider">
+		<olingo:schema namespace="test" alias="">
+			<olingo:entityContainer>
+				<olingo:entitySet name="sources1" type="sources1"/>
+			</olingo:entityContainer>
+			<!-- EnumType -->
+			<!-- getTypeDefinition -->
+			<olingo:entityType name="sources1">
+				<olingo:key property-name="field1"/>
+
+				<olingo:property name="field1" type="Edm.String"/>
+				<olingo:property name="field2" type="Edm.Int32"/>
+				<olingo:property name="field3" type="Edm.Int64"/>
+				<olingo:property name="field4" type="Edm.Double"/>
+				<olingo:property name="field5" type="Edm.Double"/>
+				<olingo:property name="field6" type="Edm.Boolean"/>
+			</olingo:entityType>
+
+<!-- 			<edm:complexType name="test"> -->
+<!-- 			</edm:complexType> -->
+
+			<!-- getActions -->
+			<!-- getFunctions -->
+			<!-- getTerm -->
+			<!-- getEntitySet -->
+			<!-- getSingleton -->
+			<!-- getActionImport -->
+			<!-- getFunctionImport -->
+			<!-- getEntityContainerInfo -->
+			<!-- getAliasInfos -->
+			<!-- getSchemas -->
+			<!-- getEntityContainer -->
+		</olingo:schema>
+	</olingo:edm-provider>
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f4a1f434/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-beans.xml
----------------------------------------------------------------------
diff --git a/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-beans.xml
b/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-beans.xml
new file mode 100644
index 0000000..a33d539
--- /dev/null
+++ b/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-beans.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:olingo="http://olingo.apache.org/schema/spring-olingo"
+	xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/spring-olingo
+                http://olingo.apache.org/schema/olingo/spring-olingo.xsd">
+
+	<bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
+		<property name="customEditors">
+			<map>
+				<entry key="org.apache.olingo.commons.api.edm.FullQualifiedName"
+					value="org.apache.olingo.ext.spring.editor.FullQualifiedNameEditor" />
+			</map>
+		</property>
+	</bean>
+
+	<bean id="odata" class="org.apache.olingo.ext.spring.factory.ODataFactoryBean" />
+
+	<bean id="httpHandler"
+		class="org.apache.olingo.ext.spring.factory.ODataHttpHandlerFactoryBean">
+		<property name="odata" ref="odata" />
+		<property name="serviceMetadata">
+			<bean class="org.apache.olingo.ext.spring.factory.ServiceMetadataFactoryBean">
+				<property name="odata" ref="odata" />
+				<property name="edmProvider" ref="edmProvider" />
+				<property name="references">
+					<list>
+						<bean class="org.apache.olingo.ext.spring.factory.EdmxReferenceFactoryBean">
+							<property name="uri"
+								value="../v4.0/cs02/vocabularies/Org.OData.Core.V1.xml" />
+							<property name="includes">
+								<map>
+									<entry key="Org.OData.Core.V1" value="Core" />
+								</map>
+							</property>
+						</bean>
+					</list>
+				</property>
+			</bean>
+		</property>
+		<property name="processors">
+			<list>
+				<ref bean="testProcessor" />
+			</list>
+		</property>
+	</bean>
+
+	<bean id="edmProvider" class="org.apache.olingo.ext.spring.edm.GenericEdmProvider" />
+
+	<bean id="testProcessor" class="org.apache.olingo.ext.spring.config.TestProcessor" />
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f4a1f434/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-namespace.xml
----------------------------------------------------------------------
diff --git a/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-namespace.xml
b/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-namespace.xml
new file mode 100644
index 0000000..4e9de08
--- /dev/null
+++ b/ext/olingo-ext-spring/src/test/resources/applicationContext-http-handler-namespace.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:olingo="http://olingo.apache.org/schema/olingo/spring-olingo"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo/spring-olingo
+                http://olingo.apache.org/schema/olingo/spring-olingo.xsd">
+
+	<olingo:http-handler id="httpHandler" edm-provider="edmProvider">
+		<olingo:reference uri="../v4.0/cs02/vocabularies/Org.OData.Core.V1.xml">
+			<olingo:include key="Org.OData.Core.V1" value="Core"/>
+		</olingo:reference>
+		<olingo:processor ref="testProcessor"/>
+	</olingo:http-handler>
+
+	<bean id="edmProvider" class="org.apache.olingo.ext.spring.edm.GenericEdmProvider" />
+
+	<bean id="testProcessor" class="org.apache.olingo.ext.spring.config.TestProcessor" />
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f4a1f434/ext/olingo-ext-spring/src/test/resources/applicationContext-namespace.xml
----------------------------------------------------------------------
diff --git a/ext/olingo-ext-spring/src/test/resources/applicationContext-namespace.xml b/ext/olingo-ext-spring/src/test/resources/applicationContext-namespace.xml
new file mode 100644
index 0000000..73579b4
--- /dev/null
+++ b/ext/olingo-ext-spring/src/test/resources/applicationContext-namespace.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:olingo="http://olingo.apache.org/schema/olingo/spring-olingo"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                http://www.springframework.org/schema/beans/spring-beans.xsd
+            http://olingo.apache.org/schema/olingo/spring-olingo
+                http://olingo.apache.org/schema/olingo/spring-olingo.xsd">
+
+	<olingo:http-handler id="httpHandler" edm-provider="edmProvider">
+		<olingo:reference uri="../v4.0/cs02/vocabularies/Org.OData.Core.V1.xml">
+			<olingo:include key="Org.OData.Core.V1" value="Core"/>
+		</olingo:reference>
+		<olingo:processor ref="testProcessor"/>
+	</olingo:http-handler>
+
+	<olingo:edm-provider id="edmProvider">
+		<olingo:schema namespace="test" alias="">
+			<olingo:entityContainer>
+				<olingo:entitySet name="sources1" type="sources1"/>
+			</olingo:entityContainer>
+			<!-- EnumType -->
+			<!-- getTypeDefinition -->
+			<olingo:entityType name="sources1">
+				<olingo:key property-name="field1"/>
+
+				<olingo:property name="field1" type="Edm.String"/>
+				<olingo:property name="field2" type="Edm.Int32"/>
+				<olingo:property name="field3" type="Edm.Int64"/>
+				<olingo:property name="field4" type="Edm.Double"/>
+				<olingo:property name="field5" type="Edm.Double"/>
+				<olingo:property name="field6" type="Edm.Boolean"/>
+			</olingo:entityType>
+		</olingo:schema>
+	</olingo:edm-provider>
+
+	<bean id="testProcessor" class="org.apache.olingo.ext.spring.config.TestProcessor" />
+</beans>
\ No newline at end of file


Mime
View raw message