http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java deleted file mode 100644 index 7b1ef0f..0000000 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/PropertyProvider.java +++ /dev/null @@ -1,707 +0,0 @@ -/* - * 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. - */ -package org.apache.olingo.server.tecsvc.provider; - -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.apache.olingo.commons.api.edm.FullQualifiedName; -import org.apache.olingo.server.api.edm.provider.NavigationProperty; -import org.apache.olingo.server.api.edm.provider.Property; - -public class PropertyProvider { - - // Primitive Type Names - public static final FullQualifiedName nameBinary = EdmPrimitiveTypeKind.Binary.getFullQualifiedName(); - public static final FullQualifiedName nameBoolean = EdmPrimitiveTypeKind.Boolean.getFullQualifiedName(); - public static final FullQualifiedName nameByte = EdmPrimitiveTypeKind.Byte.getFullQualifiedName(); - - public static final FullQualifiedName nameDate = EdmPrimitiveTypeKind.Date.getFullQualifiedName(); - public static final FullQualifiedName nameDateTimeOffset = - EdmPrimitiveTypeKind.DateTimeOffset.getFullQualifiedName(); - - public static final FullQualifiedName nameDecimal = EdmPrimitiveTypeKind.Decimal.getFullQualifiedName(); - public static final FullQualifiedName nameDouble = EdmPrimitiveTypeKind.Double.getFullQualifiedName(); - public static final FullQualifiedName nameDuration = EdmPrimitiveTypeKind.Duration.getFullQualifiedName(); - - public static final FullQualifiedName nameGuid = EdmPrimitiveTypeKind.Guid.getFullQualifiedName(); - public static final FullQualifiedName nameInt16 = EdmPrimitiveTypeKind.Int16.getFullQualifiedName(); - public static final FullQualifiedName nameInt32 = EdmPrimitiveTypeKind.Int32.getFullQualifiedName(); - public static final FullQualifiedName nameInt64 = EdmPrimitiveTypeKind.Int64.getFullQualifiedName(); - - public static final FullQualifiedName nameSByte = EdmPrimitiveTypeKind.SByte.getFullQualifiedName(); - public static final FullQualifiedName nameSingle = EdmPrimitiveTypeKind.Single.getFullQualifiedName(); - - public static final FullQualifiedName nameString = EdmPrimitiveTypeKind.String.getFullQualifiedName(); - public static final FullQualifiedName nameTimeOfDay = EdmPrimitiveTypeKind.TimeOfDay.getFullQualifiedName(); - - // Primitive Properties -------------------------------------------------------------------------------------------- - public static final Property collPropertyBinary = new Property() - .setName("CollPropertyBinary") - .setType(nameBinary) - .setCollection(true); - - public static final Property collPropertyBinary_ExplicitNullable = new Property() - .setName("CollPropertyBinary") - .setType(nameBinary) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyBinary_NotNullable = new Property() - .setName("CollPropertyBinary") - .setType(nameBinary) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyBoolean = new Property() - .setName("CollPropertyBoolean") - .setType(nameBoolean) - .setCollection(true); - - public static final Property collPropertyBoolean_ExplicitNullable = new Property() - .setName("CollPropertyBoolean") - .setType(nameBoolean) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyBoolean_NotNullable = new Property() - .setName("CollPropertyBoolean") - .setType(nameBoolean) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyByte = new Property() - .setName("CollPropertyByte") - .setType(nameByte) - .setCollection(true); - - public static final Property collPropertyByte_ExplicitNullable = new Property() - .setName("CollPropertyByte") - .setType(nameByte) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyByte_NotNullable = new Property() - .setName("CollPropertyByte") - .setType(nameByte) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyDate = new Property() - .setName("CollPropertyDate") - .setType(nameDate) - .setCollection(true); - - public static final Property collPropertyDate_ExplicitNullable = new Property() - .setName("CollPropertyDate") - .setType(nameDate) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyDate_NotNullable = new Property() - .setName("CollPropertyDate") - .setType(nameDate) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyDateTimeOffset = new Property() - .setName("CollPropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setCollection(true); - - public static final Property collPropertyDateTimeOffset_ExplicitNullable = new Property() - .setName("CollPropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyDateTimeOffset_NotNullable = new Property() - .setName("CollPropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyDecimal = new Property() - .setName("CollPropertyDecimal") - .setType(nameDecimal) - .setCollection(true); - - public static final Property collPropertyDecimal_ExplicitNullable = new Property() - .setName("CollPropertyDecimal") - .setType(nameDecimal) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyDecimal_NotNullable = new Property() - .setName("CollPropertyDecimal") - .setType(nameDecimal) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyDouble = new Property() - .setName("CollPropertyDouble") - .setType(nameDouble) - .setCollection(true); - - public static final Property collPropertyDouble_ExplicitNullable = new Property() - .setName("CollPropertyDouble") - .setType(nameDouble) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyDouble_NotNullable = new Property() - .setName("CollPropertyDouble") - .setType(nameDouble) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyDuration = new Property() - .setName("CollPropertyDuration") - .setType(nameDuration) - .setCollection(true); - - public static final Property collPropertyDuration_ExplicitNullable = new Property() - .setName("CollPropertyDuration") - .setType(nameDuration) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyDuration_NotNullable = new Property() - .setName("CollPropertyDuration") - .setType(nameDuration) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyGuid = new Property() - .setName("CollPropertyGuid") - .setType(nameGuid) - .setCollection(true); - - public static final Property collPropertyGuid_ExplicitNullable = new Property() - .setName("CollPropertyGuid") - .setType(nameGuid) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyGuid_NotNullable = new Property() - .setName("CollPropertyGuid") - .setType(nameGuid) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyInt16 = new Property() - .setName("CollPropertyInt16") - .setType(nameInt16) - .setCollection(true); - - public static final Property collPropertyInt16_ExplicitNullable = new Property() - .setName("CollPropertyInt16") - .setType(nameInt16) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyInt16_NotNullable = new Property() - .setName("CollPropertyInt16") - .setType(nameInt16) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyInt32 = new Property() - .setName("CollPropertyInt32") - .setType(nameInt32) - .setCollection(true); - - public static final Property collPropertyInt32_ExplicitNullable = new Property() - .setName("CollPropertyInt32") - .setType(nameInt32) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyInt32_NotNullable = new Property() - .setName("CollPropertyInt32") - .setType(nameInt32) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyInt64 = new Property() - .setName("CollPropertyInt64") - .setType(nameInt64) - .setCollection(true); - - public static final Property collPropertyInt64_ExplicitNullable = new Property() - .setName("CollPropertyInt64") - .setType(nameInt64) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyInt64_NotNullable = new Property() - .setName("CollPropertyInt64") - .setType(nameInt64) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertySByte = new Property() - .setName("CollPropertySByte") - .setType(nameSByte) - .setCollection(true); - - public static final Property collPropertySByte_ExplicitNullable = new Property() - .setName("CollPropertySByte") - .setType(nameSByte) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertySByte_NotNullable = new Property() - .setName("CollPropertySByte") - .setType(nameSByte) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertySingle = new Property() - .setName("CollPropertySingle") - .setType(nameSingle) - .setCollection(true); - - public static final Property collPropertySingle_ExplicitNullable = new Property() - .setName("CollPropertySingle") - .setType(nameSingle) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertySingle_NotNullable = new Property() - .setName("CollPropertySingle") - .setType(nameSingle) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyString = new Property() - .setName("CollPropertyString") - .setType(nameString) - .setCollection(true); - - public static final Property collPropertyString_ExplicitNullable = new Property() - .setName("CollPropertyString") - .setType(nameString) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyString_NotNullable = new Property() - .setName("CollPropertyString") - .setType(nameString) - .setNullable(false) - .setCollection(true); - - public static final Property collPropertyTimeOfDay = new Property() - .setName("CollPropertyTimeOfDay") - .setType(nameTimeOfDay) - .setCollection(true); - - public static final Property collPropertyTimeOfDay_ExplicitNullable = new Property() - .setName("CollPropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(true) - .setCollection(true); - - public static final Property collPropertyTimeOfDay_NotNullable = new Property() - .setName("CollPropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(false) - .setCollection(true); - - public static final Property propertyBinary = new Property() - .setName("PropertyBinary") - .setType(nameBinary); - - public static final Property propertyBinary_NotNullable = new Property() - .setName("PropertyBinary") - .setType(nameBinary) - .setNullable(false); - - public static final Property propertyBinary_ExplicitNullable = new Property() - .setName("PropertyBinary") - .setType(nameBinary) - .setNullable(true); - - public static final Property propertyBoolean = new Property() - .setName("PropertyBoolean") - .setType(nameBoolean); - - public static final Property propertyBoolean_NotNullable = new Property() - .setName("PropertyBoolean") - .setType(nameBoolean) - .setNullable(false); - - public static final Property propertyBoolean_ExplicitNullable = new Property() - .setName("PropertyBoolean") - .setType(nameBoolean) - .setNullable(true); - - public static final Property propertyByte = new Property() - .setName("PropertyByte") - .setType(nameByte); - - public static final Property propertyByte_NotNullable = new Property() - .setName("PropertyByte") - .setType(nameByte) - .setNullable(false); - - public static final Property propertyByte_ExplicitNullable = new Property() - .setName("PropertyByte") - .setType(nameByte) - .setNullable(true); - - public static final Property propertyDate = new Property() - .setName("PropertyDate") - .setType(nameDate); - - public static final Property propertyDate_NotNullable = new Property() - .setName("PropertyDate") - .setType(nameDate) - .setNullable(false); - - public static final Property propertyDate_ExplicitNullable = new Property() - .setName("PropertyDate") - .setType(nameDate) - .setNullable(true); - - public static final Property propertyDateTimeOffset = new Property() - .setName("PropertyDateTimeOffset") - .setPrecision(20) - .setType(nameDateTimeOffset); - - public static final Property propertyDateTimeOffset_NotNullable = new Property() - .setName("PropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(false); - - public static final Property propertyDateTimeOffset_ExplicitNullable = new Property() - .setName("PropertyDateTimeOffset") - .setType(nameDateTimeOffset) - .setNullable(true); - - public static final Property propertyDecimal = new Property() - .setName("PropertyDecimal") - .setScale(10) - .setType(nameDecimal); - - public static final Property propertyDecimal_NotNullable = new Property() - .setName("PropertyDecimal") - .setType(nameDecimal) - .setNullable(false); - - public static final Property propertyDecimal_ExplicitNullable = new Property() - .setName("PropertyDecimal") - .setType(nameDecimal) - .setNullable(true); - - public static final Property propertyDouble = new Property() - .setName("PropertyDouble") - .setType(nameDouble); - - public static final Property propertyDouble_NotNullable = new Property() - .setName("PropertyDouble") - .setType(nameDouble) - .setNullable(false); - - public static final Property propertyDouble_ExplicitNullable = new Property() - .setName("PropertyDouble") - .setType(nameDouble) - .setNullable(true); - - public static final Property propertyDuration = new Property() - .setName("PropertyDuration") - .setType(nameDuration); - - public static final Property propertyDuration_NotNullable = new Property() - .setName("PropertyDuration") - .setType(nameDuration) - .setNullable(false); - - public static final Property propertyDuration_ExplicitNullable = new Property() - .setName("PropertyDuration") - .setType(nameDuration) - .setNullable(true); - - public static final Property propertyGuid = new Property() - .setName("PropertyGuid") - .setType(nameGuid); - - public static final Property propertyGuid_NotNullable = new Property() - .setName("PropertyGuid") - .setType(nameGuid) - .setNullable(false); - - public static final Property propertyGuid_ExplicitNullable = new Property() - .setName("PropertyGuid") - .setType(nameGuid) - .setNullable(true); - - public static final Property propertyInt16 = new Property() - .setName("PropertyInt16") - .setType(nameInt16); - - public static final Property propertyInt16_NotNullable = new Property() - .setName("PropertyInt16") - .setType(nameInt16) - .setNullable(false); - - public static final Property propertyInt16_ExplicitNullable = new Property() - .setName("PropertyInt16") - .setType(nameInt16) - .setNullable(true); - - public static final Property propertyInt32 = new Property() - .setName("PropertyInt32") - .setType(nameInt32); - - public static final Property propertyInt32_NotNullable = new Property() - .setName("PropertyInt32") - .setType(nameInt32) - .setNullable(false); - - public static final Property propertyInt32_ExplicitNullable = new Property() - .setName("PropertyInt32") - .setType(nameInt32) - .setNullable(true); - - public static final Property propertyInt64 = new Property() - .setName("PropertyInt64") - .setType(nameInt64); - - public static final Property propertyInt64_NotNullable = new Property() - .setName("PropertyInt64") - .setType(nameInt64) - .setNullable(false); - - public static final Property propertyInt64_ExplicitNullable = new Property() - .setName("PropertyInt64") - .setType(nameInt64) - .setNullable(true); - - public static final Property propertySByte = new Property() - .setName("PropertySByte") - .setType(nameSByte); - - public static final Property propertySByte_NotNullable = new Property() - .setName("PropertySByte") - .setType(nameSByte) - .setNullable(false); - - public static final Property propertySByte_ExplicitNullable = new Property() - .setName("PropertySByte") - .setType(nameSByte) - .setNullable(true); - - public static final Property propertySingle = new Property() - .setName("PropertySingle") - .setType(nameSingle); - - public static final Property propertySingle_NotNullable = new Property() - .setName("PropertySingle") - .setType(nameSingle) - .setNullable(false); - - public static final Property propertySingle_ExplicitNullable = new Property() - .setName("PropertySingle") - .setType(nameSingle) - .setNullable(true); - - public static final Property propertyString = new Property() - .setName("PropertyString") - .setType(nameString); - - public static final Property propertyString_NotNullable = new Property() - .setName("PropertyString") - .setType(nameString) - .setNullable(false); - - public static final Property propertyString_ExplicitNullable = new Property() - .setName("PropertyString") - .setType(nameString) - .setNullable(true); - - public static final Property propertyTimeOfDay = new Property() - .setName("PropertyTimeOfDay") - .setPrecision(10) - .setType(nameTimeOfDay); - - public static final Property propertyTimeOfDay_NotNullable = new Property() - .setName("PropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(false); - - public static final Property propertyTimeOfDay_ExplicitNullable = new Property() - .setName("PropertyTimeOfDay") - .setType(nameTimeOfDay) - .setNullable(true); - - /* - * TODO add propertyStream - * Property propertyStream = new Property() - * .setName("PropertyStream") - * .setType(EdmStream.getFullQualifiedName()); - */ - - // Complex Properties ---------------------------------------------------------------------------------------------- - public static final Property collPropertyComp_CTPrimComp = new Property() - .setName("CollPropertyComp") - .setType(ComplexTypeProvider.nameCTPrimComp) - .setCollection(true); - - public static final Property collPropertyComp_CTTwoPrim = new Property() - .setName("CollPropertyComp") - .setType(ComplexTypeProvider.nameCTTwoPrim) - .setCollection(true); - - public static final Property propertyComp_CTAllPrim = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTAllPrim); - - public static final Property propertyComp_CTCollAllPrim = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTCollAllPrim); - - public static final Property propertyComp_CTCompCollComp = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTCompCollComp); - - public static final Property propertyComp_CTCompComp = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTCompComp); - - public static final Property propertyComp_CTNavFiveProp = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTNavFiveProp); - - public static final Property propertyComp_CTPrimComp_NotNullable = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTPrimComp) - .setNullable(false); - - public static final Property propertyComp_CTTwoPrim = new Property() - .setName("PropertyComp") - .setType(ComplexTypeProvider.nameCTTwoPrim); - - public static final Property propertyCompAllPrim_CTAllPrim = new Property() - .setName("PropertyCompAllPrim") - .setType(ComplexTypeProvider.nameCTAllPrim); - - public static final Property propertyCompComp_CTCompComp = new Property() - .setName("PropertyCompComp") - .setType(ComplexTypeProvider.nameCTCompComp); - - public static final Property propertyCompTwoPrim_CTTwoPrim = new Property() - .setName("PropertyCompTwoPrim") - .setType(ComplexTypeProvider.nameCTTwoPrim); - - public static final Property propertyMixedPrimCollComp_CTMixPrimCollComp = new Property() - .setName("PropertyMixedPrimCollComp") - .setType(ComplexTypeProvider.nameCTMixPrimCollComp); - - public static final Property propertyComp_CTMixEnumTypeDefColl = new Property() - .setName("PropertyCompMixedEnumDef") - .setType(ComplexTypeProvider.nameCTMixEnumDef); - - public static final Property propertyCompColl_CTMixEnumTypeDefColl = new Property() - .setName("CollPropertyCompMixedEnumDef") - .setType(ComplexTypeProvider.nameCTMixEnumDef) - .setCollection(true); - - // Navigation Properties ------------------------------------------------------------------------------------------- - public static final NavigationProperty collectionNavPropertyETKeyNavMany_ETKeyNav = new NavigationProperty() - .setName("NavPropertyETKeyNavMany") - .setType(EntityTypeProvider.nameETKeyNav) - .setCollection(true); - - public static final NavigationProperty collectionNavPropertyETMediaMany_ETMedia = new NavigationProperty() - .setName("NavPropertyETMediaMany") - .setType(EntityTypeProvider.nameETMedia) - .setCollection(true); - - public static final NavigationProperty collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavMany") - .setType(EntityTypeProvider.nameETTwoKeyNav) - .setCollection(true) - .setPartner("NavPropertyETKeyNavOne"); - - public static final NavigationProperty collectionNavPropertyETTwoKeyNavOne_ETTwoKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavOne") - .setType(EntityTypeProvider.nameETTwoKeyNav); - - public static final NavigationProperty collectionNavPropertyETTwoPrimMany_ETTwoPrim = new NavigationProperty() - .setName("NavPropertyETTwoPrimMany") - .setType(EntityTypeProvider.nameETTwoPrim) - .setCollection(true) - .setNullable(false); - - public static final NavigationProperty collectionNavPropertyETAllPrimMany_ETAllPrim = new NavigationProperty() - .setName("NavPropertyETAllPrimMany") - .setType(EntityTypeProvider.nameETAllPrim) - .setCollection(true); - - public static final NavigationProperty navPropertyETKeyNavOne_ETKeyNav = new NavigationProperty() - .setName("NavPropertyETKeyNavOne") - .setType(EntityTypeProvider.nameETKeyNav); - - public static final NavigationProperty navPropertyETMediaOne_ETMedia = new NavigationProperty() - .setName("NavPropertyETMediaOne") - .setType(EntityTypeProvider.nameETMedia); - - public static final NavigationProperty navPropertyETKeyPrimNavOne_ETKeyPrimNav = new NavigationProperty() - .setName("NavPropertyETKeyPrimNavOne") - .setType(EntityTypeProvider.nameETKeyPrimNav); - - public static final NavigationProperty navPropertyETTwoKeyNavOne_ETTwoKeyNav_NotNullable = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavOne") - .setType(EntityTypeProvider.nameETTwoKeyNav) - .setNullable(false); - - public static final NavigationProperty navPropertyETTwoKeyNavOne_ETTwoKeyNav = new NavigationProperty() - .setName("NavPropertyETTwoKeyNavOne") - .setType(EntityTypeProvider.nameETTwoKeyNav); - - public static final NavigationProperty navPropertyETTwoPrimOne_ETTwoPrim = new NavigationProperty() - .setName("NavPropertyETTwoPrimOne") - .setType(EntityTypeProvider.nameETTwoPrim) - .setNullable(false); - - public static final NavigationProperty navPropertyETAllPrimOne_ETAllPrim = new NavigationProperty() - .setName("NavPropertyETAllPrimOne") - .setType(EntityTypeProvider.nameETAllPrim); - - // EnumProperties -------------------------------------------------------------------------------------------------- - public static final Property propertyEnumString_ENString = new Property() - .setName("PropertyEnumString") - .setType(EnumTypeProvider.nameENString); - - public static final Property collPropertyEnumString_ENString = new Property() - .setName("CollPropertyEnumString") - .setType(EnumTypeProvider.nameENString) - .setCollection(true); - - // TypeDefinition Properties --------------------------------------------------------------------------------------- - public static final Property propertyTypeDefinition_TDString = new Property() - .setName("PropertyDefString") - .setType(TypeDefinitionProvider.nameTDString) - .setMaxLength(15); - - public static final Property collPropertyTypeDefinition_TDString = new Property() - .setName("CollPropertyDefString") - .setType(TypeDefinitionProvider.nameTDString) - .setMaxLength(15) - .setCollection(true); -}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java deleted file mode 100644 index 27e6a68..0000000 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/SchemaProvider.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * 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. - */ -package org.apache.olingo.server.tecsvc.provider; - -import org.apache.olingo.commons.api.ODataException; -import org.apache.olingo.server.api.edm.provider.Action; -import org.apache.olingo.server.api.edm.provider.ComplexType; -import org.apache.olingo.server.api.edm.provider.EntityType; -import org.apache.olingo.server.api.edm.provider.EnumType; -import org.apache.olingo.server.api.edm.provider.Function; -import org.apache.olingo.server.api.edm.provider.Schema; -import org.apache.olingo.server.api.edm.provider.TypeDefinition; - -import java.util.ArrayList; -import java.util.List; - -public class SchemaProvider { - - private EdmTechProvider prov; - - public static final String NAMESPACE = "olingo.odata.test1"; - - public SchemaProvider(final EdmTechProvider prov) { - this.prov = prov; - } - - public List<Schema> getSchemas() throws ODataException { - List<Schema> schemas = new ArrayList<Schema>(); - Schema schema = new Schema(); - schema.setNamespace(NAMESPACE); - schema.setAlias("Namespace1_Alias"); - schemas.add(schema); - // EnumTypes - List<EnumType> enumTypes = new ArrayList<EnumType>(); - schema.setEnumTypes(enumTypes); - enumTypes.add(prov.getEnumType(EnumTypeProvider.nameENString)); - // EntityTypes - List<EntityType> entityTypes = new ArrayList<EntityType>(); - schema.setEntityTypes(entityTypes); - - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAllPrim)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCollAllPrim)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoPrim)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETMixPrimCollComp)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoKeyTwoPrim)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETBase)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoBase)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAllKey)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCompAllPrim)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCompCollAllPrim)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCompComp)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCompCollComp)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETMedia)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETFourKeyAlias)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETServerSidePaging)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAllNullable)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETKeyNav)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoKeyNav)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETBaseTwoKeyNav)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETTwoBaseTwoKeyNav)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETCompMixPrimCollComp)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETKeyPrimNav)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAbstract)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETAbstractBase)); - entityTypes.add(prov.getEntityType(EntityTypeProvider.nameETMixEnumDefCollComp)); - - // ComplexTypes - List<ComplexType> complexType = new ArrayList<ComplexType>(); - schema.setComplexTypes(complexType); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTPrim)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTAllPrim)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCollAllPrim)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoPrim)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTMixPrimCollComp)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTBase)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoBase)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCompComp)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCompCollComp)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTPrimComp)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTNavFiveProp)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTBasePrimCompNav)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTTwoBasePrimCompNav)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTCompNav)); - complexType.add(prov.getComplexType(ComplexTypeProvider.nameCTMixEnumDef)); - - // TypeDefinitions - List<TypeDefinition> typeDefinitions = new ArrayList<TypeDefinition>(); - schema.setTypeDefinitions(typeDefinitions); - typeDefinitions.add(prov.getTypeDefinition(TypeDefinitionProvider.nameTDString)); - - // Actions - List<Action> actions = new ArrayList<Action>(); - schema.setActions(actions); - actions.addAll(prov.getActions(ActionProvider.nameBAETTwoKeyNavRTETTwoKeyNav)); - actions.addAll(prov.getActions(ActionProvider.nameBAESAllPrimRTETAllPrim)); - actions.addAll(prov.getActions(ActionProvider.nameBAESTwoKeyNavRTESTwoKeyNav)); - actions.addAll(prov.getActions(ActionProvider.nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav)); - actions.addAll(prov.getActions(ActionProvider.nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav)); - actions.addAll(prov.getActions(ActionProvider.nameUARTString)); - actions.addAll(prov.getActions(ActionProvider.nameUARTCollStringTwoParam)); - actions.addAll(prov.getActions(ActionProvider.nameUARTCTTwoPrimParam)); - actions.addAll(prov.getActions(ActionProvider.nameUARTCollCTTwoPrimParam)); - actions.addAll(prov.getActions(ActionProvider.nameUARTETTwoKeyTwoPrimParam)); - actions.addAll(prov.getActions(ActionProvider.nameUARTCollETKeyNavParam)); - actions.addAll(prov.getActions(ActionProvider.nameUARTETAllPrimParam)); - actions.addAll(prov.getActions(ActionProvider.nameUARTCollETAllPrimParam)); - - // Functions - List<Function> functions = new ArrayList<Function>(); - schema.setFunctions(functions); - - functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTInt16)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETTwoKeyNavParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETTwoKeyNavParamCTTwoPrim)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTStringTwoParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTESTwoKeyNavParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTString)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollStringTwoParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollString)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCTAllPrimTwoParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCTTwoPrimParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollCTTwoPrimParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCTTwoPrim)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTCollCTTwoPrim)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETMedia)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTESMixPrimCollCompTwoParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTETAllPrimTwoParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFCRTESMixPrimCollCompTwoParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameUFNRTCollCTNavFiveProp)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCStringRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETBaseTwoKeyNavRTETTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESBaseTwoKeyNavRTESBaseTwoKey)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESAllPrimRTCTAllPrim)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTCTTwoPrim)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTCollCTTwoPrim)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTString)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTCollString)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETTwoKeyNavRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETBaseTwoKeyNavRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCSINavRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETBaseTwoKeyNavRTESBaseTwoKey)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCollStringRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCTPrimCompRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCTPrimCompRTESBaseTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCollCTPrimCompRTESAllPrim)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESKeyNavRTETKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETKeyNavRTETKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFESTwoKeyNavRTESTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETTwoKeyNavRTETTwoKeyNav)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCETTwoKeyNavRTCTTwoPrim)); - - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTCTNavFiveProp)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTCollCTNavFiveProp)); - - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESTwoKeyNavRTStringParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCESKeyNavRTETKeyNavParam)); - functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCTPrimCompRTETTwoKeyNavParam)); - // functions.addAll(prov.getFunctions(FunctionProvider.nameBFCCTPrimCompRTESTwoKeyNavParam)); - - // EntityContainer - schema.setEntityContainer(prov.getEntityContainer()); - - return schemas; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/TypeDefinitionProvider.java ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/TypeDefinitionProvider.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/TypeDefinitionProvider.java deleted file mode 100644 index 242c44f..0000000 --- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/provider/TypeDefinitionProvider.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. - */ -package org.apache.olingo.server.tecsvc.provider; - -import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; -import org.apache.olingo.commons.api.edm.FullQualifiedName; -import org.apache.olingo.server.api.edm.provider.TypeDefinition; - -public class TypeDefinitionProvider { - - public static final FullQualifiedName nameTDString = new FullQualifiedName(SchemaProvider.NAMESPACE, "TDString"); - - public TypeDefinition getTypeDefinition(final FullQualifiedName typeDefinitionName) { - if (nameTDString.equals(typeDefinitionName)) { - return new TypeDefinition().setName(nameTDString.getName()).setUnderlyingType( - EdmPrimitiveTypeKind.String.getFullQualifiedName()); - } - return null; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/resources/META-INF/LICENSE ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/resources/META-INF/LICENSE b/lib/server-tecsvc/src/main/resources/META-INF/LICENSE deleted file mode 100644 index 715ff30..0000000 --- a/lib/server-tecsvc/src/main/resources/META-INF/LICENSE +++ /dev/null @@ -1,331 +0,0 @@ -Licenses for TecSvc artifact - - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -Licensed 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. - - -From: 'abego Software GmbH, Germany' (http://abego-software.de) - abego -TreeLayout Core (http://code.google.com/p/treelayout/) -org.abego.treelayout:org.abego.treelayout.core:jar:1.0.1 License: BSD 3-Clause -"New" or "Revised" License (BSD-3-Clause) -(http://treelayout.googlecode.com/files/LICENSE.TXT) - -[The "BSD license"] -Copyright (c) 2011, abego Software GmbH, Germany (http://www.abego.org) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -3. Neither the name of the abego Software GmbH nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -From: 'ANTLR' (http://www.antlr.org) - ANTLR 4 Runtime -(http://www.antlr.org/antlr4-runtime) org.antlr:antlr4-runtime:jar:4.1 License: -The BSD License (http://www.antlr.org/license.html) - -[The BSD License] -Copyright (c) 2012 Terence Parr and Sam Harwell -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. Redistributions in binary - form must reproduce the above copyright notice, this list of conditions and - the following disclaimer in the documentation and/or other materials - provided with the distribution. Neither the name of the author nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -From: 'fasterxml.com' (http://fasterxml.com) - Stax2 API -(http://wiki.fasterxml.com/WoodstoxStax2) -org.codehaus.woodstox:stax2-api:bundle:3.1.4 License: The BSD License -(http://www.opensource.org/licenses/bsd-license.php) - -Copyright (c) 2004-2010, Woodstox Project (http://woodstox.codehaus.org/) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -3. Neither the name of the Woodstox XML Processor nor the names - of its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - -From: 'QOS.ch' (http://www.qos.ch) - - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.7.7 - License: MIT License (http://www.opensource.org/licenses/mit-license.php) - - SLF4J Simple Binding (http://www.slf4j.org) org.slf4j:slf4j-simple:jar:1.7.7 - License: MIT License (http://www.opensource.org/licenses/mit-license.php) - - -Copyright (c) 2004-2013 QOS.ch - -All rights reserved. Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated documentation files -(the "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to permit persons to whom -the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/resources/simplelogger.properties ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/resources/simplelogger.properties b/lib/server-tecsvc/src/main/resources/simplelogger.properties deleted file mode 100644 index 2a3350c..0000000 --- a/lib/server-tecsvc/src/main/resources/simplelogger.properties +++ /dev/null @@ -1,20 +0,0 @@ -# -# 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. -# -org.slf4j.simpleLogger.defaultLogLevel=debug -org.slf4j.simpleLogger.logFile=System.out \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/version/version.html ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/version/version.html b/lib/server-tecsvc/src/main/version/version.html deleted file mode 100644 index 7bc2ddd..0000000 --- a/lib/server-tecsvc/src/main/version/version.html +++ /dev/null @@ -1,37 +0,0 @@ -<!-- - 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. ---> - -<table> - <thead> - <tr><th colspan=2>Version Information</th></tr> - </thead> - - <tfoot> - <tr> - <td>Home</td> - <td><a href="http://olingo.apache.org/" target="self">Apache Olingo</a></td> - </tr> - </tfoot> - - <tbody> - <tr><td>name</td><td>${name}</td></tr> - <tr><td>version</td><td>${version}</td></tr> - <tr><td>timestamp</td><td>${timestamp}</td></tr> - </tbody> -</table> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/webapp/WEB-INF/web.xml ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/webapp/WEB-INF/web.xml b/lib/server-tecsvc/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 3c68d16..0000000 --- a/lib/server-tecsvc/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?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. ---> -<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" - id="WebApp_ID" version="2.5"> - - <display-name>Apache Olingo OData 4.0 Technical Service</display-name> - - <welcome-file-list> - <welcome-file>index.jsp</welcome-file> - </welcome-file-list> - - <servlet> - <servlet-name>ODataServlet</servlet-name> - <servlet-class>org.apache.olingo.server.tecsvc.TechnicalServlet</servlet-class> - <load-on-startup>1</load-on-startup> - </servlet> - - <servlet-mapping> - <servlet-name>ODataServlet</servlet-name> - <url-pattern>/odata.svc/*</url-pattern> - </servlet-mapping> - -</web-app> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/webapp/css/olingo.css ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/webapp/css/olingo.css b/lib/server-tecsvc/src/main/webapp/css/olingo.css deleted file mode 100644 index 5b9deec..0000000 --- a/lib/server-tecsvc/src/main/webapp/css/olingo.css +++ /dev/null @@ -1,91 +0,0 @@ -/* - 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. -*/ -body { - font-family: Arial, sans-serif; - font-size: 13px; - line-height: 18px; - color: #8904B1; - background-color: #ffffff; -} - -a { - color: #8904B1; -} - -a:VISITED { - color: #D358F7; -} - -td { - padding: 5px; -} - -h1,h2,h3,h4,h5,h6 { - font-family: inherit; - font-weight: bold; - line-height: 1; - color: #8904B1; -} - -h1 { - font-size: 36px; - line-height: 40px; -} - -h2 { - font-size: 30px; - line-height: 40px; -} - -h3 { - font-size: 24px; - line-height: 40px; -} - -h4 { - font-size: 18px; - line-height: 20px; -} - -h5 { - font-size: 14px; - line-height: 20px; -} - -h6 { - font-size: 12px; - line-height: 20px; -} - -.logo { - float: right; -} - -hr, thead, tfoot { - margin: 9px 0; - border-top: 1px solid #8904B1; - border-bottom: 1px solid #8904B1; -} - -table { border-collapse: collapse; border: 1px solid #8904B1; } - -.version { - font-family: "Courier New", monospace; - font-size: 10px; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/webapp/img/OlingoOrangeTM.png ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/webapp/img/OlingoOrangeTM.png b/lib/server-tecsvc/src/main/webapp/img/OlingoOrangeTM.png deleted file mode 100644 index 4878e8a..0000000 Binary files a/lib/server-tecsvc/src/main/webapp/img/OlingoOrangeTM.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/webapp/index.jsp ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/webapp/index.jsp b/lib/server-tecsvc/src/main/webapp/index.jsp deleted file mode 100644 index 788390f..0000000 --- a/lib/server-tecsvc/src/main/webapp/index.jsp +++ /dev/null @@ -1,55 +0,0 @@ -<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="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. ---> - -<!DOCTYPE html> -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <title>Apache Olingo - OData 4.0</title> - <link type="text/css" rel="stylesheet" href="css/olingo.css"> -</head> - -<body> - <div class="logo"> - <img height="40" src="img/OlingoOrangeTM.png" /> - </div> - <h1>Olingo OData 4.0</h1> - <hr> - <h2>Technical Service</h2> - <ul> - <li><a href="odata.svc/">Service Document</a></li> - <li><a href="odata.svc/$metadata">Metadata</a></li> - <li>Entity Set <a href="odata.svc/ESAllPrim">ESAllPrim</a></li> - <li>Entity <a href="odata.svc/ESAllPrim(32767)">ESAllPrim(32767)</a></li> - </ul> - <hr> - <div class="version"> - <% String version = "gen/version.html"; - try { - %> - <jsp:include page='<%=version%>' /> - <%} catch (Exception e) { - %> - <p>IDE Build</p> - <%}%> - </div> -</body> -</html> http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/main/webapp/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/main/webapp/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml b/lib/server-tecsvc/src/main/webapp/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml deleted file mode 100644 index aeca931..0000000 --- a/lib/server-tecsvc/src/main/webapp/v4.0/cs02/vocabularies/Org.OData.Core.V1.xml +++ /dev/null @@ -1,134 +0,0 @@ -<?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. - ---> - -<!-- - OData Version 4.0 - Committee Specification 02 - 17 November 2013 - Copyright (c) OASIS Open 2013. All Rights Reserved. - Source: http://docs.oasis-open.org/odata/odata/v4.0/cs02/vocabularies/ ---> - -<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0"> - <edmx:DataServices> - <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Org.OData.Core.V1" Alias="Core"> - <Annotation Term="Core.Description"> - <String>Core terms needed to write vocabularies</String> - </Annotation> - - <!--Documentation --> - - <Term Name="Description" Type="Edm.String"> - <Annotation Term="Core.Description" String="A brief description of a model element" /> - <Annotation Term="Core.IsLanguageDependent" /> - </Term> - - <Term Name="LongDescription" Type="Edm.String"> - <Annotation Term="Core.Description" String="A lengthy description of a model element" /> - <Annotation Term="Core.IsLanguageDependent" /> - </Term> - - <!-- Localization --> - - <Term Name="IsLanguageDependent" Type="Core.Tag" DefaultValue="true" AppliesTo="Property Term"> - <Annotation Term="Core.Description" String="Properties and terms annotated with this term are language-dependent" /> - <Annotation Term="Core.RequiresType" String="Edm.String" /> - </Term> - - <!-- Term Restrictions --> - - <TypeDefinition Name="Tag" UnderlyingType="Edm.Boolean"> - <Annotation Term="Core.Description" String="This is the type to use for all tagging terms" /> - </TypeDefinition> - - <Term Name="RequiresType" Type="Edm.String" AppliesTo="Term"> - <Annotation Term="Core.Description" - String="Properties and terms annotated with this annotation MUST have a type that is identical to or derived from the given type name" /> - </Term> - - <!--Resource Paths --> - - <Term Name="ResourcePath" Type="Edm.String" AppliesTo="EntitySet Singleton ActionImport FunctionImport"> - <Annotation Term="Core.Description" - String="Resource path for entity container child, can be relative to xml:base and the request URL" /> - <Annotation Term="Core.IsUrl" /> - </Term> - - <Term Name="DereferenceableIDs" Type="Core.Tag" DefaultValue="true" AppliesTo="EntityContainer"> - <Annotation Term="Core.Description" String="Entity-ids are URLs that locate the identified entity" /> - </Term> - - <Term Name="ConventionalIDs" Type="Core.Tag" DefaultValue="true" AppliesTo="EntityContainer"> - <Annotation Term="Core.Description" String="Entity-ids follow OData URL conventions" /> - </Term> - - <!-- Permissions --> - - <Term Name="Permissions" Type="Core.Permission" AppliesTo="Property"> - <Annotation Term="Core.Description" String="Permissions available for a property.The value of 2 is reserved for future use." /> - </Term> - <EnumType Name="Permission" IsFlags="true"> - <Member Name="None" Value="0" /> - <Member Name="Read" Value="1" /> - <Member Name="ReadWrite" Value="3" /> - </EnumType> - - <!-- Metadata Extensions --> - - <Term Name="Immutable" Type="Core.Tag" DefaultValue="true" AppliesTo="Property"> - <Annotation Term="Core.Description" - String="A value for this non-key property can be provided on insert and remains unchanged on update" /> - </Term> - - <Term Name="Computed" Type="Core.Tag" DefaultValue="true" AppliesTo="Property"> - <Annotation Term="Core.Description" String="A value for this property is generated on both insert and update" /> - </Term> - - <Term Name="IsURL" Type="Core.Tag" DefaultValue="true" AppliesTo="Property Term"> - <Annotation Term="Core.Description" String="Properties and terms annotated with this term MUST contain a valid URL" /> - <Annotation Term="Core.RequiresType" String="Edm.String" /> - </Term> - - <Term Name="AcceptableMediaTypes" Type="Collection(Edm.String)" AppliesTo="EntityType Property"> - <Annotation Term="Core.Description" - String="Lists the MIME types acceptable for the annotated entity type marked with HasStream="true" or the annotated stream property" /> - <Annotation Term="Core.IsMediaType" /> - </Term> - - <Term Name="MediaType" Type="Edm.String" AppliesTo="Property"> - <Annotation Term="Core.IsMediaType" /> - <Annotation Term="Core.RequiresType" String="Edm.Binary" /> - </Term> - - <Term Name="IsMediaType" Type="Core.Tag" DefaultValue="true" AppliesTo="Property Term"> - <Annotation Term="Core.Description" String="Properties and terms annotated with this term MUST contain a valid MIME type" /> - <Annotation Term="Core.RequiresType" String="Edm.String" /> - </Term> - - <Term Name="OptimisticConcurrency" Type="Collection(Edm.PropertyPath)" AppliesTo="EntitySet"> - <Annotation Term="Core.Description" - String="Data modification requires the use of Etags. A non-empty collection contains the set of properties that are used to compute the ETag" /> - </Term> - - </Schema> - </edmx:DataServices> -</edmx:Edmx> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/f7a7b484/lib/server-tecsvc/src/test/java/org/apache/olingo/server/tecsvc/data/DataProviderTest.java ---------------------------------------------------------------------- diff --git a/lib/server-tecsvc/src/test/java/org/apache/olingo/server/tecsvc/data/DataProviderTest.java b/lib/server-tecsvc/src/test/java/org/apache/olingo/server/tecsvc/data/DataProviderTest.java deleted file mode 100644 index 264febd..0000000 --- a/lib/server-tecsvc/src/test/java/org/apache/olingo/server/tecsvc/data/DataProviderTest.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * 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. - */ -package org.apache.olingo.server.tecsvc.data; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -import org.apache.olingo.commons.api.data.Entity; -import org.apache.olingo.commons.api.data.EntitySet; -import org.apache.olingo.commons.api.data.LinkedComplexValue; -import org.apache.olingo.commons.api.data.Property; -import org.apache.olingo.commons.api.edm.Edm; -import org.apache.olingo.commons.api.edm.EdmEntityContainer; -import org.apache.olingo.commons.api.edm.EdmEntitySet; -import org.apache.olingo.commons.api.edm.FullQualifiedName; -import org.apache.olingo.server.api.OData; -import org.apache.olingo.server.api.edmx.EdmxReference; -import org.apache.olingo.server.api.uri.UriParameter; -import org.apache.olingo.server.tecsvc.provider.EdmTechProvider; -import org.junit.Assert; -import org.junit.Test; -import org.mockito.Mockito; - -public class DataProviderTest { - - private final Edm edm = OData.newInstance().createServiceMetadata(new EdmTechProvider( - Collections.<EdmxReference> emptyList()), Collections.<EdmxReference> emptyList()) - .getEdm(); - private final EdmEntityContainer entityContainer = edm.getEntityContainer( - new FullQualifiedName("olingo.odata.test1", "Container")); - - private final EdmEntitySet esAllPrim = entityContainer.getEntitySet("ESAllPrim"); - private final EdmEntitySet esAllKey = entityContainer.getEntitySet("ESAllKey"); - private final EdmEntitySet esCompAllPrim = entityContainer.getEntitySet("ESCompAllPrim"); - private final EdmEntitySet esCollAllPrim = entityContainer.getEntitySet("ESCollAllPrim"); - private final EdmEntitySet esMixPrimCollComp = entityContainer.getEntitySet("ESMixPrimCollComp"); - private final EdmEntitySet esMedia = entityContainer.getEntitySet("ESMedia"); - - @Test - public void esAllPrimEntity() throws Exception { - final DataProvider dataProvider = new DataProvider(); - final Entity entity = dataProvider.readAll(esAllPrim).getEntities().get(2); - Assert.assertEquals(16, entity.getProperties().size()); - - Assert.assertEquals(entity, - dataProvider.read(esAllPrim, Arrays.asList(mockParameter("PropertyInt16", "-0")))); - } - - @Test - public void esAllKeyEntity() throws Exception { - final DataProvider dataProvider = new DataProvider(); - final Entity entity = dataProvider.readAll(esAllKey).getEntities().get(0); - Assert.assertEquals(13, entity.getProperties().size()); - - Assert.assertEquals(entity, dataProvider.read(esAllKey, Arrays.asList( - mockParameter("PropertyBoolean", "true"), - mockParameter("PropertyByte", "255"), - mockParameter("PropertyDate", "2012-12-03"), - mockParameter("PropertyDateTimeOffset", "2012-12-03T07:16:23Z"), - mockParameter("PropertyDecimal", "34"), - mockParameter("PropertyDuration", "duration'PT6S'"), - mockParameter("PropertyGuid", "01234567-89AB-CDEF-0123-456789ABCDEF"), - mockParameter("PropertyInt16", "32767"), - mockParameter("PropertyInt32", "2147483647"), - mockParameter("PropertyInt64", "9223372036854775807"), - mockParameter("PropertySByte", "127"), - mockParameter("PropertyString", "'First'"), - mockParameter("PropertyTimeOfDay", "02:48:21")))); - } - - @Test - public void esAllPrim() throws Exception { - final DataProvider data = new DataProvider(); - EntitySet outSet = data.readAll(esAllPrim); - - Assert.assertEquals(3, outSet.getEntities().size()); - - Entity first = outSet.getEntities().get(0); - Assert.assertEquals(16, first.getProperties().size()); - Assert.assertEquals(2, first.getNavigationLinks().size()); - final EntitySet target = first.getNavigationLink("NavPropertyETTwoPrimMany").getInlineEntitySet(); - Assert.assertNotNull(target); - Assert.assertEquals(1, target.getEntities().size()); - Assert.assertEquals(data.readAll(entityContainer.getEntitySet("ESTwoPrim")).getEntities().get(1), - target.getEntities().get(0)); - - Assert.assertEquals(16, outSet.getEntities().get(1).getProperties().size()); - Assert.assertEquals(16, outSet.getEntities().get(2).getProperties().size()); - } - - @Test - public void esCollAllPrim() throws Exception { - EntitySet outSet = new DataProvider().readAll(esCollAllPrim); - - Assert.assertEquals(3, outSet.getEntities().size()); - Assert.assertEquals(17, outSet.getEntities().get(0).getProperties().size()); - Property list = outSet.getEntities().get(0).getProperties().get(1); - Assert.assertTrue(list.isCollection()); - Assert.assertEquals(3, list.asCollection().size()); - Assert.assertEquals(17, outSet.getEntities().get(1).getProperties().size()); - Assert.assertEquals(17, outSet.getEntities().get(2).getProperties().size()); - } - - @Test - public void esCompAllPrim() throws Exception { - EntitySet outSet = new DataProvider().readAll(esCompAllPrim); - - Assert.assertEquals(3, outSet.getEntities().size()); - Assert.assertEquals(2, outSet.getEntities().get(0).getProperties().size()); - Property complex = outSet.getEntities().get(0).getProperties().get(1); - Assert.assertTrue(complex.isLinkedComplex()); - Assert.assertEquals(16, complex.asLinkedComplex().getValue().size()); - Assert.assertEquals(2, outSet.getEntities().get(1).getProperties().size()); - Assert.assertEquals(2, outSet.getEntities().get(2).getProperties().size()); - } - - @Test - public void esMixPrimCollComp() throws Exception { - EntitySet outSet = new DataProvider().readAll(esMixPrimCollComp); - - Assert.assertEquals(3, outSet.getEntities().size()); - Assert.assertEquals(4, outSet.getEntities().get(0).getProperties().size()); - Property complex = outSet.getEntities().get(0).getProperties().get(2); - Assert.assertTrue(complex.isLinkedComplex()); - Assert.assertEquals(2, complex.asLinkedComplex().getValue().size()); - Property complexCollection = outSet.getEntities().get(0).getProperties().get(3); - Assert.assertTrue(complexCollection.isCollection()); - List<?> linkedComplexValues = complexCollection.asCollection(); - Assert.assertEquals(3, linkedComplexValues.size()); - LinkedComplexValue linkedComplexValue = (LinkedComplexValue) linkedComplexValues.get(0); - Assert.assertEquals(2, linkedComplexValue.getValue().size()); - Property lcProp = linkedComplexValue.getValue().get(0); - Assert.assertFalse(lcProp.isCollection()); - Assert.assertEquals(123, lcProp.getValue()); - // - Assert.assertEquals(4, outSet.getEntities().get(1).getProperties().size()); - Assert.assertEquals(4, outSet.getEntities().get(2).getProperties().size()); - } - - @Test - public void esMedia() throws Exception { - DataProvider dataProvider = new DataProvider(); - Entity entity = dataProvider.read(esMedia, Arrays.asList(mockParameter("PropertyInt16", "3"))); - Assert.assertNotNull(dataProvider.readMedia(entity)); - dataProvider.delete(esMedia, entity); - Assert.assertEquals(3, dataProvider.readAll(esMedia).getEntities().size()); - entity = dataProvider.create(esMedia); - Assert.assertEquals(5, entity.getProperty("PropertyInt16").getValue()); - dataProvider.setMedia(entity, new byte[] { 1, 2, 3, 4 }, "x/y"); - Assert.assertArrayEquals(new byte[] { 1, 2, 3, 4 }, dataProvider.readMedia(entity)); - Assert.assertEquals("x/y", entity.getMediaContentType()); - } - - private static UriParameter mockParameter(final String name, final String text) { - UriParameter parameter = Mockito.mock(UriParameter.class); - Mockito.when(parameter.getName()).thenReturn(name); - Mockito.when(parameter.getText()).thenReturn(text); - return parameter; - } -}
