You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by sk...@apache.org on 2013/12/03 12:51:43 UTC

svn commit: r1547350 - /incubator/olingo/site/trunk/content/doc/tutorials/Olingo_Tutorial_BasicRead_EDM.mdtext

Author: sklevenz
Date: Tue Dec  3 11:51:43 2013
New Revision: 1547350

URL: http://svn.apache.org/r1547350
Log:
CMS commit to olingo by sklevenz

Added:
    incubator/olingo/site/trunk/content/doc/tutorials/Olingo_Tutorial_BasicRead_EDM.mdtext   (with props)

Added: incubator/olingo/site/trunk/content/doc/tutorials/Olingo_Tutorial_BasicRead_EDM.mdtext
URL: http://svn.apache.org/viewvc/incubator/olingo/site/trunk/content/doc/tutorials/Olingo_Tutorial_BasicRead_EDM.mdtext?rev=1547350&view=auto
==============================================================================
--- incubator/olingo/site/trunk/content/doc/tutorials/Olingo_Tutorial_BasicRead_EDM.mdtext (added)
+++ incubator/olingo/site/trunk/content/doc/tutorials/Olingo_Tutorial_BasicRead_EDM.mdtext Tue Dec  3 11:51:43 2013
@@ -0,0 +1,40 @@
+Title:
+Notice:    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.
+
+# How to use EDMX source as EDM Provider within an OData Service 
+
+
+## How To Guide for the using an EDM Parser
+
+The EDM Parser is designed to parse the metadata document.
+To make the parser accessible from the API, we have to implement the method readMetadata from interface com.sap.core.odata.api.ep.EntityProviderInterface:
+
+     @Override
+     public Edm readMetadata(final InputStream inputStream, final boolean validate) throws EntityProviderException {
+       EdmProvider provider = new EdmxProvider().parse(inputStream, validate);
+       return new EdmImplProv(provider);
+      }
+
+The signature contains the InputStream that represents a data stream read from a file and flag validate. If validate is set to true, the structure of the metadata will be checked according to the CSDL after parsing. For example: it will be validated that each EntityType defines a key element or derives from a BaseType that for its part defines a key.
+
+To start the parsing we have to follow the next steps:
+
+- create an object of the class EdmxProvider. This class derives from EdmProvider and provides implementations for all of its abstract methods 
+- invoke the method parse(InputStream, boolean) of this object 
+
+Returned is an EDM object that contains the complete information from parsed metadata.
\ No newline at end of file

Propchange: incubator/olingo/site/trunk/content/doc/tutorials/Olingo_Tutorial_BasicRead_EDM.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native