http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySet.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySet.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySet.java new file mode 100644 index 0000000..6b5f1f1 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntitySet.java @@ -0,0 +1,71 @@ +/* + * 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.domain; + +import java.net.URI; +import java.util.List; + +/** + * OData entity collection. If pagination was used to get this instance, forward page navigation URI will be available. + */ +public interface ClientEntitySet extends ClientInvokeResult, ClientAnnotatable { + + /** + * Gets next page link. + * + * @return next page link; null value if single page or last page reached. + */ + URI getNext(); + + /** + * Gets contained entities. + * + * @return entity set's entities. + */ + List<ClientEntity> getEntities(); + + /** + * Gets in-line count. + * + * @return in-line count value. + */ + Integer getCount(); + + /** + * Sets in-line count. + * + * @param count in-line count value. + */ + void setCount(final int count); + + + /** + * Gets delta link if exists. + * + * @return delta link if exists; null otherwise. + */ + URI getDeltaLink(); + + /** + * Sets delta link. + * + * @param deltaLink delta link. + */ + void setDeltaLink(URI deltaLink); +}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEnumValue.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEnumValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEnumValue.java new file mode 100644 index 0000000..c1c5937 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEnumValue.java @@ -0,0 +1,27 @@ +/* + * 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.domain; + +public interface ClientEnumValue extends ClientValue { + + String getValue(); + + @Override + String toString(); +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntity.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntity.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntity.java new file mode 100644 index 0000000..b5ff829 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntity.java @@ -0,0 +1,68 @@ +/* + * 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.domain; + +import java.net.URI; + +/** + * OData in-line entity. + */ +public class ClientInlineEntity extends ClientLink { + + private final ClientEntity entity; + + /** + * Constructor. + * + * @param uri edit link. + * @param type type. + * @param title title. + * @param entity entity. + */ + public ClientInlineEntity(final URI uri, final ClientLinkType type, final String title, final ClientEntity entity) { + + super(uri, type, title); + this.entity = entity; + } + + /** + * Constructor. + * + * @param baseURI base URI. + * @param href href. + * @param type type. + * @param title title. + * @param entity entity. + */ + public ClientInlineEntity(final URI baseURI, final String href, final ClientLinkType type, final String title, + final ClientEntity entity) { + + super(baseURI, href, type, title); + this.entity = entity; + } + + /** + * Gets wrapped entity. + * + * @return wrapped entity. + */ + public ClientEntity getEntity() { + return entity; + } +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntitySet.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntitySet.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntitySet.java new file mode 100644 index 0000000..28c4ee6 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInlineEntitySet.java @@ -0,0 +1,69 @@ +/* + * 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.domain; + +import java.net.URI; + +/** + * OData in-line entity set. + */ +public class ClientInlineEntitySet extends ClientLink { + + private ClientEntitySet entitySet; + + /** + * Constructor. + * + * @param uri edit link. + * @param type type. + * @param title title. + * @param entitySet entity set. + */ + public ClientInlineEntitySet(final URI uri, final ClientLinkType type, + final String title, final ClientEntitySet entitySet) { + + super(uri, type, title); + this.entitySet = entitySet; + } + + /** + * Constructor. + * + * @param baseURI base URI. + * @param href href. + * @param type type. + * @param title title. + * @param entitySet entity set. + */ + public ClientInlineEntitySet(final URI baseURI, final String href, + final ClientLinkType type, final String title, final ClientEntitySet entitySet) { + + super(baseURI, href, type, title); + this.entitySet = entitySet; + } + + /** + * Gets wrapped entity set. + * + * @return wrapped entity set. + */ + public ClientEntitySet getEntitySet() { + return entitySet; + } +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInvokeResult.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInvokeResult.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInvokeResult.java new file mode 100644 index 0000000..294aa1c --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientInvokeResult.java @@ -0,0 +1,30 @@ +/* + * 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.domain; + +/** + * Marker interface for any OData domain object that can be returned by an operation invocation. + * + * @see ClientEntitySet + * @see ClientEntity + * @see ClientProperty + */ +public interface ClientInvokeResult { +//No additional methods needed for now. +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientItem.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientItem.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientItem.java new file mode 100644 index 0000000..32dcdce --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientItem.java @@ -0,0 +1,96 @@ +/* + * 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.domain; + +import java.net.URI; + +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.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Abstract representation of OData entities and links. + */ +public abstract class ClientItem { + + /** + * Logger. + */ + protected static final Logger LOG = LoggerFactory.getLogger(ClientItem.class); + + /** + * OData entity name/type. + */ + private final String name; + + /** + * OData item self link. + */ + protected URI link; + + /** + * Constructor. + * + * @param name ODataItem name (it's entity type for {@link ClientEntity}). + */ + public ClientItem(final String name) { + this.name = name; + } + + /** + * @return ODataItem name (it's entity type for {@link ClientEntity}). + */ + public String getName() { + return name; + } + + /** + * @return ODataItem link (it's edit link for {@link ClientEntity}). + */ + public URI getLink() { + return link; + } + + /** + * Sets ODataItem link (it's edit link for {@link ClientEntity}). + * + * @param link link. + */ + public void setLink(final URI link) { + this.link = link; + } + + @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/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLink.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLink.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLink.java new file mode 100644 index 0000000..d4d6d23 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLink.java @@ -0,0 +1,187 @@ +/* + * 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.domain; + +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +import org.apache.olingo.commons.api.Constants; + +/** + * OData link. + */ +public class ClientLink extends ClientItem implements ClientAnnotatable { + + public static class Builder { + + protected URI uri; + + protected ClientLinkType type; + + protected String title; + + public Builder setURI(final URI uri) { + this.uri = uri; + return this; + } + + public Builder setURI(final URI baseURI, final String href) { + uri = getURI(baseURI, href); + return this; + } + + public Builder setType(final ClientLinkType type) { + this.type = type; + return this; + } + + public Builder setTitle(final String title) { + this.title = title; + return this; + } + + public ClientLink build() { + return new ClientLink(uri, type, title); + } + } + + /** + * Build URI starting from the given base and href. + * <br/> + * If href is absolute or base is null then base will be ignored. + * + * @param base URI prefix. + * @param href URI suffix. + * @return built URI. + */ + private static URI getURI(final URI base, final String href) { + if (href == null) { + throw new IllegalArgumentException("Null link provided"); + } + + URI uri = URI.create(href); + + if (!uri.isAbsolute() && base != null) { + uri = URI.create(base.toASCIIString() + "/" + href); + } + + return uri.normalize(); + } + + /** + * Link type. + */ + protected final ClientLinkType type; + + /** + * Link rel. + */ + protected final String rel; + + /** + * ETag for media edit links. + */ + protected String mediaETag; + + private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>(); + + /** + * Constructor. + * + * @param uri URI. + * @param type type. + * @param title title. + */ + public ClientLink(final URI uri, final ClientLinkType type, final String title) { + super(title); + + link = uri; + this.type = type; + + switch (this.type) { + case ASSOCIATION: + rel = Constants.NS_ASSOCIATION_LINK_REL + title; + break; + + case ENTITY_NAVIGATION: + case ENTITY_SET_NAVIGATION: + rel = Constants.NS_NAVIGATION_LINK_REL + title; + break; + + case MEDIA_EDIT: + default: + rel = Constants.NS_MEDIA_EDIT_LINK_REL + title; + break; + } + } + + /** + * Constructor. + * + * @param version OData service version. + * @param baseURI base URI. + * @param href href. + * @param type type. + * @param title title. + */ + protected ClientLink(final URI baseURI, final String href, final ClientLinkType type, final String title) { + + this(getURI(baseURI, href), type, title); + } + + /** + * Gets link type. + * + * @return link type; + */ + public ClientLinkType getType() { + return type; + } + + public ClientInlineEntity asInlineEntity() { + return (this instanceof ClientInlineEntity) ? (ClientInlineEntity) this : null; + } + + public ClientInlineEntitySet asInlineEntitySet() { + return (this instanceof ClientInlineEntitySet) ? (ClientInlineEntitySet) this : null; + } + + /** + * Gets link rel. + * + * @return link rel + */ + public String getRel() { + return rel; + } + + /** + * Gets Media ETag. + * + * @return media ETag + */ + public String getMediaETag() { + return mediaETag; + } + + public List<ClientAnnotation> getAnnotations() { + return annotations; + } +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java new file mode 100644 index 0000000..e4b6a22 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinkType.java @@ -0,0 +1,105 @@ +/* + * 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.domain; + +import org.apache.commons.lang3.StringUtils; +import org.apache.olingo.commons.api.Constants; +import org.apache.olingo.commons.api.format.ContentType; + +/** + * OData link types. + */ +public enum ClientLinkType { + + /** + * Entity navigation link. + */ + ENTITY_NAVIGATION(ContentType.APPLICATION_ATOM_XML_ENTRY), + /** + * Entity set navigation link. + */ + ENTITY_SET_NAVIGATION(ContentType.APPLICATION_ATOM_XML_FEED), + /** + * Association link. + */ + ASSOCIATION(ContentType.APPLICATION_XML), + /** + * Media-edit link. + */ + MEDIA_EDIT("*/*"), + + /** + * Entity binding link. + */ + ENTITY_BINDING(ContentType.APPLICATION_XML), + + /** + * Entity collection binding link. + */ + ENTITY_COLLECTION_BINDING(ContentType.APPLICATION_XML); + + private String type; + + private ClientLinkType(final String type) { + this.type = type; + } + + private ClientLinkType(final ContentType contentType) { + this(contentType.toContentTypeString()); + } + + private ClientLinkType setType(final String type) { + this.type = type; + return this; + } + + /** + * Gets + * <code>LinkType</code> instance from the given rel and type. + * + * @param rel rel. + * @param type type. + * @return <code>ODataLinkType</code> object. + */ + public static ClientLinkType fromString(final String rel, final String type) { + if (StringUtils.isNotBlank(rel) && rel.startsWith(Constants.NS_MEDIA_EDIT_LINK_REL)) { + + return MEDIA_EDIT.setType(StringUtils.isBlank(type) ? "*/*" : type); + } + + if (ClientLinkType.ENTITY_NAVIGATION.type.equals(type)) { + return ENTITY_NAVIGATION; + } + + if (ClientLinkType.ENTITY_SET_NAVIGATION.type.equals(type)) { + return ENTITY_SET_NAVIGATION; + } + + if (ClientLinkType.ASSOCIATION.type.equals(type)) { + return ASSOCIATION; + } + + throw new IllegalArgumentException("Invalid link type: " + type); + } + + @Override + public String toString() { + return type; + } +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinked.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinked.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinked.java new file mode 100644 index 0000000..92fec05 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientLinked.java @@ -0,0 +1,70 @@ +/* + * 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.domain; + +import java.util.List; + +public interface ClientLinked { + + /** + * Puts the given link into one of available lists, based on its type. + * + * @param link to be added + * @return <tt>true</tt> if the given link was added in one of available lists + */ + boolean addLink(ClientLink link); + + /** + * Removes the given link from any list (association, navigation, edit-media). + * + * @param link to be removed + * @return <tt>true</tt> if the given link was contained in one of available lists + */ + boolean removeLink(ClientLink link); + + /** + * Gets association link with given name, if available, otherwise <tt>null</tt>. + * + * @param name candidate link name + * @return association link with given name, if available, otherwise <tt>null</tt> + */ + ClientLink getAssociationLink(String name); + + /** + * Returns all entity association links. + * + * @return OData entity links. + */ + List<ClientLink> getAssociationLinks(); + + /** + * Gets navigation link with given name, if available, otherwise <tt>null</tt>. + * + * @param name candidate link name + * @return navigation link with given name, if available, otherwise <tt>null</tt> + */ + ClientLink getNavigationLink(String name); + + /** + * Returns all entity navigation links (including inline entities / entity sets). + * + * @return OData entity links. + */ + List<ClientLink> getNavigationLinks(); +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientObjectFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientObjectFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientObjectFactory.java new file mode 100644 index 0000000..5bf1e08 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientObjectFactory.java @@ -0,0 +1,168 @@ +/* + * 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.domain; + +import org.apache.olingo.commons.api.edm.FullQualifiedName; + +import java.net.URI; + +/** + * Entry point for generating OData domain objects. + */ +public interface ClientObjectFactory { + + /** + * Instantiates a new entity set. + * + * @return entity set. + */ + ClientEntitySet newEntitySet(); + + /** + * Instantiates a new entity set. + * + * @param next next link. + * @return entity set. + */ + ClientEntitySet newEntitySet(URI next); + + /** + * Instantiates a new entity. + * + * @param typeName OData entity type name. + * @return entity. + */ + ClientEntity newEntity(FullQualifiedName typeName); + + /** + * Instantiates a new entity. + * + * @param typeName OData entity type name. + * @param link self link. + * @return entity. + */ + ClientEntity newEntity(FullQualifiedName typeName, URI link); + + /** + * Instantiates a new entity set (for deep insert). + * + * @param name name. + * @param entitySet entity set. + * @return in-line entity set. + */ + ClientInlineEntitySet newDeepInsertEntitySet(String name, ClientEntitySet entitySet); + + /** + * Instantiates a new entity (for deep insert). + * + * @param name name. + * @param entity entity. + * @return in-line entity. + */ + ClientInlineEntity newDeepInsertEntity(String name, ClientEntity entity); + + /** + * Instantiates a new entity set navigation link. + * + * @param name name. + * @param link link. + * @return entity set navigation link. + */ + ClientLink newEntitySetNavigationLink(String name, URI link); + + /** + * Instantiates a new singleton entity. + * + * @param typeName OData singleton entity type name. + * @return new singleton entity. + */ + ClientSingleton newSingleton(FullQualifiedName typeName); + + /** + * Instantiates a new entity navigation link. + * + * @param name name. + * @param link link. + * @return entity navigation link. + */ + ClientLink newEntityNavigationLink(String name, URI link); + + ClientLink newAssociationLink(String name, URI link); + + ClientLink newMediaEditLink(String name, URI link); + + ClientPrimitiveValue.Builder newPrimitiveValueBuilder(); + + ClientEnumValue newEnumValue(String typeName, String value); + + ClientComplexValue newComplexValue(String typeName); + + ClientCollectionValue<ClientValue> newCollectionValue(String typeName); + + /** + * Instantiates a new primitive property. + * + * @param name name. + * @param value primitive value. + * @return primitive property. + */ + ClientProperty newPrimitiveProperty(String name, ClientPrimitiveValue value); + + /** + * Instantiates a new complex property. + * + * @param name name. + * @param value value. + * @return complex property. + */ + ClientProperty newComplexProperty(String name, ClientComplexValue value); + + /** + * Instantiates a new collection property. + * + * @param name name. + * @param value value. + * @return collection property. + */ + ClientProperty newCollectionProperty(String name, ClientCollectionValue<? extends ClientValue> value); + + /** + * Instantiates a new enum property. + * + * @param name name. + * @param value value. + * @return new enum property. + */ + ClientProperty newEnumProperty(String name, ClientEnumValue value); + + /** + * Instantiates a new delta property. + * + * @return new delta property. + */ + ClientDelta newDelta(); + + /** + * Instantiates a new delta property. + * + * @param next next link for delta property + * @return new delta property. + */ + ClientDelta newDelta(URI next); +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientOperation.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientOperation.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientOperation.java new file mode 100644 index 0000000..a746437 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientOperation.java @@ -0,0 +1,85 @@ +/* + * 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.domain; + +import java.net.URI; + +public class ClientOperation { + + private String metadataAnchor; + + private String title; + + private URI target; + + /** + * Gets metadata anchor. + * + * @return metadata anchor. + */ + public String getMetadataAnchor() { + return metadataAnchor; + } + + /** + * Sets metadata anchor. + * + * @param metadataAnchor metadata anchor. + */ + public void setMetadataAnchor(final String metadataAnchor) { + this.metadataAnchor = metadataAnchor; + } + + /** + * Gets title. + * + * @return title. + */ + public String getTitle() { + return title; + } + + /** + * Sets title. + * + * @param title title. + */ + public void setTitle(final String title) { + this.title = title; + } + + /** + * Gets target. + * + * @return target. + */ + public URI getTarget() { + return target; + } + + /** + * Sets target. + * + * @param target target. + */ + public void setTarget(final URI target) { + this.target = target; + } + +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientPrimitiveValue.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientPrimitiveValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientPrimitiveValue.java new file mode 100644 index 0000000..350efdb --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientPrimitiveValue.java @@ -0,0 +1,88 @@ +/* + * 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.domain; + +import org.apache.olingo.commons.api.edm.EdmPrimitiveType; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException; +import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; +import org.apache.olingo.commons.api.edm.EdmType; + +import java.util.UUID; + +public interface ClientPrimitiveValue extends ClientValue { + + interface Builder { + + Builder setType(EdmType type); + + Builder setType(EdmPrimitiveTypeKind type); + + Builder setValue(Object value); + + ClientPrimitiveValue build(); + + ClientPrimitiveValue buildBoolean(Boolean value); + + ClientPrimitiveValue buildInt16(Short value); + + ClientPrimitiveValue buildInt32(Integer value); + + ClientPrimitiveValue buildInt64(Long value); + + ClientPrimitiveValue buildSingle(Float value); + + ClientPrimitiveValue buildDouble(Double value); + + ClientPrimitiveValue buildString(String value); + + ClientPrimitiveValue buildGuid(UUID value); + + ClientPrimitiveValue buildBinary(byte[] value); + } + + EdmPrimitiveTypeKind getTypeKind(); + + EdmPrimitiveType getType(); + + /** + * Returns the current value as generic Object. + * + * @return an uncasted instance of this value + */ + Object toValue(); + + /** + * Returns the current value casted to the given type. + * + * @param <T> cast type + * @param reference class reference + * @return the current value as typed java instance + * @throws EdmPrimitiveTypeException if the object is not assignable to the type T. + */ + <T> T toCastValue(Class<T> reference) throws EdmPrimitiveTypeException; + + /** + * Serialize the current value as String. + * + * @return a String representation of this value + */ + @Override + String toString(); + +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientProperty.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientProperty.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientProperty.java new file mode 100644 index 0000000..2e5dde8 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientProperty.java @@ -0,0 +1,32 @@ +/* + * 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.domain; + +/** + * OData entity property. + */ +public interface ClientProperty extends ClientInvokeResult, ClientAnnotatable, ClientValuable { + + /** + * Returns property name. + * + * @return property name. + */ + String getName(); +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientServiceDocument.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientServiceDocument.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientServiceDocument.java new file mode 100644 index 0000000..d78b7bf --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientServiceDocument.java @@ -0,0 +1,163 @@ +/* + * 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.domain; + +import java.net.URI; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +public class ClientServiceDocument { + + private final Map<String, URI> entitySets = new HashMap<String, URI>(); + + private final Map<String, URI> functionImports = new HashMap<String, URI>(); + + private final Map<String, URI> singletons = new HashMap<String, URI>(); + + private final Map<String, URI> relatedServiceDocuments = new HashMap<String, URI>(); + + public Map<String, URI> getEntitySets() { + return entitySets; + } + + /** + * Gets entity set names. + * + * @return entity set names. + */ + public Collection<String> getEntitySetNames() { + return entitySets.keySet(); + } + + /** + * Gets entity set URIs. + * + * @return entity set URIs. + */ + public Collection<URI> getEntitySetURIs() { + return entitySets.values(); + } + + /** + * Gets URI about the given entity set. + * + * @param name name. + * @return URI. + */ + public URI getEntitySetURI(final String name) { + return entitySets.get(name); + } + + public Map<String, URI> getFunctionImports() { + return functionImports; + } + + /** + * Gets function import names. + * + * @return function import names. + */ + public Collection<String> getFunctionImportNames() { + return functionImports.keySet(); + } + + /** + * Gets function import URIs. + * + * @return function import URIs. + */ + public Collection<URI> getFunctionImportURIs() { + return functionImports.values(); + } + + /** + * Gets URI of the given function import. + * + * @param name name. + * @return URI. + */ + public URI getFunctionImportURI(final String name) { + return functionImports.get(name); + } + + public Map<String, URI> getSingletons() { + return singletons; + } + + /** + * Gets singleton names. + * + * @return singleton names. + */ + public Collection<String> getSingletonNames() { + return singletons.keySet(); + } + + /** + * Gets singleton URIs. + * + * @return singleton URIs. + */ + public Collection<URI> getSingletonURIs() { + return singletons.values(); + } + + /** + * Gets URI of the given singleton. + * + * @param name name. + * @return URI. + */ + public URI getSingletonURI(final String name) { + return singletons.get(name); + } + + public Map<String, URI> getRelatedServiceDocuments() { + return relatedServiceDocuments; + } + + /** + * Gets related service documents names. + * + * @return related service documents names. + */ + public Collection<String> getRelatedServiceDocumentsNames() { + return relatedServiceDocuments.keySet(); + } + + /** + * Gets related service documents URIs. + * + * @return related service documents URIs. + */ + public Collection<URI> getRelatedServiceDocumentsURIs() { + return relatedServiceDocuments.values(); + } + + /** + * Gets URI of the given related service documents. + * + * @param name name. + * @return URI. + */ + public URI getRelatedServiceDocumentURI(final String name) { + return relatedServiceDocuments.get(name); + } +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientSingleton.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientSingleton.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientSingleton.java new file mode 100644 index 0000000..5c4629f --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientSingleton.java @@ -0,0 +1,23 @@ +/* + * 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.domain; + +public interface ClientSingleton extends ClientEntity { +//No additional methods needed for now. +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValuable.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValuable.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValuable.java new file mode 100644 index 0000000..68456c8 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValuable.java @@ -0,0 +1,94 @@ +/* + * 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.domain; + + +public interface ClientValuable { + + /** + * Returns annotation value. + * + * @return annotation value. + */ + ClientValue getValue(); + + /** + * Checks if has null value. + * + * @return 'TRUE' if has null value; 'FALSE' otherwise. + */ + boolean hasNullValue(); + + /** + * Checks if has primitive value. + * + * @return 'TRUE' if has primitive value; 'FALSE' otherwise. + */ + boolean hasPrimitiveValue(); + + /** + * Gets primitive value. + * + * @return primitive value if exists; null otherwise. + */ + ClientPrimitiveValue getPrimitiveValue(); + + /** + * Checks if has collection value. + * + * @return 'TRUE' if has collection value; 'FALSE' otherwise. + */ + boolean hasCollectionValue(); + + /** + * Gets collection value. + * + * @return collection value if exists; null otherwise. + */ + ClientCollectionValue<ClientValue> getCollectionValue(); + + /** + * Checks if has complex value. + * + * @return 'TRUE' if has complex value; 'FALSE' otherwise. + */ + boolean hasComplexValue(); + + /** + * Gets complex value. + * + * @return complex value if exists; null otherwise. + */ + ClientComplexValue getComplexValue(); + + /** + * Checks if has enum value. + * + * @return 'TRUE' if has enum value; 'FALSE' otherwise. + */ + boolean hasEnumValue(); + + /** + * Gets enum value. + * + * @return enum value if exists; null otherwise. + */ + ClientEnumValue getEnumValue(); + +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValue.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValue.java new file mode 100644 index 0000000..de778c5 --- /dev/null +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientValue.java @@ -0,0 +1,91 @@ +/* + * 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.domain; + + +/** + * Abstract representation of an OData entity property value. + */ +public interface ClientValue { + + /** + * Gets value type name. + * + * @return value type name. + */ + String getTypeName(); + + /** + * Check is is a primitive value. + * + * @return 'TRUE' if primitive; 'FALSE' otherwise. + */ + boolean isPrimitive(); + + /** + * Casts to primitive value. + * + * @return primitive value. + */ + ClientPrimitiveValue asPrimitive(); + + /** + * Check is is a collection value. + * + * @return 'TRUE' if collection; 'FALSE' otherwise. + */ + boolean isCollection(); + + /** + * Casts to collection value. + * + * @param <OV> The actual ODataValue interface. + * @return collection value. + */ + <OV extends ClientValue> ClientCollectionValue<OV> asCollection(); + + /** + * Casts to complex value. + * + * @return complex value. + */ + ClientComplexValue asComplex(); + + /** + * Check is is a linked complex value. + * + * @return 'TRUE' if linked complex; 'FALSE' otherwise. + */ + boolean isComplex(); + + /** + * Check is is an enum value. + * + * @return 'TRUE' if enum; 'FALSE' otherwise. + */ + boolean isEnum(); + + /** + * Casts to enum value. + * + * @return enum value. + */ + ClientEnumValue asEnum(); + +} http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java index 60fd352..64bf0f2 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ODataEntitySetIterator.java @@ -33,8 +33,6 @@ import org.apache.olingo.client.api.ODataClient; import org.apache.olingo.commons.api.Constants; import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientEntitySet; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; import org.slf4j.Logger; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java index 9be8744..aeabf3b 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataBinder.java @@ -25,12 +25,12 @@ import org.apache.olingo.commons.api.data.EntityCollection; import org.apache.olingo.commons.api.data.Link; import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientDelta; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientEntitySet; -import org.apache.olingo.commons.api.domain.ClientLink; -import org.apache.olingo.commons.api.domain.ClientProperty; -import org.apache.olingo.commons.api.domain.ClientServiceDocument; +import org.apache.olingo.client.api.domain.ClientDelta; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntitySet; +import org.apache.olingo.client.api.domain.ClientLink; +import org.apache.olingo.client.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientServiceDocument; public interface ODataBinder { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java index 8519a66..8c5ccc4 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataReader.java @@ -22,11 +22,11 @@ import java.io.InputStream; import java.util.Map; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientEntitySet; -import org.apache.olingo.commons.api.domain.ClientError; -import org.apache.olingo.commons.api.domain.ClientProperty; -import org.apache.olingo.commons.api.domain.ClientServiceDocument; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntitySet; +import org.apache.olingo.commons.api.domain.ODataError; +import org.apache.olingo.client.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientServiceDocument; import org.apache.olingo.commons.api.edm.Edm; import org.apache.olingo.commons.api.edm.provider.CsdlSchema; import org.apache.olingo.commons.api.format.ODataFormat; @@ -105,7 +105,7 @@ public interface ODataReader { * @return OData error. * @throws ODataDeserializerException */ - ClientError readError(InputStream inputStream, ODataFormat format) throws ODataDeserializerException; + ODataError readError(InputStream inputStream, ODataFormat format) throws ODataDeserializerException; /** * Parses a stream into the object type specified by the given reference. http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java ---------------------------------------------------------------------- diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java index 81f07a6..5287c94 100644 --- a/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java +++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/serialization/ODataWriter.java @@ -23,9 +23,9 @@ import java.net.URI; import java.util.Collection; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientProperty; -import org.apache.olingo.commons.api.domain.ClientLink; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientLink; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataSerializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java index 55d4169..a934e3e 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/ODataClientImpl.java @@ -47,11 +47,11 @@ import org.apache.olingo.client.core.serialization.ODataReaderImpl; import org.apache.olingo.client.core.serialization.ODataWriterImpl; import org.apache.olingo.client.core.uri.FilterFactoryImpl; import org.apache.olingo.client.core.uri.URIBuilderImpl; -import org.apache.olingo.commons.api.domain.ClientObjectFactory; +import org.apache.olingo.client.api.domain.ClientObjectFactory; import org.apache.olingo.commons.api.edm.constants.ODataServiceVersion; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataSerializer; -import org.apache.olingo.commons.core.domain.ClientObjectFactoryImpl; +import org.apache.olingo.client.core.domain.ClientObjectFactoryImpl; import org.apache.olingo.commons.core.serialization.AtomSerializer; import org.apache.olingo.commons.core.serialization.JsonSerializer; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java index 717096d..f1cc64a 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/header/ODataErrorResponseChecker.java @@ -25,7 +25,7 @@ import org.apache.olingo.client.api.ODataClient; import org.apache.olingo.client.api.communication.ODataClientErrorException; import org.apache.olingo.client.api.communication.ODataServerErrorException; import org.apache.olingo.commons.api.ODataRuntimeException; -import org.apache.olingo.commons.api.domain.ClientError; +import org.apache.olingo.commons.api.domain.ODataError; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; import org.slf4j.Logger; @@ -35,8 +35,8 @@ public final class ODataErrorResponseChecker { protected static final Logger LOG = LoggerFactory.getLogger(ODataErrorResponseChecker.class); - private static ClientError getGenericError(final int code, final String errorMsg) { - final ClientError error = new ClientError(); + private static ODataError getGenericError(final int code, final String errorMsg) { + final ODataError error = new ODataError(); error.setCode(String.valueOf(code)); error.setMessage(errorMsg); return error; @@ -53,7 +53,7 @@ public final class ODataErrorResponseChecker { } else { final ODataFormat format = accept.contains("xml") ? ODataFormat.XML : ODataFormat.JSON; - ClientError error; + ODataError error; try { error = odataClient.getReader().readError(entity, format); } catch (final RuntimeException e) { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java index be0960a..8f33e09 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/CUDRequestFactoryImpl.java @@ -38,10 +38,10 @@ import org.apache.olingo.client.core.communication.request.streamed.ODataMediaEn import org.apache.olingo.client.core.communication.request.streamed.ODataStreamUpdateRequestImpl; import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientPrimitiveValue; -import org.apache.olingo.commons.api.domain.ClientProperty; -import org.apache.olingo.commons.api.domain.ClientSingleton; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientPrimitiveValue; +import org.apache.olingo.client.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientSingleton; import org.apache.olingo.commons.api.http.HttpMethod; public class CUDRequestFactoryImpl implements CUDRequestFactory { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java index 86d5395..b2aba3d 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityCreateRequestImpl.java @@ -33,7 +33,7 @@ import org.apache.olingo.client.core.communication.response.AbstractODataRespons import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntity; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpMethod; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java index b86e6ae..195eaeb 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataEntityUpdateRequestImpl.java @@ -34,7 +34,7 @@ import org.apache.olingo.client.core.communication.response.AbstractODataRespons import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntity; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpMethod; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java index 674a342..a88652f 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataPropertyUpdateRequestImpl.java @@ -33,7 +33,7 @@ import org.apache.olingo.client.core.communication.response.AbstractODataRespons import org.apache.olingo.client.core.uri.URIUtils; import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientProperty; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpMethod; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java index a7dfb5f..93f4b59 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/cud/ODataValueUpdateRequestImpl.java @@ -32,7 +32,7 @@ import org.apache.olingo.client.api.http.HttpClientException; import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest; import org.apache.olingo.client.core.communication.response.AbstractODataResponse; import org.apache.olingo.client.core.uri.URIUtils; -import org.apache.olingo.commons.api.domain.ClientPrimitiveValue; +import org.apache.olingo.client.api.domain.ClientPrimitiveValue; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpMethod; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractEdmEnabledInvokeRequestFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractEdmEnabledInvokeRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractEdmEnabledInvokeRequestFactory.java index e4d67b5..6431b83 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractEdmEnabledInvokeRequestFactory.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractEdmEnabledInvokeRequestFactory.java @@ -25,8 +25,8 @@ import java.util.Map; import org.apache.olingo.client.api.EdmEnabledODataClient; import org.apache.olingo.client.api.communication.request.invoke.EdmEnabledInvokeRequestFactory; import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest; -import org.apache.olingo.commons.api.domain.ClientInvokeResult; -import org.apache.olingo.commons.api.domain.ClientValue; +import org.apache.olingo.client.api.domain.ClientInvokeResult; +import org.apache.olingo.client.api.domain.ClientValue; import org.apache.olingo.commons.api.edm.EdmAction; import org.apache.olingo.commons.api.edm.EdmActionImport; import org.apache.olingo.commons.api.edm.EdmEntityContainer; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java index 75ee264..ec41777 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractInvokeRequestFactory.java @@ -24,11 +24,11 @@ import java.util.Map; import org.apache.olingo.client.api.communication.request.invoke.InvokeRequestFactory; import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest; import org.apache.olingo.client.api.communication.request.invoke.ClientNoContent; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientEntitySet; -import org.apache.olingo.commons.api.domain.ClientProperty; -import org.apache.olingo.commons.api.domain.ClientInvokeResult; -import org.apache.olingo.commons.api.domain.ClientValue; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntitySet; +import org.apache.olingo.client.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientInvokeResult; +import org.apache.olingo.client.api.domain.ClientValue; import org.apache.olingo.commons.api.edm.EdmReturnType; import org.apache.olingo.commons.api.edm.constants.EdmTypeKind; import org.apache.olingo.commons.api.http.HttpMethod; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java index 2f26161..5bd259c 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/AbstractODataInvokeRequest.java @@ -38,11 +38,11 @@ import org.apache.olingo.client.api.http.HttpClientException; import org.apache.olingo.client.core.communication.request.AbstractODataBasicRequest; import org.apache.olingo.client.core.communication.response.AbstractODataResponse; import org.apache.olingo.client.core.uri.URIUtils; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientEntitySet; -import org.apache.olingo.commons.api.domain.ClientInvokeResult; -import org.apache.olingo.commons.api.domain.ClientProperty; -import org.apache.olingo.commons.api.domain.ClientValue; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntitySet; +import org.apache.olingo.client.api.domain.ClientInvokeResult; +import org.apache.olingo.client.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientValue; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpMethod; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java index 27691c5..bb488d5 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/EdmEnabledInvokeRequestFactoryImpl.java @@ -23,8 +23,8 @@ import java.util.Map; import org.apache.olingo.client.api.EdmEnabledODataClient; import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest; -import org.apache.olingo.commons.api.domain.ClientInvokeResult; -import org.apache.olingo.commons.api.domain.ClientValue; +import org.apache.olingo.client.api.domain.ClientInvokeResult; +import org.apache.olingo.client.api.domain.ClientValue; import org.apache.olingo.commons.api.http.HttpMethod; public class EdmEnabledInvokeRequestFactoryImpl extends AbstractEdmEnabledInvokeRequestFactory { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java index 7b8506c..b01c54a 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/InvokeRequestFactoryImpl.java @@ -23,8 +23,8 @@ import java.util.Map; import org.apache.olingo.client.api.ODataClient; import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest; -import org.apache.olingo.commons.api.domain.ClientInvokeResult; -import org.apache.olingo.commons.api.domain.ClientValue; +import org.apache.olingo.client.api.domain.ClientInvokeResult; +import org.apache.olingo.client.api.domain.ClientValue; import org.apache.olingo.commons.api.http.HttpMethod; public class InvokeRequestFactoryImpl extends AbstractInvokeRequestFactory { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java index adf2214..5e8736e 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/invoke/ODataInvokeRequestImpl.java @@ -21,7 +21,7 @@ package org.apache.olingo.client.core.communication.request.invoke; import java.net.URI; import org.apache.olingo.client.api.ODataClient; -import org.apache.olingo.commons.api.domain.ClientInvokeResult; +import org.apache.olingo.client.api.domain.ClientInvokeResult; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.http.HttpMethod; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java index 4412ef0..601e4ba 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataDeltaRequestImpl.java @@ -29,7 +29,7 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse import org.apache.olingo.client.api.http.HttpClientException; import org.apache.olingo.commons.api.data.Delta; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientDelta; +import org.apache.olingo.client.api.domain.ClientDelta; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java index eec258b..57acf2a 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntityRequestImpl.java @@ -27,7 +27,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntity; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java index 04adfb6..9c47b69 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetIteratorRequestImpl.java @@ -26,8 +26,8 @@ import org.apache.olingo.client.api.ODataClient; import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetIteratorRequest; import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.client.api.domain.ODataEntitySetIterator; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientEntitySet; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntitySet; import org.apache.olingo.commons.api.format.ODataFormat; /** http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java index 44de4c1..620a88d 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataEntitySetRequestImpl.java @@ -27,7 +27,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.commons.api.data.EntityCollection; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntitySet; +import org.apache.olingo.client.api.domain.ClientEntitySet; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java index 91644bf..36e9d0c 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataPropertyRequestImpl.java @@ -29,7 +29,7 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse import org.apache.olingo.client.api.http.HttpClientException; import org.apache.olingo.commons.api.data.Property; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientProperty; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java index 771525e..363ba87 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataServiceDocumentRequestImpl.java @@ -27,7 +27,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceD import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.client.api.data.ServiceDocument; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientServiceDocument; +import org.apache.olingo.client.api.domain.ClientServiceDocument; import org.apache.olingo.commons.api.format.ODataFormat; import org.apache.olingo.commons.api.serialization.ODataDeserializerException; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java index e6de8a6..9bbce7c 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/ODataValueRequestImpl.java @@ -27,7 +27,7 @@ import org.apache.olingo.client.api.ODataClient; import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest; import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse; import org.apache.olingo.client.api.http.HttpClientException; -import org.apache.olingo.commons.api.domain.ClientPrimitiveValue; +import org.apache.olingo.client.api.domain.ClientPrimitiveValue; import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind; import org.apache.olingo.commons.api.format.ODataFormat; http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java index 4717f7a..1f5d80b 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/retrieve/RetrieveRequestFactoryImpl.java @@ -35,10 +35,10 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataValueReq import org.apache.olingo.client.api.communication.request.retrieve.RetrieveRequestFactory; import org.apache.olingo.client.api.communication.request.retrieve.XMLMetadataRequest; import org.apache.olingo.client.core.uri.URIUtils; -import org.apache.olingo.commons.api.domain.ClientEntity; -import org.apache.olingo.commons.api.domain.ClientEntitySet; -import org.apache.olingo.commons.api.domain.ClientProperty; -import org.apache.olingo.commons.api.domain.ClientSingleton; +import org.apache.olingo.client.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntitySet; +import org.apache.olingo.client.api.domain.ClientProperty; +import org.apache.olingo.client.api.domain.ClientSingleton; public class RetrieveRequestFactoryImpl implements RetrieveRequestFactory { http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java ---------------------------------------------------------------------- diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java index a6bcb13..175258b 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java @@ -32,7 +32,7 @@ import org.apache.olingo.client.core.communication.request.AbstractODataStreamMa import org.apache.olingo.client.core.communication.response.AbstractODataResponse; import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.ResWrap; -import org.apache.olingo.commons.api.domain.ClientEntity; +import org.apache.olingo.client.api.domain.ClientEntity; import org.apache.olingo.commons.api.http.HttpMethod; import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
