[OLINGO-575] Delete EDM abstract classes
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/d088866e Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/d088866e Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/d088866e Branch: refs/heads/master Commit: d088866e97ecbb5831df2033ac7cfb9f9ea1b641 Parents: 59766b2 Author: Christian Amend <[email protected]> Authored: Fri Feb 27 14:17:11 2015 +0100 Committer: Christian Amend <[email protected]> Committed: Fri Feb 27 14:17:11 2015 +0100 ---------------------------------------------------------------------- .../olingo/ext/proxy/utils/CoreUtils.java | 1 - .../retrieve/RetrieveRequestFactory.java | 1 - .../olingo/client/api/edm/xml/Annotations.java | 6 +- .../client/api/edm/xml/CommonAnnotations.java | 26 ---- .../api/edm/xml/CommonFunctionImport.java | 22 ---- .../api/edm/xml/CommonNavigationProperty.java | 24 ---- .../client/api/edm/xml/CommonParameter.java | 33 ----- .../client/api/edm/xml/CommonProperty.java | 41 ------ .../olingo/client/api/edm/xml/ComplexType.java | 30 ++--- .../olingo/client/api/edm/xml/EntityType.java | 8 +- .../client/api/edm/xml/FunctionImport.java | 2 +- .../client/api/edm/xml/NavigationProperty.java | 5 +- .../olingo/client/api/edm/xml/Parameter.java | 12 +- .../olingo/client/api/edm/xml/Property.java | 20 ++- .../olingo/client/api/edm/xml/Schema.java | 1 - .../client/api/edm/xml/StructuralType.java | 39 ++++++ .../retrieve/XMLMetadataRequestImpl.java | 3 +- .../olingo/client/core/edm/EdmClientImpl.java | 6 +- .../client/core/edm/EdmEntityContainerImpl.java | 8 +- .../client/core/edm/EdmEntityTypeImpl.java | 2 +- .../client/core/edm/EdmOperationImpl.java | 6 +- .../client/core/edm/EdmParameterImpl.java | 5 +- .../olingo/client/core/edm/EdmPropertyImpl.java | 5 +- .../core/edm/EdmStructuredTypeHelperImpl.java | 20 +-- .../core/edm/xml/AbstractAnnotatable.java | 38 ------ .../core/edm/xml/AbstractAnnotations.java | 51 -------- .../core/edm/xml/AbstractComplexType.java | 52 -------- .../core/edm/xml/AbstractDataServices.java | 51 -------- .../client/core/edm/xml/AbstractEdmx.java | 52 -------- .../core/edm/xml/AbstractEntityContainer.java | 104 --------------- .../client/core/edm/xml/AbstractEntitySet.java | 51 -------- .../client/core/edm/xml/AbstractEntityType.java | 86 ------------- .../client/core/edm/xml/AbstractEnumType.java | 96 -------------- .../client/core/edm/xml/AbstractMember.java | 52 -------- .../edm/xml/AbstractNavigationProperty.java | 52 -------- .../client/core/edm/xml/AbstractParameter.java | 95 -------------- .../client/core/edm/xml/AbstractProperty.java | 129 ------------------- .../client/core/edm/xml/AbstractSchema.java | 69 ---------- .../core/edm/xml/AbstractStructuralType.java | 49 +++++++ .../core/edm/xml/AbstractXMLMetadata.java | 70 ---------- .../olingo/client/core/edm/xml/ActionImpl.java | 10 +- .../client/core/edm/xml/ActionImportImpl.java | 13 +- .../client/core/edm/xml/AnnotationImpl.java | 12 +- .../client/core/edm/xml/AnnotationsImpl.java | 27 +++- .../core/edm/xml/ComplexTypeDeserializer.java | 4 +- .../client/core/edm/xml/ComplexTypeImpl.java | 7 +- .../core/edm/xml/DataServicesDeserializer.java | 4 +- .../client/core/edm/xml/DataServicesImpl.java | 42 ++++-- .../client/core/edm/xml/EdmxDeserializer.java | 15 +-- .../olingo/client/core/edm/xml/EdmxImpl.java | 27 +++- .../edm/xml/EntityContainerDeserializer.java | 29 ++--- .../core/edm/xml/EntityContainerImpl.java | 77 ++++++++--- .../core/edm/xml/EntitySetDeserializer.java | 33 +++-- .../client/core/edm/xml/EntitySetImpl.java | 27 +++- .../core/edm/xml/EntityTypeDeserializer.java | 17 +-- .../client/core/edm/xml/EntityTypeImpl.java | 61 ++++++++- .../core/edm/xml/EnumTypeDeserializer.java | 29 ++--- .../client/core/edm/xml/EnumTypeImpl.java | 69 +++++++++- .../olingo/client/core/edm/xml/MemberImpl.java | 43 +++++-- .../core/edm/xml/NavigationPropertyImpl.java | 29 ++++- .../core/edm/xml/ParameterDeserializer.java | 27 ++-- .../client/core/edm/xml/ParameterImpl.java | 85 ++++++++++-- .../core/edm/xml/PropertyDeserializer.java | 9 +- .../client/core/edm/xml/PropertyImpl.java | 105 ++++++++++++++- .../client/core/edm/xml/ReferenceImpl.java | 10 +- .../core/edm/xml/ReferentialConstraintImpl.java | 13 +- .../client/core/edm/xml/SchemaDeserializer.java | 54 ++------ .../olingo/client/core/edm/xml/SchemaImpl.java | 52 ++++++-- .../client/core/edm/xml/SingletonImpl.java | 10 +- .../olingo/client/core/edm/xml/TermImpl.java | 10 +- .../client/core/edm/xml/XMLMetadataImpl.java | 46 +++++-- .../core/serialization/AbstractODataBinder.java | 7 +- .../core/domain/ODataComplexValueImpl.java | 1 - 73 files changed, 938 insertions(+), 1489 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java ---------------------------------------------------------------------- diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java index cd89e09..297a8e6 100644 --- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java +++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java @@ -294,7 +294,6 @@ public final class CoreUtils { } } - @SuppressWarnings("unchecked") public static void addProperties( final CommonEdmEnabledODataClient<?> client, final Map<String, Object> changes, http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java index bc2bf5e..58cd835 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java @@ -25,7 +25,6 @@ import org.apache.olingo.commons.api.domain.ODataEntitySet; import org.apache.olingo.commons.api.domain.ODataProperty; import org.apache.olingo.commons.api.domain.ODataSingleton; -@SuppressWarnings("unchecked") public interface RetrieveRequestFactory extends CommonRetrieveRequestFactory { @Override http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java index 6c1027b..17a6243 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Annotations.java @@ -19,7 +19,11 @@ package org.apache.olingo.client.api.edm.xml; -public interface Annotations extends CommonAnnotations, Annotatable { +public interface Annotations extends Annotatable { + String getTarget(); + + String getQualifier(); + Annotation getAnnotation(String term); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonAnnotations.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonAnnotations.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonAnnotations.java deleted file mode 100644 index b79328f..0000000 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonAnnotations.java +++ /dev/null @@ -1,26 +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.client.api.edm.xml; - -public abstract interface CommonAnnotations { - - String getTarget(); - - String getQualifier(); -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonFunctionImport.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonFunctionImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonFunctionImport.java deleted file mode 100644 index c590387..0000000 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonFunctionImport.java +++ /dev/null @@ -1,22 +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.client.api.edm.xml; - -public interface CommonFunctionImport extends Named { -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonNavigationProperty.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonNavigationProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonNavigationProperty.java deleted file mode 100644 index ae66b4e..0000000 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonNavigationProperty.java +++ /dev/null @@ -1,24 +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.client.api.edm.xml; - -public interface CommonNavigationProperty extends Named { - - boolean isContainsTarget(); -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonParameter.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonParameter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonParameter.java deleted file mode 100644 index ec96dc0..0000000 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonParameter.java +++ /dev/null @@ -1,33 +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.client.api.edm.xml; - -public interface CommonParameter extends Named { - - String getType(); - - boolean isNullable(); - - Integer getMaxLength(); - - Integer getPrecision(); - - Integer getScale(); - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonProperty.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonProperty.java deleted file mode 100644 index 156631c..0000000 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/CommonProperty.java +++ /dev/null @@ -1,41 +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.client.api.edm.xml; - -import org.apache.olingo.commons.api.edm.geo.SRID; - -public interface CommonProperty extends Named { - - String getType(); - - boolean isNullable(); - - String getDefaultValue(); - - Integer getMaxLength(); - - Integer getPrecision(); - - Integer getScale(); - - boolean isUnicode(); - - SRID getSrid(); - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java index 173eaeb..c375590 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/ComplexType.java @@ -1,38 +1,24 @@ /* * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file + * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file + * 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 - * + * 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 + * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.olingo.client.api.edm.xml; -import java.util.List; -public interface ComplexType extends Named, Annotatable { +public interface ComplexType extends StructuralType { - boolean isAbstractEntityType(); - - String getBaseType(); - - boolean isOpenType(); - - Property getProperty(String name); - - List<Property> getProperties(); - - NavigationProperty getNavigationProperty(String name); - - List<NavigationProperty> getNavigationProperties(); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityType.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityType.java index a413edf..8d8eeb4 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityType.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/EntityType.java @@ -18,13 +18,7 @@ */ package org.apache.olingo.client.api.edm.xml; -public interface EntityType extends ComplexType { - - boolean isAbstractEntityType(); - - String getBaseType(); - - boolean isOpenType(); +public interface EntityType extends StructuralType { EntityKey getKey(); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java index e69bdf6..8d4449a 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/FunctionImport.java @@ -19,7 +19,7 @@ package org.apache.olingo.client.api.edm.xml; -public interface FunctionImport extends OperationImport, CommonFunctionImport { +public interface FunctionImport extends OperationImport, Named { String getFunction(); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java index a08d4c7..7985561 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/NavigationProperty.java @@ -20,7 +20,7 @@ package org.apache.olingo.client.api.edm.xml; import java.util.List; -public interface NavigationProperty extends CommonNavigationProperty, Annotatable { +public interface NavigationProperty extends Named, Annotatable { String getType(); @@ -31,5 +31,6 @@ public interface NavigationProperty extends CommonNavigationProperty, Annotatabl List<ReferentialConstraint> getReferentialConstraints(); OnDelete getOnDelete(); - + + boolean isContainsTarget(); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java index 85cf446..0f4ee36 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Parameter.java @@ -20,7 +20,17 @@ package org.apache.olingo.client.api.edm.xml; import org.apache.olingo.commons.api.edm.geo.SRID; -public interface Parameter extends CommonParameter, Annotatable { +public interface Parameter extends Named, Annotatable { + String getType(); + + boolean isNullable(); + + Integer getMaxLength(); + + Integer getPrecision(); + + Integer getScale(); + SRID getSrid(); } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java index 7c13e20..62909f1 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Property.java @@ -18,7 +18,25 @@ */ package org.apache.olingo.client.api.edm.xml; +import org.apache.olingo.commons.api.edm.geo.SRID; -public interface Property extends CommonProperty, Annotatable { +public interface Property extends Named, Annotatable { + + String getType(); + + boolean isNullable(); + + String getDefaultValue(); + + Integer getMaxLength(); + + Integer getPrecision(); + + Integer getScale(); + + boolean isUnicode(); + + SRID getSrid(); + } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java index 1b2796a..820c327 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/Schema.java @@ -81,7 +81,6 @@ public interface Schema { List<Annotations> getAnnotationGroups(); Annotations getAnnotationGroup(String target); - //TODO: Check if there are annotations in V4 List<Annotation> getAnnotations(); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/StructuralType.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/StructuralType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/StructuralType.java new file mode 100644 index 0000000..5800d78 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/edm/xml/StructuralType.java @@ -0,0 +1,39 @@ +/* + * 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.client.api.edm.xml; + +import java.util.List; + +public interface StructuralType extends Named, Annotatable{ + + boolean isAbstractType(); + + String getBaseType(); + + boolean isOpenType(); + + Property getProperty(String name); + + List<Property> getProperties(); + + NavigationProperty getNavigationProperty(String name); + + List<NavigationProperty> getNavigationProperties(); + +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java index 30682f7..3b326e5 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/XMLMetadataRequestImpl.java @@ -35,7 +35,6 @@ import org.apache.olingo.client.api.edm.xml.IncludeAnnotations; import org.apache.olingo.client.api.edm.xml.Reference; import org.apache.olingo.client.api.edm.xml.Schema; import org.apache.olingo.client.api.edm.xml.XMLMetadata; -import org.apache.olingo.client.core.edm.xml.AbstractSchema; import org.apache.olingo.client.core.edm.xml.AnnotationsImpl; import org.apache.olingo.client.core.edm.xml.SchemaImpl; import org.apache.olingo.commons.api.format.ODataFormat; @@ -70,7 +69,7 @@ public class XMLMetadataRequestImpl if (includedSchema != null) { response.getBody().getSchemas().add(includedSchema); if (StringUtils.isNotBlank(include.getAlias())) { - ((AbstractSchema) includedSchema).setAlias(include.getAlias()); + ((SchemaImpl) includedSchema).setAlias(include.getAlias()); } } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java index 6b9c9b9..4a445ab 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java @@ -36,12 +36,12 @@ import org.apache.olingo.client.api.edm.xml.Action; import org.apache.olingo.client.api.edm.xml.Annotatable; import org.apache.olingo.client.api.edm.xml.Annotation; import org.apache.olingo.client.api.edm.xml.Annotations; -import org.apache.olingo.client.api.edm.xml.CommonParameter; import org.apache.olingo.client.api.edm.xml.ComplexType; import org.apache.olingo.client.api.edm.xml.EntityContainer; import org.apache.olingo.client.api.edm.xml.EntityType; import org.apache.olingo.client.api.edm.xml.EnumType; import org.apache.olingo.client.api.edm.xml.Function; +import org.apache.olingo.client.api.edm.xml.Parameter; import org.apache.olingo.client.api.edm.xml.Schema; import org.apache.olingo.client.api.edm.xml.Term; import org.apache.olingo.client.api.edm.xml.TypeDefinition; @@ -232,7 +232,7 @@ public class EdmClientImpl extends AbstractEdm { final Function function = itor.next(); if (!function.isBound()) { final Set<String> functionParamNames = new HashSet<String>(); - for (CommonParameter param : function.getParameters()) { + for (Parameter param : function.getParameters()) { functionParamNames.add(param.getName()); } found = parameterNames == null @@ -296,7 +296,7 @@ public class EdmClientImpl extends AbstractEdm { || isBindingParameterCollection.booleanValue() == boundParam.isCollection())) { final Set<String> functionParamNames = new HashSet<String>(); - for (CommonParameter param : function.getParameters()) { + for (Parameter param : function.getParameters()) { functionParamNames.add(param.getName()); } found = parameterNames == null http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java index b6cdc36..ea68a7a 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java @@ -22,9 +22,9 @@ import java.util.Collections; import java.util.List; import org.apache.olingo.client.api.edm.xml.ActionImport; -import org.apache.olingo.client.api.edm.xml.CommonFunctionImport; import org.apache.olingo.client.api.edm.xml.EntityContainer; import org.apache.olingo.client.api.edm.xml.EntitySet; +import org.apache.olingo.client.api.edm.xml.FunctionImport; import org.apache.olingo.client.api.edm.xml.Schema; import org.apache.olingo.client.api.edm.xml.Singleton; import org.apache.olingo.commons.api.edm.Edm; @@ -115,7 +115,7 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer { protected EdmFunctionImport createFunctionImport(final String functionImportName) { EdmFunctionImport result = null; - final CommonFunctionImport functionImport = xmlEntityContainer.getFunctionImport(functionImportName); + final FunctionImport functionImport = xmlEntityContainer.getFunctionImport(functionImportName); if (functionImport != null) { if (functionImport instanceof org.apache.olingo.client.api.edm.xml.FunctionImport) { result = new EdmFunctionImportImpl(edm, this, functionImportName, @@ -146,8 +146,8 @@ public class EdmEntityContainerImpl extends AbstractEdmEntityContainer { @Override protected void loadAllFunctionImports() { - final List<? extends CommonFunctionImport> localFunctionImports = xmlEntityContainer.getFunctionImports(); - for (CommonFunctionImport functionImport : localFunctionImports) { + final List<? extends FunctionImport> localFunctionImports = xmlEntityContainer.getFunctionImports(); + for (FunctionImport functionImport : localFunctionImports) { EdmFunctionImport edmFunctionImport; if (functionImport instanceof org.apache.olingo.client.api.edm.xml.FunctionImport) { edmFunctionImport = new EdmFunctionImportImpl(edm, this, functionImport.getName(), http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java index 746047b..2dabbbf 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java @@ -58,7 +58,7 @@ public class EdmEntityTypeImpl extends AbstractEdmEntityType { final List<EdmKeyPropertyRef> edmKey; //Abstract EntityTypes do not necessarily have keys - if (entityType.isAbstractEntityType() && entityType.getKey() == null) { + if (entityType.isAbstractType() && entityType.getKey() == null) { edmKey = new ArrayList<EdmKeyPropertyRef>(); } else { edmKey = new ArrayList<EdmKeyPropertyRef>( http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java index 498fece..0df592c 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java @@ -23,7 +23,7 @@ import java.util.List; import org.apache.commons.lang3.StringUtils; import org.apache.olingo.client.api.edm.xml.Action; -import org.apache.olingo.client.api.edm.xml.CommonParameter; +import org.apache.olingo.client.api.edm.xml.Parameter; import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.EdmAnnotation; import org.apache.olingo.commons.api.edm.EdmParameter; @@ -40,9 +40,9 @@ public abstract class EdmOperationImpl extends AbstractEdmOperation { protected final EdmAnnotationHelper helper; protected static <T extends EdmOperationImpl> T getInstance(final T instance) { - final List<? extends CommonParameter> parameters = instance.operation.getParameters(); + final List<? extends Parameter> parameters = instance.operation.getParameters(); final List<EdmParameter> _parameters = new ArrayList<EdmParameter>(parameters.size()); - for (CommonParameter parameter : parameters) { + for (Parameter parameter : parameters) { _parameters.add(new EdmParameterImpl(instance.edm, parameter)); } instance.setParameters(_parameters); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java index c71d1e5..4e8fc8f 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java @@ -21,7 +21,6 @@ package org.apache.olingo.client.core.edm; import java.util.Collections; import java.util.List; -import org.apache.olingo.client.api.edm.xml.CommonParameter; import org.apache.olingo.client.api.edm.xml.Parameter; import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.EdmAnnotation; @@ -35,13 +34,13 @@ import org.apache.olingo.commons.core.edm.EdmTypeInfo; public class EdmParameterImpl extends AbstractEdmParameter { - private final CommonParameter parameter; + private final Parameter parameter; private final EdmTypeInfo typeInfo; private EdmAnnotationHelper helper; - public EdmParameterImpl(final Edm edm, final CommonParameter parameter) { + public EdmParameterImpl(final Edm edm, final Parameter parameter) { super(edm, parameter.getName(), new FullQualifiedName(parameter.getType())); this.parameter = parameter; this.typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(parameter.getType()).build(); http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java index 36e2348..6b2e189 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java @@ -21,7 +21,6 @@ package org.apache.olingo.client.core.edm; import java.util.Collections; import java.util.List; -import org.apache.olingo.client.api.edm.xml.CommonProperty; import org.apache.olingo.client.api.edm.xml.Property; import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.EdmAnnotation; @@ -37,13 +36,13 @@ public class EdmPropertyImpl extends AbstractEdmProperty { private final FullQualifiedName structuredTypeName; - private final CommonProperty property; + private final Property property; private final EdmTypeInfo typeInfo; private EdmAnnotationHelper helper; - public EdmPropertyImpl(final Edm edm, final FullQualifiedName structuredTypeName, final CommonProperty property) { + public EdmPropertyImpl(final Edm edm, final FullQualifiedName structuredTypeName, final Property property) { super(edm, property.getName()); this.structuredTypeName = structuredTypeName; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java index 9a5e0c8..89726d5 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmStructuredTypeHelperImpl.java @@ -22,11 +22,11 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import org.apache.olingo.client.api.edm.xml.CommonNavigationProperty; -import org.apache.olingo.client.api.edm.xml.CommonProperty; -import org.apache.olingo.client.api.edm.xml.ComplexType; import org.apache.olingo.client.api.edm.xml.EntityType; +import org.apache.olingo.client.api.edm.xml.NavigationProperty; +import org.apache.olingo.client.api.edm.xml.Property; import org.apache.olingo.client.api.edm.xml.Schema; +import org.apache.olingo.client.api.edm.xml.StructuralType; import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.EdmNavigationProperty; import org.apache.olingo.commons.api.edm.EdmProperty; @@ -39,7 +39,7 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper { private final FullQualifiedName structuredTypeName; - private final ComplexType complexType; + private final StructuralType complexType; private final List<? extends Schema> xmlSchemas; @@ -48,11 +48,11 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper { private Map<String, EdmNavigationProperty> navigationProperties; public EdmStructuredTypeHelperImpl(final Edm edm, final FullQualifiedName structuredTypeName, - final List<? extends Schema> xmlSchemas, final ComplexType complexType) { + final List<? extends Schema> xmlSchemas, final StructuralType structuralType) { this.edm = edm; this.structuredTypeName = structuredTypeName; - this.complexType = complexType; + this.complexType = structuralType; this.xmlSchemas = xmlSchemas; } @@ -60,7 +60,7 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper { public Map<String, EdmProperty> getProperties() { if (properties == null) { properties = new LinkedHashMap<String, EdmProperty>(); - for (CommonProperty property : complexType.getProperties()) { + for (Property property : complexType.getProperties()) { properties.put(property.getName(), new EdmPropertyImpl(edm, structuredTypeName, property)); } } @@ -71,7 +71,7 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper { public Map<String, EdmNavigationProperty> getNavigationProperties() { if (navigationProperties == null) { navigationProperties = new LinkedHashMap<String, EdmNavigationProperty>(); - for (CommonNavigationProperty navigationProperty : complexType.getNavigationProperties()) { + for (NavigationProperty navigationProperty : complexType.getNavigationProperties()) { if (navigationProperty instanceof org.apache.olingo.client.api.edm.xml.NavigationProperty) { navigationProperties.put(navigationProperty.getName(), new EdmNavigationPropertyImpl( edm, structuredTypeName, @@ -94,9 +94,9 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper { @Override public boolean isAbstract() { return complexType instanceof org.apache.olingo.client.api.edm.xml.ComplexType - ? ((org.apache.olingo.client.api.edm.xml.ComplexType) complexType).isAbstractEntityType() + ? ((org.apache.olingo.client.api.edm.xml.ComplexType) complexType).isAbstractType() : complexType instanceof EntityType - ? ((EntityType) complexType).isAbstractEntityType() + ? ((EntityType) complexType).isAbstractType() : false; } } http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java deleted file mode 100644 index e0fd56e..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotatable.java +++ /dev/null @@ -1,38 +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.client.core.edm.xml; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.olingo.client.api.edm.xml.Annotatable; -import org.apache.olingo.client.api.edm.xml.Annotation; - -public abstract class AbstractAnnotatable extends AbstractEdmItem implements Annotatable { - - private static final long serialVersionUID = 3739284381932173905L; - - private final List<Annotation> annotations = new ArrayList<Annotation>(); - - @Override - public List<Annotation> getAnnotations() { - return annotations; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotations.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotations.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotations.java deleted file mode 100644 index 8b569d2..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractAnnotations.java +++ /dev/null @@ -1,51 +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.client.core.edm.xml; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public abstract class AbstractAnnotations extends AbstractEdmItem - implements org.apache.olingo.client.api.edm.xml.CommonAnnotations { - - private static final long serialVersionUID = 3065797355916813641L; - - @JsonProperty(value = "Target", required = true) - private String target; - - @JsonProperty("Qualifier") - private String qualifier; - - @Override - public String getTarget() { - return target; - } - - public void setTarget(final String target) { - this.target = target; - } - - @Override - public String getQualifier() { - return qualifier; - } - - public void setQualifier(final String qualifier) { - this.qualifier = qualifier; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java deleted file mode 100644 index adc89c2..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractComplexType.java +++ /dev/null @@ -1,52 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.ComplexType; -import org.apache.olingo.client.api.edm.xml.NavigationProperty; -import org.apache.olingo.client.api.edm.xml.Property; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = ComplexTypeDeserializer.class) -public abstract class AbstractComplexType extends AbstractEdmItem implements ComplexType { - - private static final long serialVersionUID = 1137297128124390440L; - - private String name; - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public Property getProperty(final String name) { - return getOneByName(name, getProperties()); - } - - @Override - public NavigationProperty getNavigationProperty(final String name) { - return getOneByName(name, getNavigationProperties()); - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractDataServices.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractDataServices.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractDataServices.java deleted file mode 100644 index 34cad8a..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractDataServices.java +++ /dev/null @@ -1,51 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.DataServices; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = DataServicesDeserializer.class) -public abstract class AbstractDataServices extends AbstractEdmItem implements DataServices { - - private static final long serialVersionUID = -4400718085220384367L; - - private String dataServiceVersion; - - private String maxDataServiceVersion; - - @Override - public String getDataServiceVersion() { - return dataServiceVersion; - } - - public void setDataServiceVersion(final String version) { - this.dataServiceVersion = version; - } - - @Override - public String getMaxDataServiceVersion() { - return maxDataServiceVersion; - } - - public void setMaxDataServiceVersion(final String version) { - this.maxDataServiceVersion = version; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmx.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmx.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmx.java deleted file mode 100644 index 5645bae..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEdmx.java +++ /dev/null @@ -1,52 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.DataServices; -import org.apache.olingo.client.api.edm.xml.Edmx; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = EdmxDeserializer.class) -public abstract class AbstractEdmx extends AbstractEdmItem implements Edmx { - - private static final long serialVersionUID = 4832081463474985688L; - - private String version; - - private DataServices dataServices; - - @Override - public String getVersion() { - return version; - } - - public void setVersion(final String version) { - this.version = version; - } - - @Override - public DataServices getDataServices() { - return dataServices; - } - - public void setDataServices(final DataServices dataServices) { - this.dataServices = dataServices; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java deleted file mode 100644 index 9d8cf5e..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityContainer.java +++ /dev/null @@ -1,104 +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.client.core.edm.xml; - -import java.util.List; - -import org.apache.olingo.client.api.edm.xml.EntityContainer; -import org.apache.olingo.client.api.edm.xml.EntitySet; -import org.apache.olingo.client.api.edm.xml.FunctionImport; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = EntityContainerDeserializer.class) -public abstract class AbstractEntityContainer extends AbstractEdmItem implements EntityContainer { - - private static final long serialVersionUID = -1114035944715857067L; - - private String name; - - private String _extends; - - private boolean lazyLoadingEnabled; - - private boolean defaultEntityContainer; - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public String getExtends() { - return _extends; - } - - public void setExtends(final String _extends) { - this._extends = _extends; - } - - @Override - public boolean isLazyLoadingEnabled() { - return lazyLoadingEnabled; - } - - public void setLazyLoadingEnabled(final boolean lazyLoadingEnabled) { - this.lazyLoadingEnabled = lazyLoadingEnabled; - } - - @Override - public boolean isDefaultEntityContainer() { - return defaultEntityContainer; - } - - public void setDefaultEntityContainer(final boolean defaultEntityContainer) { - this.defaultEntityContainer = defaultEntityContainer; - } - - @Override - public EntitySet getEntitySet(final String name) { - return getOneByName(name, getEntitySets()); - } - - /** - * Gets the first function import with given name. - * - * @param name name. - * @return function import. - */ - @Override - public FunctionImport getFunctionImport(final String name) { - return getOneByName(name, getFunctionImports()); - } - - /** - * Gets all function imports with given name. - * - * @param name name. - * @return function imports. - */ - @Override - public List<FunctionImport> getFunctionImports(final String name) { - return getAllByName(name, getFunctionImports()); - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java deleted file mode 100644 index 97197bd..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntitySet.java +++ /dev/null @@ -1,51 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.EntitySet; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = EntitySetDeserializer.class) -public abstract class AbstractEntitySet extends AbstractEdmItem implements EntitySet { - - private static final long serialVersionUID = 8583772498037429318L; - - private String name; - - private String entityType; - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public String getEntityType() { - return entityType; - } - - public void setEntityType(final String entityType) { - this.entityType = entityType; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java deleted file mode 100644 index 6878a2d..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEntityType.java +++ /dev/null @@ -1,86 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.EntityKey; -import org.apache.olingo.client.api.edm.xml.EntityType; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = EntityTypeDeserializer.class) -public abstract class AbstractEntityType extends AbstractComplexType implements EntityType { - - private static final long serialVersionUID = 1203890295232722675L; - - private boolean abstractEntityType = false; - - private String baseType; - - private boolean openType = false; - - private boolean hasStream = false; - - private EntityKeyImpl key; - - @Override - public boolean isAbstractEntityType() { - return abstractEntityType; - } - - public void setAbstractEntityType(final boolean abstractEntityType) { - this.abstractEntityType = abstractEntityType; - } - - @Override - public String getBaseType() { - return baseType; - } - - public void setBaseType(final String baseType) { - this.baseType = baseType; - } - - @Override - public boolean isOpenType() { - return openType; - } - - public void setOpenType(final boolean openType) { - this.openType = openType; - } - - @Override - public EntityKeyImpl getKey() { - return key; - } - - public void setKey(final EntityKey key) { - this.key = (EntityKeyImpl) key; - } - - @Override - public boolean isHasStream() { - return hasStream; - } - - public void setHasStream(final boolean hasStream) { - this.hasStream = hasStream; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java deleted file mode 100644 index 149f95b..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractEnumType.java +++ /dev/null @@ -1,96 +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.client.core.edm.xml; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.olingo.client.api.edm.xml.EnumType; -import org.apache.olingo.client.api.edm.xml.Member; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = EnumTypeDeserializer.class) -public abstract class AbstractEnumType extends AbstractEdmItem implements EnumType { - - private static final long serialVersionUID = 3130179997854833072L; - - private String name; - - private String underlyingType; - - private boolean flags; - - private final List<Member> members = new ArrayList<Member>(); - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public String getUnderlyingType() { - return underlyingType; - } - - public void setUnderlyingType(final String underlyingType) { - this.underlyingType = underlyingType; - } - - @Override - public boolean isFlags() { - return flags; - } - - public void setFlags(final boolean flags) { - this.flags = flags; - } - - @Override - public Member getMember(final String name) { - Member result = null; - for (Member member : getMembers()) { - if (name.equals(member.getName())) { - result = member; - } - } - return result; - } - - @Override - public Member getMember(final Integer value) { - Member result = null; - for (Member member : getMembers()) { - if (value.equals(member.getValue())) { - result = member; - } - } - return result; - } - - @Override - public List<Member> getMembers() { - return members; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractMember.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractMember.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractMember.java deleted file mode 100644 index a5dadcc..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractMember.java +++ /dev/null @@ -1,52 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.Member; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public abstract class AbstractMember extends AbstractEdmItem implements Member { - - private static final long serialVersionUID = -2335311346302901837L; - - @JsonProperty(value = "Name", required = true) - private String name; - - @JsonProperty("Value") - private String value; - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public String getValue() { - return value; - } - - public void setValue(final String value) { - this.value = value; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractNavigationProperty.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractNavigationProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractNavigationProperty.java deleted file mode 100644 index 90e2c21..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractNavigationProperty.java +++ /dev/null @@ -1,52 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.CommonNavigationProperty; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class AbstractNavigationProperty extends AbstractEdmItem implements CommonNavigationProperty { - - private static final long serialVersionUID = 6240231735592427582L; - - @JsonProperty(value = "Name", required = true) - private String name; - - @JsonProperty(value = "ContainsTarget") - private boolean containsTarget = false; - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public boolean isContainsTarget() { - return containsTarget; - } - - public void setContainsTarget(final boolean containsTarget) { - this.containsTarget = containsTarget; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractParameter.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractParameter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractParameter.java deleted file mode 100644 index bc4162b..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractParameter.java +++ /dev/null @@ -1,95 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.CommonParameter; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = ParameterDeserializer.class) -public abstract class AbstractParameter extends AbstractEdmItem implements CommonParameter { - - private static final long serialVersionUID = -1064183665249856572L; - - private String name; - - private String type; - - private boolean nullable = true; - - private Integer maxLength; - - private Integer precision; - - private Integer scale; - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public String getType() { - return type; - } - - public void setType(final String type) { - this.type = type; - } - - @Override - public boolean isNullable() { - return nullable; - } - - public void setNullable(final boolean nullable) { - this.nullable = nullable; - } - - @Override - public Integer getMaxLength() { - return maxLength; - } - - public void setMaxLength(final Integer maxLength) { - this.maxLength = maxLength; - } - - @Override - public Integer getPrecision() { - return precision; - } - - public void setPrecision(final Integer precision) { - this.precision = precision; - } - - @Override - public Integer getScale() { - return scale; - } - - public void setScale(final Integer scale) { - this.scale = scale; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractProperty.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractProperty.java deleted file mode 100644 index af0d381..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractProperty.java +++ /dev/null @@ -1,129 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.CommonProperty; -import org.apache.olingo.commons.api.edm.geo.SRID; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = PropertyDeserializer.class) -public abstract class AbstractProperty extends AbstractEdmItem implements CommonProperty { - - private static final long serialVersionUID = -1489578611146966897L; - - private String name; - - private String type; - - private boolean nullable = true; - - private String defaultValue; - - private Integer maxLength; - - private Integer precision; - - private Integer scale; - - private boolean unicode = true; - - private SRID srid; - - @Override - public String getName() { - return name; - } - - public void setName(final String name) { - this.name = name; - } - - @Override - public String getType() { - return type; - } - - public void setType(final String type) { - this.type = type; - } - - @Override - public boolean isNullable() { - return nullable; - } - - public void setNullable(final boolean nullable) { - this.nullable = nullable; - } - - @Override - public String getDefaultValue() { - return defaultValue; - } - - public void setDefaultValue(final String defaultValue) { - this.defaultValue = defaultValue; - } - - @Override - public Integer getMaxLength() { - return maxLength; - } - - public void setMaxLength(final Integer maxLength) { - this.maxLength = maxLength; - } - - @Override - public Integer getPrecision() { - return precision; - } - - public void setPrecision(final Integer precision) { - this.precision = precision; - } - - @Override - public Integer getScale() { - return scale; - } - - public void setScale(final Integer scale) { - this.scale = scale; - } - - @Override - public boolean isUnicode() { - return unicode; - } - - public void setUnicode(final boolean unicode) { - this.unicode = unicode; - } - - @Override - public SRID getSrid() { - return srid; - } - - public void setSrid(final SRID srid) { - this.srid = srid; - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java deleted file mode 100644 index 5dfc53e..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractSchema.java +++ /dev/null @@ -1,69 +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.client.core.edm.xml; - -import org.apache.olingo.client.api.edm.xml.ComplexType; -import org.apache.olingo.client.api.edm.xml.EntityType; -import org.apache.olingo.client.api.edm.xml.EnumType; -import org.apache.olingo.client.api.edm.xml.Schema; - -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; - -@JsonDeserialize(using = SchemaDeserializer.class) -public abstract class AbstractSchema extends AbstractEdmItem implements Schema { - - private static final long serialVersionUID = -6432381849489898369L; - - private String namespace; - - private String alias; - - @Override - public String getNamespace() { - return namespace; - } - - public void setNamespace(final String namespace) { - this.namespace = namespace; - } - - @Override - public String getAlias() { - return alias; - } - - public void setAlias(final String alias) { - this.alias = alias; - } - - @Override - public EnumType getEnumType(final String name) { - return getOneByName(name, getEnumTypes()); - } - - @Override - public ComplexType getComplexType(final String name) { - return getOneByName(name, getComplexTypes()); - } - - @Override - public EntityType getEntityType(final String name) { - return getOneByName(name, getEntityTypes()); - } -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractStructuralType.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractStructuralType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractStructuralType.java new file mode 100644 index 0000000..a8d0401 --- /dev/null +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractStructuralType.java @@ -0,0 +1,49 @@ +/* + * 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.client.core.edm.xml; + +import org.apache.olingo.client.api.edm.xml.NavigationProperty; +import org.apache.olingo.client.api.edm.xml.Property; +import org.apache.olingo.client.api.edm.xml.StructuralType; + +public abstract class AbstractStructuralType extends AbstractEdmItem implements StructuralType { + + private static final long serialVersionUID = 1137297128124390440L; + + private String name; + + @Override + public String getName() { + return name; + } + + public void setName(final String name) { + this.name = name; + } + + @Override + public Property getProperty(final String name) { + return getOneByName(name, getProperties()); + } + + @Override + public NavigationProperty getNavigationProperty(final String name) { + return getOneByName(name, getNavigationProperties()); + } +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java deleted file mode 100644 index f911463..0000000 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AbstractXMLMetadata.java +++ /dev/null @@ -1,70 +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.client.core.edm.xml; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.lang3.StringUtils; -import org.apache.olingo.client.api.edm.xml.Edmx; -import org.apache.olingo.client.api.edm.xml.Schema; -import org.apache.olingo.client.api.edm.xml.XMLMetadata; - -/** - * Entry point for access information about EDM metadata. - */ -public abstract class AbstractXMLMetadata extends AbstractEdmItem implements XMLMetadata { - - private static final long serialVersionUID = -5141922932300533083L; - - protected final Edmx edmx; - - public AbstractXMLMetadata(final Edmx edmx) { - this.edmx = edmx; - } - - @Override - public List<Schema> getSchemas() { - return this.edmx.getDataServices().getSchemas(); - } - - @Override - public Schema getSchema(final int index) { - return getSchemas().get(index); - } - - @Override - public Schema getSchema(final String key) { - return getSchemaByNsOrAlias().get(key); - } - - @Override - public Map<String, Schema> getSchemaByNsOrAlias() { - final Map<String, Schema> schemaByNsOrAlias = new HashMap<String, Schema>(); - for (Schema schema : getSchemas()) { - schemaByNsOrAlias.put(schema.getNamespace(), schema); - if (StringUtils.isNotBlank(schema.getAlias())) { - schemaByNsOrAlias.put(schema.getAlias(), schema); - } - } - return schemaByNsOrAlias; - } - -} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java index 2b685dd..b73a97b 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImpl.java @@ -22,13 +22,14 @@ import java.util.ArrayList; import java.util.List; import org.apache.olingo.client.api.edm.xml.Action; +import org.apache.olingo.client.api.edm.xml.Annotation; import org.apache.olingo.client.api.edm.xml.Parameter; import org.apache.olingo.client.api.edm.xml.ReturnType; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @JsonDeserialize(using = ActionDeserializer.class) -public class ActionImpl extends AbstractAnnotatable implements Action { +public class ActionImpl extends AbstractEdmItem implements Action { private static final long serialVersionUID = 5321541275349234088L; @@ -42,6 +43,13 @@ public class ActionImpl extends AbstractAnnotatable implements Action { private ReturnType returnType; + private final List<Annotation> annotations = new ArrayList<Annotation>(); + + @Override + public List<Annotation> getAnnotations() { + return annotations; + } + @Override public String getName() { return name; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java index ac9c1c5..cdfc650 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ActionImportImpl.java @@ -18,11 +18,15 @@ */ package org.apache.olingo.client.core.edm.xml; +import java.util.ArrayList; +import java.util.List; + import org.apache.olingo.client.api.edm.xml.ActionImport; +import org.apache.olingo.client.api.edm.xml.Annotation; import com.fasterxml.jackson.annotation.JsonProperty; -public class ActionImportImpl extends AbstractAnnotatable implements ActionImport { +public class ActionImportImpl extends AbstractEdmItem implements ActionImport { private static final long serialVersionUID = 2971468441177647068L; @@ -35,6 +39,13 @@ public class ActionImportImpl extends AbstractAnnotatable implements ActionImpor @JsonProperty(value = "EntitySet") private String entitySet; + private final List<Annotation> annotations = new ArrayList<Annotation>(); + + @Override + public List<Annotation> getAnnotations() { + return annotations; + } + @Override public String getName() { return name; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d088866e/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java index aaf510e..1489f2e 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/AnnotationImpl.java @@ -18,13 +18,16 @@ */ package org.apache.olingo.client.core.edm.xml; +import java.util.ArrayList; +import java.util.List; + import org.apache.olingo.client.api.edm.xml.Annotation; import org.apache.olingo.client.api.edm.xml.annotation.AnnotationExpression; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @JsonDeserialize(using = AnnotationDeserializer.class) -public class AnnotationImpl extends AbstractAnnotatable implements Annotation { +public class AnnotationImpl extends AbstractEdmItem implements Annotation { private static final long serialVersionUID = 5464714417411058033L; @@ -34,6 +37,13 @@ public class AnnotationImpl extends AbstractAnnotatable implements Annotation { private AnnotationExpression annotationExpression; + private final List<Annotation> annotations = new ArrayList<Annotation>(); + + @Override + public List<Annotation> getAnnotations() { + return annotations; + } + @Override public String getTerm() { return term;
