You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2014/03/16 04:04:06 UTC
[3/3] git commit: [OLINGO-191] change package name: part 1 of
1.edm->edm.shared, 2, edm.v4->edm
[OLINGO-191] change package name: part 1 of 1.edm->edm.shared, 2, edm.v4->edm
Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/commit/64564c2d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/tree/64564c2d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/diff/64564c2d
Branch: refs/heads/olingo191
Commit: 64564c2d6bc97575cef68553f081c134172db401
Parents: ec39fd6
Author: challenh <ch...@apache.org>
Authored: Sun Mar 16 10:59:05 2014 +0800
Committer: challenh <ch...@apache.org>
Committed: Sun Mar 16 10:59:05 2014 +0800
----------------------------------------------------------------------
.../edm/AbstractEdmServiceMetadataImpl.java | 99 -----
.../olingo/client/core/edm/EdmActionImpl.java | 36 --
.../client/core/edm/EdmActionImportImpl.java | 45 ---
.../client/core/edm/EdmBindingTargetImpl.java | 79 ----
.../olingo/client/core/edm/EdmClientImpl.java | 385 -------------------
.../client/core/edm/EdmComplexTypeImpl.java | 66 ----
.../client/core/edm/EdmEntityContainerImpl.java | 204 ----------
.../client/core/edm/EdmEntitySetImpl.java | 42 --
.../client/core/edm/EdmEntityTypeImpl.java | 80 ----
.../olingo/client/core/edm/EdmEnumTypeImpl.java | 96 -----
.../olingo/client/core/edm/EdmFunctionImpl.java | 44 ---
.../client/core/edm/EdmFunctionImportImpl.java | 56 ---
.../client/core/edm/EdmKeyPropertyRefImpl.java | 49 ---
.../core/edm/EdmNavigationPropertyImpl.java | 74 ----
.../client/core/edm/EdmOperationImpl.java | 90 -----
.../client/core/edm/EdmOperationImportImpl.java | 34 --
.../client/core/edm/EdmParameterImpl.java | 73 ----
.../olingo/client/core/edm/EdmPropertyImpl.java | 90 -----
.../client/core/edm/EdmReturnTypeImpl.java | 67 ----
.../olingo/client/core/edm/EdmSchemaImpl.java | 166 --------
.../client/core/edm/EdmSingletonImpl.java | 35 --
.../core/edm/EdmStructuredTypeHelperImpl.java | 72 ----
.../client/core/edm/EdmTypeDefinitionImpl.java | 73 ----
.../olingo/client/core/edm/EdmTypeInfo.java | 174 ---------
.../shared/AbstractEdmServiceMetadataImpl.java | 99 +++++
.../client/core/edm/shared/EdmActionImpl.java | 36 ++
.../core/edm/shared/EdmActionImportImpl.java | 44 +++
.../core/edm/shared/EdmBindingTargetImpl.java | 79 ++++
.../client/core/edm/shared/EdmClientImpl.java | 385 +++++++++++++++++++
.../core/edm/shared/EdmComplexTypeImpl.java | 67 ++++
.../core/edm/shared/EdmEntityContainerImpl.java | 204 ++++++++++
.../core/edm/shared/EdmEntitySetImpl.java | 42 ++
.../core/edm/shared/EdmEntityTypeImpl.java | 80 ++++
.../client/core/edm/shared/EdmEnumTypeImpl.java | 96 +++++
.../client/core/edm/shared/EdmFunctionImpl.java | 44 +++
.../core/edm/shared/EdmFunctionImportImpl.java | 56 +++
.../core/edm/shared/EdmKeyPropertyRefImpl.java | 49 +++
.../edm/shared/EdmNavigationPropertyImpl.java | 74 ++++
.../core/edm/shared/EdmOperationImpl.java | 90 +++++
.../core/edm/shared/EdmOperationImportImpl.java | 34 ++
.../core/edm/shared/EdmParameterImpl.java | 73 ++++
.../client/core/edm/shared/EdmPropertyImpl.java | 90 +++++
.../core/edm/shared/EdmReturnTypeImpl.java | 67 ++++
.../client/core/edm/shared/EdmSchemaImpl.java | 166 ++++++++
.../core/edm/shared/EdmSingletonImpl.java | 35 ++
.../edm/shared/EdmStructuredTypeHelperImpl.java | 72 ++++
.../core/edm/shared/EdmTypeDefinitionImpl.java | 73 ++++
.../client/core/edm/shared/EdmTypeInfo.java | 174 +++++++++
.../core/edm/v3/EdmActionImportProxy.java | 4 +-
.../core/edm/v3/EdmFunctionImportProxy.java | 4 +-
.../client/core/edm/v3/EdmOperationProxy.java | 4 +-
.../core/edm/v3/EdmServiceMetadataImpl.java | 2 +-
.../core/edm/v4/EdmServiceMetadataImpl.java | 2 +-
.../client/core/op/impl/ODataV3ReaderImpl.java | 2 +-
.../client/core/op/impl/ODataV4ReaderImpl.java | 2 +-
.../client/core/v4/FilterFactoryTest.java | 2 +-
56 files changed, 2240 insertions(+), 2240 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/AbstractEdmServiceMetadataImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/AbstractEdmServiceMetadataImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/AbstractEdmServiceMetadataImpl.java
deleted file mode 100644
index 6508224..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/AbstractEdmServiceMetadataImpl.java
+++ /dev/null
@@ -1,99 +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;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-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.Schema;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.commons.api.edm.EdmActionImportInfo;
-import org.apache.olingo.commons.api.edm.EdmEntitySetInfo;
-import org.apache.olingo.commons.api.edm.EdmFunctionImportInfo;
-import org.apache.olingo.commons.api.edm.EdmServiceMetadata;
-import org.apache.olingo.commons.core.edm.EdmEntitySetInfoImpl;
-
-public abstract class AbstractEdmServiceMetadataImpl implements EdmServiceMetadata {
-
- protected final XMLMetadata xmlMetadata;
-
- private List<EdmEntitySetInfo> entitySetInfos;
-
- protected List<EdmFunctionImportInfo> functionImportInfos;
-
- protected List<EdmActionImportInfo> actionImportInfos;
-
- public static EdmServiceMetadata getInstance(final XMLMetadata xmlMetadata) {
- return xmlMetadata instanceof org.apache.olingo.client.core.edm.xml.v3.XMLMetadataImpl
- ? new org.apache.olingo.client.core.edm.v3.EdmServiceMetadataImpl(
- (org.apache.olingo.client.core.edm.xml.v3.XMLMetadataImpl) xmlMetadata)
- : new org.apache.olingo.client.core.edm.v4.EdmServiceMetadataImpl(
- (org.apache.olingo.client.core.edm.xml.v4.XMLMetadataImpl) xmlMetadata);
-
- }
-
- public AbstractEdmServiceMetadataImpl(final XMLMetadata xmlMetadata) {
- this.xmlMetadata = xmlMetadata;
- }
-
- @Override
- public InputStream getMetadata() {
- throw new UnsupportedOperationException("Not supported in client code.");
- }
-
- @Override
- public List<EdmEntitySetInfo> getEntitySetInfos() {
- synchronized (this) {
- if (entitySetInfos == null) {
- entitySetInfos = new ArrayList<EdmEntitySetInfo>();
- for (Schema schema : xmlMetadata.getSchemas()) {
- for (EntityContainer entityContainer : schema.getEntityContainers()) {
- for (EntitySet entitySet : entityContainer.getEntitySets()) {
- entitySetInfos.add(
- new EdmEntitySetInfoImpl(entityContainer.getName(), entitySet.getName()));
- }
- }
- }
- }
- return entitySetInfos;
- }
- }
-
- @Override
- public boolean equals(final Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java
deleted file mode 100644
index 8340ec6..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImpl.java
+++ /dev/null
@@ -1,36 +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;
-
-import org.apache.olingo.client.api.edm.xml.v4.Action;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmAction;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
-
-public class EdmActionImpl extends EdmOperationImpl implements EdmAction {
-
- public static EdmActionImpl getInstance(final Edm edm, final FullQualifiedName name, final Action action) {
- return EdmOperationImpl.getInstance(new EdmActionImpl(edm, name, action));
- }
-
- private EdmActionImpl(final Edm edm, final FullQualifiedName name, final Action action) {
- super(edm, name, action, EdmTypeKind.ACTION);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
deleted file mode 100644
index 3827418..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmActionImportImpl.java
+++ /dev/null
@@ -1,45 +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;
-
-import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
-import org.apache.olingo.client.core.edm.EdmTypeInfo;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmAction;
-import org.apache.olingo.commons.api.edm.EdmActionImport;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-
-public class EdmActionImportImpl extends EdmOperationImportImpl implements EdmActionImport {
-
- private final ActionImport actionImport;
-
- public EdmActionImportImpl(final Edm edm, final EdmEntityContainer container, final String name,
- final ActionImport actionImport) {
-
- super(edm, container, name, actionImport.getEntitySet());
- this.actionImport = actionImport;
- }
-
- @Override
- public EdmAction getAction() {
- return edm.getAction(new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(actionImport.getAction()).
- setDefaultNamespace(container.getNamespace()).build().getFullQualifiedName(), null, null);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java
deleted file mode 100644
index 6f1990e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmBindingTargetImpl.java
+++ /dev/null
@@ -1,79 +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;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.BindingTarget;
-import org.apache.olingo.client.api.edm.xml.v4.NavigationPropertyBinding;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmBindingTarget;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-import org.apache.olingo.commons.api.edm.EdmException;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.Target;
-import org.apache.olingo.commons.core.edm.AbstractEdmBindingTarget;
-
-public abstract class EdmBindingTargetImpl extends AbstractEdmBindingTarget {
-
- private final BindingTarget target;
-
- public EdmBindingTargetImpl(final Edm edm, final EdmEntityContainer container,
- final String name, final FullQualifiedName type, final BindingTarget target) {
-
- super(edm, container, name, type);
- this.target = target;
- }
-
- @Override
- public EdmBindingTarget getRelatedBindingTarget(final String path) {
- EdmBindingTarget bindingTarget = null;
-
- final List<? extends NavigationPropertyBinding> navigationPropertyBindings = target.getNavigationPropertyBindings();
- boolean found = false;
- for (final Iterator<? extends NavigationPropertyBinding> itor = navigationPropertyBindings.iterator();
- itor.hasNext() && !found;) {
-
- final NavigationPropertyBinding binding = itor.next();
- if (binding.getPath().equals(path)) {
- final Target edmTarget = new Target.Builder(binding.getTarget(), container).build();
-
- final EdmEntityContainer entityContainer = edm.getEntityContainer(edmTarget.getEntityContainer());
- if (entityContainer == null) {
- throw new EdmException("Cannot find entity container with name: " + edmTarget.getEntityContainer());
- }
- bindingTarget = entityContainer.getEntitySet(edmTarget.getTargetName());
- if (bindingTarget == null) {
- bindingTarget = entityContainer.getSingleton(edmTarget.getTargetName());
- if (bindingTarget == null) {
- throw new EdmException("Cannot find target with name: " + edmTarget.getTargetName());
- }
-
- found = true;
- } else {
- found = true;
- }
- }
- }
-
- return bindingTarget;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/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
deleted file mode 100644
index 7ab12ee..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmClientImpl.java
+++ /dev/null
@@ -1,385 +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;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.olingo.client.api.UnsupportedInV3Exception;
-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.Schema;
-import org.apache.olingo.client.api.edm.xml.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Action;
-import org.apache.olingo.client.api.edm.xml.v4.Function;
-import org.apache.olingo.client.api.edm.xml.v4.TypeDefinition;
-import org.apache.olingo.client.core.edm.v3.EdmActionProxy;
-import org.apache.olingo.client.core.edm.v3.EdmFunctionProxy;
-import org.apache.olingo.client.core.edm.v3.V3FunctionImportUtils;
-import org.apache.olingo.commons.api.edm.EdmAction;
-import org.apache.olingo.commons.api.edm.EdmComplexType;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-import org.apache.olingo.commons.api.edm.EdmEntityType;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-import org.apache.olingo.commons.api.edm.EdmFunction;
-import org.apache.olingo.commons.api.edm.EdmSchema;
-import org.apache.olingo.commons.api.edm.EdmServiceMetadata;
-import org.apache.olingo.commons.api.edm.EdmTypeDefinition;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.AbstractEdmImpl;
-
-public class EdmClientImpl extends AbstractEdmImpl {
-
- private final XMLMetadata xmlMetadata;
-
- private final EdmServiceMetadata serviceMetadata;
-
- public EdmClientImpl(final XMLMetadata xmlMetadata) {
- this.xmlMetadata = xmlMetadata;
- this.serviceMetadata = AbstractEdmServiceMetadataImpl.getInstance(xmlMetadata);
- }
-
- public XMLMetadata getXMLMetadata() {
- return xmlMetadata;
- }
-
- @Override
- protected EdmServiceMetadata createServiceMetadata() {
- return serviceMetadata;
- }
-
- @Override
- protected Map<String, String> createAliasToNamespaceInfo() {
- final Map<String, String> aliasToNamespace = new HashMap<String, String>();
-
- for (Schema schema : xmlMetadata.getSchemas()) {
- aliasToNamespace.put(null, schema.getNamespace());
- if (StringUtils.isNotBlank(schema.getAlias())) {
- aliasToNamespace.put(schema.getAlias(), schema.getNamespace());
- }
- }
-
- return aliasToNamespace;
- }
-
- @Override
- protected EdmEntityContainer createEntityContainer(final FullQualifiedName containerName) {
- EdmEntityContainer result = null;
-
- final Schema schema = xmlMetadata.getSchema(containerName.getNamespace());
- if (schema != null) {
- final EntityContainer xmlEntityContainer = schema.getDefaultEntityContainer();
- if (xmlEntityContainer != null) {
- result = new EdmEntityContainerImpl(this, containerName, xmlEntityContainer, xmlMetadata);
- }
- }
-
- return result;
- }
-
- @Override
- protected EdmEnumType createEnumType(final FullQualifiedName enumName) {
- EdmEnumType result = null;
-
- final Schema schema = xmlMetadata.getSchema(enumName.getNamespace());
- if (schema != null) {
- final EnumType xmlEnumType = schema.getEnumType(enumName.getName());
- if (xmlEnumType != null) {
- result = new EdmEnumTypeImpl(this, enumName, xmlEnumType);
- }
- }
-
- return result;
- }
-
- @Override
- protected EdmTypeDefinition createTypeDefinition(final FullQualifiedName typeDefinitionName) {
- EdmTypeDefinition result = null;
-
- final Schema schema = xmlMetadata.getSchema(typeDefinitionName.getNamespace());
- if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
- final TypeDefinition xmlTypeDefinition = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
- getTypeDefinition(typeDefinitionName.getName());
- if (xmlTypeDefinition != null) {
- result = new EdmTypeDefinitionImpl(this, typeDefinitionName, xmlTypeDefinition);
- }
- } else {
- throw new UnsupportedInV3Exception();
- }
-
- return result;
- }
-
- @Override
- protected EdmEntityType createEntityType(final FullQualifiedName entityTypeName) {
- EdmEntityType result = null;
-
- final Schema schema = xmlMetadata.getSchema(entityTypeName.getNamespace());
- final EntityType xmlEntityType = schema.getEntityType(entityTypeName.getName());
- if (xmlEntityType != null) {
- result = EdmEntityTypeImpl.getInstance(this, entityTypeName, xmlEntityType);
- }
-
- return result;
- }
-
- @Override
- protected EdmComplexType createComplexType(final FullQualifiedName complexTypeName) {
- EdmComplexType result = null;
-
- final Schema schema = xmlMetadata.getSchema(complexTypeName.getNamespace());
- final ComplexType xmlComplexType = schema.getComplexType(complexTypeName.getName());
- if (xmlComplexType != null) {
- result = EdmComplexTypeImpl.getInstance(this, complexTypeName, xmlComplexType);
- }
-
- return result;
- }
-
- @Override
- protected EdmAction createUnboundAction(final FullQualifiedName actionName) {
- EdmAction result = null;
-
- final Schema schema = xmlMetadata.getSchema(actionName.getNamespace());
- if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
- final List<Action> actions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
- getActions(actionName.getName());
- boolean found = false;
- for (final Iterator<Action> itor = actions.iterator(); itor.hasNext() && !found;) {
- final Action action = itor.next();
- if (!action.isBound()) {
- found = true;
- result = EdmActionImpl.getInstance(this, actionName, action);
- }
- }
- } else {
- for (EntityContainer entityContainer : schema.getEntityContainers()) {
- @SuppressWarnings("unchecked")
- final List<FunctionImport> functionImports = (List<FunctionImport>) entityContainer.
- getFunctionImports(actionName.getName());
- boolean found = false;
- for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
- final FunctionImport functionImport = itor.next();
- if (!V3FunctionImportUtils.canProxyFunction(functionImport) && !functionImport.isBindable()) {
- found = functionImport.getParameters().isEmpty();
- result = EdmActionProxy.getInstance(this, actionName, functionImport);
- }
- }
- }
- }
-
- return result;
- }
-
- @Override
- protected EdmFunction createUnboundFunction(final FullQualifiedName functionName, final List<String> parameterNames) {
- EdmFunction result = null;
-
- final Schema schema = xmlMetadata.getSchema(functionName.getNamespace());
- if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
- final List<Function> functions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
- getFunctions(functionName.getName());
- boolean found = false;
- for (final Iterator<Function> itor = functions.iterator(); itor.hasNext() && !found;) {
- final Function function = itor.next();
- if (!function.isBound()) {
- final Set<String> functionParamNames = new HashSet<String>();
- for (CommonParameter param : function.getParameters()) {
- functionParamNames.add(param.getName());
- }
- found = parameterNames == null
- ? functionParamNames.isEmpty()
- : functionParamNames.containsAll(parameterNames);
- result = EdmFunctionImpl.getInstance(this, functionName, function);
- }
- }
- } else {
- for (EntityContainer entityContainer : schema.getEntityContainers()) {
- @SuppressWarnings("unchecked")
- final List<FunctionImport> functionImports = (List<FunctionImport>) entityContainer.
- getFunctionImports(functionName.getName());
- boolean found = false;
- for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
- final FunctionImport functionImport = itor.next();
- if (V3FunctionImportUtils.canProxyFunction(functionImport) && !functionImport.isBindable()) {
- final Set<String> functionParamNames = new HashSet<String>();
- for (CommonParameter param : functionImport.getParameters()) {
- functionParamNames.add(param.getName());
- }
- found = parameterNames == null
- ? functionParamNames.isEmpty()
- : functionParamNames.containsAll(parameterNames);
- result = EdmFunctionProxy.getInstance(this, functionName, functionImport);
- }
- }
- }
- }
-
- return result;
- }
-
- @Override
- protected EdmAction createBoundAction(final FullQualifiedName actionName,
- final FullQualifiedName bindingParameterTypeName, final Boolean isBindingParameterCollection) {
-
- EdmAction result = null;
-
- final Schema schema = xmlMetadata.getSchema(actionName.getNamespace());
- if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
- final List<Action> actions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
- getActions(actionName.getName());
- boolean found = false;
- for (final Iterator<Action> itor = actions.iterator(); itor.hasNext() && !found;) {
- final Action action = itor.next();
- if (action.isBound()) {
- final EdmTypeInfo boundParam = new EdmTypeInfo.Builder().setEdm(this).
- setTypeExpression(action.getParameters().get(0).getType()).build();
- if (bindingParameterTypeName.equals(boundParam.getFullQualifiedName())
- && isBindingParameterCollection.booleanValue() == boundParam.isCollection()) {
-
- found = true;
- result = EdmActionImpl.getInstance(this, actionName, action);
- }
- }
- }
- } else {
- for (EntityContainer entityContainer : schema.getEntityContainers()) {
- @SuppressWarnings("unchecked")
- final List<FunctionImport> functionImports = (List<FunctionImport>) entityContainer.
- getFunctionImports(actionName.getName());
- boolean found = false;
- for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
- final FunctionImport functionImport = itor.next();
- if (!V3FunctionImportUtils.canProxyFunction(functionImport) && functionImport.isBindable()) {
- final EdmTypeInfo boundParam = new EdmTypeInfo.Builder().setEdm(this).
- setTypeExpression(functionImport.getParameters().get(0).getType()).build();
- if (bindingParameterTypeName.equals(boundParam.getFullQualifiedName())
- && isBindingParameterCollection.booleanValue() == boundParam.isCollection()) {
-
- found = true;
- result = EdmActionProxy.getInstance(this, actionName, functionImport);
- }
- }
- }
- }
- }
-
- return result;
- }
-
- @Override
- protected EdmFunction createBoundFunction(final FullQualifiedName functionName,
- final FullQualifiedName bindingParameterTypeName, final Boolean isBindingParameterCollection,
- final List<String> parameterNames) {
-
- EdmFunction result = null;
-
- final Schema schema = xmlMetadata.getSchema(functionName.getNamespace());
- if (schema instanceof org.apache.olingo.client.api.edm.xml.v4.Schema) {
- final List<Function> functions = ((org.apache.olingo.client.api.edm.xml.v4.Schema) schema).
- getFunctions(functionName.getName());
- boolean found = false;
- for (final Iterator<Function> itor = functions.iterator(); itor.hasNext() && !found;) {
- final Function function = itor.next();
- if (function.isBound()) {
- final EdmTypeInfo boundParam = new EdmTypeInfo.Builder().setEdm(this).
- setTypeExpression(function.getParameters().get(0).getType()).build();
- if (bindingParameterTypeName.equals(boundParam.getFullQualifiedName())
- && isBindingParameterCollection.booleanValue() == boundParam.isCollection()) {
-
- final Set<String> functionParamNames = new HashSet<String>();
- for (CommonParameter param : function.getParameters()) {
- functionParamNames.add(param.getName());
- }
- found = parameterNames == null
- ? functionParamNames.isEmpty()
- : functionParamNames.containsAll(parameterNames);
- result = EdmFunctionImpl.getInstance(this, functionName, function);
- }
- }
- }
- } else {
- for (EntityContainer entityContainer : schema.getEntityContainers()) {
- @SuppressWarnings("unchecked")
- final List<FunctionImport> functionImports = (List<FunctionImport>) entityContainer.
- getFunctionImports(functionName.getName());
- boolean found = false;
- for (final Iterator<FunctionImport> itor = functionImports.iterator(); itor.hasNext() && !found;) {
- final FunctionImport functionImport = itor.next();
- if (!V3FunctionImportUtils.canProxyFunction(functionImport) && functionImport.isBindable()) {
- final EdmTypeInfo boundParam = new EdmTypeInfo.Builder().setEdm(this).
- setTypeExpression(functionImport.getParameters().get(0).getType()).build();
- if (bindingParameterTypeName.equals(boundParam.getFullQualifiedName())
- && isBindingParameterCollection.booleanValue() == boundParam.isCollection()) {
-
- final Set<String> functionParamNames = new HashSet<String>();
- for (CommonParameter param : functionImport.getParameters()) {
- functionParamNames.add(param.getName());
- }
- found = parameterNames == null
- ? functionParamNames.isEmpty()
- : functionParamNames.containsAll(parameterNames);
- result = EdmFunctionProxy.getInstance(this, functionName, functionImport);
- }
- }
- }
- }
- }
-
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public String toString() {
- return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
- }
-
- @Override
- protected List<EdmSchema> createSchemas() {
- final List<EdmSchema> schemas = new ArrayList<EdmSchema>();
- for (Schema schema : xmlMetadata.getSchemas()) {
- schemas.add(new EdmSchemaImpl(this, xmlMetadata, schema));
- }
- return schemas;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
deleted file mode 100644
index 43f5357..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmComplexTypeImpl.java
+++ /dev/null
@@ -1,66 +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;
-
-import java.util.Map;
-import org.apache.olingo.client.api.edm.xml.ComplexType;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmNavigationProperty;
-import org.apache.olingo.commons.api.edm.EdmProperty;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.AbstractEdmComplexType;
-import org.apache.olingo.commons.core.edm.EdmStructuredTypeHelper;
-
-public class EdmComplexTypeImpl extends AbstractEdmComplexType {
-
- private final EdmStructuredTypeHelper helper;
-
- public static EdmComplexTypeImpl getInstance(final Edm edm, final FullQualifiedName fqn,
- final ComplexType complexType) {
-
- FullQualifiedName baseTypeName = null;
- if (complexType instanceof org.apache.olingo.client.api.edm.xml.v4.ComplexType) {
- final String baseType = ((org.apache.olingo.client.api.edm.xml.v4.ComplexType) complexType).getBaseType();
- baseTypeName = baseType == null
- ? null : new EdmTypeInfo.Builder().setTypeExpression(baseType).build().getFullQualifiedName();
- }
- final EdmComplexTypeImpl instance = new EdmComplexTypeImpl(edm, fqn, baseTypeName, complexType);
- instance.baseType = instance.buildBaseType(baseTypeName);
-
- return instance;
- }
-
- private EdmComplexTypeImpl(final Edm edm, final FullQualifiedName fqn, final FullQualifiedName baseTypeName,
- final ComplexType complexType) {
-
- super(edm, fqn, baseTypeName);
- this.helper = new EdmStructuredTypeHelperImpl(edm, complexType);
- }
-
- @Override
- protected Map<String, EdmProperty> getProperties() {
- return helper.getProperties();
- }
-
- @Override
- protected Map<String, EdmNavigationProperty> getNavigationProperties() {
- return helper.getNavigationProperties();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/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
deleted file mode 100644
index 169aaf9..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityContainerImpl.java
+++ /dev/null
@@ -1,204 +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;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.UnsupportedInV3Exception;
-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.XMLMetadata;
-import org.apache.olingo.client.api.edm.xml.v3.FunctionImport;
-import org.apache.olingo.client.api.edm.xml.v4.ActionImport;
-import org.apache.olingo.client.api.edm.xml.v4.Singleton;
-import org.apache.olingo.client.core.edm.v3.EdmActionImportProxy;
-import org.apache.olingo.client.core.edm.v3.EdmEntitySetProxy;
-import org.apache.olingo.client.core.edm.v3.EdmFunctionImportProxy;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmActionImport;
-import org.apache.olingo.commons.api.edm.EdmEntitySet;
-import org.apache.olingo.commons.api.edm.EdmException;
-import org.apache.olingo.commons.api.edm.EdmFunctionImport;
-import org.apache.olingo.commons.api.edm.EdmSingleton;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.AbstractEdmEntityContainer;
-
-public class EdmEntityContainerImpl extends AbstractEdmEntityContainer {
-
- private final EntityContainer xmlEntityContainer;
-
- private final XMLMetadata xmlMetadata;
-
- public EdmEntityContainerImpl(final Edm edm, final FullQualifiedName entityContainerName,
- final EntityContainer xmlEntityContainer, final XMLMetadata xmlMetadata) {
-
- super(edm, entityContainerName);
-
- this.xmlEntityContainer = xmlEntityContainer;
- this.xmlMetadata = xmlMetadata;
- }
-
- @Override
- protected EdmSingleton createSingleton(final String singletonName) {
- if (!(xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer)) {
- throw new UnsupportedInV3Exception();
- }
-
- final Singleton singleton = ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).
- getSingleton(singletonName);
- if (singleton == null) {
- throw new EdmException("Singleton named '" + singletonName + "' not found in " + entityContainerName);
- }
- return new EdmSingletonImpl(edm, this, singletonName, new EdmTypeInfo.Builder().
- setTypeExpression(singleton.getEntityType()).setDefaultNamespace(entityContainerName.getNamespace()).
- build().getFullQualifiedName(), singleton);
- }
-
- @Override
- protected EdmEntitySet createEntitySet(final String entitySetName) {
- final EntitySet entitySet = xmlEntityContainer.getEntitySet(entitySetName);
- if (entitySet == null) {
- throw new EdmException("EntitySet named '" + entitySetName + "' not found in " + entityContainerName);
- }
-
- final FullQualifiedName entityType = new EdmTypeInfo.Builder().setTypeExpression(entitySet.getEntityType()).
- setDefaultNamespace(entityContainerName.getNamespace()).build().getFullQualifiedName();
- if (entitySet instanceof org.apache.olingo.client.api.edm.xml.v4.EntitySet) {
- return new EdmEntitySetImpl(edm, this, entitySetName, entityType,
- (org.apache.olingo.client.api.edm.xml.v4.EntitySet) entitySet);
- } else {
- return new EdmEntitySetProxy(edm, this, entitySetName, entityType, xmlMetadata);
- }
- }
-
- @Override
- protected EdmActionImport createActionImport(final String actionImportName) {
- if (xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer) {
- final ActionImport actionImport = ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).
- getActionImport(actionImportName);
- if (actionImport == null) {
- throw new EdmException("ActionImport named '" + actionImportName + "' not found in " + entityContainerName);
- }
- return new EdmActionImportImpl(edm, this, actionImportName, actionImport);
- } else {
- final FunctionImport functionImport = (FunctionImport) xmlEntityContainer.getFunctionImport(actionImportName);
- if (functionImport == null) {
- throw new EdmException("FunctionImport named '" + actionImportName + "' not found in " + entityContainerName);
- }
- return new EdmActionImportProxy(edm, this, actionImportName, functionImport);
- }
- }
-
- @Override
- protected EdmFunctionImport createFunctionImport(final String functionImportName) {
- final CommonFunctionImport functionImport = xmlEntityContainer.getFunctionImport(functionImportName);
- if (functionImport == null) {
- throw new EdmException("FunctionImport named '" + functionImportName + "' not found in " + entityContainerName);
- }
-
- if (functionImport instanceof org.apache.olingo.client.api.edm.xml.v4.FunctionImport) {
- return new EdmFunctionImportImpl(edm, this, functionImportName,
- (org.apache.olingo.client.api.edm.xml.v4.FunctionImport) functionImport);
- } else {
- return new EdmFunctionImportProxy(edm, this, functionImportName,
- (org.apache.olingo.client.api.edm.xml.v3.FunctionImport) functionImport);
- }
- }
-
- @Override
- protected void loadAllEntitySets() {
- List<? extends EntitySet> localEntitySets = xmlEntityContainer.getEntitySets();
- if (localEntitySets != null) {
- for (EntitySet entitySet : localEntitySets) {
- EdmEntitySet edmSet;
- final FullQualifiedName entityType = new EdmTypeInfo.Builder().setTypeExpression(entitySet.getEntityType()).
- setDefaultNamespace(entityContainerName.getNamespace()).build().getFullQualifiedName();
- if (entitySet instanceof org.apache.olingo.client.api.edm.xml.v4.EntitySet) {
- edmSet =
- new EdmEntitySetImpl(edm, this, entitySet.getName(), entityType,
- (org.apache.olingo.client.api.edm.xml.v4.EntitySet) entitySet);
- } else {
- edmSet = new EdmEntitySetProxy(edm, this, entitySet.getName(), entityType, xmlMetadata);
- }
- entitySets.put(edmSet.getName(), edmSet);
- }
- }
-
- }
-
- @Override
- protected void loadAllFunctionImports() {
- final List<? extends CommonFunctionImport> localFunctionImports = xmlEntityContainer.getFunctionImports();
- if (localFunctionImports != null) {
- for (CommonFunctionImport functionImport : localFunctionImports) {
- EdmFunctionImport edmFunctionImport;
- if (functionImport instanceof org.apache.olingo.client.api.edm.xml.v4.FunctionImport) {
- edmFunctionImport = new EdmFunctionImportImpl(edm, this, functionImport.getName(),
- (org.apache.olingo.client.api.edm.xml.v4.FunctionImport) functionImport);
- } else {
- edmFunctionImport = new EdmFunctionImportProxy(edm, this, functionImport.getName(),
- (org.apache.olingo.client.api.edm.xml.v3.FunctionImport) functionImport);
- }
- functionImports.put(edmFunctionImport.getName(), edmFunctionImport);
- }
- }
- }
-
- @Override
- protected void loadAllSingletons() {
- if (!(xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer)) {
- throw new UnsupportedInV3Exception();
- }
-
- final List<Singleton> localSingletons =
- ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).getSingletons();
- if (localSingletons != null) {
- for (Singleton singleton : localSingletons) {
- singletons.put(singleton.getName(), new EdmSingletonImpl(edm, this, singleton.getName(),
- new EdmTypeInfo.Builder().
- setTypeExpression(singleton.getEntityType()).setDefaultNamespace(entityContainerName.getNamespace()).
- build().getFullQualifiedName(), singleton));
- }
- }
- }
-
- @Override
- protected void loadAllActionImports() {
- if (xmlEntityContainer instanceof org.apache.olingo.client.api.edm.xml.v4.EntityContainer) {
- final List<ActionImport> localActionImports =
- ((org.apache.olingo.client.api.edm.xml.v4.EntityContainer) xmlEntityContainer).getActionImports();
- if (actionImports != null) {
- for (ActionImport actionImport : localActionImports) {
- actionImports.put(actionImport.getName(),
- new EdmActionImportImpl(edm, this, actionImport.getName(), actionImport));
- }
- }
- } else {
- @SuppressWarnings("unchecked")
- final List<FunctionImport> localFunctionImports = (List<FunctionImport>) xmlEntityContainer.getFunctionImports();
- if (localFunctionImports != null) {
- for (FunctionImport functionImport : localFunctionImports) {
- actionImports.put(functionImport.getName(),
- new EdmActionImportProxy(edm, this, functionImport.getName(), functionImport));
- }
- }
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java
deleted file mode 100644
index ec9af77..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntitySetImpl.java
+++ /dev/null
@@ -1,42 +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;
-
-import org.apache.olingo.client.api.edm.xml.v4.EntitySet;
-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;
-
-public class EdmEntitySetImpl extends EdmBindingTargetImpl implements EdmEntitySet {
-
- private EntitySet entitySet;
-
- public EdmEntitySetImpl(final Edm edm, final EdmEntityContainer container, final String name,
- final FullQualifiedName type, final EntitySet entitySet) {
-
- super(edm, container, name, type, entitySet);
- this.entitySet = entitySet;
- }
-
- @Override
- public boolean isIncludeInServiceDocument() {
- return entitySet.isIncludeInServiceDocument();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/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
deleted file mode 100644
index 914ad1c..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEntityTypeImpl.java
+++ /dev/null
@@ -1,80 +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;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.olingo.client.api.edm.xml.EntityType;
-import org.apache.olingo.client.api.edm.xml.PropertyRef;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmEntityType;
-import org.apache.olingo.commons.api.edm.EdmKeyPropertyRef;
-import org.apache.olingo.commons.api.edm.EdmNavigationProperty;
-import org.apache.olingo.commons.api.edm.EdmProperty;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.AbstractEdmEntityType;
-import org.apache.olingo.commons.core.edm.EdmStructuredTypeHelper;
-
-public class EdmEntityTypeImpl extends AbstractEdmEntityType {
-
- private final EdmStructuredTypeHelper helper;
-
- public static EdmEntityTypeImpl getInstance(final Edm edm, final FullQualifiedName fqn, final EntityType entityType) {
- final FullQualifiedName baseTypeName = entityType.getBaseType() == null
- ? null
- : new EdmTypeInfo.Builder().setTypeExpression(entityType.getBaseType()).build().getFullQualifiedName();
- final EdmEntityTypeImpl instance = new EdmEntityTypeImpl(edm, fqn, baseTypeName, entityType);
- instance.baseType = instance.buildBaseType(baseTypeName);
-
- if (instance.baseType == null) {
- instance.entityBaseType = null;
-
- final List<EdmKeyPropertyRef> edmKey = new ArrayList<EdmKeyPropertyRef>(
- entityType.getKey().getPropertyRefs().size());
- for (PropertyRef ref : entityType.getKey().getPropertyRefs()) {
- edmKey.add(new EdmKeyPropertyRefImpl(instance, ref));
- }
- instance.setEdmKeyPropertyRef(edmKey);
- } else {
- instance.entityBaseType = (EdmEntityType) instance.baseType;
- }
-
- return instance;
- }
-
- private EdmEntityTypeImpl(final Edm edm, final FullQualifiedName fqn, final FullQualifiedName baseTypeName,
- final EntityType entityType) {
-
- super(edm, fqn, baseTypeName, entityType.isHasStream());
- this.helper = new EdmStructuredTypeHelperImpl(edm, entityType);
- }
-
- @Override
- protected Map<String, EdmProperty> getProperties() {
- return helper.getProperties();
- }
-
- @Override
- protected Map<String, EdmNavigationProperty> getNavigationProperties() {
- return helper.getNavigationProperties();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.java
deleted file mode 100644
index 10a1b2e..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmEnumTypeImpl.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;
-
-import org.apache.olingo.client.api.edm.xml.EnumType;
-import org.apache.olingo.client.api.edm.xml.Member;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmEnumType;
-import org.apache.olingo.commons.api.edm.EdmMember;
-import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.AbstractEdmEnumType;
-import org.apache.olingo.commons.core.edm.EdmMemberImpl;
-import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.olingo.commons.api.edm.EdmException;
-
-public class EdmEnumTypeImpl extends AbstractEdmEnumType implements EdmEnumType {
-
- private static final EdmPrimitiveTypeKind[] VALID_UNDERLYING_TYPES = new EdmPrimitiveTypeKind[] {
- EdmPrimitiveTypeKind.Byte,
- EdmPrimitiveTypeKind.SByte,
- EdmPrimitiveTypeKind.Int16,
- EdmPrimitiveTypeKind.Int32,
- EdmPrimitiveTypeKind.Int64
- };
-
- private final EdmPrimitiveType underlyingType;
-
- private final List<String> memberNames;
-
- private final Map<String, EdmMember> members;
-
- public EdmEnumTypeImpl(final Edm edm, final FullQualifiedName fqn, final EnumType xmlEnumType) {
- super(edm, fqn, xmlEnumType.isFlags());
-
- if (xmlEnumType.getUnderlyingType() == null) {
- this.underlyingType = EdmPrimitiveTypeKind.Int32.getEdmPrimitiveTypeInstance();
- } else {
- this.underlyingType = EdmPrimitiveTypeKind.valueOfFQN(xmlEnumType.getUnderlyingType()).
- getEdmPrimitiveTypeInstance();
- if (!ArrayUtils.contains(VALID_UNDERLYING_TYPES, this.underlyingType.getKind())) {
- throw new EdmException("Not allowed as underlying type: " + this.underlyingType.getKind());
- }
- }
-
- final List<? extends Member> xmlMembers = xmlEnumType.getMembers();
- final List<String> _memberNames = new ArrayList<String>();
- final Map<String, EdmMember> _members = new LinkedHashMap<String, EdmMember>(xmlMembers.size());
- for (Member xmlMember : xmlMembers) {
- _memberNames.add(xmlMember.getName());
- _members.put(xmlMember.getName(), new EdmMemberImpl(edm, xmlMember.getName(), xmlMember.getValue()));
- }
- this.memberNames = Collections.unmodifiableList(_memberNames);
- this.members = Collections.unmodifiableMap(_members);
- }
-
- @Override
- public EdmPrimitiveType getUnderlyingType() {
- return underlyingType;
- }
-
- @Override
- public List<String> getMemberNames() {
- return memberNames;
- }
-
- @Override
- protected Collection<? extends EdmMember> getMembers() {
- return members.values();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java
deleted file mode 100644
index d2831fc..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImpl.java
+++ /dev/null
@@ -1,44 +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;
-
-import org.apache.olingo.client.api.edm.xml.v4.Function;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmFunction;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
-
-public class EdmFunctionImpl extends EdmOperationImpl implements EdmFunction {
-
- private final Function function;
-
- public static EdmFunctionImpl getInstance(final Edm edm, final FullQualifiedName name, final Function function) {
- return EdmOperationImpl.getInstance(new EdmFunctionImpl(edm, name, function));
- }
-
- private EdmFunctionImpl(final Edm edm, final FullQualifiedName name, final Function function) {
- super(edm, name, function, EdmTypeKind.FUNCTION);
- this.function = function;
- }
-
- @Override
- public boolean isComposable() {
- return function.isComposable();
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
deleted file mode 100644
index 27d6d10..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmFunctionImportImpl.java
+++ /dev/null
@@ -1,56 +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;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.FunctionImport;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-import org.apache.olingo.commons.api.edm.EdmFunction;
-import org.apache.olingo.commons.api.edm.EdmFunctionImport;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-
-public class EdmFunctionImportImpl extends EdmOperationImportImpl implements EdmFunctionImport {
-
- private final FunctionImport functionImport;
-
- public EdmFunctionImportImpl(final Edm edm, final EdmEntityContainer container, final String name,
- final FunctionImport functionImport) {
-
- super(edm, container, name, functionImport.getEntitySet());
- this.functionImport = functionImport;
- }
-
- @Override
- public EdmFunction getFunction(final List<String> parameterNames) {
- return edm.getFunction(new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(functionImport.getFunction()).
- setDefaultNamespace(container.getNamespace()).build().getFullQualifiedName(), null, null, parameterNames);
- }
-
- @Override
- public boolean isIncludeInServiceDocument() {
- return functionImport.isIncludeInServiceDocument();
- }
-
- @Override
- public FullQualifiedName getFunctionFqn() {
- return new FullQualifiedName(functionImport.getFunction());
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmKeyPropertyRefImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmKeyPropertyRefImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmKeyPropertyRefImpl.java
deleted file mode 100644
index a44b4c5..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmKeyPropertyRefImpl.java
+++ /dev/null
@@ -1,49 +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;
-
-import org.apache.olingo.client.api.edm.xml.PropertyRef;
-import org.apache.olingo.commons.api.edm.EdmEntityType;
-import org.apache.olingo.commons.core.edm.AbstractEdmKeyPropertyRef;
-
-public class EdmKeyPropertyRefImpl extends AbstractEdmKeyPropertyRef {
-
- private final PropertyRef propertyRef;
-
- public EdmKeyPropertyRefImpl(final EdmEntityType edmEntityType, final PropertyRef propertyRef) {
- super(edmEntityType);
- this.propertyRef = propertyRef;
- }
-
- @Override
- public String getKeyPropertyName() {
- return propertyRef.getName();
- }
-
- @Override
- public String getAlias() {
- return propertyRef.getAlias();
- }
-
- @Override
- public String getPath() {
- throw new UnsupportedOperationException("Not supported in client code.");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
deleted file mode 100644
index 19df620..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmNavigationPropertyImpl.java
+++ /dev/null
@@ -1,74 +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;
-
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.v4.NavigationProperty;
-import org.apache.olingo.client.api.edm.xml.v4.ReferentialConstraint;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.AbstractEdmNavigationProperty;
-
-public class EdmNavigationPropertyImpl extends AbstractEdmNavigationProperty {
-
- private final NavigationProperty navigationProperty;
-
- private final EdmTypeInfo edmTypeInfo;
-
- public EdmNavigationPropertyImpl(final Edm edm, final NavigationProperty navigationProperty) {
- super(edm, navigationProperty.getName());
- this.navigationProperty = navigationProperty;
- this.edmTypeInfo = new EdmTypeInfo.Builder().setTypeExpression(navigationProperty.getType()).build();
- }
-
- @Override
- protected FullQualifiedName getTypeFQN() {
- return edmTypeInfo.getFullQualifiedName();
- }
-
- @Override
- protected String internatGetPartner() {
- return navigationProperty.getPartner();
- }
-
- @Override
- public boolean isCollection() {
- return edmTypeInfo.isCollection();
- }
-
- @Override
- public Boolean isNullable() {
- return navigationProperty.isNullable();
- }
-
- @Override
- public String getReferencingPropertyName(final String referencedPropertyName) {
- final List<? extends ReferentialConstraint> referentialConstraints = navigationProperty.getReferentialConstraints();
- if (referentialConstraints != null) {
- for (ReferentialConstraint constraint : referentialConstraints) {
- if (constraint.getReferencedProperty().equals(referencedPropertyName)) {
- return constraint.getProperty();
- }
- }
- }
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/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
deleted file mode 100644
index f54d6c1..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImpl.java
+++ /dev/null
@@ -1,90 +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;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.olingo.client.api.edm.xml.CommonParameter;
-import org.apache.olingo.client.api.edm.xml.v4.Action;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmParameter;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
-import org.apache.olingo.commons.core.edm.AbstractEdmOperation;
-
-public abstract class EdmOperationImpl extends AbstractEdmOperation {
-
- protected final Action operation;
-
- protected static <T extends EdmOperationImpl> T getInstance(final T instance) {
- final List<? extends CommonParameter> parameters = instance.operation.getParameters();
- final List<EdmParameter> _parameters = new ArrayList<EdmParameter>(parameters.size());
- for (CommonParameter parameter : parameters) {
- _parameters.add(EdmParameterImpl.getInstance(instance.edm, parameter));
- }
- instance.setParameters(_parameters);
-
- instance.setEntitySetPath(instance.operation.getEntitySetPath());
-
- instance.setIsBound(instance.operation.isBound());
-
- if (instance.operation.getReturnType() != null) {
- instance.setReturnType(EdmReturnTypeImpl.getInstance(instance.edm, instance.operation.getReturnType()));
- }
-
- return instance;
- }
-
- protected EdmOperationImpl(final Edm edm, final FullQualifiedName name, final Action operation,
- final EdmTypeKind kind) {
-
- super(edm, name, kind);
- this.operation = operation;
- }
-
- private EdmParameter getBindingParameter() {
- EdmParameter bindingParam = null;
- if (isBound()) {
- final String bindingParamName = operation.getParameters().get(0).getName();
- bindingParam = getParameter(bindingParamName);
- }
- return bindingParam;
- }
-
- @Override
- public FullQualifiedName getBindingParameterTypeFqn() {
- FullQualifiedName fqn = null;
- final EdmParameter bindingParam = getBindingParameter();
- if (bindingParam != null) {
- fqn = new FullQualifiedName(bindingParam.getType().getNamespace(), bindingParam.getType().getName());
- }
- return fqn;
- }
-
- @Override
- public Boolean isBindingParameterTypeCollection() {
- Boolean result = null;
- final EdmParameter bindingParam = getBindingParameter();
- if (bindingParam != null) {
- result = bindingParam.isCollection();
- }
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImportImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImportImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImportImpl.java
deleted file mode 100644
index 9f7aadf..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmOperationImportImpl.java
+++ /dev/null
@@ -1,34 +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;
-
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmEntityContainer;
-import org.apache.olingo.commons.api.edm.Target;
-import org.apache.olingo.commons.core.edm.AbstractEdmOperationImport;
-
-public abstract class EdmOperationImportImpl extends AbstractEdmOperationImport {
-
- protected EdmOperationImportImpl(final Edm edm, final EdmEntityContainer container, final String name,
- final String entitySet) {
-
- super(edm, container, name, entitySet == null ? null : new Target.Builder(entitySet, container).build());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/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
deleted file mode 100644
index e912ecb..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmParameterImpl.java
+++ /dev/null
@@ -1,73 +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;
-
-import org.apache.olingo.client.api.edm.xml.CommonParameter;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmMapping;
-import org.apache.olingo.commons.core.edm.AbstractEdmParameter;
-
-public class EdmParameterImpl extends AbstractEdmParameter {
-
- private final CommonParameter parameter;
-
- private final EdmTypeInfo parameterInfo;
-
- public static EdmParameterImpl getInstance(final Edm edm, final CommonParameter parameter) {
- final EdmTypeInfo paramTypeInfo = new EdmTypeInfo.Builder().setTypeExpression(parameter.getType()).build();
- return new EdmParameterImpl(edm, parameter, paramTypeInfo);
- }
-
- private EdmParameterImpl(final Edm edm, final CommonParameter parameter, final EdmTypeInfo parameterInfo) {
- super(edm, parameter.getName(), parameterInfo.getFullQualifiedName());
- this.parameter = parameter;
- this.parameterInfo = parameterInfo;
- }
-
- @Override
- public boolean isCollection() {
- return parameterInfo.isCollection();
- }
-
- @Override
- public EdmMapping getMapping() {
- throw new UnsupportedOperationException("Not supported in client code.");
- }
-
- @Override
- public Boolean isNullable() {
- return parameter.isNullable();
- }
-
- @Override
- public Integer getMaxLength() {
- return parameter.getMaxLength();
- }
-
- @Override
- public Integer getPrecision() {
- return parameter.getPrecision();
- }
-
- @Override
- public Integer getScale() {
- return parameter.getScale();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/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
deleted file mode 100644
index 8e3eba6..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmPropertyImpl.java
+++ /dev/null
@@ -1,90 +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;
-
-import org.apache.olingo.client.api.edm.xml.CommonProperty;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmMapping;
-import org.apache.olingo.commons.api.edm.EdmProperty;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.edm.AbstractEdmProperty;
-
-public class EdmPropertyImpl extends AbstractEdmProperty implements EdmProperty {
-
- private final CommonProperty property;
-
- private final EdmTypeInfo edmTypeInfo;
-
- public EdmPropertyImpl(final Edm edm, final CommonProperty property) {
- super(edm, property.getName());
- this.property = property;
- this.edmTypeInfo = new EdmTypeInfo.Builder().setTypeExpression(property.getType()).build();
- }
-
- @Override
- protected FullQualifiedName getTypeFQN() {
- return edmTypeInfo.getFullQualifiedName();
- }
-
- @Override
- public boolean isCollection() {
- return edmTypeInfo.isCollection();
- }
-
- @Override
- public EdmMapping getMapping() {
- throw new UnsupportedOperationException("Not supported in client code.");
- }
-
- @Override
- public String getMimeType() {
- throw new UnsupportedOperationException("Not supported in client code.");
- }
-
- @Override
- public Boolean isNullable() {
- return property.isNullable();
- }
-
- @Override
- public Integer getMaxLength() {
- return property.getMaxLength();
- }
-
- @Override
- public Integer getPrecision() {
- return property.getPrecision();
- }
-
- @Override
- public Integer getScale() {
- return property.getScale();
- }
-
- @Override
- public Boolean isUnicode() {
- return property.isUnicode();
- }
-
- @Override
- public String getDefaultValue() {
- return property.getDefaultValue();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/64564c2d/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
deleted file mode 100644
index b559c71..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/EdmReturnTypeImpl.java
+++ /dev/null
@@ -1,67 +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;
-
-import org.apache.olingo.client.api.edm.xml.v4.ReturnType;
-import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.core.edm.AbstractEdmReturnType;
-
-public class EdmReturnTypeImpl extends AbstractEdmReturnType {
-
- private final ReturnType returnType;
-
- private final EdmTypeInfo returnTypeInfo;
-
- public static EdmReturnTypeImpl getInstance(final Edm edm, final ReturnType returnType) {
- final EdmTypeInfo returnTypeInfo = new EdmTypeInfo.Builder().setTypeExpression(returnType.getType()).build();
- return new EdmReturnTypeImpl(edm, returnType, returnTypeInfo);
- }
-
- private EdmReturnTypeImpl(final Edm edm, final ReturnType returnType, final EdmTypeInfo returnTypeInfo) {
- super(edm, returnTypeInfo.getFullQualifiedName());
- this.returnType = returnType;
- this.returnTypeInfo = returnTypeInfo;
- }
-
- @Override
- public Boolean isNullable() {
- return returnType.isNullable();
- }
-
- @Override
- public Integer getMaxLength() {
- return returnType.getMaxLength();
- }
-
- @Override
- public Integer getPrecision() {
- return returnType.getPrecision();
- }
-
- @Override
- public Integer getScale() {
- return returnType.getScale();
- }
-
- @Override
- public boolean isCollection() {
- return returnTypeInfo.isCollection();
- }
-
-}