| Schema |
| |
| |
| <?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 ANYKIND, either express or implied. See the License for the specific language governing permissions and limitations under the |
| License. |
| --> |
| <xs:schema attributeFormDefault="unqualified" |
| elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" |
| targetNamespace="http://www.apache.org/olingo/odata2/jpa/processor/api/model/mapping" |
| xmlns:tns="http://www.apache.org/olingo/odata2/jpa/processor/api/model/mapping"> |
| |
| <xs:element name="JPAEDMMappingModel"> |
| <xs:annotation> |
| <xs:documentation xml:lang="en"> |
| Java Persistence (JPA) - |
| Entity Data Model (EDM) Mapping schema. The schema defines a mapping model to describe EDM names for entity types, entity sets, |
| entity properties, entity navigation properties. By default the names of Java Persistence entity types, entity attributes |
| and entity relationships are transformed into their corresponding EDM names. To override the default names the mapping model |
| is defined. |
| |
| Note:- Define the mapping model for only those default names that needs to be overridden. |
| |
| </xs:documentation> |
| </xs:annotation> |
| <xs:complexType> |
| <xs:sequence> |
| <xs:element name="PersistenceUnit" type="tns:JPAPersistenceUnitMapType" |
| maxOccurs="1" minOccurs="1" /> |
| </xs:sequence> |
| </xs:complexType> |
| </xs:element> |
| |
| <xs:complexType name="JPAAttributeMapType"> |
| <xs:annotation> |
| <xs:documentation xml:lang="en"> |
| The default name for EDM property is derived from JPA attribute name. This can be overridden using JPAAttributeMapType. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element name="JPAAttribute" maxOccurs="unbounded" |
| minOccurs="0"> |
| <xs:complexType> |
| <xs:simpleContent> |
| <xs:extension base="xs:string"> |
| <xs:attribute type="xs:string" name="name" use="required" /> |
| <xs:attribute type="xs:boolean" name="exclude" use="optional" |
| default="false" /> |
| </xs:extension> |
| </xs:simpleContent> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="JPARelationshipMapType"> |
| <xs:annotation> |
| <xs:documentation xml:lang="en"> |
| The default name for EDM navigation property is derived from JPA relationship name. This can be overridden using JPARelationshipMapType. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element name="JPARelationship" maxOccurs="unbounded" |
| minOccurs="0"> |
| <xs:complexType> |
| <xs:simpleContent> |
| <xs:extension base="xs:string"> |
| <xs:attribute type="xs:string" name="name" use="required" /> |
| </xs:extension> |
| </xs:simpleContent> |
| </xs:complexType> |
| </xs:element> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="JPAEntityTypeMapType"> |
| <xs:annotation> |
| <xs:documentation xml:lang="en"> |
| The default name for EDM entity type is derived from JPA entity type name. This can be overridden using JPAEntityTypeMapType. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element type="xs:string" name="EDMEntityType" |
| maxOccurs="1" minOccurs="0" /> |
| <xs:element type="xs:string" name="EDMEntitySet" |
| maxOccurs="1" minOccurs="0" /> |
| <xs:element name="JPAAttributes" type="tns:JPAAttributeMapType" /> |
| <xs:element name="JPARelationships" type="tns:JPARelationshipMapType" /> |
| </xs:sequence> |
| <xs:attribute type="xs:string" name="name" use="required" /> |
| <xs:attribute type="xs:boolean" name="exclude" use="optional" default="false" /> |
| </xs:complexType> |
| |
| <xs:complexType name="JPAEntityTypesMapType"> |
| <xs:sequence> |
| <xs:element name="JPAEntityType" type="tns:JPAEntityTypeMapType" |
| maxOccurs="unbounded" minOccurs="0" /> |
| </xs:sequence> |
| </xs:complexType> |
| <xs:complexType name="JPAEmbeddableTypeMapType"> |
| <xs:annotation> |
| <xs:documentation xml:lang="en"> |
| The default name for EDM complex type is derived from JPA Embeddable type name. This can be overridden using JPAEmbeddableTypeMapType. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element type="xs:string" name="EDMComplexType" |
| maxOccurs="1" minOccurs="0" /> |
| <xs:element name="JPAAttributes" type="tns:JPAAttributeMapType" /> |
| </xs:sequence> |
| <xs:attribute type="xs:string" name="name" use="required" /> |
| <xs:attribute type="xs:boolean" name="exclude" use="optional" |
| default="false" /> |
| </xs:complexType> |
| |
| <xs:complexType name="JPAEmbeddableTypesMapType"> |
| <xs:sequence> |
| <xs:element name="JPAEmbeddableType" type="tns:JPAEmbeddableTypeMapType" |
| maxOccurs="unbounded" minOccurs="0" /> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="JPAPersistenceUnitMapType"> |
| <xs:annotation> |
| <xs:documentation xml:lang="en"> |
| By default Java Persistence Unit name is taken as EDM schema name. This can be overridden using JPAPersistenceUnitMapType. |
| </xs:documentation> |
| </xs:annotation> |
| <xs:sequence> |
| <xs:element type="xs:string" name="EDMSchemaNamespace" |
| maxOccurs="1" minOccurs="0" /> |
| <xs:element name="JPAEntityTypes" type="tns:JPAEntityTypesMapType" /> |
| <xs:element name="JPAEmbeddableTypes" type="tns:JPAEmbeddableTypesMapType" /> |
| </xs:sequence> |
| <xs:attribute type="xs:string" name="name" use="required" /> |
| </xs:complexType> |
| |
| </xs:schema |