You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2015/04/30 06:08:12 UTC
[1/7] olingo-odata4 git commit: [OLINGO-564] first step for common ->
client extraction
Repository: olingo-odata4
Updated Branches:
refs/heads/OLINGO-564 c37d4da57 -> 17152920f
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
index 9977b06..1047bdf 100755
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonDeserializer.java
@@ -43,9 +43,8 @@ import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.data.Valuable;
import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.ClientError;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
-import org.apache.olingo.commons.api.domain.ClientPropertyType;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataPropertyType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
@@ -100,11 +99,11 @@ public class JsonDeserializer implements ODataDeserializer {
JsonEntityDeserializer entityDeserializer = new JsonEntityDeserializer(serverMode);
if (inline instanceof ObjectNode) {
- link.setType(ClientLinkType.ENTITY_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
link.setInlineEntity(entityDeserializer.doDeserialize(inline.traverse(codec)).getPayload());
} else if (inline instanceof ArrayNode) {
- link.setType(ClientLinkType.ENTITY_SET_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE);
final EntityCollection entitySet = new EntityCollection();
for (final Iterator<JsonNode> entries = inline.elements(); entries.hasNext();) {
@@ -136,7 +135,7 @@ public class JsonDeserializer implements ODataDeserializer {
if (field.getValue().isValueNode()) {
link.setHref(field.getValue().textValue());
- link.setType(ClientLinkType.ENTITY_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
}
linked.getNavigationLinks().add(link);
@@ -148,7 +147,7 @@ public class JsonDeserializer implements ODataDeserializer {
link.setTitle(getTitle(field));
link.setRel(Constants.NS_ASSOCIATION_LINK_REL + getTitle(field));
link.setHref(field.getValue().textValue());
- link.setType(ClientLinkType.ASSOCIATION.toString());
+ link.setType(Constants.ASSOCIATION_LINK_TYPE);
linked.getAssociationLinks().add(link);
toRemove.add(field.getKey());
@@ -168,7 +167,7 @@ public class JsonDeserializer implements ODataDeserializer {
link.setTitle(getTitle(field));
link.setRel(Constants.NS_NAVIGATION_LINK_REL + getTitle(field));
link.setHref(field.getValue().textValue());
- link.setType(ClientLinkType.ENTITY_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
linked.getNavigationLinks().add(link);
toRemove.add(setInline(field.getKey(), suffix, tree, codec, link));
@@ -180,7 +179,7 @@ public class JsonDeserializer implements ODataDeserializer {
link.setTitle(getTitle(field));
link.setRel(Constants.NS_NAVIGATION_LINK_REL + getTitle(field));
link.setHref(node.asText());
- link.setType(ClientLinkType.ENTITY_SET_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE);
linked.getNavigationLinks().add(link);
toRemove.add(setInline(field.getKey(), Constants.JSON_BIND_LINK_SUFFIX, tree, codec, link));
}
@@ -189,32 +188,32 @@ public class JsonDeserializer implements ODataDeserializer {
}
}
- private Map.Entry<ClientPropertyType, EdmTypeInfo> guessPropertyType(final JsonNode node) {
- ClientPropertyType type;
+ private Map.Entry<ODataPropertyType, EdmTypeInfo> guessPropertyType(final JsonNode node) {
+ ODataPropertyType type;
String typeExpression = null;
if (node.isValueNode() || node.isNull()) {
- type = ClientPropertyType.PRIMITIVE;
+ type = ODataPropertyType.PRIMITIVE;
typeExpression = guessPrimitiveTypeKind(node).getFullQualifiedName().toString();
} else if (node.isArray()) {
- type = ClientPropertyType.COLLECTION;
+ type = ODataPropertyType.COLLECTION;
if (node.has(0) && node.get(0).isValueNode()) {
typeExpression = "Collection(" + guessPrimitiveTypeKind(node.get(0)) + ')';
}
} else if (node.isObject()) {
if (node.has(Constants.ATTR_TYPE)) {
- type = ClientPropertyType.PRIMITIVE;
+ type = ODataPropertyType.PRIMITIVE;
typeExpression = "Edm.Geography" + node.get(Constants.ATTR_TYPE).asText();
} else {
- type = ClientPropertyType.COMPLEX;
+ type = ODataPropertyType.COMPLEX;
}
} else {
- type = ClientPropertyType.EMPTY;
+ type = ODataPropertyType.EMPTY;
}
final EdmTypeInfo typeInfo = typeExpression == null ? null :
new EdmTypeInfo.Builder().setTypeExpression(typeExpression).build();
- return new SimpleEntry<ClientPropertyType, EdmTypeInfo>(type, typeInfo);
+ return new SimpleEntry<ODataPropertyType, EdmTypeInfo>(type, typeInfo);
}
private EdmPrimitiveTypeKind guessPrimitiveTypeKind(final JsonNode node) {
@@ -337,15 +336,15 @@ public class JsonDeserializer implements ODataDeserializer {
EdmTypeInfo typeInfo = StringUtils.isBlank(valuable.getType()) ? null
: new EdmTypeInfo.Builder().setTypeExpression(valuable.getType()).build();
- final Map.Entry<ClientPropertyType, EdmTypeInfo> guessed = guessPropertyType(node);
+ final Map.Entry<ODataPropertyType, EdmTypeInfo> guessed = guessPropertyType(node);
if (typeInfo == null) {
typeInfo = guessed.getValue();
}
- final ClientPropertyType propType = typeInfo == null ? guessed.getKey()
- : typeInfo.isCollection() ? ClientPropertyType.COLLECTION
- : typeInfo.isPrimitiveType() ? ClientPropertyType.PRIMITIVE
- : node.isValueNode() ? ClientPropertyType.ENUM : ClientPropertyType.COMPLEX;
+ final ODataPropertyType propType = typeInfo == null ? guessed.getKey()
+ : typeInfo.isCollection() ? ODataPropertyType.COLLECTION
+ : typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE
+ : node.isValueNode() ? ODataPropertyType.ENUM : ODataPropertyType.COMPLEX;
switch (propType) {
case COLLECTION:
@@ -411,7 +410,7 @@ public class JsonDeserializer implements ODataDeserializer {
}
@Override
- public ClientError toError(final InputStream input) throws ODataDeserializerException {
+ public ODataError toError(final InputStream input) throws ODataDeserializerException {
try {
parser = new JsonFactory(new ObjectMapper()).createParser(input);
return new JsonODataErrorDeserializer(serverMode).doDeserialize(parser);
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
index 47a2598..248f425 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntityDeserializer.java
@@ -34,9 +34,8 @@ import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.Annotation;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Operation;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
-import org.apache.olingo.commons.api.domain.ClientOperation;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
@@ -154,7 +153,7 @@ public class JsonEntityDeserializer extends JsonDeserializer {
link.setTitle(getTitle(field));
link.setRel(Constants.NS_MEDIA_EDIT_LINK_REL + getTitle(field));
link.setHref(field.getValue().textValue());
- link.setType(ClientLinkType.MEDIA_EDIT.toString());
+ link.setType(Constants.MEDIA_EDIT_LINK_TYPE);
entity.getMediaEditLinks().add(link);
if (tree.has(link.getTitle() + getJSONAnnotation(Constants.JSON_MEDIA_ETAG))) {
@@ -174,7 +173,7 @@ public class JsonEntityDeserializer extends JsonDeserializer {
}
toRemove.add(field.getKey());
} else if (field.getKey().charAt(0) == '#') {
- final ClientOperation operation = new ClientOperation();
+ final Operation operation = new Operation();
operation.setMetadataAnchor(field.getKey());
final ObjectNode opNode = (ObjectNode) tree.get(field.getKey());
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java
index 9f58664..8a6030d 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonEntitySerializer.java
@@ -25,9 +25,9 @@ import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.Annotation;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Operation;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientOperation;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
@@ -122,7 +122,7 @@ public class JsonEntitySerializer extends JsonSerializer {
}
if (serverMode) {
- for (ClientOperation operation : entity.getOperations()) {
+ for (Operation operation : entity.getOperations()) {
jgen.writeObjectFieldStart("#" + StringUtils.substringAfterLast(operation.getMetadataAnchor(), "#"));
jgen.writeStringField(Constants.ATTR_TITLE, operation.getTitle());
jgen.writeStringField(Constants.ATTR_TARGET, operation.getTarget().toASCIIString());
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java
index 9e225ad..89252dc 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDeserializer.java
@@ -25,8 +25,8 @@ import java.util.Iterator;
import java.util.List;
import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.domain.ClientError;
-import org.apache.olingo.commons.api.domain.ClientErrorDetail;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataErrorDetail;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.JsonNode;
@@ -38,9 +38,9 @@ public class JsonODataErrorDeserializer extends JsonDeserializer {
super(serverMode);
}
- protected ClientError doDeserialize(final JsonParser parser) throws IOException {
+ protected ODataError doDeserialize(final JsonParser parser) throws IOException {
- final ClientError error = new ClientError();
+ final ODataError error = new ODataError();
final ObjectNode tree = parser.getCodec().readTree(parser);
if (tree.has(Constants.JSON_ERROR)) {
@@ -61,7 +61,7 @@ public class JsonODataErrorDeserializer extends JsonDeserializer {
error.setTarget(errorNode.get(Constants.ERROR_TARGET).textValue());
}
if (errorNode.hasNonNull(Constants.ERROR_DETAILS)) {
- List<ClientErrorDetail> details = new ArrayList<ClientErrorDetail>();
+ List<ODataErrorDetail> details = new ArrayList<ODataErrorDetail>();
JsonODataErrorDetailDeserializer detailDeserializer = new JsonODataErrorDetailDeserializer(serverMode);
for (JsonNode jsonNode : errorNode.get(Constants.ERROR_DETAILS)) {
details.add(detailDeserializer.doDeserialize(jsonNode.traverse(parser.getCodec()))
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java
index 0b5cddb..138bad3 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonODataErrorDetailDeserializer.java
@@ -23,7 +23,7 @@ import java.net.URI;
import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientErrorDetail;
+import org.apache.olingo.commons.api.domain.ODataErrorDetail;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.JsonNode;
@@ -34,9 +34,9 @@ public class JsonODataErrorDetailDeserializer extends JsonDeserializer {
super(serverMode);
}
- protected ResWrap<ClientErrorDetail> doDeserialize(final JsonParser parser) throws IOException {
+ protected ResWrap<ODataErrorDetail> doDeserialize(final JsonParser parser) throws IOException {
- final ClientErrorDetail error = new ClientErrorDetail();
+ final ODataErrorDetail error = new ODataErrorDetail();
final JsonNode errorNode = parser.getCodec().readTree(parser);
if (errorNode.has(Constants.ERROR_CODE)) {
error.setCode(errorNode.get(Constants.ERROR_CODE).textValue());
@@ -53,6 +53,6 @@ public class JsonODataErrorDetailDeserializer extends JsonDeserializer {
error.setTarget(errorNode.get(Constants.ERROR_TARGET).textValue());
}
- return new ResWrap<ClientErrorDetail>((URI) null, null, error);
+ return new ResWrap<ODataErrorDetail>((URI) null, null, error);
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
index 2eae519..727e03e 100755
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/JsonSerializer.java
@@ -40,7 +40,6 @@ import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.data.Valuable;
import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
@@ -157,14 +156,7 @@ public class JsonSerializer implements ODataSerializer {
valuable(jgen, annotation, link.getTitle() + "@" + annotation.getTerm());
}
- ClientLinkType type = null;
- try {
- type = ClientLinkType.fromString(link.getRel(), link.getType());
- } catch (IllegalArgumentException e) {
- // ignore
- }
-
- if (type == ClientLinkType.ENTITY_SET_NAVIGATION) {
+ if (isEntitySetNavigation(link)) {
final List<String> uris;
if (entitySetLinks.containsKey(link.getTitle())) {
uris = entitySetLinks.get(link.getTitle());
@@ -204,6 +196,10 @@ public class JsonSerializer implements ODataSerializer {
}
}
+ private boolean isEntitySetNavigation(Link link) {
+ return Constants.ENTITY_SET_NAVIGATION_LINK_TYPE.equals(link.getType());
+ }
+
protected void serverLinks(final Linked linked, final JsonGenerator jgen)
throws IOException, EdmPrimitiveTypeException {
if (linked instanceof Entity) {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-api/src/main/java/org/apache/olingo/server/api/ClientServerError.java
----------------------------------------------------------------------
diff --git a/lib/server-api/src/main/java/org/apache/olingo/server/api/ClientServerError.java b/lib/server-api/src/main/java/org/apache/olingo/server/api/ClientServerError.java
index f64f0d0..6bbde22 100644
--- a/lib/server-api/src/main/java/org/apache/olingo/server/api/ClientServerError.java
+++ b/lib/server-api/src/main/java/org/apache/olingo/server/api/ClientServerError.java
@@ -22,13 +22,13 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
-import org.apache.olingo.commons.api.domain.ClientError;
-import org.apache.olingo.commons.api.domain.ClientErrorDetail;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataErrorDetail;
/**
* Server error.
*/
-public class ClientServerError extends ClientError {
+public class ClientServerError extends ODataError {
private Exception exception;
private int statusCode;
@@ -121,7 +121,7 @@ public class ClientServerError extends ClientError {
* Sets error details.
* @return this for method chaining.
*/
- public ClientServerError setDetails(List<ClientErrorDetail> details) {
+ public ClientServerError setDetails(List<ODataErrorDetail> details) {
super.setDetails(details);
return this;
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/ResponseUtil.java
----------------------------------------------------------------------
diff --git a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/ResponseUtil.java b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/ResponseUtil.java
index e20299a..0cc16a0 100644
--- a/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/ResponseUtil.java
+++ b/lib/server-core-ext/src/main/java/org/apache/olingo/server/core/responses/ResponseUtil.java
@@ -22,13 +22,13 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.ComplexValue;
import org.apache.olingo.commons.api.data.Entity;
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.ValueType;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
public class ResponseUtil {
public static Property createPrimitive(final String name, final String type, final Object value) {
@@ -62,7 +62,7 @@ public class ResponseUtil {
Link link = entity.getNavigationLink(navigationPropertyName);
if (link == null) {
link = new Link();
- link.setType(ClientLinkType.ENTITY_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
link.setTitle(navigationPropertyName);
entity.getNavigationLinks().add(link);
}
@@ -73,7 +73,7 @@ public class ResponseUtil {
Link link = entity.getNavigationLink(navigationPropertyName);
if (link == null) {
link = new Link();
- link.setType(ClientLinkType.ENTITY_SET_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE);
link.setTitle(navigationPropertyName);
EntityCollection target = new EntityCollection();
target.getEntities().addAll(Arrays.asList(targets));
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
index e6ab0c9..5bbbcff 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializer.java
@@ -37,7 +37,6 @@ import org.apache.olingo.commons.api.data.Link;
import org.apache.olingo.commons.api.data.Parameter;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmComplexType;
import org.apache.olingo.commons.api.edm.EdmEntityType;
@@ -358,14 +357,14 @@ public class ODataJsonDeserializer implements ODataDeserializer {
final ExpandTreeBuilder childExpandBuilder = (expandBuilder != null) ?
expandBuilder.expand(edmNavigationProperty) : null;
if (jsonNode.isArray() && edmNavigationProperty.isCollection()) {
- link.setType(ClientLinkType.ENTITY_SET_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE);
EntityCollection inlineEntitySet = new EntityCollection();
inlineEntitySet.getEntities().addAll(consumeEntitySetArray(edmNavigationProperty.getType(), jsonNode,
childExpandBuilder));
link.setInlineEntitySet(inlineEntitySet);
} else if (!jsonNode.isArray() && (!jsonNode.isValueNode() || jsonNode.isNull())
&& !edmNavigationProperty.isCollection()) {
- link.setType(ClientLinkType.ENTITY_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
if (!jsonNode.isNull()) {
Entity inlineEntity = consumeEntityNode(edmNavigationProperty.getType(), (ObjectNode) jsonNode,
childExpandBuilder);
@@ -409,7 +408,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
}
bindingLinkStrings.add(arrayValue.asText());
}
- bindingLink.setType(ClientLinkType.ENTITY_COLLECTION_BINDING.toString());
+ bindingLink.setType(Constants.ENTITY_COLLECTION_BINDING_LINK_TYPE);
bindingLink.setBindingLinks(bindingLinkStrings);
} else {
assertIsNullNode(key, jsonNode);
@@ -418,7 +417,7 @@ public class ODataJsonDeserializer implements ODataDeserializer {
DeserializerException.MessageKeys.INVALID_ANNOTATION_TYPE, key);
}
bindingLink.setBindingLink(jsonNode.asText());
- bindingLink.setType(ClientLinkType.ENTITY_BINDING.toString());
+ bindingLink.setType(Constants.ENTITY_BINDING_LINK_TYPE);
}
return bindingLink;
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
index 354c811..14381bb 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/serializer/json/ODataErrorSerializer.java
@@ -21,15 +21,15 @@ package org.apache.olingo.server.core.serializer.json;
import java.io.IOException;
import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.domain.ClientError;
-import org.apache.olingo.commons.api.domain.ClientErrorDetail;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataErrorDetail;
import org.apache.olingo.server.api.serializer.SerializerException;
import com.fasterxml.jackson.core.JsonGenerator;
public class ODataErrorSerializer {
- public void writeErrorDocument(JsonGenerator json, final ClientError error)
+ public void writeErrorDocument(JsonGenerator json, final ODataError error)
throws IOException, SerializerException {
if (error == null) {
throw new SerializerException("ODataError object MUST NOT be null!",
@@ -43,7 +43,7 @@ public class ODataErrorSerializer {
if (error.getDetails() != null) {
json.writeArrayFieldStart(Constants.ERROR_DETAILS);
- for (ClientErrorDetail detail : error.getDetails()) {
+ for (ODataErrorDetail detail : error.getDetails()) {
json.writeStartObject();
writeODataError(json, detail.getCode(), detail.getMessage(), detail.getTarget());
json.writeEndObject();
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ClientErrorSerializerTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ClientErrorSerializerTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ClientErrorSerializerTest.java
index c30a719..adf0eb4 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ClientErrorSerializerTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ClientErrorSerializerTest.java
@@ -26,7 +26,7 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.apache.olingo.commons.api.domain.ClientErrorDetail;
+import org.apache.olingo.commons.api.domain.ODataErrorDetail;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.server.api.OData;
import org.apache.olingo.server.api.ClientServerError;
@@ -83,7 +83,7 @@ public class ClientErrorSerializerTest {
@Test
public void emptyDetailsList() throws Exception {
ClientServerError error = new ClientServerError();
- error.setMessage("ErrorMessage").setDetails(new ArrayList<ClientErrorDetail>());
+ error.setMessage("ErrorMessage").setDetails(new ArrayList<ODataErrorDetail>());
InputStream stream = ser.error(error).getContent();
String jsonString = IOUtils.toString(stream);
assertEquals("{\"error\":{\"code\":null,\"message\":\"ErrorMessage\",\"details\":[]}}", jsonString);
@@ -99,8 +99,8 @@ public class ClientErrorSerializerTest {
@Test
public void singleDetailNothingSet() throws Exception {
- List<ClientErrorDetail> details = new ArrayList<ClientErrorDetail>();
- details.add(new ClientErrorDetail());
+ List<ODataErrorDetail> details = new ArrayList<ODataErrorDetail>();
+ details.add(new ODataErrorDetail());
ClientServerError error = new ClientServerError().setDetails(details);
InputStream stream = ser.error(error).getContent();
String jsonString = IOUtils.toString(stream);
@@ -110,8 +110,8 @@ public class ClientErrorSerializerTest {
@Test
public void verifiedWithJacksonParser() throws Exception {
- List<ClientErrorDetail> details = new ArrayList<ClientErrorDetail>();
- details.add(new ClientErrorDetail().setCode("detailCode").setMessage("detailMessage").setTarget("detailTarget"));
+ List<ODataErrorDetail> details = new ArrayList<ODataErrorDetail>();
+ details.add(new ODataErrorDetail().setCode("detailCode").setMessage("detailMessage").setTarget("detailTarget"));
ClientServerError error =
new ClientServerError().setCode("Code").setMessage("Message").setTarget("Target").setDetails(details);
InputStream stream = ser.error(error).getContent();
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
----------------------------------------------------------------------
diff --git a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
index 452e529..db0b7ac 100644
--- a/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
+++ b/lib/server-tecsvc/src/main/java/org/apache/olingo/server/tecsvc/data/DataCreator.java
@@ -29,13 +29,13 @@ import java.util.Map;
import java.util.TimeZone;
import java.util.UUID;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.ComplexValue;
import org.apache.olingo.commons.api.data.Entity;
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.ValueType;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
public class DataCreator {
@@ -628,7 +628,7 @@ public class DataCreator {
Link link = entity.getNavigationLink(navigationPropertyName);
if (link == null) {
link = new Link();
- link.setType(ClientLinkType.ENTITY_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_NAVIGATION_LINK_TYPE);
link.setTitle(navigationPropertyName);
entity.getNavigationLinks().add(link);
}
@@ -639,7 +639,7 @@ public class DataCreator {
Link link = entity.getNavigationLink(navigationPropertyName);
if (link == null) {
link = new Link();
- link.setType(ClientLinkType.ENTITY_SET_NAVIGATION.toString());
+ link.setType(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE);
link.setTitle(navigationPropertyName);
EntityCollection target = new EntityCollection();
target.getEntities().addAll(Arrays.asList(targets));
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataDeserializerDeepInsertTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataDeserializerDeepInsertTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataDeserializerDeepInsertTest.java
index 192f9b7..bcacb3a 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataDeserializerDeepInsertTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataDeserializerDeepInsertTest.java
@@ -25,9 +25,9 @@ import static org.junit.Assert.assertNull;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.Link;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
@@ -46,7 +46,7 @@ public class ODataDeserializerDeepInsertTest extends AbstractODataDeserializerTe
assertNotNull(navigationLink);
assertEquals("NavPropertyETTwoPrimOne", navigationLink.getTitle());
- assertEquals(ClientLinkType.ENTITY_NAVIGATION.toString(), navigationLink.getType());
+ assertEquals(Constants.ENTITY_NAVIGATION_LINK_TYPE, navigationLink.getType());
assertNotNull(navigationLink.getInlineEntity());
assertNull(navigationLink.getInlineEntitySet());
}
@@ -68,7 +68,7 @@ public class ODataDeserializerDeepInsertTest extends AbstractODataDeserializerTe
assertNotNull(navigationLink);
assertEquals("NavPropertyETTwoPrimMany", navigationLink.getTitle());
- assertEquals(ClientLinkType.ENTITY_SET_NAVIGATION.toString(), navigationLink.getType());
+ assertEquals(Constants.ENTITY_SET_NAVIGATION_LINK_TYPE, navigationLink.getType());
assertNull(navigationLink.getInlineEntity());
assertNotNull(navigationLink.getInlineEntitySet());
assertEquals(1, navigationLink.getInlineEntitySet().getEntities().size());
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
----------------------------------------------------------------------
diff --git a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
index 7886fbc..cd3c710 100644
--- a/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
+++ b/lib/server-test/src/test/java/org/apache/olingo/server/core/deserializer/json/ODataJsonDeserializerEntityTest.java
@@ -35,12 +35,12 @@ import java.util.Collections;
import java.util.Date;
import java.util.List;
+import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.ComplexValue;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.Link;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmEntityType;
import org.apache.olingo.commons.api.edm.EdmProperty;
@@ -474,7 +474,7 @@ public class ODataJsonDeserializerEntityTest extends AbstractODataDeserializerTe
assertNotNull(bindingToOne);
assertEquals("NavPropertyETTwoPrimOne", bindingToOne.getTitle());
assertEquals("ESTwoPrim(2)", bindingToOne.getBindingLink());
- assertEquals(ClientLinkType.ENTITY_BINDING.toString(), bindingToOne.getType());
+ assertEquals(Constants.ENTITY_BINDING_LINK_TYPE, bindingToOne.getType());
assertTrue(bindingToOne.getBindingLinks().isEmpty());
assertNull(bindingToOne.getHref());
assertNull(bindingToOne.getRel());
@@ -484,7 +484,7 @@ public class ODataJsonDeserializerEntityTest extends AbstractODataDeserializerTe
assertEquals("NavPropertyETTwoPrimMany", bindingToMany.getTitle());
assertNotNull(bindingToMany.getBindingLinks());
assertEquals(2, bindingToMany.getBindingLinks().size());
- assertEquals(ClientLinkType.ENTITY_COLLECTION_BINDING.toString(), bindingToMany.getType());
+ assertEquals(Constants.ENTITY_COLLECTION_BINDING_LINK_TYPE, bindingToMany.getType());
assertNull(bindingToMany.getBindingLink());
assertNull(bindingToMany.getHref());
assertNull(bindingToMany.getRel());
[6/7] olingo-odata4 git commit: [OLINGO-564] first step for common ->
client extraction
Posted by mi...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
index 1a7bfe0..976c621 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/DeltaTestITCase.java
@@ -20,9 +20,9 @@ package org.apache.olingo.fit.v4;
import org.apache.olingo.client.api.communication.request.retrieve.ODataDeltaRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
-import org.apache.olingo.commons.api.domain.ClientDelta;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientDelta;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
index 087ef8e..42b5beb 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/DerivedTypeTestITCase.java
@@ -30,10 +30,10 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientValuable;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
index 5ad4407..8aedbe7 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityCreateTestITCase.java
@@ -22,10 +22,10 @@ import org.apache.commons.lang3.RandomUtils;
import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
index 8b47d38..21f9be2 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityRetrieveTestITCase.java
@@ -32,13 +32,13 @@ import org.apache.olingo.client.api.communication.response.ODataRawResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
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.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
+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.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientLinkType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
index 65f54e5..3e001b0 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntitySetTestITCase.java
@@ -28,8 +28,8 @@ import org.apache.olingo.client.api.domain.ODataEntitySetIterator;
import org.apache.olingo.client.api.uri.URIBuilder;
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.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;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
index 2b47267..5eb9c69 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/EntityUpdateTestITCase.java
@@ -32,8 +32,8 @@ import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddi
import org.apache.olingo.client.api.communication.request.cud.UpdateType;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataReferenceAddingResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientLink;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
index a69df67..8cdd2db 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/ErrorResponseTestITCase.java
@@ -19,8 +19,8 @@
package org.apache.olingo.fit.v4;
import org.apache.olingo.client.api.communication.ODataClientErrorException;
-import org.apache.olingo.commons.api.domain.ClientError;
-import org.apache.olingo.commons.api.domain.ClientErrorDetail;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataErrorDetail;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
@@ -42,10 +42,10 @@ public class ErrorResponseTestITCase extends AbstractTestITCase {
read(ODataFormat.JSON, readURI);
fail("should have got exception");
} catch (Exception ex) {
- final ClientError err = ((ODataClientErrorException) ex).getODataError();
+ final ODataError err = ((ODataClientErrorException) ex).getODataError();
// verify details
- final ClientErrorDetail detail = err.getDetails().get(0);
+ final ODataErrorDetail detail = err.getDetails().get(0);
assertEquals("Code should be correct", "301", detail.getCode());
assertEquals("Target should be correct", "$search", detail.getTarget());
assertEquals("Message should be correct", "$search query option not supported", detail.getMessage());
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
index 74e510a..8e3fcc2 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/FilterFactoryTestITCase.java
@@ -23,8 +23,8 @@ import org.apache.olingo.client.api.uri.FilterArgFactory;
import org.apache.olingo.client.api.uri.FilterFactory;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.api.uri.URIFilter;
-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;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
index b45cf5a..c061fd2 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/JSONFormatConformanceTestITCase.java
@@ -29,12 +29,12 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-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.ClientLinkType;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+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.ClientLinkType;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
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/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
index 835d7a3..bd6ca5e 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/KeyAsSegmentTestITCase.java
@@ -24,8 +24,8 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.AfterClass;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
index 2b19064..a1d4da3 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
@@ -36,8 +36,8 @@ import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdat
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientValuable;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
index 4a5d6f5..c591394 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/MetadataTestITCase.java
@@ -67,8 +67,7 @@ public class MetadataTestITCase extends AbstractTestITCase {
assertNotNull(record);
assertEquals(3, record.getPropertyValues().size());
assertTrue(record.getPropertyValues().get(0).getValue().isConstant());
- assertTrue(record.getPropertyValues().get(0).getValue().asConstant().getValue().asPrimitive().
- toCastValue(Boolean.class));
+ assertTrue((Boolean) record.getPropertyValues().get(0).getValue().asConstant().getValue().asPrimitive());
assertTrue(record.getPropertyValues().get(1).getValue().asDynamic().isCollection());
assertEquals(1, record.getPropertyValues().get(1).getValue().asDynamic().asCollection().getItems().size());
assertTrue(record.getPropertyValues().get(1).getValue().asDynamic().asCollection().getItems().get(0).isDynamic());
@@ -134,7 +133,7 @@ public class MetadataTestITCase extends AbstractTestITCase {
final EdmAnnotation requiresTypeInScale = edm.getAnnotation(
scale.getFullQualifiedName(), edm.getTerm(new FullQualifiedName("Core.RequiresType")));
assertNotNull(requiresTypeInScale);
- assertEquals("Edm.Decimal", requiresTypeInScale.getExpression().asConstant().getValue().toString());
+ assertEquals("Edm.Decimal", requiresTypeInScale.getExpression().asConstant().toString());
// 3. capabilities
final EdmTerm deleteRestrictions = edm.getTerm(new FullQualifiedName("Capabilities.DeleteRestrictions"));
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
index 44b7eca..6af12fa 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OAuth2TestITCase.java
@@ -28,7 +28,7 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.ODataClientFactory;
-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.junit.AfterClass;
import org.junit.BeforeClass;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
index ad9b0a6..f6c7235 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OpenTypeTestITCase.java
@@ -30,8 +30,8 @@ import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateR
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.EdmSchema;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
index 4c0775e..10dda83 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/OperationImportInvokeTestITCase.java
@@ -28,14 +28,14 @@ import java.util.Map;
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.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
index f942e1c..f26c54b 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyTestITCase.java
@@ -34,9 +34,9 @@ import org.apache.olingo.client.api.communication.response.ODataEntityCreateResp
import org.apache.olingo.client.api.communication.response.ODataPropertyUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValuable;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.http.HttpMethod;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
index 6038654..5d05227 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/PropertyValueTestITCase.java
@@ -28,9 +28,9 @@ import org.apache.olingo.client.api.communication.ODataClientErrorException;
import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValuable;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
index 046baa9..6d17940 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/QueryOptionsTestITCase.java
@@ -23,9 +23,9 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.QueryOption;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java
index 402b30f..c9418fa 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/ServiceDocumentTestITCase.java
@@ -20,7 +20,7 @@ package org.apache.olingo.fit.v4;
import org.apache.olingo.client.api.communication.request.retrieve.ODataServiceDocumentRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
-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.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
index 8883c96..ecb5699 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/SingletonTestITCase.java
@@ -24,9 +24,9 @@ import org.apache.olingo.client.api.communication.request.cud.UpdateType;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientSingleton;
-import org.apache.olingo.commons.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientSingleton;
+import org.apache.olingo.client.api.domain.ClientValuable;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
index 04e01ba..214ab98 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/ODataClient.java
@@ -32,7 +32,7 @@ import org.apache.olingo.client.api.serialization.ODataWriter;
import org.apache.olingo.client.api.uri.FilterFactory;
import org.apache.olingo.client.api.uri.SearchFactory;
import org.apache.olingo.client.api.uri.URIBuilder;
-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;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
index 218c6e3..178241a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/ODataClientErrorException.java
@@ -21,12 +21,12 @@ package org.apache.olingo.client.api.communication;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.StatusLine;
import org.apache.olingo.commons.api.ODataRuntimeException;
-import org.apache.olingo.commons.api.domain.ClientError;
+import org.apache.olingo.commons.api.domain.ODataError;
/**
* Represents a client error in OData.
*
- * @see ClientError
+ * @see ODataError
*/
public class ODataClientErrorException extends ODataRuntimeException {
@@ -34,7 +34,7 @@ public class ODataClientErrorException extends ODataRuntimeException {
private final StatusLine statusLine;
- private final ClientError error;
+ private final ODataError error;
/**
* Constructor.
@@ -54,7 +54,7 @@ public class ODataClientErrorException extends ODataRuntimeException {
* @param statusLine request status info.
* @param error OData error to be wrapped.
*/
- public ODataClientErrorException(final StatusLine statusLine, final ClientError error) {
+ public ODataClientErrorException(final StatusLine statusLine, final ODataError error) {
super(error == null
? statusLine.toString()
: (StringUtils.isBlank(error.getCode()) ? StringUtils.EMPTY : "(" + error.getCode() + ") ")
@@ -78,7 +78,7 @@ public class ODataClientErrorException extends ODataRuntimeException {
*
* @return OData error.
*/
- public ClientError getODataError() {
+ public ODataError getODataError() {
return error;
}
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
index 73c3f1f..05537e9 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/CUDRequestFactory.java
@@ -24,10 +24,10 @@ import java.net.URI;
import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityCreateRequest;
import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityUpdateRequest;
import org.apache.olingo.client.api.communication.request.streamed.ODataStreamUpdateRequest;
-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;
public interface CUDRequestFactory {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java
index 3799357..43bea54 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityCreateRequest.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This interface describes an OData create request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java
index fa51265..b3bc2f7 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/cud/ODataEntityUpdateRequest.java
@@ -21,7 +21,7 @@ package org.apache.olingo.client.api.communication.request.cud;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This class implements an OData update request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java
index 948570a..82bb7f3 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ClientNoContent.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.invoke;
-import org.apache.olingo.commons.api.domain.ClientInvokeResult;
+import org.apache.olingo.client.api.domain.ClientInvokeResult;
/**
* Marker class for invoke with no 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/communication/request/invoke/EdmEnabledInvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java
index cf993f2..5293f7d 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/EdmEnabledInvokeRequestFactory.java
@@ -21,8 +21,8 @@ package org.apache.olingo.client.api.communication.request.invoke;
import java.net.URI;
import java.util.Map;
-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.FullQualifiedName;
public interface EdmEnabledInvokeRequestFactory extends InvokeRequestFactory {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java
index 247042f..7a3f301 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/InvokeRequestFactory.java
@@ -21,8 +21,8 @@ package org.apache.olingo.client.api.communication.request.invoke;
import java.net.URI;
import java.util.Map;
-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;
/**
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java
index 3ff05bb..8344f74 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/invoke/ODataInvokeRequest.java
@@ -22,8 +22,8 @@ import java.util.Map;
import org.apache.olingo.client.api.communication.request.ODataBasicRequest;
import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
-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;
/**
* This class implements an OData invoke operation request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
index ea028d3..2ac9f37 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataDeltaRequest.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.commons.api.domain.ClientDelta;
+import org.apache.olingo.client.api.domain.ClientDelta;
/**
* Describes an OData retrieve request returning a delta object.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java
index c96e417..a0a1830 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntityRequest.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* Describes an OData retrieve query request returning a single entity.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java
index a00525b..4b3f05e 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetIteratorRequest.java
@@ -19,8 +19,8 @@
package org.apache.olingo.client.api.communication.request.retrieve;
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;
/**
* This class implements an OData EntitySet query request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java
index 31accd5..d1c4f13 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataEntitySetRequest.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
/**
* This interface describes an OData EntitySet query request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java
index fd02f03..6727ee0 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataPropertyRequest.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientProperty;
/**
* This class implements an OData entity property query request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java
index 44d04f9..64c23e0 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataServiceDocumentRequest.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.commons.api.domain.ClientServiceDocument;
+import org.apache.olingo.client.api.domain.ClientServiceDocument;
/**
* This class implements an OData service document request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java
index 2b24591..1f66756 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/ODataValueRequest.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.request.retrieve;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
/**
* This class implements an OData entity property value query request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
index 04c5dfb..04733f6 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/retrieve/RetrieveRequestFactory.java
@@ -20,10 +20,10 @@ package org.apache.olingo.client.api.communication.request.retrieve;
import java.net.URI;
-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 interface RetrieveRequestFactory {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
index 1ef2493..57b42a7 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.streamed;
import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* Media entity payload object.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
index cf4bdd0..d876b16 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.streamed;
import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* Media entity payload object.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java
index 93570e5..3596643 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityCreateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.streamed;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java
index e50620c..8029b5a 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataMediaEntityUpdateRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.api.communication.request.streamed;
import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This class implements an OData Media Entity create request. Get instance by using ODataStreamedRequestFactory.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java
index 5816e71..24135fd 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityCreateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This interface describes the response to an OData entity create request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java
index 1f7f86d..084fc80 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataEntityUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This class implements the response to an OData update request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java
index 96ae840..401714b 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataInvokeResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.commons.api.domain.ClientInvokeResult;
+import org.apache.olingo.client.api.domain.ClientInvokeResult;
/**
* This class implements a response to a specific invoke request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java
index 2b5141d..3ca6db2 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityCreateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This class implements the response to an OData media entity create request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java
index a22eebd..64dd965 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataMediaEntityUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
/**
* This class implements the response to an Odata media entity update request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java
index 0739e37..7e2f511 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataPropertyUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientProperty;
/**
* This class implements the response to an OData update entity property request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java
index c921c44..8077eea 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/response/ODataValueUpdateResponse.java
@@ -18,7 +18,7 @@
*/
package org.apache.olingo.client.api.communication.response;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
/**
* This class implements the response to an OData update entity property request.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ServiceDocument.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ServiceDocument.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ServiceDocument.java
index fd8e4e6..47cbf67 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ServiceDocument.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/data/ServiceDocument.java
@@ -18,13 +18,15 @@
*/
package org.apache.olingo.client.api.data;
+import org.apache.olingo.client.api.domain.ClientServiceDocument;
+
import java.net.URI;
import java.util.List;
/**
* REST resource for an <tt>ODataServiceDocument</tt>.
*
- * @see org.apache.olingo.commons.api.domain.ClientServiceDocument
+ * @see ClientServiceDocument
*/
public interface ServiceDocument {
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientPayload.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientPayload.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientPayload.java
new file mode 100644
index 0000000..994bea4
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientPayload.java
@@ -0,0 +1,50 @@
+/*
+ * 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 entity.
+ */
+public abstract class AbstractClientPayload extends ClientItem {
+
+ /**
+ * Context URL.
+ */
+ private URI contextURL;
+
+ public AbstractClientPayload(final String name) {
+ super(name);
+ }
+
+ /**
+ * The context URL describes the content of the payload. It consists of the canonical metadata document URL and a
+ * fragment identifying the relevant portion of the metadata document.
+ *
+ * @return context URL.
+ */
+ public URI getContextURL() {
+ return contextURL;
+ }
+
+ public void setContextURL(final URI contextURL) {
+ this.contextURL = contextURL;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientValue.java
new file mode 100644
index 0000000..dca1904
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/AbstractClientValue.java
@@ -0,0 +1,120 @@
+/*
+ * 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.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * Abstract representation of an OData entity property value.
+ */
+public abstract class AbstractClientValue implements ClientValue {
+
+ /**
+ * Type name;
+ */
+ private final String typeName;
+
+ public AbstractClientValue(final String typeName) {
+ this.typeName = typeName;
+ }
+
+ @Override
+ public String getTypeName() {
+ return typeName;
+ }
+
+ /**
+ * Check is is a primitive value.
+ *
+ * @return 'TRUE' if primitive; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean isPrimitive() {
+ return (this instanceof ClientPrimitiveValue);
+ }
+
+ /**
+ * Casts to primitive value.
+ *
+ * @return primitive value.
+ */
+ @Override
+ public ClientPrimitiveValue asPrimitive() {
+ return isPrimitive() ? (ClientPrimitiveValue) this : null;
+ }
+
+ /**
+ * Check is is a complex value.
+ *
+ * @return 'TRUE' if complex; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean isComplex() {
+ return (this instanceof ClientComplexValue);
+ }
+
+ /**
+ * Casts to complex value.
+ *
+ * @return complex value.
+ */
+ @Override
+ public ClientComplexValue asComplex() {
+ return isComplex() ? (ClientComplexValue) this : null;
+ }
+
+ /**
+ * Check is is a collection value.
+ *
+ * @return 'TRUE' if collection; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean isCollection() {
+ return (this instanceof ClientCollectionValue);
+ }
+
+ /**
+ * Casts to collection value.
+ *
+ * @return collection value.
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public <OV extends ClientValue> ClientCollectionValue<OV> asCollection() {
+ return isCollection() ? (ClientCollectionValue<OV>) this : null;
+ }
+
+ @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/ClientAnnotatable.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientAnnotatable.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientAnnotatable.java
new file mode 100644
index 0000000..7da9677
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientAnnotatable.java
@@ -0,0 +1,26 @@
+/*
+ * 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 ClientAnnotatable {
+
+ List<ClientAnnotation> getAnnotations();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientAnnotation.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientAnnotation.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientAnnotation.java
new file mode 100644
index 0000000..4034821
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientAnnotation.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;
+
+public interface ClientAnnotation extends ClientValuable {
+
+ /**
+ * Returns annotation name.
+ *
+ * @return annotation name.
+ */
+ String getTerm();
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientCollectionValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientCollectionValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientCollectionValue.java
new file mode 100644
index 0000000..8a0078e
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientCollectionValue.java
@@ -0,0 +1,57 @@
+/*
+ * 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.Collection;
+
+/**
+ * OData collection property value.
+ *
+ * @param <OV> The actual ODataValue interface.
+ */
+public interface ClientCollectionValue<OV extends ClientValue> extends ClientValue, Iterable<OV> {
+
+ /**
+ * Adds a value to the collection.
+ *
+ * @param value value to be added.
+ */
+ ClientCollectionValue<OV> add(ClientValue value);
+
+ /**
+ * Checks if collection is empty.
+ *
+ * @return 'TRUE' if empty; 'FALSE' otherwise.
+ */
+ boolean isEmpty();
+
+ /**
+ * Gets collection size.
+ *
+ * @return collection size.
+ */
+ int size();
+
+ /**
+ * Converts this instance as POJO collection.
+ *
+ * @return this instance as POJO collection
+ */
+ Collection<Object> asJavaCollection();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientComplexValue.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientComplexValue.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientComplexValue.java
new file mode 100644
index 0000000..ee4f4df
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientComplexValue.java
@@ -0,0 +1,58 @@
+/*
+ * 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.Map;
+
+/**
+ * OData complex property value.
+ *
+ */
+public interface ClientComplexValue extends ClientValue, ClientLinked, ClientAnnotatable, Iterable<ClientProperty> {
+
+ /**
+ * Adds field to the complex type.
+ *
+ * @param field field to be added.
+ * @return this (for fluent-style calls)
+ */
+ ClientComplexValue add(ClientProperty field);
+
+ /**
+ * Gets field.
+ *
+ * @param name name of the field to be retrieved.
+ * @return requested field.
+ */
+ ClientProperty get(String name);
+
+ /**
+ * Gets number of fields.
+ *
+ * @return number of fields.
+ */
+ int size();
+
+ /**
+ * Converts this instance as POJO collection.
+ *
+ * @return this instance as POJO collection
+ */
+ Map<String, Object> asJavaMap();
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeletedEntity.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeletedEntity.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeletedEntity.java
new file mode 100644
index 0000000..ff64e38
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeletedEntity.java
@@ -0,0 +1,36 @@
+/*
+ * 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 interface ClientDeletedEntity {
+
+ enum Reason {
+
+ deleted,
+ changed
+
+ }
+
+ URI getId();
+
+ Reason getReason();
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDelta.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDelta.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDelta.java
new file mode 100644
index 0000000..d5419f2
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDelta.java
@@ -0,0 +1,31 @@
+/*
+ * 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 ClientDelta extends ClientEntitySet {
+
+ List<ClientDeletedEntity> getDeletedEntities();
+
+ List<ClientDeltaLink> getAddedLinks();
+
+ List<ClientDeltaLink> getDeletedLinks();
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeltaLink.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeltaLink.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeltaLink.java
new file mode 100644
index 0000000..efef3b1
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientDeltaLink.java
@@ -0,0 +1,36 @@
+/*
+ * 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 interface ClientDeltaLink extends ClientAnnotatable {
+
+ URI getSource();
+
+ void setSource(URI source);
+
+ String getRelationship();
+
+ void setRelationship(String relationship);
+
+ URI getTarget();
+
+ void setTarget(URI 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/ClientEntity.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntity.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntity.java
new file mode 100644
index 0000000..f023bfc
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/domain/ClientEntity.java
@@ -0,0 +1,202 @@
+/*
+ * 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;
+import java.util.List;
+
+/**
+ * OData entity.
+ */
+public interface ClientEntity extends ClientLinked, ClientAnnotatable, ClientInvokeResult {
+
+ /**
+ * @return the type name of this entity.
+ */
+ FullQualifiedName getTypeName();
+
+ /**
+ * @return self link.
+ */
+ URI getLink();
+
+ /**
+ * Returns OData entity edit link.
+ *
+ * @return entity edit link.
+ */
+ URI getEditLink();
+
+ /**
+ * Sets OData entity edit link.
+ *
+ * @param editLink edit link.
+ */
+ void setEditLink(URI editLink);
+
+ /**
+ * Gets ETag.
+ *
+ * @return ETag.
+ */
+ String getETag();
+
+ /**
+ * Sets ETag.
+ *
+ * @param eTag ETag.
+ */
+ void setETag(String eTag);
+
+ /**
+ * Searches for operation with given title.
+ *
+ * @param title operation to look for
+ * @return operation if found with given title, <tt>null</tt> otherwise
+ */
+ ClientOperation getOperation(String title);
+
+ /**
+ * Gets operations.
+ *
+ * @return operations.
+ */
+ List<ClientOperation> getOperations();
+
+ /**
+ * Searches for property with given name.
+ *
+ * @param name property to look for
+ * @return property if found with given name, <tt>null</tt> otherwise
+ */
+ ClientProperty getProperty(String name);
+
+ /**
+ * Returns OData entity properties.
+ *
+ * @return OData entity properties.
+ */
+ List<ClientProperty> getProperties();
+
+ /**
+ * To request entity references in place of the actual entities, the client issues a GET request with /$ref appended
+ * to the resource path.
+ * <br />
+ * If the resource path does not identify an entity or a collection of entities, the service returns 404 Not Found.
+ * <br />
+ * If the resource path terminates on a collection, the response MUST be the format-specific representation of a
+ * collection of entity references pointing to the related entities. If no entities are related, the response is the
+ * format-specific representation of an empty collection.
+ * <br />
+ * If the resource path terminates on a single entity, the response MUST be the format-specific representation of an
+ * entity reference pointing to the related single entity. If the resource path terminates on a single entity and no
+ * such entity exists, the service returns 404 Not Found.
+ *
+ * @return entity reference.
+ */
+ URI getId();
+
+ /**
+ * Set id for this OData entity.
+ *
+ * @param id the if for this entity
+ */
+ void setId(URI id);
+
+ /**
+ * Gets media-edit link with given name, if available, otherwise <tt>null</tt>.
+ *
+ * @param name candidate link name
+ * @return media-edit link with given name, if available, otherwise <tt>null</tt>
+ */
+ ClientLink getMediaEditLink(final String name);
+
+ /**
+ * Returns entity media edit links.
+ *
+ * @return OData entity links.
+ */
+ List<ClientLink> getMediaEditLinks();
+
+ /**
+ * TRUE if read-only entity.
+ *
+ * @return TRUE if read-only; FALSE otherwise.
+ */
+ boolean isReadOnly();
+
+ /**
+ * Checks if the current entity is a media entity.
+ *
+ * @return 'TRUE' if media entity; 'FALSE' otherwise.
+ */
+ boolean isMediaEntity();
+
+ /**
+ * Sets media entity flag.
+ *
+ * @param isMediaEntity media entity flag value.
+ */
+ void setMediaEntity(boolean isMediaEntity);
+
+ /**
+ * Gets media content type.
+ *
+ * @return media content type.
+ */
+ String getMediaContentType();
+
+ /**
+ * Sets media content type.
+ *
+ * @param mediaContentType media content type.
+ */
+ void setMediaContentType(String mediaContentType);
+
+ /**
+ * Gets media content source.
+ *
+ * @return media content source.
+ */
+ URI getMediaContentSource();
+
+ /**
+ * Sets media content source.
+ *
+ * @param mediaContentSource media content source.
+ */
+ void setMediaContentSource(URI mediaContentSource);
+
+ /**
+ * ETag of the binary stream represented by this media entity or named stream property.
+ *
+ * @return media ETag value
+ */
+ String getMediaETag();
+
+ /**
+ * Set media ETag.
+ *
+ * @param eTag media ETag value
+ */
+ void setMediaETag(String eTag);
+
+}
[5/7] olingo-odata4 git commit: [OLINGO-564] first step for common ->
client extraction
Posted by mi...@apache.org.
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;
[3/7] olingo-odata4 git commit: [OLINGO-564] first step for common ->
client extraction
Posted by mi...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.java
new file mode 100644
index 0000000..914c42c
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Operation.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.commons.api.data;
+
+import java.net.URI;
+
+public class Operation {
+
+ 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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientPayload.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientPayload.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientPayload.java
deleted file mode 100644
index fc54860..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientPayload.java
+++ /dev/null
@@ -1,50 +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.commons.api.domain;
-
-import java.net.URI;
-
-/**
- * OData entity.
- */
-public abstract class AbstractClientPayload extends ClientItem {
-
- /**
- * Context URL.
- */
- private URI contextURL;
-
- public AbstractClientPayload(final String name) {
- super(name);
- }
-
- /**
- * The context URL describes the content of the payload. It consists of the canonical metadata document URL and a
- * fragment identifying the relevant portion of the metadata document.
- *
- * @return context URL.
- */
- public URI getContextURL() {
- return contextURL;
- }
-
- public void setContextURL(final URI contextURL) {
- this.contextURL = contextURL;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientValue.java
deleted file mode 100644
index af5b423..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/AbstractClientValue.java
+++ /dev/null
@@ -1,120 +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.commons.api.domain;
-
-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;
-
-/**
- * Abstract representation of an OData entity property value.
- */
-public abstract class AbstractClientValue implements ClientValue {
-
- /**
- * Type name;
- */
- private final String typeName;
-
- public AbstractClientValue(final String typeName) {
- this.typeName = typeName;
- }
-
- @Override
- public String getTypeName() {
- return typeName;
- }
-
- /**
- * Check is is a primitive value.
- *
- * @return 'TRUE' if primitive; 'FALSE' otherwise.
- */
- @Override
- public boolean isPrimitive() {
- return (this instanceof ClientPrimitiveValue);
- }
-
- /**
- * Casts to primitive value.
- *
- * @return primitive value.
- */
- @Override
- public ClientPrimitiveValue asPrimitive() {
- return isPrimitive() ? (ClientPrimitiveValue) this : null;
- }
-
- /**
- * Check is is a complex value.
- *
- * @return 'TRUE' if complex; 'FALSE' otherwise.
- */
- @Override
- public boolean isComplex() {
- return (this instanceof ClientComplexValue);
- }
-
- /**
- * Casts to complex value.
- *
- * @return complex value.
- */
- @Override
- public ClientComplexValue asComplex() {
- return isComplex() ? (ClientComplexValue) this : null;
- }
-
- /**
- * Check is is a collection value.
- *
- * @return 'TRUE' if collection; 'FALSE' otherwise.
- */
- @Override
- public boolean isCollection() {
- return (this instanceof ClientCollectionValue);
- }
-
- /**
- * Casts to collection value.
- *
- * @return collection value.
- */
- @SuppressWarnings("unchecked")
- @Override
- public <OV extends ClientValue> ClientCollectionValue<OV> asCollection() {
- return isCollection() ? (ClientCollectionValue<OV>) this : null;
- }
-
- @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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotatable.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotatable.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotatable.java
deleted file mode 100644
index f9c5119..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotatable.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.api.domain;
-
-import java.util.List;
-
-public interface ClientAnnotatable {
-
- List<ClientAnnotation> getAnnotations();
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotation.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotation.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotation.java
deleted file mode 100644
index 1749c63..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientAnnotation.java
+++ /dev/null
@@ -1,30 +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.commons.api.domain;
-
-public interface ClientAnnotation extends ClientValuable {
-
- /**
- * Returns annotation name.
- *
- * @return annotation name.
- */
- String getTerm();
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientCollectionValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientCollectionValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientCollectionValue.java
deleted file mode 100644
index 0497dc6..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientCollectionValue.java
+++ /dev/null
@@ -1,57 +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.commons.api.domain;
-
-import java.util.Collection;
-
-/**
- * OData collection property value.
- *
- * @param <OV> The actual ODataValue interface.
- */
-public interface ClientCollectionValue<OV extends ClientValue> extends ClientValue, Iterable<OV> {
-
- /**
- * Adds a value to the collection.
- *
- * @param value value to be added.
- */
- ClientCollectionValue<OV> add(ClientValue value);
-
- /**
- * Checks if collection is empty.
- *
- * @return 'TRUE' if empty; 'FALSE' otherwise.
- */
- boolean isEmpty();
-
- /**
- * Gets collection size.
- *
- * @return collection size.
- */
- int size();
-
- /**
- * Converts this instance as POJO collection.
- *
- * @return this instance as POJO collection
- */
- Collection<Object> asJavaCollection();
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientComplexValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientComplexValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientComplexValue.java
deleted file mode 100644
index 3c2931a..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientComplexValue.java
+++ /dev/null
@@ -1,58 +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.commons.api.domain;
-
-import java.util.Map;
-
-/**
- * OData complex property value.
- *
- */
-public interface ClientComplexValue extends ClientValue, ClientLinked, ClientAnnotatable, Iterable<ClientProperty> {
-
- /**
- * Adds field to the complex type.
- *
- * @param field field to be added.
- * @return this (for fluent-style calls)
- */
- ClientComplexValue add(ClientProperty field);
-
- /**
- * Gets field.
- *
- * @param name name of the field to be retrieved.
- * @return requested field.
- */
- ClientProperty get(String name);
-
- /**
- * Gets number of fields.
- *
- * @return number of fields.
- */
- int size();
-
- /**
- * Converts this instance as POJO collection.
- *
- * @return this instance as POJO collection
- */
- Map<String, Object> asJavaMap();
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeletedEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeletedEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeletedEntity.java
deleted file mode 100644
index 3cdcb7b..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeletedEntity.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.commons.api.domain;
-
-import java.net.URI;
-
-public interface ClientDeletedEntity {
-
- enum Reason {
-
- deleted,
- changed
-
- }
-
- URI getId();
-
- Reason getReason();
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDelta.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDelta.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDelta.java
deleted file mode 100644
index 7092e6f..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDelta.java
+++ /dev/null
@@ -1,31 +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.commons.api.domain;
-
-import java.util.List;
-
-public interface ClientDelta extends ClientEntitySet {
-
- List<ClientDeletedEntity> getDeletedEntities();
-
- List<ClientDeltaLink> getAddedLinks();
-
- List<ClientDeltaLink> getDeletedLinks();
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeltaLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeltaLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeltaLink.java
deleted file mode 100644
index d12aedf..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientDeltaLink.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.commons.api.domain;
-
-import java.net.URI;
-
-public interface ClientDeltaLink extends ClientAnnotatable {
-
- URI getSource();
-
- void setSource(URI source);
-
- String getRelationship();
-
- void setRelationship(String relationship);
-
- URI getTarget();
-
- void setTarget(URI target);
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntity.java
deleted file mode 100644
index 39736cc..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntity.java
+++ /dev/null
@@ -1,202 +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.commons.api.domain;
-
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-
-import java.net.URI;
-import java.util.List;
-
-/**
- * OData entity.
- */
-public interface ClientEntity extends ClientLinked, ClientAnnotatable, ClientInvokeResult {
-
- /**
- * @return the type name of this entity.
- */
- FullQualifiedName getTypeName();
-
- /**
- * @return self link.
- */
- URI getLink();
-
- /**
- * Returns OData entity edit link.
- *
- * @return entity edit link.
- */
- URI getEditLink();
-
- /**
- * Sets OData entity edit link.
- *
- * @param editLink edit link.
- */
- void setEditLink(URI editLink);
-
- /**
- * Gets ETag.
- *
- * @return ETag.
- */
- String getETag();
-
- /**
- * Sets ETag.
- *
- * @param eTag ETag.
- */
- void setETag(String eTag);
-
- /**
- * Searches for operation with given title.
- *
- * @param title operation to look for
- * @return operation if found with given title, <tt>null</tt> otherwise
- */
- ClientOperation getOperation(String title);
-
- /**
- * Gets operations.
- *
- * @return operations.
- */
- List<ClientOperation> getOperations();
-
- /**
- * Searches for property with given name.
- *
- * @param name property to look for
- * @return property if found with given name, <tt>null</tt> otherwise
- */
- ClientProperty getProperty(String name);
-
- /**
- * Returns OData entity properties.
- *
- * @return OData entity properties.
- */
- List<ClientProperty> getProperties();
-
- /**
- * To request entity references in place of the actual entities, the client issues a GET request with /$ref appended
- * to the resource path.
- * <br />
- * If the resource path does not identify an entity or a collection of entities, the service returns 404 Not Found.
- * <br />
- * If the resource path terminates on a collection, the response MUST be the format-specific representation of a
- * collection of entity references pointing to the related entities. If no entities are related, the response is the
- * format-specific representation of an empty collection.
- * <br />
- * If the resource path terminates on a single entity, the response MUST be the format-specific representation of an
- * entity reference pointing to the related single entity. If the resource path terminates on a single entity and no
- * such entity exists, the service returns 404 Not Found.
- *
- * @return entity reference.
- */
- URI getId();
-
- /**
- * Set id for this OData entity.
- *
- * @param id the if for this entity
- */
- void setId(URI id);
-
- /**
- * Gets media-edit link with given name, if available, otherwise <tt>null</tt>.
- *
- * @param name candidate link name
- * @return media-edit link with given name, if available, otherwise <tt>null</tt>
- */
- ClientLink getMediaEditLink(final String name);
-
- /**
- * Returns entity media edit links.
- *
- * @return OData entity links.
- */
- List<ClientLink> getMediaEditLinks();
-
- /**
- * TRUE if read-only entity.
- *
- * @return TRUE if read-only; FALSE otherwise.
- */
- boolean isReadOnly();
-
- /**
- * Checks if the current entity is a media entity.
- *
- * @return 'TRUE' if media entity; 'FALSE' otherwise.
- */
- boolean isMediaEntity();
-
- /**
- * Sets media entity flag.
- *
- * @param isMediaEntity media entity flag value.
- */
- void setMediaEntity(boolean isMediaEntity);
-
- /**
- * Gets media content type.
- *
- * @return media content type.
- */
- String getMediaContentType();
-
- /**
- * Sets media content type.
- *
- * @param mediaContentType media content type.
- */
- void setMediaContentType(String mediaContentType);
-
- /**
- * Gets media content source.
- *
- * @return media content source.
- */
- URI getMediaContentSource();
-
- /**
- * Sets media content source.
- *
- * @param mediaContentSource media content source.
- */
- void setMediaContentSource(URI mediaContentSource);
-
- /**
- * ETag of the binary stream represented by this media entity or named stream property.
- *
- * @return media ETag value
- */
- String getMediaETag();
-
- /**
- * Set media ETag.
- *
- * @param eTag media ETag value
- */
- void setMediaETag(String eTag);
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntitySet.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntitySet.java
deleted file mode 100644
index 36a8161..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEntitySet.java
+++ /dev/null
@@ -1,71 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEnumValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEnumValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEnumValue.java
deleted file mode 100644
index cc88a94..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientEnumValue.java
+++ /dev/null
@@ -1,27 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientError.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientError.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientError.java
deleted file mode 100644
index 11b6ca8..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientError.java
+++ /dev/null
@@ -1,132 +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.commons.api.domain;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * OData error.
- */
-public class ClientError {
-
- private String code;
- private String message;
- private String target;
- private List<ClientErrorDetail> details;
- private Map<String, String> innerError;
-
- /**
- * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
- * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
- * @return the error code as a string
- */
- public String getCode() {
- return code;
- }
-
- /**
- * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
- * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
- * @param code
- * @return this for method chaining
- */
- public ClientError setCode(String code) {
- this.code = code;
- return this;
- }
-
- /**
- * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
- * MUST not be null
- * @return the message string
- */
- public String getMessage() {
- return message;
- }
-
- /**
- * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
- * MUST not be null
- * @param message
- * @return this for method chaining
- */
- public ClientError setMessage(String message) {
- this.message = message;
- return this;
- }
-
- /**
- * The value for the target name/value pair is the target of the particular error (for example, the name of the
- * property in error). MAY be null.
- * @return the target string
- */
- public String getTarget() {
- return target;
- }
-
- /**
- * The value for the target name/value pair is the target of the particular error (for example, the name of the
- * property in error). MAY be null.
- * @param target
- * @return this for method chaining
- */
- public ClientError setTarget(String target) {
- this.target = target;
- return this;
- }
-
- /**
- * Gets error details.
- *
- * @return ODataErrorDetail list.
- */
- public List<ClientErrorDetail> getDetails() {
- return details;
- }
-
- /**
- * Sets error details.
- *
- * @return this for method chaining.
- */
- public ClientError setDetails(List<ClientErrorDetail> details) {
- this.details = details;
- return this;
- }
-
- /**
- * Gets server defined key-value pairs for debug environment only.
- *
- * @return a pair representing server defined object. MAY be null.
- */
- public Map<String, String> getInnerError() {
- return innerError;
- }
-
- /**
- * Sets server defined key-value pairs for debug environment only.
- *
- * @return this for method chaining.
- */
- public ClientError setInnerError(Map<String, String> innerError) {
- this.innerError = innerError;
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientErrorDetail.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientErrorDetail.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientErrorDetail.java
deleted file mode 100644
index 77316ef..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientErrorDetail.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.commons.api.domain;
-
-/**
- * OData details, for example <tt>{ "error": {..., "details":[
- * {"code": "301","target": "$search" ,"message": "$search query option not supported"}
- * ],...}}</tt>.
- */
-public class ClientErrorDetail {
-
- private String code;
- private String message;
- private String target;
-
- /**
- * Gets error code.
- *
- * @return error code.
- */
- public String getCode() {
- return code;
- }
-
- public ClientErrorDetail setCode(final String code) {
- this.code = code;
- return this;
- }
-
- /**
- * Gets error message.
- *
- * @return error message.
- */
- public String getMessage() {
- return message;
- }
-
- public ClientErrorDetail setMessage(final String message) {
- this.message = message;
- return this;
- }
-
- /**
- * Gets error target.
- *
- * @return error message.
- */
- public String getTarget() {
- return target;
- }
-
- public ClientErrorDetail setTarget(final String target) {
- this.target = target;
- return this;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntity.java
deleted file mode 100644
index e3fb699..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntity.java
+++ /dev/null
@@ -1,68 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntitySet.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntitySet.java
deleted file mode 100644
index a14933f..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInlineEntitySet.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInvokeResult.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInvokeResult.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInvokeResult.java
deleted file mode 100644
index a28c078..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientInvokeResult.java
+++ /dev/null
@@ -1,30 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientItem.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientItem.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientItem.java
deleted file mode 100644
index 1279aea..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientItem.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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLink.java
deleted file mode 100644
index d19c3c5..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLink.java
+++ /dev/null
@@ -1,187 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinkType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinkType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinkType.java
deleted file mode 100644
index 8b13c33..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinkType.java
+++ /dev/null
@@ -1,105 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinked.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinked.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinked.java
deleted file mode 100644
index 92b3a42..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientLinked.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientObjectFactory.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientObjectFactory.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientObjectFactory.java
deleted file mode 100644
index d9a2e9f..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientObjectFactory.java
+++ /dev/null
@@ -1,168 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientOperation.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientOperation.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientOperation.java
deleted file mode 100644
index e5c5845..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientOperation.java
+++ /dev/null
@@ -1,85 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPrimitiveValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPrimitiveValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPrimitiveValue.java
deleted file mode 100644
index a3da64a..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPrimitiveValue.java
+++ /dev/null
@@ -1,88 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientProperty.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientProperty.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientProperty.java
deleted file mode 100644
index 8d7a490..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientProperty.java
+++ /dev/null
@@ -1,32 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPropertyType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPropertyType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPropertyType.java
deleted file mode 100644
index 96ab250..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientPropertyType.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.commons.api.domain;
-
-public enum ClientPropertyType {
-
- /**
- * Primitive (including geospatial).
- */
- PRIMITIVE,
- /**
- * Enum.
- */
- ENUM,
- /**
- * Collection.
- */
- COLLECTION,
- /**
- * Complex.
- */
- COMPLEX,
- /**
- * Empty type (possibly, no type information could be retrieved).
- */
- EMPTY
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientServiceDocument.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientServiceDocument.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientServiceDocument.java
deleted file mode 100644
index a2af9ab..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientServiceDocument.java
+++ /dev/null
@@ -1,163 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientSingleton.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientSingleton.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientSingleton.java
deleted file mode 100644
index aa474b7..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientSingleton.java
+++ /dev/null
@@ -1,23 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValuable.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValuable.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValuable.java
deleted file mode 100644
index 636972a..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValuable.java
+++ /dev/null
@@ -1,94 +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.commons.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/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValue.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValue.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValue.java
deleted file mode 100644
index ba41bc0..0000000
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ClientValue.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.commons.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();
-
-}
[7/7] olingo-odata4 git commit: [OLINGO-564] first step for common ->
client extraction
Posted by mi...@apache.org.
[OLINGO-564] first step for common -> client extraction
Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/17152920
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/17152920
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/17152920
Branch: refs/heads/OLINGO-564
Commit: 17152920f0f3d267db681a1c89be38c3ac67e34c
Parents: c37d4da
Author: Michael Bolz <mi...@sap.com>
Authored: Wed Apr 29 10:04:12 2015 +0200
Committer: Michael Bolz <mi...@sap.com>
Committed: Thu Apr 30 06:04:42 2015 +0200
----------------------------------------------------------------------
.../AbstractCollectionInvocationHandler.java | 2 +-
...stractEntityCollectionInvocationHandler.java | 8 +-
.../commons/AbstractInvocationHandler.java | 4 +-
.../commons/AbstractPersistenceManager.java | 6 +-
.../AbstractStructuredInvocationHandler.java | 14 +-
.../commons/AnnotatableInvocationHandler.java | 6 +-
.../ComplexCollectionInvocationHandler.java | 8 +-
.../proxy/commons/ComplexInvocationHandler.java | 6 +-
.../EntityContainerInvocationHandler.java | 2 +-
.../proxy/commons/EntityInvocationHandler.java | 6 +-
.../commons/EntitySetInvocationHandler.java | 4 +-
.../ext/proxy/commons/EntitySetIterator.java | 2 +-
.../proxy/commons/InvokerInvocationHandler.java | 10 +-
.../commons/OperationInvocationHandler.java | 6 +-
.../PrimitiveCollectionInvocationHandler.java | 6 +-
...turedComposableInvokerInvocationHandler.java | 2 +-
.../ext/proxy/context/EntityLinkDesc.java | 2 +-
.../olingo/ext/proxy/utils/CoreUtils.java | 20 +-
.../olingo/ext/proxy/utils/ProxyUtils.java | 6 +-
.../olingo/fit/AbstractBaseTestITCase.java | 6 +-
.../fit/tecsvc/client/ActionImportITCase.java | 12 +-
.../olingo/fit/tecsvc/client/BasicITCase.java | 125 ++++----
.../fit/tecsvc/client/BatchClientITCase.java | 6 +-
.../olingo/fit/tecsvc/client/BindingITCase.java | 15 +-
.../fit/tecsvc/client/DeepInsertITCase.java | 18 +-
.../fit/tecsvc/client/ExpandSelectITCase.java | 12 +-
.../ExpandWithSystemQueryOptionsITCase.java | 4 +-
.../tecsvc/client/FilterSystemQueryITCase.java | 8 +-
.../fit/tecsvc/client/FunctionImportITCase.java | 10 +-
.../olingo/fit/tecsvc/client/MediaITCase.java | 4 +-
.../fit/tecsvc/client/NavigationITCase.java | 6 +-
.../tecsvc/client/OrderBySystemQueryITCase.java | 6 +-
.../tecsvc/client/PrimitiveComplexITCase.java | 4 +-
.../tecsvc/client/SystemQueryOptionITCase.java | 4 +-
.../olingo/fit/v4/AbstractTestITCase.java | 10 +-
.../apache/olingo/fit/v4/AsyncTestITCase.java | 10 +-
.../olingo/fit/v4/AuthBatchTestITCase.java | 2 +-
.../apache/olingo/fit/v4/BatchTestITCase.java | 4 +-
.../fit/v4/BoundOperationInvokeTestITCase.java | 20 +-
.../olingo/fit/v4/ConformanceTestITCase.java | 14 +-
.../apache/olingo/fit/v4/DeltaTestITCase.java | 6 +-
.../olingo/fit/v4/DerivedTypeTestITCase.java | 8 +-
.../olingo/fit/v4/EntityCreateTestITCase.java | 8 +-
.../olingo/fit/v4/EntityRetrieveTestITCase.java | 14 +-
.../olingo/fit/v4/EntitySetTestITCase.java | 4 +-
.../olingo/fit/v4/EntityUpdateTestITCase.java | 4 +-
.../olingo/fit/v4/ErrorResponseTestITCase.java | 8 +-
.../olingo/fit/v4/FilterFactoryTestITCase.java | 4 +-
.../fit/v4/JSONFormatConformanceTestITCase.java | 12 +-
.../olingo/fit/v4/KeyAsSegmentTestITCase.java | 4 +-
.../olingo/fit/v4/MediaEntityTestITCase.java | 4 +-
.../olingo/fit/v4/MetadataTestITCase.java | 5 +-
.../apache/olingo/fit/v4/OAuth2TestITCase.java | 2 +-
.../olingo/fit/v4/OpenTypeTestITCase.java | 4 +-
.../fit/v4/OperationImportInvokeTestITCase.java | 16 +-
.../olingo/fit/v4/PropertyTestITCase.java | 6 +-
.../olingo/fit/v4/PropertyValueTestITCase.java | 6 +-
.../olingo/fit/v4/QueryOptionsTestITCase.java | 6 +-
.../fit/v4/ServiceDocumentTestITCase.java | 2 +-
.../olingo/fit/v4/SingletonTestITCase.java | 6 +-
.../apache/olingo/client/api/ODataClient.java | 2 +-
.../ODataClientErrorException.java | 10 +-
.../request/cud/CUDRequestFactory.java | 8 +-
.../request/cud/ODataEntityCreateRequest.java | 2 +-
.../request/cud/ODataEntityUpdateRequest.java | 2 +-
.../request/invoke/ClientNoContent.java | 2 +-
.../invoke/EdmEnabledInvokeRequestFactory.java | 4 +-
.../request/invoke/InvokeRequestFactory.java | 4 +-
.../request/invoke/ODataInvokeRequest.java | 4 +-
.../request/retrieve/ODataDeltaRequest.java | 2 +-
.../request/retrieve/ODataEntityRequest.java | 2 +-
.../retrieve/ODataEntitySetIteratorRequest.java | 4 +-
.../request/retrieve/ODataEntitySetRequest.java | 2 +-
.../request/retrieve/ODataPropertyRequest.java | 2 +-
.../retrieve/ODataServiceDocumentRequest.java | 2 +-
.../request/retrieve/ODataValueRequest.java | 2 +-
.../retrieve/RetrieveRequestFactory.java | 8 +-
.../MediaEntityCreateStreamManager.java | 2 +-
.../MediaEntityUpdateStreamManager.java | 2 +-
.../streamed/ODataMediaEntityCreateRequest.java | 2 +-
.../streamed/ODataMediaEntityUpdateRequest.java | 2 +-
.../response/ODataEntityCreateResponse.java | 2 +-
.../response/ODataEntityUpdateResponse.java | 2 +-
.../response/ODataInvokeResponse.java | 2 +-
.../ODataMediaEntityCreateResponse.java | 2 +-
.../ODataMediaEntityUpdateResponse.java | 2 +-
.../response/ODataPropertyUpdateResponse.java | 2 +-
.../response/ODataValueUpdateResponse.java | 2 +-
.../olingo/client/api/data/ServiceDocument.java | 4 +-
.../api/domain/AbstractClientPayload.java | 50 ++++
.../client/api/domain/AbstractClientValue.java | 120 ++++++++
.../client/api/domain/ClientAnnotatable.java | 26 ++
.../client/api/domain/ClientAnnotation.java | 30 ++
.../api/domain/ClientCollectionValue.java | 57 ++++
.../client/api/domain/ClientComplexValue.java | 58 ++++
.../client/api/domain/ClientDeletedEntity.java | 36 +++
.../olingo/client/api/domain/ClientDelta.java | 31 ++
.../client/api/domain/ClientDeltaLink.java | 36 +++
.../olingo/client/api/domain/ClientEntity.java | 202 +++++++++++++
.../client/api/domain/ClientEntitySet.java | 71 +++++
.../client/api/domain/ClientEnumValue.java | 27 ++
.../client/api/domain/ClientInlineEntity.java | 68 +++++
.../api/domain/ClientInlineEntitySet.java | 69 +++++
.../client/api/domain/ClientInvokeResult.java | 30 ++
.../olingo/client/api/domain/ClientItem.java | 96 ++++++
.../olingo/client/api/domain/ClientLink.java | 187 ++++++++++++
.../client/api/domain/ClientLinkType.java | 105 +++++++
.../olingo/client/api/domain/ClientLinked.java | 70 +++++
.../client/api/domain/ClientObjectFactory.java | 168 +++++++++++
.../client/api/domain/ClientOperation.java | 85 ++++++
.../client/api/domain/ClientPrimitiveValue.java | 88 ++++++
.../client/api/domain/ClientProperty.java | 32 ++
.../api/domain/ClientServiceDocument.java | 163 ++++++++++
.../client/api/domain/ClientSingleton.java | 23 ++
.../client/api/domain/ClientValuable.java | 94 ++++++
.../olingo/client/api/domain/ClientValue.java | 91 ++++++
.../api/domain/ODataEntitySetIterator.java | 2 -
.../client/api/serialization/ODataBinder.java | 12 +-
.../client/api/serialization/ODataReader.java | 12 +-
.../client/api/serialization/ODataWriter.java | 6 +-
.../olingo/client/core/ODataClientImpl.java | 4 +-
.../header/ODataErrorResponseChecker.java | 8 +-
.../request/cud/CUDRequestFactoryImpl.java | 8 +-
.../cud/ODataEntityCreateRequestImpl.java | 2 +-
.../cud/ODataEntityUpdateRequestImpl.java | 2 +-
.../cud/ODataPropertyUpdateRequestImpl.java | 2 +-
.../cud/ODataValueUpdateRequestImpl.java | 2 +-
.../AbstractEdmEnabledInvokeRequestFactory.java | 4 +-
.../invoke/AbstractInvokeRequestFactory.java | 10 +-
.../invoke/AbstractODataInvokeRequest.java | 10 +-
.../EdmEnabledInvokeRequestFactoryImpl.java | 4 +-
.../invoke/InvokeRequestFactoryImpl.java | 4 +-
.../request/invoke/ODataInvokeRequestImpl.java | 2 +-
.../request/retrieve/ODataDeltaRequestImpl.java | 2 +-
.../retrieve/ODataEntityRequestImpl.java | 2 +-
.../ODataEntitySetIteratorRequestImpl.java | 4 +-
.../retrieve/ODataEntitySetRequestImpl.java | 2 +-
.../retrieve/ODataPropertyRequestImpl.java | 2 +-
.../ODataServiceDocumentRequestImpl.java | 2 +-
.../request/retrieve/ODataValueRequestImpl.java | 2 +-
.../retrieve/RetrieveRequestFactoryImpl.java | 8 +-
.../ODataMediaEntityCreateRequestImpl.java | 2 +-
.../ODataMediaEntityUpdateRequestImpl.java | 2 +-
.../core/domain/AbstractClientEntitySet.java | 71 +++++
.../core/domain/ClientAnnotationImpl.java | 102 +++++++
.../core/domain/ClientCollectionValueImpl.java | 124 ++++++++
.../core/domain/ClientComplexValueImpl.java | 204 +++++++++++++
.../core/domain/ClientDeletedEntityImpl.java | 54 ++++
.../client/core/domain/ClientDeltaImpl.java | 60 ++++
.../client/core/domain/ClientDeltaLinkImpl.java | 78 +++++
.../client/core/domain/ClientEntityImpl.java | 298 +++++++++++++++++++
.../client/core/domain/ClientEntitySetImpl.java | 65 ++++
.../client/core/domain/ClientEnumValueImpl.java | 59 ++++
.../core/domain/ClientObjectFactoryImpl.java | 155 ++++++++++
.../core/domain/ClientPrimitiveValueImpl.java | 222 ++++++++++++++
.../client/core/domain/ClientPropertyImpl.java | 163 ++++++++++
.../client/core/domain/ClientValuableImpl.java | 111 +++++++
.../ClientODataDeserializerImpl.java | 4 +-
.../core/serialization/ODataBinderImpl.java | 54 ++--
.../core/serialization/ODataReaderImpl.java | 16 +-
.../core/serialization/ODataWriterImpl.java | 6 +-
.../apache/olingo/client/core/uri/URIUtils.java | 2 +-
.../olingo/client/core/v4/EntitySetTest.java | 4 +-
.../olingo/client/core/v4/EntityTest.java | 18 +-
.../apache/olingo/client/core/v4/ErrorTest.java | 8 +-
.../apache/olingo/client/core/v4/JSONTest.java | 8 +-
.../olingo/client/core/v4/MetadataTest.java | 8 +-
.../client/core/v4/PrimitiveValueTest.java | 2 +-
.../olingo/client/core/v4/PropertyTest.java | 8 +-
.../client/core/v4/ServiceDocumentTest.java | 2 +-
.../apache/olingo/commons/api/Constants.java | 8 +
.../apache/olingo/commons/api/data/Entity.java | 6 +-
.../olingo/commons/api/data/Operation.java | 85 ++++++
.../api/domain/AbstractClientPayload.java | 50 ----
.../commons/api/domain/AbstractClientValue.java | 120 --------
.../commons/api/domain/ClientAnnotatable.java | 26 --
.../commons/api/domain/ClientAnnotation.java | 30 --
.../api/domain/ClientCollectionValue.java | 57 ----
.../commons/api/domain/ClientComplexValue.java | 58 ----
.../commons/api/domain/ClientDeletedEntity.java | 36 ---
.../olingo/commons/api/domain/ClientDelta.java | 31 --
.../commons/api/domain/ClientDeltaLink.java | 36 ---
.../olingo/commons/api/domain/ClientEntity.java | 202 -------------
.../commons/api/domain/ClientEntitySet.java | 71 -----
.../commons/api/domain/ClientEnumValue.java | 27 --
.../olingo/commons/api/domain/ClientError.java | 132 --------
.../commons/api/domain/ClientErrorDetail.java | 73 -----
.../commons/api/domain/ClientInlineEntity.java | 68 -----
.../api/domain/ClientInlineEntitySet.java | 69 -----
.../commons/api/domain/ClientInvokeResult.java | 30 --
.../olingo/commons/api/domain/ClientItem.java | 96 ------
.../olingo/commons/api/domain/ClientLink.java | 187 ------------
.../commons/api/domain/ClientLinkType.java | 105 -------
.../olingo/commons/api/domain/ClientLinked.java | 70 -----
.../commons/api/domain/ClientObjectFactory.java | 168 -----------
.../commons/api/domain/ClientOperation.java | 85 ------
.../api/domain/ClientPrimitiveValue.java | 88 ------
.../commons/api/domain/ClientProperty.java | 32 --
.../commons/api/domain/ClientPropertyType.java | 44 ---
.../api/domain/ClientServiceDocument.java | 163 ----------
.../commons/api/domain/ClientSingleton.java | 23 --
.../commons/api/domain/ClientValuable.java | 94 ------
.../olingo/commons/api/domain/ClientValue.java | 91 ------
.../olingo/commons/api/domain/ODataError.java | 132 ++++++++
.../commons/api/domain/ODataErrorDetail.java | 73 +++++
.../commons/api/domain/ODataPropertyType.java | 44 +++
.../EdmConstantAnnotationExpression.java | 4 +-
.../api/serialization/ODataDeserializer.java | 4 +-
.../core/domain/AbstractClientEntitySet.java | 71 -----
.../core/domain/ClientAnnotationImpl.java | 102 -------
.../core/domain/ClientCollectionValueImpl.java | 124 --------
.../core/domain/ClientComplexValueImpl.java | 204 -------------
.../core/domain/ClientDeletedEntityImpl.java | 54 ----
.../commons/core/domain/ClientDeltaImpl.java | 60 ----
.../core/domain/ClientDeltaLinkImpl.java | 78 -----
.../commons/core/domain/ClientEntityImpl.java | 298 -------------------
.../core/domain/ClientEntitySetImpl.java | 65 ----
.../core/domain/ClientEnumValueImpl.java | 59 ----
.../core/domain/ClientObjectFactoryImpl.java | 155 ----------
.../core/domain/ClientPrimitiveValueImpl.java | 222 --------------
.../commons/core/domain/ClientPropertyImpl.java | 163 ----------
.../commons/core/domain/ClientValuableImpl.java | 111 -------
.../EdmConstantAnnotationExpressionImpl.java | 72 +++--
.../core/serialization/AtomDeserializer.java | 46 +--
.../core/serialization/AtomSerializer.java | 4 +-
.../core/serialization/JsonDeserializer.java | 45 ++-
.../serialization/JsonEntityDeserializer.java | 7 +-
.../serialization/JsonEntitySerializer.java | 4 +-
.../JsonODataErrorDeserializer.java | 10 +-
.../JsonODataErrorDetailDeserializer.java | 8 +-
.../core/serialization/JsonSerializer.java | 14 +-
.../olingo/server/api/ClientServerError.java | 8 +-
.../server/core/responses/ResponseUtil.java | 6 +-
.../json/ODataJsonDeserializer.java | 9 +-
.../serializer/json/ODataErrorSerializer.java | 8 +-
.../json/ClientErrorSerializerTest.java | 12 +-
.../olingo/server/tecsvc/data/DataCreator.java | 6 +-
.../json/ODataDeserializerDeepInsertTest.java | 6 +-
.../json/ODataJsonDeserializerEntityTest.java | 6 +-
239 files changed, 4822 insertions(+), 4711 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
index 276d6e4..dd10b75 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractCollectionInvocationHandler.java
@@ -35,7 +35,7 @@ import org.apache.commons.lang3.tuple.Triple;
import org.apache.olingo.client.api.uri.QueryOption;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.api.uri.URIFilter;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.AbstractTerm;
import org.apache.olingo.ext.proxy.api.EntityType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
index 90309c5..891ba1c 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractEntityCollectionInvocationHandler.java
@@ -30,10 +30,10 @@ import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientSingleton;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientSingleton;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.AbstractEntitySet;
import org.apache.olingo.ext.proxy.api.AbstractSingleton;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java
index a1005a3..258a496 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractInvocationHandler.java
@@ -32,8 +32,8 @@ import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.olingo.client.api.EdmEnabledODataClient;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.ComplexType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
index d29aad4..6bb8673 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractPersistenceManager.java
@@ -40,9 +40,9 @@ import org.apache.olingo.client.api.communication.request.cud.ODataReferenceAddi
import org.apache.olingo.client.api.communication.request.streamed.ODataMediaEntityUpdateRequest;
import org.apache.olingo.client.api.communication.request.streamed.ODataStreamUpdateRequest;
import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientLinkType;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.EdmStreamValue;
import org.apache.olingo.ext.proxy.api.PersistenceManager;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
index 0795e8b..96b3f26 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
@@ -41,13 +41,13 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.uri.QueryOption;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientLinked;
-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.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientLinked;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.ext.proxy.AbstractService;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
index 4b66898..a0b18ba 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
@@ -27,9 +27,9 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.AbstractTerm;
import org.apache.olingo.ext.proxy.api.Annotatable;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
index 1607cfe..ff4fc66 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexCollectionInvocationHandler.java
@@ -33,10 +33,10 @@ import org.apache.commons.lang3.tuple.Triple;
import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.ComplexCollection;
import org.apache.olingo.ext.proxy.api.ComplexType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
index 16467c2..3aa3326 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ComplexInvocationHandler.java
@@ -28,9 +28,9 @@ import org.apache.commons.lang3.tuple.Pair;
import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientLinked;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientLinked;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.annotations.ComplexType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
index b903fdb..b31e624 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityContainerInvocationHandler.java
@@ -25,7 +25,7 @@ import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.URI;
import org.apache.commons.lang3.ArrayUtils;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.ComplexCollection;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
index fff16b4..66bc66c 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
@@ -34,9 +34,9 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
import org.apache.olingo.client.api.communication.request.retrieve.ODataMediaRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.ext.proxy.AbstractService;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
index 950b0ff..6c8d35f 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetInvocationHandler.java
@@ -30,8 +30,8 @@ import java.util.concurrent.Future;
import org.apache.commons.lang3.tuple.Triple;
import org.apache.olingo.client.api.communication.request.retrieve.ODataValueRequest;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientEntity;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.ext.proxy.AbstractService;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
index 9bbeeb0..87bc08d 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntitySetIterator.java
@@ -26,7 +26,7 @@ import java.util.List;
import java.util.NoSuchElementException;
import org.apache.commons.lang3.tuple.Triple;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
import org.apache.olingo.ext.proxy.api.EntityCollection;
import org.apache.olingo.ext.proxy.api.EntityType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/InvokerInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/InvokerInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/InvokerInvocationHandler.java
index 733391c..53208f7 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/InvokerInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/InvokerInvocationHandler.java
@@ -34,11 +34,11 @@ import org.apache.olingo.client.api.communication.request.invoke.ClientNoContent
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.api.uri.URIFilter;
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.edm.EdmFunction;
import org.apache.olingo.commons.api.edm.EdmOperation;
import org.apache.olingo.commons.api.edm.EdmReturnType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java
index d92d39e..bdab06c 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/OperationInvocationHandler.java
@@ -30,9 +30,9 @@ import java.util.List;
import java.util.Map;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientOperation;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientOperation;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmAction;
import org.apache.olingo.commons.api.edm.EdmEntityContainer;
import org.apache.olingo.commons.api.edm.EdmEntityType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
index e40593d..553af6e 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/PrimitiveCollectionInvocationHandler.java
@@ -34,9 +34,9 @@ import org.apache.commons.lang3.tuple.Triple;
import org.apache.olingo.client.api.communication.request.retrieve.ODataPropertyRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.api.PrimitiveCollection;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/StructuredComposableInvokerInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/StructuredComposableInvokerInvocationHandler.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/StructuredComposableInvokerInvocationHandler.java
index 2ca7b86..41ec9ce 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/StructuredComposableInvokerInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/StructuredComposableInvokerInvocationHandler.java
@@ -24,7 +24,7 @@ import java.net.URI;
import java.util.Map;
import org.apache.commons.lang3.ArrayUtils;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmOperation;
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.ext.proxy.AbstractService;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java
index 1506655..91a7dec 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityLinkDesc.java
@@ -22,7 +22,7 @@ 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.commons.api.domain.ClientLinkType;
+import org.apache.olingo.client.api.domain.ClientLinkType;
import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler;
import java.io.Serializable;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
index 882f0f6..2776f3b 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
@@ -40,22 +40,22 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.EdmEnabledODataClient;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.domain.ClientAnnotatable;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientAnnotatable;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmElement;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.EdmTerm;
import org.apache.olingo.commons.api.edm.EdmType;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.commons.core.domain.ClientAnnotationImpl;
+import org.apache.olingo.client.core.domain.ClientAnnotationImpl;
import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.ext.proxy.AbstractService;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ProxyUtils.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ProxyUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ProxyUtils.java
index cb17b14..1800b1f 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ProxyUtils.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ProxyUtils.java
@@ -22,9 +22,9 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-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.ClientValue;
import org.apache.olingo.ext.proxy.AbstractService;
import org.apache.olingo.ext.proxy.commons.ComplexInvocationHandler;
import org.apache.olingo.ext.proxy.commons.EntityCollectionInvocationHandler;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
index da0e742..823592d 100644
--- a/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/AbstractBaseTestITCase.java
@@ -32,9 +32,9 @@ import org.apache.commons.io.IOUtils;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-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.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.serialization.ODataSerializerException;
import org.apache.olingo.fit.server.TomcatTestServer;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ActionImportITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ActionImportITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ActionImportITCase.java
index 9f6c183..1037a9c 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ActionImportITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ActionImportITCase.java
@@ -34,12 +34,12 @@ import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.ODataClientErrorException;
import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-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.ClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+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.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.fit.AbstractBaseTestITCase;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
index 8a19000..5463ffa 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BasicITCase.java
@@ -53,17 +53,17 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
import org.apache.olingo.client.api.edm.xml.Reference;
import org.apache.olingo.client.api.edm.xml.XMLMetadata;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-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.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientObjectFactory;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientServiceDocument;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+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.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientObjectFactory;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientServiceDocument;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
@@ -174,7 +174,7 @@ public class BasicITCase extends AbstractBaseTestITCase {
fail("Expected Exception not thrown!");
} catch (final ODataClientErrorException e) {
assertEquals(HttpStatusCode.BAD_REQUEST.getStatusCode(), e.getStatusLine().getStatusCode());
- final ClientError error = e.getODataError();
+ final ODataError error = e.getODataError();
assertThat(error.getMessage(), containsString("key property"));
}
}
@@ -464,22 +464,26 @@ public class BasicITCase extends AbstractBaseTestITCase {
.add(
of.newComplexValue("CTPrimComp")
.add(
- of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder().buildInt16(
- (short) 42)))
+ of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder()
+ .buildInt16(
+ (short) 42)))
.add(
of.newComplexProperty("PropertyComp", of.newComplexValue("CTAllPrim")
.add(
- of.newPrimitiveProperty("PropertyString", of.newPrimitiveValueBuilder()
+ of.newPrimitiveProperty("PropertyString", of
+ .newPrimitiveValueBuilder()
.buildString("42"))))))
.add(
of.newComplexValue("CTPrimComp")
.add(
- of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder().buildInt16(
- (short) 43)))
+ of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder()
+ .buildInt16(
+ (short) 43)))
.add(
of.newComplexProperty("PropertyComp", of.newComplexValue("CTAllPrim")
.add(
- of.newPrimitiveProperty("PropertyString", of.newPrimitiveValueBuilder()
+ of.newPrimitiveProperty("PropertyString", of
+ .newPrimitiveValueBuilder()
.buildString("43"))))))));
final URI uri = getClient().newURIBuilder(SERVICE_URI)
@@ -489,8 +493,8 @@ public class BasicITCase extends AbstractBaseTestITCase {
final ODataEntityUpdateResponse<ClientEntity> response = getClient().getCUDRequestFactory()
.getEntityUpdateRequest(uri,
- UpdateType.PATCH,
- entity)
+ UpdateType.PATCH,
+ entity)
.execute();
assertEquals(HttpStatusCode.NO_CONTENT.getStatusCode(), response.getStatusCode());
@@ -536,38 +540,27 @@ public class BasicITCase extends AbstractBaseTestITCase {
final ClientEntity entity = of.newEntity(new FullQualifiedName("olingo.odata.test1", "ETKeyNav"));
entity.getProperties().add(
of.newPrimitiveProperty("PropertyString",
- of.newPrimitiveValueBuilder().buildString("Complex collection test")));
+ of.newPrimitiveValueBuilder().buildString("Complex collection test")));
entity.getProperties().add(of.newComplexProperty("PropertyCompTwoPrim",
- of.newComplexValue("CTTwoPrim")
- .add(of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder().buildInt16((short) 1)))
- .add(of.newPrimitiveProperty("PropertyString", of.newPrimitiveValueBuilder().buildString("1")))));
-
- entity.getProperties().add(
- of.newCollectionProperty("CollPropertyComp",
- of.newCollectionValue("CTPrimComp")
- .add(
- of.newComplexValue("CTPrimComp")
- .add(
- of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder()
- .buildInt16((short) 1)))
- .add(
- of.newComplexProperty("PropertyComp", of.newComplexValue("CTAllPrim")
- .add(
- of.newPrimitiveProperty("PropertyString", of.newPrimitiveValueBuilder()
- .buildString("1"))))))
- .add(
- of.newComplexValue("CTPrimComp")
- .add(
- of.newComplexProperty("PropertyComp", of.newComplexValue("CTAllPrim")
- .add(
- of.newPrimitiveProperty("PropertyString", of.newPrimitiveValueBuilder()
- .buildString("2")))
- .add(
- of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder().buildInt16(
- (short) 2)))
- .add(
- of.newPrimitiveProperty("PropertySingle", of.newPrimitiveValueBuilder()
- .buildSingle(2.0f))))))));
+ of.newComplexValue("CTTwoPrim")
+ .add(of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder().buildInt16((short) 1)))
+ .add(of.newPrimitiveProperty("PropertyString", of.newPrimitiveValueBuilder().buildString("1")))));
+
+ entity.getProperties().add(of.newCollectionProperty("CollPropertyComp",
+ of.newCollectionValue("CTPrimComp")
+ .add(of.newComplexValue("CTPrimComp")
+ .add(of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder().buildInt16((short) 1)))
+ .add(of.newComplexProperty("PropertyComp", of.newComplexValue("CTAllPrim")
+ .add(of.newPrimitiveProperty("PropertyString",
+ of.newPrimitiveValueBuilder().buildString("1"))))))
+ .add(of.newComplexValue("CTPrimComp")
+ .add(of.newComplexProperty("PropertyComp", of.newComplexValue("CTAllPrim")
+ .add(of.newPrimitiveProperty("PropertyString", of.newPrimitiveValueBuilder().buildString
+ ("2")))
+ .add(of.newPrimitiveProperty("PropertyInt16", of.newPrimitiveValueBuilder().buildInt16(
+ (short) 2)))
+ .add(of.newPrimitiveProperty("PropertySingle",
+ of.newPrimitiveValueBuilder().buildSingle(2.0f))))))));
entity.addLink(of.newEntityNavigationLink("NavPropertyETTwoKeyNavOne",
getClient().newURIBuilder(SERVICE_URI)
@@ -678,9 +671,9 @@ public class BasicITCase extends AbstractBaseTestITCase {
final ODataEntityRequest<ClientEntity> entityRequest = client.getRetrieveRequestFactory()
.getEntityRequest(client.newURIBuilder()
- .appendEntitySetSegment("ESTwoPrim")
- .appendKeySegment(key)
- .build());
+ .appendEntitySetSegment("ESTwoPrim")
+ .appendKeySegment(key)
+ .build());
entityRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
final ODataRetrieveResponse<ClientEntity> responseEntityRequest = entityRequest.execute();
assertEquals(HttpStatusCode.OK.getStatusCode(), responseEntityRequest.getStatusCode());
@@ -754,7 +747,7 @@ public class BasicITCase extends AbstractBaseTestITCase {
entity.getProperties().add(of.newComplexProperty("PropertyCompAllPrim",
of.newComplexValue("CTAllPrim")
.add(of.newPrimitiveProperty("PropertyString",
- of.newPrimitiveValueBuilder().buildString("Changed")))));
+ of.newPrimitiveValueBuilder().buildString("Changed")))));
final ODataEntityUpdateResponse<ClientEntity> response = client.getCUDRequestFactory()
.getEntityUpdateRequest(targetURI, UpdateType.PATCH, entity)
@@ -765,11 +758,11 @@ public class BasicITCase extends AbstractBaseTestITCase {
final ODataEntityRequest<ClientEntity> entityRequest = client.getRetrieveRequestFactory()
.getEntityRequest(
- client.newURIBuilder()
- .appendEntitySetSegment("ESKeyNav")
- .appendKeySegment(1)
- .expand("NavPropertyETKeyNavOne", "NavPropertyETKeyNavMany")
- .build());
+ client.newURIBuilder()
+ .appendEntitySetSegment("ESKeyNav")
+ .appendKeySegment(1)
+ .expand("NavPropertyETKeyNavOne", "NavPropertyETKeyNavMany")
+ .build());
entityRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
final ODataRetrieveResponse<ClientEntity> entitytResponse = entityRequest.execute();
@@ -854,7 +847,7 @@ public class BasicITCase extends AbstractBaseTestITCase {
entity.getProperties().add(of.newComplexProperty("PropertyCompAllPrim",
of.newComplexValue("CTAllPrim")
.add(of.newPrimitiveProperty("PropertyString",
- of.newPrimitiveValueBuilder().buildString("Changed")))));
+ of.newPrimitiveValueBuilder().buildString("Changed")))));
final ODataEntityUpdateResponse<ClientEntity> response = client.getCUDRequestFactory()
.getEntityUpdateRequest(targetURI, UpdateType.REPLACE, entity)
@@ -865,11 +858,11 @@ public class BasicITCase extends AbstractBaseTestITCase {
final ODataEntityRequest<ClientEntity> entityRequest = client.getRetrieveRequestFactory()
.getEntityRequest(
- client.newURIBuilder()
- .appendEntitySetSegment("ESKeyNav")
- .appendKeySegment(1)
- .expand("NavPropertyETKeyNavOne", "NavPropertyETKeyNavMany")
- .build());
+ client.newURIBuilder()
+ .appendEntitySetSegment("ESKeyNav")
+ .appendKeySegment(1)
+ .expand("NavPropertyETKeyNavOne", "NavPropertyETKeyNavMany")
+ .build());
entityRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
final ODataRetrieveResponse<ClientEntity> entitytResponse = entityRequest.execute();
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
index c03490c..08bb95a 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BatchClientITCase.java
@@ -45,9 +45,9 @@ import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse
import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.communication.request.batch.ODataChangesetResponseItem;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientObjectFactory;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientObjectFactory;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ContentType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BindingITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BindingITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BindingITCase.java
index 57a3ed2..daad079 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BindingITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/BindingITCase.java
@@ -35,12 +35,12 @@ import org.apache.olingo.client.api.communication.response.ODataEntityCreateResp
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientObjectFactory;
-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.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientObjectFactory;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
@@ -107,6 +107,7 @@ public class BindingITCase extends AbstractBaseTestITCase {
.appendEntitySetSegment(ES_TWO_KEY_NAV)
.appendKeySegment(new LinkedHashMap<String, Object>() {
private static final long serialVersionUID = 3109256773218160485L;
+
{
put(PROPERTY_INT16, 3);
put(PROPERTY_STRING, "1");
@@ -348,6 +349,7 @@ public class BindingITCase extends AbstractBaseTestITCase {
.appendEntitySetSegment(ES_TWO_KEY_NAV)
.appendKeySegment(new LinkedHashMap<String, Object>() {
private static final long serialVersionUID = 3109256773218160485L;
+
{
put(PROPERTY_INT16, 3);
put(PROPERTY_STRING, "1");
@@ -362,6 +364,7 @@ public class BindingITCase extends AbstractBaseTestITCase {
.appendEntitySetSegment(ES_TWO_KEY_NAV)
.appendKeySegment(new LinkedHashMap<String, Object>() {
private static final long serialVersionUID = 3109256773218160485L;
+
{
put(PROPERTY_INT16, 3);
put(PROPERTY_STRING, "1");
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
index 5e25b79..4bec968 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
@@ -40,15 +40,15 @@ import org.apache.olingo.client.api.communication.response.ODataEntityCreateResp
import org.apache.olingo.client.api.communication.response.ODataEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientObjectFactory;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientObjectFactory;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
index 9a430ff..a4fc570 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandSelectITCase.java
@@ -28,12 +28,12 @@ import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientLinkType;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.http.HttpStatusCode;
import org.apache.olingo.fit.AbstractBaseTestITCase;
import org.apache.olingo.fit.tecsvc.TecSvcConst;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandWithSystemQueryOptionsITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandWithSystemQueryOptionsITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandWithSystemQueryOptionsITCase.java
index 38aec61..1f13f88 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandWithSystemQueryOptionsITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/ExpandWithSystemQueryOptionsITCase.java
@@ -33,8 +33,8 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.QueryOption;
import org.apache.olingo.client.core.ODataClientFactory;
-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;
import org.apache.olingo.commons.api.http.HttpHeader;
import org.apache.olingo.commons.api.http.HttpStatusCode;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FilterSystemQueryITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FilterSystemQueryITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FilterSystemQueryITCase.java
index 383b709..02a287c 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FilterSystemQueryITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FilterSystemQueryITCase.java
@@ -30,10 +30,10 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
import org.apache.olingo.client.api.communication.response.ODataEntityCreateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientObjectFactory;
-import org.apache.olingo.commons.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientObjectFactory;
+import org.apache.olingo.client.api.domain.ClientValuable;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.http.HttpHeader;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FunctionImportITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FunctionImportITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FunctionImportITCase.java
index 9078d8f..ae7dabf 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FunctionImportITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/FunctionImportITCase.java
@@ -34,11 +34,11 @@ import org.apache.olingo.client.api.communication.response.ODataInvokeResponse;
import org.apache.olingo.client.api.communication.response.ODataRawResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-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.ClientPrimitiveValue;
+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.HttpStatusCode;
import org.apache.olingo.fit.AbstractBaseTestITCase;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
index 5df211c..582cf43 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/MediaITCase.java
@@ -39,8 +39,8 @@ import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreat
import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.http.HttpHeader;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
index 46261b2..b3db254 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/NavigationITCase.java
@@ -24,9 +24,9 @@ import static org.junit.Assert.assertNotNull;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-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.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.http.HttpStatusCode;
import org.apache.olingo.fit.AbstractBaseTestITCase;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/OrderBySystemQueryITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/OrderBySystemQueryITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/OrderBySystemQueryITCase.java
index 629f856..26be32e 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/OrderBySystemQueryITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/OrderBySystemQueryITCase.java
@@ -27,9 +27,9 @@ import org.apache.olingo.client.api.communication.ODataClientErrorException;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySetRequest;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientValuable;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.http.HttpStatusCode;
import org.apache.olingo.fit.AbstractBaseTestITCase;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
index 892cdd5..814fad4 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/PrimitiveComplexITCase.java
@@ -36,8 +36,8 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataValueReq
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.http.HttpHeader;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/SystemQueryOptionITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/SystemQueryOptionITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/SystemQueryOptionITCase.java
index 995925b..4362f44 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/SystemQueryOptionITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/SystemQueryOptionITCase.java
@@ -28,8 +28,8 @@ import org.apache.olingo.client.api.communication.ODataClientErrorException;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.QueryOption;
import org.apache.olingo.client.core.ODataClientFactory;
-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;
import org.apache.olingo.commons.api.http.HttpStatusCode;
import org.apache.olingo.fit.AbstractBaseTestITCase;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
index 8a4bcdc..c740607 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AbstractTestITCase.java
@@ -26,15 +26,15 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRe
import org.apache.olingo.client.api.communication.response.ODataDeleteResponse;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.core.ODataClientFactory;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ContentType;
import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.core.domain.ClientEntityImpl;
+import org.apache.olingo.client.core.domain.ClientEntityImpl;
import org.apache.olingo.fit.AbstractBaseTestITCase;
import org.junit.BeforeClass;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
index 3e9a85f..ad89514 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AsyncTestITCase.java
@@ -24,11 +24,11 @@ import org.apache.olingo.client.api.communication.request.retrieve.ODataEntitySe
import org.apache.olingo.client.api.communication.response.AsyncResponseWrapper;
import org.apache.olingo.client.api.communication.response.ODataRetrieveResponse;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-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.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientLink;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
index a76e97a..f5175e0 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/AuthBatchTestITCase.java
@@ -31,7 +31,7 @@ import org.apache.olingo.client.api.http.HttpClientException;
import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.ODataClientFactory;
import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
-import org.apache.olingo.commons.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntity;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ContentType;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
index 880dd95..33509da 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
@@ -46,8 +46,8 @@ import org.apache.olingo.client.core.communication.request.batch.ODataSingleResp
import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl;
import org.apache.olingo.client.core.communication.request.retrieve.ODataEntityRequestImpl.ODataEntityResponseImpl;
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.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
index b48902f..1437e8c 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/BoundOperationInvokeTestITCase.java
@@ -21,16 +21,16 @@ package org.apache.olingo.fit.v4;
import org.apache.olingo.client.api.communication.request.invoke.ODataInvokeRequest;
import org.apache.olingo.client.api.communication.request.retrieve.ODataEntityRequest;
import org.apache.olingo.client.api.uri.URIBuilder;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientOperation;
-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.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientOperation;
+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.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
index 06e3552..3ca87ce 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/ConformanceTestITCase.java
@@ -46,16 +46,16 @@ import org.apache.olingo.client.api.uri.URIBuilder;
import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
import org.apache.olingo.client.core.http.DefaultHttpClientFactory;
import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-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.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+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.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
-import org.apache.olingo.commons.core.domain.ClientEntityImpl;
+import org.apache.olingo.client.core.domain.ClientEntityImpl;
import org.junit.Test;
/**
[2/7] olingo-odata4 git commit: [OLINGO-564] first step for common ->
client extraction
Posted by mi...@apache.org.
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataError.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataError.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataError.java
new file mode 100644
index 0000000..a910f08
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataError.java
@@ -0,0 +1,132 @@
+/*
+ * 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.commons.api.domain;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * OData error.
+ */
+public class ODataError {
+
+ private String code;
+ private String message;
+ private String target;
+ private List<ODataErrorDetail> details;
+ private Map<String, String> innerError;
+
+ /**
+ * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
+ * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
+ * @return the error code as a string
+ */
+ public String getCode() {
+ return code;
+ }
+
+ /**
+ * The value for the code name/value pair is a language-independent string. Its value is a service-defined error code.
+ * This code serves as a sub-status for the HTTP error code specified in the response. MAY be null.
+ * @param code
+ * @return this for method chaining
+ */
+ public ODataError setCode(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
+ * MUST not be null
+ * @return the message string
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * The value for the message name/value pair MUST be a human-readable, language-dependent representation of the error.
+ * MUST not be null
+ * @param message
+ * @return this for method chaining
+ */
+ public ODataError setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * The value for the target name/value pair is the target of the particular error (for example, the name of the
+ * property in error). MAY be null.
+ * @return the target string
+ */
+ public String getTarget() {
+ return target;
+ }
+
+ /**
+ * The value for the target name/value pair is the target of the particular error (for example, the name of the
+ * property in error). MAY be null.
+ * @param target
+ * @return this for method chaining
+ */
+ public ODataError setTarget(String target) {
+ this.target = target;
+ return this;
+ }
+
+ /**
+ * Gets error details.
+ *
+ * @return ODataErrorDetail list.
+ */
+ public List<ODataErrorDetail> getDetails() {
+ return details;
+ }
+
+ /**
+ * Sets error details.
+ *
+ * @return this for method chaining.
+ */
+ public ODataError setDetails(List<ODataErrorDetail> details) {
+ this.details = details;
+ return this;
+ }
+
+ /**
+ * Gets server defined key-value pairs for debug environment only.
+ *
+ * @return a pair representing server defined object. MAY be null.
+ */
+ public Map<String, String> getInnerError() {
+ return innerError;
+ }
+
+ /**
+ * Sets server defined key-value pairs for debug environment only.
+ *
+ * @return this for method chaining.
+ */
+ public ODataError setInnerError(Map<String, String> innerError) {
+ this.innerError = innerError;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataErrorDetail.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataErrorDetail.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataErrorDetail.java
new file mode 100644
index 0000000..573525d
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataErrorDetail.java
@@ -0,0 +1,73 @@
+/*
+ * 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.commons.api.domain;
+
+/**
+ * OData details, for example <tt>{ "error": {..., "details":[
+ * {"code": "301","target": "$search" ,"message": "$search query option not supported"}
+ * ],...}}</tt>.
+ */
+public class ODataErrorDetail {
+
+ private String code;
+ private String message;
+ private String target;
+
+ /**
+ * Gets error code.
+ *
+ * @return error code.
+ */
+ public String getCode() {
+ return code;
+ }
+
+ public ODataErrorDetail setCode(final String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Gets error message.
+ *
+ * @return error message.
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ public ODataErrorDetail setMessage(final String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Gets error target.
+ *
+ * @return error message.
+ */
+ public String getTarget() {
+ return target;
+ }
+
+ public ODataErrorDetail setTarget(final String target) {
+ this.target = target;
+ return this;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPropertyType.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPropertyType.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPropertyType.java
new file mode 100644
index 0000000..e7b5b85
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/ODataPropertyType.java
@@ -0,0 +1,44 @@
+/*
+ * 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.commons.api.domain;
+
+public enum ODataPropertyType {
+
+ /**
+ * Primitive (including geospatial).
+ */
+ PRIMITIVE,
+ /**
+ * Enum.
+ */
+ ENUM,
+ /**
+ * Collection.
+ */
+ COLLECTION,
+ /**
+ * Complex.
+ */
+ COMPLEX,
+ /**
+ * Empty type (possibly, no type information could be retrieved).
+ */
+ EMPTY
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
index cc47fe6..0f0a34f 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/annotation/EdmConstantAnnotationExpression.java
@@ -18,10 +18,10 @@
*/
package org.apache.olingo.commons.api.edm.annotation;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.commons.api.data.Valuable;
public interface EdmConstantAnnotationExpression extends EdmAnnotationExpression {
- ClientValue getValue();
+ Valuable getValue();
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java
index 38ad911..8e313b1 100755
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/serialization/ODataDeserializer.java
@@ -22,7 +22,7 @@ import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientError;
+import org.apache.olingo.commons.api.domain.ODataError;
import java.io.InputStream;
@@ -61,5 +61,5 @@ public interface ODataDeserializer {
* @param input stream to be parsed and de-serialized.
* @return parsed ODataError object represented by the given InputStream
*/
- ClientError toError(InputStream input) throws ODataDeserializerException;
+ ODataError toError(InputStream input) throws ODataDeserializerException;
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/AbstractClientEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/AbstractClientEntitySet.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/AbstractClientEntitySet.java
deleted file mode 100644
index d11b799..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/AbstractClientEntitySet.java
+++ /dev/null
@@ -1,71 +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.commons.core.domain;
-
-import org.apache.olingo.commons.api.domain.AbstractClientPayload;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-
-import java.net.URI;
-
-public abstract class AbstractClientEntitySet extends AbstractClientPayload implements ClientEntitySet {
-
- /**
- * Link to the next page.
- */
- private URI next;
-
- /**
- * Number of ODataEntities contained in this entity set.
- * <br/>
- * If <tt>$inlinecount</tt> was requested, this value comes from there.
- */
- private Integer count;
-
- /**
- * Constructor.
- */
- public AbstractClientEntitySet() {
- super(null);
- }
-
- /**
- * Constructor.
- *
- * @param next next link.
- */
- public AbstractClientEntitySet(final URI next) {
- super(null);
- this.next = next;
- }
-
- @Override
- public URI getNext() {
- return next;
- }
-
- @Override
- public Integer getCount() {
- return count;
- }
-
- @Override
- public void setCount(final int count) {
- this.count = count;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientAnnotationImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientAnnotationImpl.java
deleted file mode 100644
index b5fae89..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientAnnotationImpl.java
+++ /dev/null
@@ -1,102 +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.commons.core.domain;
-
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientValuable;
-import org.apache.olingo.commons.api.domain.ClientValue;
-
-public class ClientAnnotationImpl implements ClientAnnotation {
-
- private final String term;
-
- private final ClientValuable valuable;
-
- public ClientAnnotationImpl(final String term, final ClientValue value) {
- this.term = term;
- valuable = new ClientValuableImpl(value);
- }
-
- @Override
- public String getTerm() {
- return term;
- }
-
- @Override
- public ClientValue getValue() {
- return valuable.getValue();
- }
-
- @Override
- public boolean hasNullValue() {
- return valuable.hasNullValue();
- }
-
- @Override
- public boolean hasPrimitiveValue() {
- return valuable.hasPrimitiveValue();
- }
-
- @Override
- public ClientPrimitiveValue getPrimitiveValue() {
- return valuable.getPrimitiveValue();
- }
-
- @Override
- public boolean hasCollectionValue() {
- return valuable.hasCollectionValue();
- }
-
- @Override
- public ClientCollectionValue<ClientValue> getCollectionValue() {
- return valuable.getCollectionValue();
- }
-
- @Override
- public boolean hasComplexValue() {
- return valuable.hasComplexValue();
- }
-
- @Override
- public ClientComplexValue getComplexValue() {
- return valuable.getComplexValue();
- }
-
- @Override
- public boolean hasEnumValue() {
- return valuable.hasEnumValue();
- }
-
- @Override
- public ClientEnumValue getEnumValue() {
- return valuable.getEnumValue();
- }
-
- @Override
- public String toString() {
- return "ODataPropertyImpl{"
- + "term=" + term
- + ",valuable=" + valuable
- + '}';
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientCollectionValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientCollectionValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientCollectionValueImpl.java
deleted file mode 100644
index e7b53ff..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientCollectionValueImpl.java
+++ /dev/null
@@ -1,124 +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.commons.core.domain;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.olingo.commons.api.domain.AbstractClientValue;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientValue;
-
-public class ClientCollectionValueImpl<OV extends ClientValue> extends AbstractClientValue
- implements ClientCollectionValue<OV>, ClientValue {
-
- /**
- * Constructor.
- *
- * @param typeName type name.
- */
- public ClientCollectionValueImpl(final String typeName) {
- super(typeName == null || typeName.startsWith("Collection(") ? typeName : "Collection(" + typeName + ")");
- }
-
- @Override
- public boolean isEnum() {
- return false;
- }
-
- @Override
- public ClientEnumValue asEnum() {
- return null;
- }
-
- @Override
- public boolean isComplex() {
- return false;
- }
-
- @Override
- public Collection<Object> asJavaCollection() {
- final List<Object> result = new ArrayList<Object>();
- for (ClientValue value : values) {
- if (value.isPrimitive()) {
- result.add(value.asPrimitive().toValue());
- } else if (value.isComplex()) {
- result.add(value.asComplex().asJavaMap());
- } else if (value.isCollection()) {
- result.add(value.asCollection().asJavaCollection());
- } else if (value.isEnum()) {
- result.add(value.asEnum().toString());
- }
- }
-
- return result;
- }
-
- /**
- * Values.
- */
- protected final List<OV> values = new ArrayList<OV>();
-
- /**
- * Adds a value to the collection.
- *
- * @param value value to be added.
- */
- @Override
- @SuppressWarnings("unchecked")
- public ClientCollectionValue<OV> add(final ClientValue value) {
- values.add((OV) value);
- return this;
- }
-
- /**
- * Value iterator.
- *
- * @return value iterator.
- */
- @Override
- public Iterator<OV> iterator() {
- return values.iterator();
- }
-
- /**
- * Gets collection size.
- *
- * @return collection size.
- */
- @Override
- public int size() {
- return values.size();
- }
-
- /**
- * Checks if collection is empty.
- *
- * @return 'TRUE' if empty; 'FALSE' otherwise.
- */
- @Override
- public boolean isEmpty() {
- return values.isEmpty();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientComplexValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientComplexValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientComplexValueImpl.java
deleted file mode 100644
index 3881c3a..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientComplexValueImpl.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.commons.core.domain;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.olingo.commons.api.domain.AbstractClientValue;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-
-public class ClientComplexValueImpl extends AbstractClientValue implements ClientComplexValue {
-
- /**
- * Navigation links (might contain in-line entities or entity sets).
- */
- private final List<ClientLink> navigationLinks = new ArrayList<ClientLink>();
-
- /**
- * Association links.
- */
- private final List<ClientLink> associationLinks = new ArrayList<ClientLink>();
-
- private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
-
- /**
- * Complex type fields.
- */
- private final Map<String, ClientProperty> fields = new LinkedHashMap<String, ClientProperty>();
-
- /**
- * Constructor.
- *
- * @param typeName type name.
- */
- public ClientComplexValueImpl(final String typeName) {
- super(typeName);
- }
-
- @Override
- public boolean isEnum() {
- return false;
- }
-
- @Override
- public ClientEnumValue asEnum() {
- return null;
- }
-
- @Override
- public boolean isComplex() {
- return true;
- }
-
- @Override
- public boolean addLink(final ClientLink link) {
- boolean result = false;
-
- switch (link.getType()) {
- case ASSOCIATION:
- result = associationLinks.contains(link) ? false : associationLinks.add(link);
- break;
-
- case ENTITY_NAVIGATION:
- case ENTITY_SET_NAVIGATION:
- result = navigationLinks.contains(link) ? false : navigationLinks.add(link);
- break;
-
- case MEDIA_EDIT:
- throw new IllegalArgumentException("Complex values cannot have media links!");
-
- default:
- }
-
- return result;
- }
-
- @Override
- public boolean removeLink(final ClientLink link) {
- return associationLinks.remove(link) || navigationLinks.remove(link);
- }
-
- private ClientLink getLink(final List<ClientLink> links, final String name) {
- ClientLink result = null;
- for (ClientLink link : links) {
- if (name.equals(link.getName())) {
- result = link;
- break;
- }
- }
-
- return result;
- }
-
- @Override
- public ClientLink getNavigationLink(final String name) {
- return getLink(navigationLinks, name);
- }
-
- @Override
- public List<ClientLink> getNavigationLinks() {
- return navigationLinks;
- }
-
- @Override
- public ClientLink getAssociationLink(final String name) {
- return getLink(associationLinks, name);
- }
-
- @Override
- public List<ClientLink> getAssociationLinks() {
- return associationLinks;
- }
-
- @Override
- public Map<String, Object> asJavaMap() {
- final Map<String, Object> result = new LinkedHashMap<String, Object>();
- for (Map.Entry<String, ClientProperty> entry : fields.entrySet()) {
- Object value = null;
- if (entry.getValue().hasPrimitiveValue()) {
- value = entry.getValue().getPrimitiveValue().toValue();
- } else if (entry.getValue().hasComplexValue()) {
- value = entry.getValue().getComplexValue().asJavaMap();
- } else if (entry.getValue().hasCollectionValue()) {
- value = entry.getValue().getCollectionValue().asJavaCollection();
- } else if (entry.getValue().hasEnumValue()) {
- value = entry.getValue().getEnumValue().toString();
- }
-
- result.put(entry.getKey(), value);
- }
-
- return result;
- }
-
- @Override
- public List<ClientAnnotation> getAnnotations() {
- return annotations;
- }
-
- /**
- * Adds field to the complex type.
- *
- * @param field field to be added.
- */
- @Override
- public ClientComplexValue add(final ClientProperty field) {
- fields.put(field.getName(), field);
- return this;
- }
-
- /**
- * Gets field.
- *
- * @param name name of the field to be retrieved.
- * @return requested field.
- */
- @Override
- public ClientProperty get(final String name) {
- return fields.get(name);
- }
-
- /**
- * Complex property fields iterator.
- *
- * @return fields iterator.
- */
- @Override
- public Iterator<ClientProperty> iterator() {
- return fields.values().iterator();
- }
-
- /**
- * Gets number of fields.
- *
- * @return number of fields.
- */
- @Override
- public int size() {
- return fields.size();
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeletedEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeletedEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeletedEntityImpl.java
deleted file mode 100644
index 9df7a18..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeletedEntityImpl.java
+++ /dev/null
@@ -1,54 +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.commons.core.domain;
-
-import org.apache.olingo.commons.api.domain.ClientDeletedEntity;
-import org.apache.olingo.commons.api.domain.ClientItem;
-
-import java.net.URI;
-
-public class ClientDeletedEntityImpl extends ClientItem implements ClientDeletedEntity {
-
- private URI id;
-
- private Reason reason;
-
- public ClientDeletedEntityImpl() {
- super(null);
- }
-
- @Override
- public URI getId() {
- return id;
- }
-
- public void setId(final URI id) {
- this.id = id;
- }
-
- @Override
- public Reason getReason() {
- return reason;
- }
-
- public void setReason(final Reason reason) {
- this.reason = reason;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaImpl.java
deleted file mode 100644
index 1c1e521..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaImpl.java
+++ /dev/null
@@ -1,60 +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.commons.core.domain;
-
-import org.apache.olingo.commons.api.domain.ClientDeletedEntity;
-import org.apache.olingo.commons.api.domain.ClientDelta;
-import org.apache.olingo.commons.api.domain.ClientDeltaLink;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ClientDeltaImpl extends ClientEntitySetImpl implements ClientDelta {
-
- private final List<ClientDeletedEntity> deletedEntities = new ArrayList<ClientDeletedEntity>();
-
- private final List<ClientDeltaLink> addedLinks = new ArrayList<ClientDeltaLink>();
-
- private final List<ClientDeltaLink> deletedLinks = new ArrayList<ClientDeltaLink>();
-
- public ClientDeltaImpl() {
- super();
- }
-
- public ClientDeltaImpl(final URI next) {
- super(next);
- }
-
- @Override
- public List<ClientDeletedEntity> getDeletedEntities() {
- return deletedEntities;
- }
-
- @Override
- public List<ClientDeltaLink> getAddedLinks() {
- return addedLinks;
- }
-
- @Override
- public List<ClientDeltaLink> getDeletedLinks() {
- return deletedLinks;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaLinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaLinkImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaLinkImpl.java
deleted file mode 100644
index a21f7ae..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientDeltaLinkImpl.java
+++ /dev/null
@@ -1,78 +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.commons.core.domain;
-
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientDeltaLink;
-import org.apache.olingo.commons.api.domain.ClientItem;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ClientDeltaLinkImpl extends ClientItem implements ClientDeltaLink {
-
- private URI source;
-
- private String relationship;
-
- private URI target;
-
- private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
-
- public ClientDeltaLinkImpl() {
- super(null);
- }
-
- @Override
- public URI getSource() {
- return source;
- }
-
- @Override
- public void setSource(final URI source) {
- this.source = source;
- }
-
- @Override
- public String getRelationship() {
- return relationship;
- }
-
- @Override
- public void setRelationship(final String relationship) {
- this.relationship = relationship;
- }
-
- @Override
- public URI getTarget() {
- return target;
- }
-
- @Override
- public void setTarget(final URI target) {
- this.target = target;
- }
-
- @Override
- public List<ClientAnnotation> getAnnotations() {
- return annotations;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntityImpl.java
deleted file mode 100644
index 0c2ef29..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntityImpl.java
+++ /dev/null
@@ -1,298 +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.commons.core.domain;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.olingo.commons.api.domain.AbstractClientPayload;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientOperation;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientSingleton;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-
-public class ClientEntityImpl extends AbstractClientPayload implements ClientEntity, ClientSingleton {
-
- /**
- * Entity id.
- */
- private URI id;
- /**
- * ETag.
- */
- private String eTag;
- /**
- * Media entity flag.
- */
- private boolean mediaEntity = false;
- /**
- * In case of media entity, media content type.
- */
- private String mediaContentType;
- /**
- * In case of media entity, media content source.
- */
- private URI mediaContentSource;
- /**
- * Media ETag.
- */
- private String mediaETag;
- /**
- * Edit link.
- */
- private URI editLink;
-
- private final List<ClientProperty> properties = new ArrayList<ClientProperty>();
-
- private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
-
- private final FullQualifiedName typeName;
- /**
- * Navigation links (might contain in-line entities or entity sets).
- */
- private final List<ClientLink> navigationLinks = new ArrayList<ClientLink>();
- /**
- * Association links.
- */
- private final List<ClientLink> associationLinks = new ArrayList<ClientLink>();
- /**
- * Media edit links.
- */
- private final List<ClientLink> mediaEditLinks = new ArrayList<ClientLink>();
- /**
- * Operations (legacy, functions, actions).
- */
- private final List<ClientOperation> operations = new ArrayList<ClientOperation>();
-
- public ClientEntityImpl(final FullQualifiedName typeName) {
- super(typeName == null ? null : typeName.toString());
- this.typeName = typeName;
- }
-
- @Override
- public FullQualifiedName getTypeName() {
- return typeName;
- }
-
- @Override
- public String getETag() {
- return eTag;
- }
-
- @Override
- public void setETag(final String eTag) {
- this.eTag = eTag;
- }
-
- @Override
- public ClientOperation getOperation(final String title) {
- ClientOperation result = null;
- for (ClientOperation operation : operations) {
- if (title.equals(operation.getTitle())) {
- result = operation;
- break;
- }
- }
-
- return result;
- }
-
- /**
- * Gets operations.
- *
- * @return operations.
- */
- @Override
- public List<ClientOperation> getOperations() {
- return operations;
- }
-
-
- @Override
- public ClientProperty getProperty(final String name) {
- ClientProperty result = null;
-
- if (StringUtils.isNotBlank(name)) {
- for (ClientProperty property : getProperties()) {
- if (name.equals(property.getName())) {
- result = property;
- break;
- }
- }
- }
-
- return result;
- }
-
- @Override
- public boolean addLink(final ClientLink link) {
- boolean result = false;
-
- switch (link.getType()) {
- case ASSOCIATION:
- result = associationLinks.contains(link) ? false : associationLinks.add(link);
- break;
-
- case ENTITY_NAVIGATION:
- case ENTITY_SET_NAVIGATION:
- result = navigationLinks.contains(link) ? false : navigationLinks.add(link);
- break;
-
- case MEDIA_EDIT:
- result = mediaEditLinks.contains(link) ? false : mediaEditLinks.add(link);
- break;
-
- default:
- }
-
- return result;
- }
-
- @Override
- public boolean removeLink(final ClientLink link) {
- return associationLinks.remove(link) || navigationLinks.remove(link);
- }
-
- private ClientLink getLink(final List<ClientLink> links, final String name) {
- ClientLink result = null;
- for (ClientLink link : links) {
- if (name.equals(link.getName())) {
- result = link;
- break;
- }
- }
-
- return result;
- }
-
- @Override
- public ClientLink getNavigationLink(final String name) {
- return getLink(navigationLinks, name);
- }
-
- @Override
- public List<ClientLink> getNavigationLinks() {
- return navigationLinks;
- }
-
- @Override
- public ClientLink getAssociationLink(final String name) {
- return getLink(associationLinks, name);
- }
-
- @Override
- public List<ClientLink> getAssociationLinks() {
- return associationLinks;
- }
-
- @Override
- public ClientLink getMediaEditLink(final String name) {
- return getLink(mediaEditLinks, name);
- }
-
- @Override
- public List<ClientLink> getMediaEditLinks() {
- return mediaEditLinks;
- }
-
- @Override
- public URI getEditLink() {
- return editLink;
- }
-
- @Override
- public void setEditLink(final URI editLink) {
- this.editLink = editLink;
- }
-
- @Override
- public URI getLink() {
- return super.getLink() == null ? getEditLink() : super.getLink();
- }
-
- @Override
- public boolean isReadOnly() {
- return super.getLink() != null;
- }
-
- @Override
- public boolean isMediaEntity() {
- return mediaEntity;
- }
-
- @Override
- public void setMediaEntity(final boolean isMediaEntity) {
- mediaEntity = isMediaEntity;
- }
-
- @Override
- public String getMediaContentType() {
- return mediaContentType;
- }
-
- @Override
- public void setMediaContentType(final String mediaContentType) {
- this.mediaContentType = mediaContentType;
- }
-
- @Override
- public URI getMediaContentSource() {
- return mediaContentSource;
- }
-
- @Override
- public void setMediaContentSource(final URI mediaContentSource) {
- this.mediaContentSource = mediaContentSource;
- }
-
- @Override
- public String getMediaETag() {
- return mediaETag;
- }
-
- @Override
- public void setMediaETag(final String eTag) {
- mediaETag = eTag;
- }
-
- @Override
- public URI getId() {
- return id;
- }
-
- @Override
- public void setId(final URI id) {
- this.id = id;
- }
-
- @Override
- public List<ClientProperty> getProperties() {
- return properties;
- }
-
- @Override
- public List<ClientAnnotation> getAnnotations() {
- return annotations;
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntitySetImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntitySetImpl.java
deleted file mode 100644
index 4e4d79b..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEntitySetImpl.java
+++ /dev/null
@@ -1,65 +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.commons.core.domain;
-
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-public class ClientEntitySetImpl extends AbstractClientEntitySet implements ClientEntitySet {
-
- private URI deltaLink;
-
- private final List<ClientEntity> entities = new ArrayList<ClientEntity>();
-
- private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
-
- public ClientEntitySetImpl() {
- super();
- }
-
- public ClientEntitySetImpl(final URI next) {
- super(next);
- }
-
- @Override
- public List<ClientEntity> getEntities() {
- return entities;
- }
-
- @Override
- public URI getDeltaLink() {
- return deltaLink;
- }
-
- @Override
- public void setDeltaLink(final URI deltaLink) {
- this.deltaLink = deltaLink;
- }
-
- @Override
- public List<ClientAnnotation> getAnnotations() {
- return annotations;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEnumValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEnumValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEnumValueImpl.java
deleted file mode 100644
index 12634d4..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientEnumValueImpl.java
+++ /dev/null
@@ -1,59 +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.commons.core.domain;
-
-import org.apache.olingo.commons.api.domain.AbstractClientValue;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-
-public class ClientEnumValueImpl extends AbstractClientValue implements ClientEnumValue {
-
- private final String value;
-
- public ClientEnumValueImpl(final String typeName, final String value) {
- super(typeName);
- this.value = value;
- }
-
- @Override
- public String getValue() {
- return value;
- }
-
- @Override
- public boolean isEnum() {
- return true;
- }
-
- @Override
- public ClientEnumValue asEnum() {
- return this;
- }
-
- @Override
- public boolean isComplex() {
- return false;
- }
-
- @Override
- public String toString() {
- return getTypeName() + "'" + getValue() + "'";
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientObjectFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientObjectFactoryImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientObjectFactoryImpl.java
deleted file mode 100644
index ed4692f..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientObjectFactoryImpl.java
+++ /dev/null
@@ -1,155 +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.commons.core.domain;
-
-import java.net.URI;
-
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-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.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
-import org.apache.olingo.commons.api.domain.ClientObjectFactory;
-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.commons.api.domain.ClientValue;
-import org.apache.olingo.commons.api.edm.FullQualifiedName;
-
-public class ClientObjectFactoryImpl implements ClientObjectFactory {
-
- @Override
- public ClientInlineEntitySet newDeepInsertEntitySet(final String name, final ClientEntitySet entitySet) {
- return new ClientInlineEntitySet(null, ClientLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
- }
-
- @Override
- public ClientInlineEntity newDeepInsertEntity(final String name, final ClientEntity entity) {
- return new ClientInlineEntity(null, ClientLinkType.ENTITY_NAVIGATION, name, entity);
- }
-
- @Override
- public ClientEntitySet newEntitySet() {
- return new ClientEntitySetImpl();
- }
-
- @Override
- public ClientEntitySet newEntitySet(final URI next) {
- return new ClientEntitySetImpl(next);
- }
-
- @Override
- public ClientEntity newEntity(final FullQualifiedName typeName) {
- return new ClientEntityImpl(typeName);
- }
-
- @Override
- public ClientEntity newEntity(final FullQualifiedName typeName, final URI link) {
- final ClientEntityImpl result = new ClientEntityImpl(typeName);
- result.setLink(link);
- return result;
- }
-
- @Override
- public ClientSingleton newSingleton(final FullQualifiedName typeName) {
- return new ClientEntityImpl(typeName);
- }
-
- @Override
- public ClientLink newEntityNavigationLink(final String name, final URI link) {
- return new ClientLink.Builder().setURI(link).
- setType(ClientLinkType.ENTITY_NAVIGATION).setTitle(name).build();
- }
-
- @Override
- public ClientLink newEntitySetNavigationLink(final String name, final URI link) {
- return new ClientLink.Builder().setURI(link).
- setType(ClientLinkType.ENTITY_SET_NAVIGATION).setTitle(name).build();
- }
-
- @Override
- public ClientLink newAssociationLink(final String name, final URI link) {
- return new ClientLink.Builder().setURI(link).
- setType(ClientLinkType.ASSOCIATION).setTitle(name).build();
- }
-
- @Override
- public ClientLink newMediaEditLink(final String name, final URI link) {
- return new ClientLink.Builder().setURI(link).
- setType(ClientLinkType.MEDIA_EDIT).setTitle(name).build();
- }
-
- @Override
- public ClientPrimitiveValue.Builder newPrimitiveValueBuilder() {
- return new ClientPrimitiveValueImpl.BuilderImpl();
- }
-
- @Override
- public ClientEnumValue newEnumValue(final String typeName, final String value) {
- return new ClientEnumValueImpl(typeName, value);
- }
-
- @Override
- public ClientComplexValue newComplexValue(final String typeName) {
- return new ClientComplexValueImpl(typeName);
- }
-
- @Override
- public ClientCollectionValue<ClientValue> newCollectionValue(final String typeName) {
- return new ClientCollectionValueImpl<ClientValue>(typeName);
- }
-
- @Override
- public ClientProperty newPrimitiveProperty(final String name, final ClientPrimitiveValue value) {
- return new ClientPropertyImpl(name, value);
- }
-
- @Override
- public ClientProperty newComplexProperty(final String name, final ClientComplexValue value) {
-
- return new ClientPropertyImpl(name, value);
- }
-
- @Override
- public ClientProperty newCollectionProperty(final String name,
- final ClientCollectionValue<? extends ClientValue> value) {
-
- return new ClientPropertyImpl(name, value);
- }
-
- @Override
- public ClientProperty newEnumProperty(final String name, final ClientEnumValue value) {
- return new ClientPropertyImpl(name, value);
- }
-
- @Override
- public ClientDelta newDelta() {
- return new ClientDeltaImpl();
- }
-
- @Override
- public ClientDelta newDelta(final URI next) {
- return new ClientDeltaImpl(next);
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPrimitiveValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPrimitiveValueImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPrimitiveValueImpl.java
deleted file mode 100644
index 0f6ad2b..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPrimitiveValueImpl.java
+++ /dev/null
@@ -1,222 +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.commons.core.domain;
-
-import java.util.UUID;
-
-import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.domain.AbstractClientValue;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientValue;
-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 org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
-import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
-
-public class ClientPrimitiveValueImpl extends AbstractClientValue implements ClientValue, ClientPrimitiveValue {
-
- public static class BuilderImpl implements Builder {
-
- private final ClientPrimitiveValueImpl instance;
-
- public BuilderImpl() {
- instance = new ClientPrimitiveValueImpl();
- }
-
- @Override
- public BuilderImpl setType(final EdmType type) {
- EdmPrimitiveTypeKind primitiveTypeKind = null;
- if (type != null) {
- if (type.getKind() != EdmTypeKind.PRIMITIVE) {
- throw new IllegalArgumentException(String.format("Provided type %s is not primitive", type));
- }
- primitiveTypeKind = EdmPrimitiveTypeKind.valueOf(type.getName());
- }
- return setType(primitiveTypeKind);
- }
-
- @Override
- public BuilderImpl setType(final EdmPrimitiveTypeKind type) {
- if (type == EdmPrimitiveTypeKind.Stream) {
- throw new IllegalArgumentException(String.format(
- "Cannot build a primitive value for %s", EdmPrimitiveTypeKind.Stream.toString()));
- }
- if (type == EdmPrimitiveTypeKind.Geography || type == EdmPrimitiveTypeKind.Geometry) {
- throw new IllegalArgumentException(
- type + "is not an instantiable type. "
- + "An entity can declare a property to be of type Geometry. "
- + "An instance of an entity MUST NOT have a value of type Geometry. "
- + "Each value MUST be of some subtype.");
- }
-
- instance.typeKind = type == null ? EdmPrimitiveTypeKind.String : type;
- instance.type = EdmPrimitiveTypeFactory.getInstance(instance.typeKind);
-
- return this;
- }
-
- @Override
- public BuilderImpl setValue(final Object value) {
- instance.value = value;
- return this;
- }
-
- @Override
- public ClientPrimitiveValue build() {
- if (instance.type == null) {
- setType(EdmPrimitiveTypeKind.String);
- }
- return instance;
- }
-
- @Override
- public ClientPrimitiveValue buildBoolean(final Boolean value) {
- return setType(EdmPrimitiveTypeKind.Boolean).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildInt16(final Short value) {
- return setType(EdmPrimitiveTypeKind.Int16).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildInt32(final Integer value) {
- return setType(EdmPrimitiveTypeKind.Int32).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildInt64(final Long value) {
- return setType(EdmPrimitiveTypeKind.Int64).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildSingle(final Float value) {
- return setType(EdmPrimitiveTypeKind.Single).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildDouble(final Double value) {
- return setType(EdmPrimitiveTypeKind.Double).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildString(final String value) {
- return setType(EdmPrimitiveTypeKind.String).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildGuid(final UUID value) {
- return setType(EdmPrimitiveTypeKind.Guid).setValue(value).build();
- }
-
- @Override
- public ClientPrimitiveValue buildBinary(final byte[] value) {
- return setType(EdmPrimitiveTypeKind.Binary).setValue(value).build();
- }
-
- }
-
- /**
- * Type kind.
- */
- private EdmPrimitiveTypeKind typeKind;
-
- /**
- * Type.
- */
- private EdmPrimitiveType type;
-
- /**
- * Actual value.
- */
- private Object value;
-
- protected ClientPrimitiveValueImpl() {
- super(null);
- }
-
- @Override
- public String getTypeName() {
- return typeKind.getFullQualifiedName().toString();
- }
-
- @Override
- public EdmPrimitiveTypeKind getTypeKind() {
- return typeKind;
- }
-
- @Override
- public EdmPrimitiveType getType() {
- return type;
- }
-
- @Override
- public Object toValue() {
- return value;
- }
-
- @Override
- public <T> T toCastValue(final Class<T> reference) throws EdmPrimitiveTypeException {
- if (value == null) {
- return null;
- } else if (typeKind.isGeospatial()) {
- return reference.cast(value);
- } else {
- // TODO: set facets
- return type.valueOfString(type.valueToString(value,
- null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null),
- null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null, reference);
- }
- }
-
- @Override
- public String toString() {
- if (value == null) {
- return "";
- } else if (typeKind.isGeospatial()) {
- return value.toString();
- } else {
- try {
- // TODO: set facets
- return type.valueToString(value, null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null);
- } catch (EdmPrimitiveTypeException e) {
- throw new IllegalArgumentException(e);
- }
- }
- }
-
- @Override
- public boolean isEnum() {
- return false;
- }
-
- @Override
- public ClientEnumValue asEnum() {
- return null;
- }
-
- @Override
- public boolean isComplex() {
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPropertyImpl.java
deleted file mode 100644
index e53c94b..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientPropertyImpl.java
+++ /dev/null
@@ -1,163 +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.commons.core.domain;
-
-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.olingo.commons.api.domain.ClientAnnotatable;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValuable;
-import org.apache.olingo.commons.api.domain.ClientValue;
-
-public class ClientPropertyImpl implements ClientProperty, ClientAnnotatable, ClientValuable {
-
-
- private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
- private final String name;
- private final ClientValue value;
- private final ClientValuable valuable;
-
- public ClientPropertyImpl(final String name, final ClientValue value) {
- this.name = name;
- this.value = value;
- this.valuable = new ClientValuableImpl(value);
- }
-
- /**
- * Returns property name.
- *
- * @return property name.
- */
- @Override
- public String getName() {
- return name;
- }
-
- /**
- * Returns property value.
- *
- * @return property value.
- */
- @Override
- public ClientValue getValue() {
- return value;
- }
-
- /**
- * Checks if has null value.
- *
- * @return 'TRUE' if has null value; 'FALSE' otherwise.
- */
- @Override
- public boolean hasNullValue() {
- return value == null || value.isPrimitive() && value.asPrimitive().toValue() == null;
- }
-
- /**
- * Checks if has primitive value.
- *
- * @return 'TRUE' if has primitive value; 'FALSE' otherwise.
- */
- @Override
- public boolean hasPrimitiveValue() {
- return !hasNullValue() && value.isPrimitive();
- }
-
- /**
- * Gets primitive value.
- *
- * @return primitive value if exists; null otherwise.
- */
- @Override
- public ClientPrimitiveValue getPrimitiveValue() {
- return hasPrimitiveValue() ? value.asPrimitive() : null;
- }
-
- /**
- * Checks if has complex value.
- *
- * @return 'TRUE' if has complex value; 'FALSE' otherwise.
- */
- @Override
- public boolean hasComplexValue() {
- return !hasNullValue() && value.isComplex();
- }
-
- /**
- * Checks if has collection value.
- *
- * @return 'TRUE' if has collection value; 'FALSE' otherwise.
- */
- @Override
- public boolean hasCollectionValue() {
- return !hasNullValue() && value.isCollection();
- }
-
- @Override
- public boolean equals(final Object obj) {
- return EqualsBuilder.reflectionEquals(this, obj);
- }
-
- @Override
- public int hashCode() {
- return HashCodeBuilder.reflectionHashCode(this);
- }
-
- @Override
- public boolean hasEnumValue() {
- return valuable.hasEnumValue();
- }
-
- @Override
- public ClientEnumValue getEnumValue() {
- return valuable.getEnumValue();
- }
-
- @Override
- public ClientComplexValue getComplexValue() {
- return valuable.getComplexValue();
- }
-
- @Override
- public ClientCollectionValue<ClientValue> getCollectionValue() {
- return valuable.getCollectionValue();
- }
-
- @Override
- public List<ClientAnnotation> getAnnotations() {
- return annotations;
- }
-
- @Override
- public String toString() {
- return "ODataPropertyImpl{"
- + "name=" + getName()
- + ",valuable=" + valuable
- + ", annotations=" + annotations
- + '}';
- }
-}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientValuableImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientValuableImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientValuableImpl.java
deleted file mode 100644
index 561d3df..0000000
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/ClientValuableImpl.java
+++ /dev/null
@@ -1,111 +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.commons.core.domain;
-
-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.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientPrimitiveValue;
-import org.apache.olingo.commons.api.domain.ClientValuable;
-import org.apache.olingo.commons.api.domain.ClientValue;
-
-public class ClientValuableImpl implements ClientValuable {
-
- private final ClientValue value;
-
- public ClientValuableImpl(final ClientValue value) {
- this.value = value;
- }
-
- @Override
- public ClientValue getValue() {
- return value;
- }
-
- @Override
- public boolean hasNullValue() {
- return value == null;
- }
-
- @Override
- public boolean hasPrimitiveValue() {
- return !hasNullValue() && value.isPrimitive();
- }
-
- @Override
- public ClientPrimitiveValue getPrimitiveValue() {
- return hasPrimitiveValue() ? value.asPrimitive() : null;
- }
-
- @Override
- public boolean hasCollectionValue() {
- return !hasNullValue() && value.isCollection();
- }
-
- @Override
- public ClientCollectionValue<ClientValue> getCollectionValue() {
- return hasCollectionValue()
- ? getValue().<ClientValue> asCollection()
- : null;
- }
-
- @Override
- public boolean hasComplexValue() {
- return !hasNullValue() && value.isComplex();
- }
-
- @Override
- public ClientComplexValue getComplexValue() {
- return hasComplexValue()
- ? getValue().asComplex()
- : null;
- }
-
- @Override
- public boolean hasEnumValue() {
- return !hasNullValue() && getValue().isEnum();
- }
-
- @Override
- public ClientEnumValue getEnumValue() {
- return hasEnumValue()
- ? getValue().asEnum()
- : null;
- }
-
- @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/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
index 7adeb3e..9763596 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/annotation/EdmConstantAnnotationExpressionImpl.java
@@ -23,42 +23,41 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.domain.ClientEnumValue;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.commons.api.data.Property;
+import org.apache.olingo.commons.api.data.Valuable;
+import org.apache.olingo.commons.api.data.ValueType;
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.annotation.EdmConstantAnnotationExpression;
import org.apache.olingo.commons.api.edm.annotation.EdmDynamicAnnotationExpression;
import org.apache.olingo.commons.api.edm.provider.annotation.ConstantAnnotationExpression;
-import org.apache.olingo.commons.core.domain.ClientCollectionValueImpl;
-import org.apache.olingo.commons.core.domain.ClientEnumValueImpl;
-import org.apache.olingo.commons.core.domain.ClientPrimitiveValueImpl;
import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
public class EdmConstantAnnotationExpressionImpl implements EdmConstantAnnotationExpression {
- private final ClientValue value;
+ private final Valuable value;
+ private final EdmPrimitiveType type;
public EdmConstantAnnotationExpressionImpl(final ConstantAnnotationExpression constExprConstruct) {
if (constExprConstruct.getType() == ConstantAnnotationExpression.Type.EnumMember) {
- final List<ClientEnumValue> enumValues = new ArrayList<ClientEnumValue>();
+ final List<Property> enumValues = new ArrayList<Property>();
String enumTypeName = null;
for (String split : StringUtils.split(constExprConstruct.getValue(), ' ')) {
final String[] enumSplit = StringUtils.split(split, '/');
enumTypeName = enumSplit[0];
- enumValues.add(new ClientEnumValueImpl(enumSplit[0], enumSplit[1]));
+ enumValues.add(new Property(enumSplit[0], enumSplit[1]));
}
if (enumValues.size() == 1) {
value = enumValues.get(0);
} else {
- final ClientCollectionValueImpl<ClientEnumValue> collValue
- = new ClientCollectionValueImpl<ClientEnumValue>(enumTypeName);
- for (ClientValue enumValue : enumValues) {
+ final List<Property> collValue = new ArrayList<Property>();
+ for (Property enumValue : enumValues) {
collValue.add(enumValue);
}
- value = collValue;
+ value = new Property(enumTypeName, "name", ValueType.COLLECTION_ENUM, collValue);
}
+ type = null;
} else {
EdmPrimitiveTypeKind kind;
switch (constExprConstruct.getType()) {
@@ -96,19 +95,30 @@ public class EdmConstantAnnotationExpressionImpl implements EdmConstantAnnotatio
default:
kind = EdmPrimitiveTypeKind.String;
}
- final ClientPrimitiveValueImpl.BuilderImpl primitiveValueBuilder = new ClientPrimitiveValueImpl.BuilderImpl();
- primitiveValueBuilder.setType(kind);
+// final ClientPrimitiveValueImpl.BuilderImpl primitiveValueBuilder = new ClientPrimitiveValueImpl.BuilderImpl();
+// primitiveValueBuilder.setType(kind);
+// try {
+// final EdmPrimitiveType type = EdmPrimitiveTypeFactory.getInstance(kind);
+// primitiveValueBuilder.setValue(
+// type.valueOfString(constExprConstruct.getValue(),
+// null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null,
+// type.getDefaultType()));
+// } catch (final EdmPrimitiveTypeException e) {
+// throw new IllegalArgumentException(e);
+// }
+//
+// value = primitiveValueBuilder.build();
+
+ type = EdmPrimitiveTypeFactory.getInstance(kind);
try {
- final EdmPrimitiveType primitiveType = EdmPrimitiveTypeFactory.getInstance(kind);
- primitiveValueBuilder.setValue(
- primitiveType.valueOfString(constExprConstruct.getValue(),
+ Object test = type.valueOfString(constExprConstruct.getValue(),
null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null,
- primitiveType.getDefaultType()));
- } catch (final EdmPrimitiveTypeException e) {
+ type.getDefaultType());
+ value = new Property(kind.getFullQualifiedName().getFullQualifiedNameAsString(),
+ "name", ValueType.PRIMITIVE, test);
+ } catch (EdmPrimitiveTypeException e) {
throw new IllegalArgumentException(e);
}
-
- value = primitiveValueBuilder.build();
}
}
@@ -133,8 +143,26 @@ public class EdmConstantAnnotationExpressionImpl implements EdmConstantAnnotatio
}
@Override
- public ClientValue getValue() {
+ public Valuable getValue() {
return value;
}
+ public String toString() {
+ if (value == null) {
+ return "";
+ } else if(value.isEnum()) {
+ return value.toString();
+ } else if (value.isGeospatial()) {
+ return value.toString();
+ } else {
+ // TODO: check after copied from ClientPrimitiveValueImpl
+ try {
+ return type.valueToString(value.getValue(), null, null,
+ Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null);
+ } catch (EdmPrimitiveTypeException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+ }
+
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
index 460e367..6b4b72c 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomDeserializer.java
@@ -46,13 +46,13 @@ import org.apache.olingo.commons.api.data.DeltaLink;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Operation;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.data.Valuable;
import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.ClientError;
-import org.apache.olingo.commons.api.domain.ClientOperation;
-import org.apache.olingo.commons.api.domain.ClientPropertyType;
+import org.apache.olingo.commons.api.domain.ODataError;
+import org.apache.olingo.commons.api.domain.ODataPropertyType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveType;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
@@ -214,7 +214,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
valuable.setValue(valueType, values);
}
- private ClientPropertyType guessPropertyType(final XMLEventReader reader, final EdmTypeInfo typeInfo)
+ private ODataPropertyType guessPropertyType(final XMLEventReader reader, final EdmTypeInfo typeInfo)
throws XMLStreamException {
XMLEvent child = null;
@@ -227,24 +227,24 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
}
}
- final ClientPropertyType type;
+ final ODataPropertyType type;
if (child == null) {
- type = typeInfo == null || typeInfo.isPrimitiveType() ? ClientPropertyType.PRIMITIVE : ClientPropertyType.ENUM;
+ type = typeInfo == null || typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE : ODataPropertyType.ENUM;
} else {
if (child.isStartElement()) {
if (Constants.NS_GML.equals(child.asStartElement().getName().getNamespaceURI())) {
- type = ClientPropertyType.PRIMITIVE;
+ type = ODataPropertyType.PRIMITIVE;
} else if (elementQName.equals(child.asStartElement().getName())) {
- type = ClientPropertyType.COLLECTION;
+ type = ODataPropertyType.COLLECTION;
} else {
- type = ClientPropertyType.COMPLEX;
+ type = ODataPropertyType.COMPLEX;
}
} else if (child.isCharacters()) {
type = typeInfo == null || typeInfo.isPrimitiveType()
- ? ClientPropertyType.PRIMITIVE
- : ClientPropertyType.ENUM;
+ ? ODataPropertyType.PRIMITIVE
+ : ODataPropertyType.ENUM;
} else {
- type = ClientPropertyType.EMPTY;
+ type = ODataPropertyType.EMPTY;
}
}
@@ -286,9 +286,9 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
valuable.setType(typeInfo.internal());
}
- final ClientPropertyType propType = typeInfo == null ? guessPropertyType(reader, typeInfo) :
- typeInfo.isCollection() ? ClientPropertyType.COLLECTION :
- typeInfo.isPrimitiveType() ? ClientPropertyType.PRIMITIVE : ClientPropertyType.COMPLEX;
+ final ODataPropertyType propType = typeInfo == null ? guessPropertyType(reader, typeInfo) :
+ typeInfo.isCollection() ? ODataPropertyType.COLLECTION :
+ typeInfo.isPrimitiveType() ? ODataPropertyType.PRIMITIVE : ODataPropertyType.COMPLEX;
if (nullAttr == null) {
switch (propType) {
@@ -316,10 +316,10 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
valuable.setValue(ValueType.PRIMITIVE, StringUtils.EMPTY);
}
} else {
- valuable.setValue(propType == ClientPropertyType.PRIMITIVE ? ValueType.PRIMITIVE :
- propType == ClientPropertyType.ENUM ? ValueType.ENUM :
- propType == ClientPropertyType.COMPLEX ? ValueType.COMPLEX :
- propType == ClientPropertyType.COLLECTION ? ValueType.COLLECTION_PRIMITIVE : ValueType.PRIMITIVE,
+ valuable.setValue(propType == ODataPropertyType.PRIMITIVE ? ValueType.PRIMITIVE :
+ propType == ODataPropertyType.ENUM ? ValueType.ENUM :
+ propType == ODataPropertyType.COMPLEX ? ValueType.COMPLEX :
+ propType == ODataPropertyType.COLLECTION ? ValueType.COLLECTION_PRIMITIVE : ValueType.PRIMITIVE,
null);
}
}
@@ -649,7 +649,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
entity.getMediaEditLinks().add(link);
}
} else if (actionQName.equals(event.asStartElement().getName())) {
- final ClientOperation operation = new ClientOperation();
+ final Operation operation = new Operation();
final Attribute metadata =
event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_METADATA));
if (metadata != null) {
@@ -800,8 +800,8 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
}
}
- private ClientError error(final XMLEventReader reader, final StartElement start) throws XMLStreamException {
- final ClientError error = new ClientError();
+ private ODataError error(final XMLEventReader reader, final StartElement start) throws XMLStreamException {
+ final ODataError error = new ODataError();
boolean setCode = false;
boolean codeSet = false;
@@ -851,7 +851,7 @@ public class AtomDeserializer extends AbstractAtomDealer implements ODataDeseria
}
@Override
- public ClientError toError(final InputStream input) throws ODataDeserializerException {
+ public ODataError toError(final InputStream input) throws ODataDeserializerException {
try {
final XMLEventReader reader = getReader(input);
final StartElement start = skipBeforeFirstStartElement(reader);
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
index 52a1bd3..2a3bb4a 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/serialization/AtomSerializer.java
@@ -38,10 +38,10 @@ import org.apache.olingo.commons.api.data.ContextURL;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.Link;
+import org.apache.olingo.commons.api.data.Operation;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.ClientOperation;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
@@ -302,7 +302,7 @@ public class AtomSerializer extends AbstractAtomDealer implements ODataSerialize
links(writer, entity.getMediaEditLinks());
if (serverMode) {
- for (ClientOperation operation : entity.getOperations()) {
+ for (Operation operation : entity.getOperations()) {
writer.writeStartElement(namespaceMetadata, Constants.ATOM_ELEM_ACTION);
writer.writeAttribute(Constants.ATTR_METADATA, operation.getMetadataAnchor());
writer.writeAttribute(Constants.ATTR_TITLE, operation.getTitle());
[4/7] olingo-odata4 git commit: [OLINGO-564] first step for common ->
client extraction
Posted by mi...@apache.org.
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/ODataMediaEntityUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
index d2b287c..d38533e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.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;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/AbstractClientEntitySet.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/AbstractClientEntitySet.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/AbstractClientEntitySet.java
new file mode 100644
index 0000000..d6b81d9
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/AbstractClientEntitySet.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.core.domain;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.domain.AbstractClientPayload;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+
+public abstract class AbstractClientEntitySet extends AbstractClientPayload implements ClientEntitySet {
+
+ /**
+ * Link to the next page.
+ */
+ private URI next;
+
+ /**
+ * Number of ODataEntities contained in this entity set.
+ * <br/>
+ * If <tt>$inlinecount</tt> was requested, this value comes from there.
+ */
+ private Integer count;
+
+ /**
+ * Constructor.
+ */
+ public AbstractClientEntitySet() {
+ super(null);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param next next link.
+ */
+ public AbstractClientEntitySet(final URI next) {
+ super(null);
+ this.next = next;
+ }
+
+ @Override
+ public URI getNext() {
+ return next;
+ }
+
+ @Override
+ public Integer getCount() {
+ return count;
+ }
+
+ @Override
+ public void setCount(final int count) {
+ this.count = count;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientAnnotationImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientAnnotationImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientAnnotationImpl.java
new file mode 100644
index 0000000..0f92445
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientAnnotationImpl.java
@@ -0,0 +1,102 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientValue;
+
+public class ClientAnnotationImpl implements ClientAnnotation {
+
+ private final String term;
+
+ private final ClientValuable valuable;
+
+ public ClientAnnotationImpl(final String term, final ClientValue value) {
+ this.term = term;
+ valuable = new ClientValuableImpl(value);
+ }
+
+ @Override
+ public String getTerm() {
+ return term;
+ }
+
+ @Override
+ public ClientValue getValue() {
+ return valuable.getValue();
+ }
+
+ @Override
+ public boolean hasNullValue() {
+ return valuable.hasNullValue();
+ }
+
+ @Override
+ public boolean hasPrimitiveValue() {
+ return valuable.hasPrimitiveValue();
+ }
+
+ @Override
+ public ClientPrimitiveValue getPrimitiveValue() {
+ return valuable.getPrimitiveValue();
+ }
+
+ @Override
+ public boolean hasCollectionValue() {
+ return valuable.hasCollectionValue();
+ }
+
+ @Override
+ public ClientCollectionValue<ClientValue> getCollectionValue() {
+ return valuable.getCollectionValue();
+ }
+
+ @Override
+ public boolean hasComplexValue() {
+ return valuable.hasComplexValue();
+ }
+
+ @Override
+ public ClientComplexValue getComplexValue() {
+ return valuable.getComplexValue();
+ }
+
+ @Override
+ public boolean hasEnumValue() {
+ return valuable.hasEnumValue();
+ }
+
+ @Override
+ public ClientEnumValue getEnumValue() {
+ return valuable.getEnumValue();
+ }
+
+ @Override
+ public String toString() {
+ return "ODataPropertyImpl{"
+ + "term=" + term
+ + ",valuable=" + valuable
+ + '}';
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientCollectionValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientCollectionValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientCollectionValueImpl.java
new file mode 100644
index 0000000..3698060
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientCollectionValueImpl.java
@@ -0,0 +1,124 @@
+/*
+ * 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.domain;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.olingo.client.api.domain.AbstractClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientValue;
+
+public class ClientCollectionValueImpl<OV extends ClientValue> extends AbstractClientValue
+ implements ClientCollectionValue<OV>, ClientValue {
+
+ /**
+ * Constructor.
+ *
+ * @param typeName type name.
+ */
+ public ClientCollectionValueImpl(final String typeName) {
+ super(typeName == null || typeName.startsWith("Collection(") ? typeName : "Collection(" + typeName + ")");
+ }
+
+ @Override
+ public boolean isEnum() {
+ return false;
+ }
+
+ @Override
+ public ClientEnumValue asEnum() {
+ return null;
+ }
+
+ @Override
+ public boolean isComplex() {
+ return false;
+ }
+
+ @Override
+ public Collection<Object> asJavaCollection() {
+ final List<Object> result = new ArrayList<Object>();
+ for (ClientValue value : values) {
+ if (value.isPrimitive()) {
+ result.add(value.asPrimitive().toValue());
+ } else if (value.isComplex()) {
+ result.add(value.asComplex().asJavaMap());
+ } else if (value.isCollection()) {
+ result.add(value.asCollection().asJavaCollection());
+ } else if (value.isEnum()) {
+ result.add(value.asEnum().toString());
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Values.
+ */
+ protected final List<OV> values = new ArrayList<OV>();
+
+ /**
+ * Adds a value to the collection.
+ *
+ * @param value value to be added.
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public ClientCollectionValue<OV> add(final ClientValue value) {
+ values.add((OV) value);
+ return this;
+ }
+
+ /**
+ * Value iterator.
+ *
+ * @return value iterator.
+ */
+ @Override
+ public Iterator<OV> iterator() {
+ return values.iterator();
+ }
+
+ /**
+ * Gets collection size.
+ *
+ * @return collection size.
+ */
+ @Override
+ public int size() {
+ return values.size();
+ }
+
+ /**
+ * Checks if collection is empty.
+ *
+ * @return 'TRUE' if empty; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean isEmpty() {
+ return values.isEmpty();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientComplexValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientComplexValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientComplexValueImpl.java
new file mode 100644
index 0000000..d7550b6
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientComplexValueImpl.java
@@ -0,0 +1,204 @@
+/*
+ * 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.domain;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.olingo.client.api.domain.AbstractClientValue;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientProperty;
+
+public class ClientComplexValueImpl extends AbstractClientValue implements ClientComplexValue {
+
+ /**
+ * Navigation links (might contain in-line entities or entity sets).
+ */
+ private final List<ClientLink> navigationLinks = new ArrayList<ClientLink>();
+
+ /**
+ * Association links.
+ */
+ private final List<ClientLink> associationLinks = new ArrayList<ClientLink>();
+
+ private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
+
+ /**
+ * Complex type fields.
+ */
+ private final Map<String, ClientProperty> fields = new LinkedHashMap<String, ClientProperty>();
+
+ /**
+ * Constructor.
+ *
+ * @param typeName type name.
+ */
+ public ClientComplexValueImpl(final String typeName) {
+ super(typeName);
+ }
+
+ @Override
+ public boolean isEnum() {
+ return false;
+ }
+
+ @Override
+ public ClientEnumValue asEnum() {
+ return null;
+ }
+
+ @Override
+ public boolean isComplex() {
+ return true;
+ }
+
+ @Override
+ public boolean addLink(final ClientLink link) {
+ boolean result = false;
+
+ switch (link.getType()) {
+ case ASSOCIATION:
+ result = associationLinks.contains(link) ? false : associationLinks.add(link);
+ break;
+
+ case ENTITY_NAVIGATION:
+ case ENTITY_SET_NAVIGATION:
+ result = navigationLinks.contains(link) ? false : navigationLinks.add(link);
+ break;
+
+ case MEDIA_EDIT:
+ throw new IllegalArgumentException("Complex values cannot have media links!");
+
+ default:
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean removeLink(final ClientLink link) {
+ return associationLinks.remove(link) || navigationLinks.remove(link);
+ }
+
+ private ClientLink getLink(final List<ClientLink> links, final String name) {
+ ClientLink result = null;
+ for (ClientLink link : links) {
+ if (name.equals(link.getName())) {
+ result = link;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public ClientLink getNavigationLink(final String name) {
+ return getLink(navigationLinks, name);
+ }
+
+ @Override
+ public List<ClientLink> getNavigationLinks() {
+ return navigationLinks;
+ }
+
+ @Override
+ public ClientLink getAssociationLink(final String name) {
+ return getLink(associationLinks, name);
+ }
+
+ @Override
+ public List<ClientLink> getAssociationLinks() {
+ return associationLinks;
+ }
+
+ @Override
+ public Map<String, Object> asJavaMap() {
+ final Map<String, Object> result = new LinkedHashMap<String, Object>();
+ for (Map.Entry<String, ClientProperty> entry : fields.entrySet()) {
+ Object value = null;
+ if (entry.getValue().hasPrimitiveValue()) {
+ value = entry.getValue().getPrimitiveValue().toValue();
+ } else if (entry.getValue().hasComplexValue()) {
+ value = entry.getValue().getComplexValue().asJavaMap();
+ } else if (entry.getValue().hasCollectionValue()) {
+ value = entry.getValue().getCollectionValue().asJavaCollection();
+ } else if (entry.getValue().hasEnumValue()) {
+ value = entry.getValue().getEnumValue().toString();
+ }
+
+ result.put(entry.getKey(), value);
+ }
+
+ return result;
+ }
+
+ @Override
+ public List<ClientAnnotation> getAnnotations() {
+ return annotations;
+ }
+
+ /**
+ * Adds field to the complex type.
+ *
+ * @param field field to be added.
+ */
+ @Override
+ public ClientComplexValue add(final ClientProperty field) {
+ fields.put(field.getName(), field);
+ return this;
+ }
+
+ /**
+ * Gets field.
+ *
+ * @param name name of the field to be retrieved.
+ * @return requested field.
+ */
+ @Override
+ public ClientProperty get(final String name) {
+ return fields.get(name);
+ }
+
+ /**
+ * Complex property fields iterator.
+ *
+ * @return fields iterator.
+ */
+ @Override
+ public Iterator<ClientProperty> iterator() {
+ return fields.values().iterator();
+ }
+
+ /**
+ * Gets number of fields.
+ *
+ * @return number of fields.
+ */
+ @Override
+ public int size() {
+ return fields.size();
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeletedEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeletedEntityImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeletedEntityImpl.java
new file mode 100644
index 0000000..e2d954b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeletedEntityImpl.java
@@ -0,0 +1,54 @@
+/*
+ * 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.domain;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.domain.ClientDeletedEntity;
+import org.apache.olingo.client.api.domain.ClientItem;
+
+public class ClientDeletedEntityImpl extends ClientItem implements ClientDeletedEntity {
+
+ private URI id;
+
+ private Reason reason;
+
+ public ClientDeletedEntityImpl() {
+ super(null);
+ }
+
+ @Override
+ public URI getId() {
+ return id;
+ }
+
+ public void setId(final URI id) {
+ this.id = id;
+ }
+
+ @Override
+ public Reason getReason() {
+ return reason;
+ }
+
+ public void setReason(final Reason reason) {
+ this.reason = reason;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaImpl.java
new file mode 100644
index 0000000..02af157
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaImpl.java
@@ -0,0 +1,60 @@
+/*
+ * 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.domain;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.domain.ClientDeletedEntity;
+import org.apache.olingo.client.api.domain.ClientDelta;
+import org.apache.olingo.client.api.domain.ClientDeltaLink;
+
+public class ClientDeltaImpl extends ClientEntitySetImpl implements ClientDelta {
+
+ private final List<ClientDeletedEntity> deletedEntities = new ArrayList<ClientDeletedEntity>();
+
+ private final List<ClientDeltaLink> addedLinks = new ArrayList<ClientDeltaLink>();
+
+ private final List<ClientDeltaLink> deletedLinks = new ArrayList<ClientDeltaLink>();
+
+ public ClientDeltaImpl() {
+ super();
+ }
+
+ public ClientDeltaImpl(final URI next) {
+ super(next);
+ }
+
+ @Override
+ public List<ClientDeletedEntity> getDeletedEntities() {
+ return deletedEntities;
+ }
+
+ @Override
+ public List<ClientDeltaLink> getAddedLinks() {
+ return addedLinks;
+ }
+
+ @Override
+ public List<ClientDeltaLink> getDeletedLinks() {
+ return deletedLinks;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaLinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaLinkImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaLinkImpl.java
new file mode 100644
index 0000000..29a1572
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientDeltaLinkImpl.java
@@ -0,0 +1,78 @@
+/*
+ * 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.domain;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientDeltaLink;
+import org.apache.olingo.client.api.domain.ClientItem;
+
+public class ClientDeltaLinkImpl extends ClientItem implements ClientDeltaLink {
+
+ private URI source;
+
+ private String relationship;
+
+ private URI target;
+
+ private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
+
+ public ClientDeltaLinkImpl() {
+ super(null);
+ }
+
+ @Override
+ public URI getSource() {
+ return source;
+ }
+
+ @Override
+ public void setSource(final URI source) {
+ this.source = source;
+ }
+
+ @Override
+ public String getRelationship() {
+ return relationship;
+ }
+
+ @Override
+ public void setRelationship(final String relationship) {
+ this.relationship = relationship;
+ }
+
+ @Override
+ public URI getTarget() {
+ return target;
+ }
+
+ @Override
+ public void setTarget(final URI target) {
+ this.target = target;
+ }
+
+ @Override
+ public List<ClientAnnotation> getAnnotations() {
+ return annotations;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntityImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntityImpl.java
new file mode 100644
index 0000000..1c0d31b
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntityImpl.java
@@ -0,0 +1,298 @@
+/*
+ * 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.domain;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.olingo.client.api.domain.AbstractClientPayload;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientOperation;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientSingleton;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+
+public class ClientEntityImpl extends AbstractClientPayload implements ClientEntity, ClientSingleton {
+
+ /**
+ * Entity id.
+ */
+ private URI id;
+ /**
+ * ETag.
+ */
+ private String eTag;
+ /**
+ * Media entity flag.
+ */
+ private boolean mediaEntity = false;
+ /**
+ * In case of media entity, media content type.
+ */
+ private String mediaContentType;
+ /**
+ * In case of media entity, media content source.
+ */
+ private URI mediaContentSource;
+ /**
+ * Media ETag.
+ */
+ private String mediaETag;
+ /**
+ * Edit link.
+ */
+ private URI editLink;
+
+ private final List<ClientProperty> properties = new ArrayList<ClientProperty>();
+
+ private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
+
+ private final FullQualifiedName typeName;
+ /**
+ * Navigation links (might contain in-line entities or entity sets).
+ */
+ private final List<ClientLink> navigationLinks = new ArrayList<ClientLink>();
+ /**
+ * Association links.
+ */
+ private final List<ClientLink> associationLinks = new ArrayList<ClientLink>();
+ /**
+ * Media edit links.
+ */
+ private final List<ClientLink> mediaEditLinks = new ArrayList<ClientLink>();
+ /**
+ * Operations (legacy, functions, actions).
+ */
+ private final List<ClientOperation> operations = new ArrayList<ClientOperation>();
+
+ public ClientEntityImpl(final FullQualifiedName typeName) {
+ super(typeName == null ? null : typeName.toString());
+ this.typeName = typeName;
+ }
+
+ @Override
+ public FullQualifiedName getTypeName() {
+ return typeName;
+ }
+
+ @Override
+ public String getETag() {
+ return eTag;
+ }
+
+ @Override
+ public void setETag(final String eTag) {
+ this.eTag = eTag;
+ }
+
+ @Override
+ public ClientOperation getOperation(final String title) {
+ ClientOperation result = null;
+ for (ClientOperation operation : operations) {
+ if (title.equals(operation.getTitle())) {
+ result = operation;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Gets operations.
+ *
+ * @return operations.
+ */
+ @Override
+ public List<ClientOperation> getOperations() {
+ return operations;
+ }
+
+
+ @Override
+ public ClientProperty getProperty(final String name) {
+ ClientProperty result = null;
+
+ if (StringUtils.isNotBlank(name)) {
+ for (ClientProperty property : getProperties()) {
+ if (name.equals(property.getName())) {
+ result = property;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean addLink(final ClientLink link) {
+ boolean result = false;
+
+ switch (link.getType()) {
+ case ASSOCIATION:
+ result = associationLinks.contains(link) ? false : associationLinks.add(link);
+ break;
+
+ case ENTITY_NAVIGATION:
+ case ENTITY_SET_NAVIGATION:
+ result = navigationLinks.contains(link) ? false : navigationLinks.add(link);
+ break;
+
+ case MEDIA_EDIT:
+ result = mediaEditLinks.contains(link) ? false : mediaEditLinks.add(link);
+ break;
+
+ default:
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean removeLink(final ClientLink link) {
+ return associationLinks.remove(link) || navigationLinks.remove(link);
+ }
+
+ private ClientLink getLink(final List<ClientLink> links, final String name) {
+ ClientLink result = null;
+ for (ClientLink link : links) {
+ if (name.equals(link.getName())) {
+ result = link;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public ClientLink getNavigationLink(final String name) {
+ return getLink(navigationLinks, name);
+ }
+
+ @Override
+ public List<ClientLink> getNavigationLinks() {
+ return navigationLinks;
+ }
+
+ @Override
+ public ClientLink getAssociationLink(final String name) {
+ return getLink(associationLinks, name);
+ }
+
+ @Override
+ public List<ClientLink> getAssociationLinks() {
+ return associationLinks;
+ }
+
+ @Override
+ public ClientLink getMediaEditLink(final String name) {
+ return getLink(mediaEditLinks, name);
+ }
+
+ @Override
+ public List<ClientLink> getMediaEditLinks() {
+ return mediaEditLinks;
+ }
+
+ @Override
+ public URI getEditLink() {
+ return editLink;
+ }
+
+ @Override
+ public void setEditLink(final URI editLink) {
+ this.editLink = editLink;
+ }
+
+ @Override
+ public URI getLink() {
+ return super.getLink() == null ? getEditLink() : super.getLink();
+ }
+
+ @Override
+ public boolean isReadOnly() {
+ return super.getLink() != null;
+ }
+
+ @Override
+ public boolean isMediaEntity() {
+ return mediaEntity;
+ }
+
+ @Override
+ public void setMediaEntity(final boolean isMediaEntity) {
+ mediaEntity = isMediaEntity;
+ }
+
+ @Override
+ public String getMediaContentType() {
+ return mediaContentType;
+ }
+
+ @Override
+ public void setMediaContentType(final String mediaContentType) {
+ this.mediaContentType = mediaContentType;
+ }
+
+ @Override
+ public URI getMediaContentSource() {
+ return mediaContentSource;
+ }
+
+ @Override
+ public void setMediaContentSource(final URI mediaContentSource) {
+ this.mediaContentSource = mediaContentSource;
+ }
+
+ @Override
+ public String getMediaETag() {
+ return mediaETag;
+ }
+
+ @Override
+ public void setMediaETag(final String eTag) {
+ mediaETag = eTag;
+ }
+
+ @Override
+ public URI getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(final URI id) {
+ this.id = id;
+ }
+
+ @Override
+ public List<ClientProperty> getProperties() {
+ return properties;
+ }
+
+ @Override
+ public List<ClientAnnotation> getAnnotations() {
+ return annotations;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntitySetImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntitySetImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntitySetImpl.java
new file mode 100644
index 0000000..7d7e646
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEntitySetImpl.java
@@ -0,0 +1,65 @@
+/*
+ * 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.domain;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+
+public class ClientEntitySetImpl extends AbstractClientEntitySet implements ClientEntitySet {
+
+ private URI deltaLink;
+
+ private final List<ClientEntity> entities = new ArrayList<ClientEntity>();
+
+ private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
+
+ public ClientEntitySetImpl() {
+ super();
+ }
+
+ public ClientEntitySetImpl(final URI next) {
+ super(next);
+ }
+
+ @Override
+ public List<ClientEntity> getEntities() {
+ return entities;
+ }
+
+ @Override
+ public URI getDeltaLink() {
+ return deltaLink;
+ }
+
+ @Override
+ public void setDeltaLink(final URI deltaLink) {
+ this.deltaLink = deltaLink;
+ }
+
+ @Override
+ public List<ClientAnnotation> getAnnotations() {
+ return annotations;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEnumValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEnumValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEnumValueImpl.java
new file mode 100644
index 0000000..84559c7
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientEnumValueImpl.java
@@ -0,0 +1,59 @@
+/*
+ * 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.domain;
+
+import org.apache.olingo.client.api.domain.AbstractClientValue;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+
+public class ClientEnumValueImpl extends AbstractClientValue implements ClientEnumValue {
+
+ private final String value;
+
+ public ClientEnumValueImpl(final String typeName, final String value) {
+ super(typeName);
+ this.value = value;
+ }
+
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public boolean isEnum() {
+ return true;
+ }
+
+ @Override
+ public ClientEnumValue asEnum() {
+ return this;
+ }
+
+ @Override
+ public boolean isComplex() {
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return getTypeName() + "'" + getValue() + "'";
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientObjectFactoryImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientObjectFactoryImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientObjectFactoryImpl.java
new file mode 100644
index 0000000..7bca6c3
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientObjectFactoryImpl.java
@@ -0,0 +1,155 @@
+/*
+ * 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.domain;
+
+import java.net.URI;
+
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+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.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientLinkType;
+import org.apache.olingo.client.api.domain.ClientObjectFactory;
+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.client.api.domain.ClientValue;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+
+public class ClientObjectFactoryImpl implements ClientObjectFactory {
+
+ @Override
+ public ClientInlineEntitySet newDeepInsertEntitySet(final String name, final ClientEntitySet entitySet) {
+ return new ClientInlineEntitySet(null, ClientLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
+ }
+
+ @Override
+ public ClientInlineEntity newDeepInsertEntity(final String name, final ClientEntity entity) {
+ return new ClientInlineEntity(null, ClientLinkType.ENTITY_NAVIGATION, name, entity);
+ }
+
+ @Override
+ public ClientEntitySet newEntitySet() {
+ return new ClientEntitySetImpl();
+ }
+
+ @Override
+ public ClientEntitySet newEntitySet(final URI next) {
+ return new ClientEntitySetImpl(next);
+ }
+
+ @Override
+ public ClientEntity newEntity(final FullQualifiedName typeName) {
+ return new ClientEntityImpl(typeName);
+ }
+
+ @Override
+ public ClientEntity newEntity(final FullQualifiedName typeName, final URI link) {
+ final ClientEntityImpl result = new ClientEntityImpl(typeName);
+ result.setLink(link);
+ return result;
+ }
+
+ @Override
+ public ClientSingleton newSingleton(final FullQualifiedName typeName) {
+ return new ClientEntityImpl(typeName);
+ }
+
+ @Override
+ public ClientLink newEntityNavigationLink(final String name, final URI link) {
+ return new ClientLink.Builder().setURI(link).
+ setType(ClientLinkType.ENTITY_NAVIGATION).setTitle(name).build();
+ }
+
+ @Override
+ public ClientLink newEntitySetNavigationLink(final String name, final URI link) {
+ return new ClientLink.Builder().setURI(link).
+ setType(ClientLinkType.ENTITY_SET_NAVIGATION).setTitle(name).build();
+ }
+
+ @Override
+ public ClientLink newAssociationLink(final String name, final URI link) {
+ return new ClientLink.Builder().setURI(link).
+ setType(ClientLinkType.ASSOCIATION).setTitle(name).build();
+ }
+
+ @Override
+ public ClientLink newMediaEditLink(final String name, final URI link) {
+ return new ClientLink.Builder().setURI(link).
+ setType(ClientLinkType.MEDIA_EDIT).setTitle(name).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue.Builder newPrimitiveValueBuilder() {
+ return new ClientPrimitiveValueImpl.BuilderImpl();
+ }
+
+ @Override
+ public ClientEnumValue newEnumValue(final String typeName, final String value) {
+ return new ClientEnumValueImpl(typeName, value);
+ }
+
+ @Override
+ public ClientComplexValue newComplexValue(final String typeName) {
+ return new ClientComplexValueImpl(typeName);
+ }
+
+ @Override
+ public ClientCollectionValue<ClientValue> newCollectionValue(final String typeName) {
+ return new ClientCollectionValueImpl<ClientValue>(typeName);
+ }
+
+ @Override
+ public ClientProperty newPrimitiveProperty(final String name, final ClientPrimitiveValue value) {
+ return new ClientPropertyImpl(name, value);
+ }
+
+ @Override
+ public ClientProperty newComplexProperty(final String name, final ClientComplexValue value) {
+
+ return new ClientPropertyImpl(name, value);
+ }
+
+ @Override
+ public ClientProperty newCollectionProperty(final String name,
+ final ClientCollectionValue<? extends ClientValue> value) {
+
+ return new ClientPropertyImpl(name, value);
+ }
+
+ @Override
+ public ClientProperty newEnumProperty(final String name, final ClientEnumValue value) {
+ return new ClientPropertyImpl(name, value);
+ }
+
+ @Override
+ public ClientDelta newDelta() {
+ return new ClientDeltaImpl();
+ }
+
+ @Override
+ public ClientDelta newDelta(final URI next) {
+ return new ClientDeltaImpl(next);
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPrimitiveValueImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPrimitiveValueImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPrimitiveValueImpl.java
new file mode 100644
index 0000000..f8f85d5
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPrimitiveValueImpl.java
@@ -0,0 +1,222 @@
+/*
+ * 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.domain;
+
+import java.util.UUID;
+
+import org.apache.olingo.commons.api.Constants;
+import org.apache.olingo.client.api.domain.AbstractClientValue;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientValue;
+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 org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
+import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
+
+public class ClientPrimitiveValueImpl extends AbstractClientValue implements ClientValue, ClientPrimitiveValue {
+
+ public static class BuilderImpl implements Builder {
+
+ private final ClientPrimitiveValueImpl instance;
+
+ public BuilderImpl() {
+ instance = new ClientPrimitiveValueImpl();
+ }
+
+ @Override
+ public BuilderImpl setType(final EdmType type) {
+ EdmPrimitiveTypeKind primitiveTypeKind = null;
+ if (type != null) {
+ if (type.getKind() != EdmTypeKind.PRIMITIVE) {
+ throw new IllegalArgumentException(String.format("Provided type %s is not primitive", type));
+ }
+ primitiveTypeKind = EdmPrimitiveTypeKind.valueOf(type.getName());
+ }
+ return setType(primitiveTypeKind);
+ }
+
+ @Override
+ public BuilderImpl setType(final EdmPrimitiveTypeKind type) {
+ if (type == EdmPrimitiveTypeKind.Stream) {
+ throw new IllegalArgumentException(String.format(
+ "Cannot build a primitive value for %s", EdmPrimitiveTypeKind.Stream.toString()));
+ }
+ if (type == EdmPrimitiveTypeKind.Geography || type == EdmPrimitiveTypeKind.Geometry) {
+ throw new IllegalArgumentException(
+ type + "is not an instantiable type. "
+ + "An entity can declare a property to be of type Geometry. "
+ + "An instance of an entity MUST NOT have a value of type Geometry. "
+ + "Each value MUST be of some subtype.");
+ }
+
+ instance.typeKind = type == null ? EdmPrimitiveTypeKind.String : type;
+ instance.type = EdmPrimitiveTypeFactory.getInstance(instance.typeKind);
+
+ return this;
+ }
+
+ @Override
+ public BuilderImpl setValue(final Object value) {
+ instance.value = value;
+ return this;
+ }
+
+ @Override
+ public ClientPrimitiveValue build() {
+ if (instance.type == null) {
+ setType(EdmPrimitiveTypeKind.String);
+ }
+ return instance;
+ }
+
+ @Override
+ public ClientPrimitiveValue buildBoolean(final Boolean value) {
+ return setType(EdmPrimitiveTypeKind.Boolean).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildInt16(final Short value) {
+ return setType(EdmPrimitiveTypeKind.Int16).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildInt32(final Integer value) {
+ return setType(EdmPrimitiveTypeKind.Int32).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildInt64(final Long value) {
+ return setType(EdmPrimitiveTypeKind.Int64).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildSingle(final Float value) {
+ return setType(EdmPrimitiveTypeKind.Single).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildDouble(final Double value) {
+ return setType(EdmPrimitiveTypeKind.Double).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildString(final String value) {
+ return setType(EdmPrimitiveTypeKind.String).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildGuid(final UUID value) {
+ return setType(EdmPrimitiveTypeKind.Guid).setValue(value).build();
+ }
+
+ @Override
+ public ClientPrimitiveValue buildBinary(final byte[] value) {
+ return setType(EdmPrimitiveTypeKind.Binary).setValue(value).build();
+ }
+
+ }
+
+ /**
+ * Type kind.
+ */
+ private EdmPrimitiveTypeKind typeKind;
+
+ /**
+ * Type.
+ */
+ private EdmPrimitiveType type;
+
+ /**
+ * Actual value.
+ */
+ private Object value;
+
+ protected ClientPrimitiveValueImpl() {
+ super(null);
+ }
+
+ @Override
+ public String getTypeName() {
+ return typeKind.getFullQualifiedName().toString();
+ }
+
+ @Override
+ public EdmPrimitiveTypeKind getTypeKind() {
+ return typeKind;
+ }
+
+ @Override
+ public EdmPrimitiveType getType() {
+ return type;
+ }
+
+ @Override
+ public Object toValue() {
+ return value;
+ }
+
+ @Override
+ public <T> T toCastValue(final Class<T> reference) throws EdmPrimitiveTypeException {
+ if (value == null) {
+ return null;
+ } else if (typeKind.isGeospatial()) {
+ return reference.cast(value);
+ } else {
+ // TODO: set facets
+ return type.valueOfString(type.valueToString(value,
+ null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null),
+ null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null, reference);
+ }
+ }
+
+ @Override
+ public String toString() {
+ if (value == null) {
+ return "";
+ } else if (typeKind.isGeospatial()) {
+ return value.toString();
+ } else {
+ try {
+ // TODO: set facets
+ return type.valueToString(value, null, null, Constants.DEFAULT_PRECISION, Constants.DEFAULT_SCALE, null);
+ } catch (EdmPrimitiveTypeException e) {
+ throw new IllegalArgumentException(e);
+ }
+ }
+ }
+
+ @Override
+ public boolean isEnum() {
+ return false;
+ }
+
+ @Override
+ public ClientEnumValue asEnum() {
+ return null;
+ }
+
+ @Override
+ public boolean isComplex() {
+ return false;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPropertyImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPropertyImpl.java
new file mode 100644
index 0000000..ac1ad1d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientPropertyImpl.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.core.domain;
+
+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.olingo.client.api.domain.ClientAnnotatable;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientValue;
+
+public class ClientPropertyImpl implements ClientProperty, ClientAnnotatable, ClientValuable {
+
+
+ private final List<ClientAnnotation> annotations = new ArrayList<ClientAnnotation>();
+ private final String name;
+ private final ClientValue value;
+ private final ClientValuable valuable;
+
+ public ClientPropertyImpl(final String name, final ClientValue value) {
+ this.name = name;
+ this.value = value;
+ this.valuable = new ClientValuableImpl(value);
+ }
+
+ /**
+ * Returns property name.
+ *
+ * @return property name.
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns property value.
+ *
+ * @return property value.
+ */
+ @Override
+ public ClientValue getValue() {
+ return value;
+ }
+
+ /**
+ * Checks if has null value.
+ *
+ * @return 'TRUE' if has null value; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean hasNullValue() {
+ return value == null || value.isPrimitive() && value.asPrimitive().toValue() == null;
+ }
+
+ /**
+ * Checks if has primitive value.
+ *
+ * @return 'TRUE' if has primitive value; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean hasPrimitiveValue() {
+ return !hasNullValue() && value.isPrimitive();
+ }
+
+ /**
+ * Gets primitive value.
+ *
+ * @return primitive value if exists; null otherwise.
+ */
+ @Override
+ public ClientPrimitiveValue getPrimitiveValue() {
+ return hasPrimitiveValue() ? value.asPrimitive() : null;
+ }
+
+ /**
+ * Checks if has complex value.
+ *
+ * @return 'TRUE' if has complex value; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean hasComplexValue() {
+ return !hasNullValue() && value.isComplex();
+ }
+
+ /**
+ * Checks if has collection value.
+ *
+ * @return 'TRUE' if has collection value; 'FALSE' otherwise.
+ */
+ @Override
+ public boolean hasCollectionValue() {
+ return !hasNullValue() && value.isCollection();
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return EqualsBuilder.reflectionEquals(this, obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return HashCodeBuilder.reflectionHashCode(this);
+ }
+
+ @Override
+ public boolean hasEnumValue() {
+ return valuable.hasEnumValue();
+ }
+
+ @Override
+ public ClientEnumValue getEnumValue() {
+ return valuable.getEnumValue();
+ }
+
+ @Override
+ public ClientComplexValue getComplexValue() {
+ return valuable.getComplexValue();
+ }
+
+ @Override
+ public ClientCollectionValue<ClientValue> getCollectionValue() {
+ return valuable.getCollectionValue();
+ }
+
+ @Override
+ public List<ClientAnnotation> getAnnotations() {
+ return annotations;
+ }
+
+ @Override
+ public String toString() {
+ return "ODataPropertyImpl{"
+ + "name=" + getName()
+ + ",valuable=" + valuable
+ + ", annotations=" + annotations
+ + '}';
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientValuableImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientValuableImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientValuableImpl.java
new file mode 100644
index 0000000..ecae20d
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/domain/ClientValuableImpl.java
@@ -0,0 +1,111 @@
+/*
+ * 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.domain;
+
+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.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEnumValue;
+import org.apache.olingo.client.api.domain.ClientPrimitiveValue;
+import org.apache.olingo.client.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientValue;
+
+public class ClientValuableImpl implements ClientValuable {
+
+ private final ClientValue value;
+
+ public ClientValuableImpl(final ClientValue value) {
+ this.value = value;
+ }
+
+ @Override
+ public ClientValue getValue() {
+ return value;
+ }
+
+ @Override
+ public boolean hasNullValue() {
+ return value == null;
+ }
+
+ @Override
+ public boolean hasPrimitiveValue() {
+ return !hasNullValue() && value.isPrimitive();
+ }
+
+ @Override
+ public ClientPrimitiveValue getPrimitiveValue() {
+ return hasPrimitiveValue() ? value.asPrimitive() : null;
+ }
+
+ @Override
+ public boolean hasCollectionValue() {
+ return !hasNullValue() && value.isCollection();
+ }
+
+ @Override
+ public ClientCollectionValue<ClientValue> getCollectionValue() {
+ return hasCollectionValue()
+ ? getValue().<ClientValue> asCollection()
+ : null;
+ }
+
+ @Override
+ public boolean hasComplexValue() {
+ return !hasNullValue() && value.isComplex();
+ }
+
+ @Override
+ public ClientComplexValue getComplexValue() {
+ return hasComplexValue()
+ ? getValue().asComplex()
+ : null;
+ }
+
+ @Override
+ public boolean hasEnumValue() {
+ return !hasNullValue() && getValue().isEnum();
+ }
+
+ @Override
+ public ClientEnumValue getEnumValue() {
+ return hasEnumValue()
+ ? getValue().asEnum()
+ : null;
+ }
+
+ @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-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
index 916c360..a668aaf 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ClientODataDeserializerImpl.java
@@ -35,7 +35,7 @@ import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientError;
+import org.apache.olingo.commons.api.domain.ODataError;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.serialization.ODataDeserializer;
@@ -86,7 +86,7 @@ public class ClientODataDeserializerImpl implements ClientODataDeserializer {
}
@Override
- public ClientError toError(final InputStream input) throws ODataDeserializerException {
+ public ODataError toError(final InputStream input) throws ODataDeserializerException {
return deserializer.toError(input);
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
index f38d795..48de8f8 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataBinderImpl.java
@@ -44,29 +44,30 @@ import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.Link;
import org.apache.olingo.commons.api.data.Linked;
+import org.apache.olingo.commons.api.data.Operation;
import org.apache.olingo.commons.api.data.Property;
import org.apache.olingo.commons.api.data.ResWrap;
import org.apache.olingo.commons.api.data.Valuable;
import org.apache.olingo.commons.api.data.ValueType;
-import org.apache.olingo.commons.api.domain.ClientAnnotatable;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientDeletedEntity.Reason;
-import org.apache.olingo.commons.api.domain.ClientDelta;
-import org.apache.olingo.commons.api.domain.ClientDeltaLink;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientEntitySet;
-import org.apache.olingo.commons.api.domain.ClientInlineEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
-import org.apache.olingo.commons.api.domain.ClientLinked;
-import org.apache.olingo.commons.api.domain.ClientOperation;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientServiceDocument;
-import org.apache.olingo.commons.api.domain.ClientValuable;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientAnnotatable;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientDeletedEntity.Reason;
+import org.apache.olingo.client.api.domain.ClientDelta;
+import org.apache.olingo.client.api.domain.ClientDeltaLink;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
+import org.apache.olingo.client.api.domain.ClientInlineEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientLinkType;
+import org.apache.olingo.client.api.domain.ClientLinked;
+import org.apache.olingo.client.api.domain.ClientOperation;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientServiceDocument;
+import org.apache.olingo.client.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmBindingTarget;
import org.apache.olingo.commons.api.edm.EdmComplexType;
@@ -87,10 +88,10 @@ import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.serialization.ODataSerializerException;
-import org.apache.olingo.commons.core.domain.ClientAnnotationImpl;
-import org.apache.olingo.commons.core.domain.ClientDeletedEntityImpl;
-import org.apache.olingo.commons.core.domain.ClientDeltaLinkImpl;
-import org.apache.olingo.commons.core.domain.ClientPropertyImpl;
+import org.apache.olingo.client.core.domain.ClientAnnotationImpl;
+import org.apache.olingo.client.core.domain.ClientDeletedEntityImpl;
+import org.apache.olingo.client.core.domain.ClientDeltaLinkImpl;
+import org.apache.olingo.client.core.domain.ClientPropertyImpl;
import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeFactory;
import org.apache.olingo.commons.core.edm.EdmTypeInfo;
import org.apache.olingo.commons.core.serialization.ContextURLParser;
@@ -635,8 +636,11 @@ public class ODataBinderImpl implements ODataBinder {
newMediaEditLink(link.getTitle(), URIUtils.getURI(base, link.getHref())));
}
- for (ClientOperation operation : resource.getPayload().getOperations()) {
- operation.setTarget(URIUtils.getURI(base, operation.getTarget()));
+ for (Operation op : resource.getPayload().getOperations()) {
+ ClientOperation operation = new ClientOperation();
+ operation.setTarget(URIUtils.getURI(base, op.getTarget()));
+ operation.setTitle(op.getTitle());
+ operation.setMetadataAnchor(op.getMetadataAnchor());
entity.getOperations().add(operation);
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
index 80972be..8f3c8be 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataReaderImpl.java
@@ -33,12 +33,12 @@ import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.EntityCollection;
import org.apache.olingo.commons.api.data.Property;
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.commons.api.domain.ClientValue;
+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.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.apache.olingo.commons.api.edm.provider.CsdlSchema;
@@ -80,7 +80,7 @@ public class ODataReaderImpl implements ODataReader {
}
@Override
- public ClientError readError(final InputStream inputStream, final ODataFormat format)
+ public ODataError readError(final InputStream inputStream, final ODataFormat format)
throws ODataDeserializerException {
return client.getDeserializer(format).toError(inputStream);
}
@@ -137,7 +137,7 @@ public class ODataReaderImpl implements ODataReader {
resource.getContextURL(),
resource.getMetadataETag(),
reference.cast(client.getBinder().getODataServiceDocument(resource.getPayload())));
- } else if (ClientError.class.isAssignableFrom(reference)) {
+ } else if (ODataError.class.isAssignableFrom(reference)) {
res = new ResWrap<T>(
(URI) null,
null,
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java
index 8191886..c891f1e 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/serialization/ODataWriterImpl.java
@@ -32,9 +32,9 @@ import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.serialization.ODataWriter;
import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientProperty;
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/uri/URIUtils.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
index e1ac9c1..60c8074 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/uri/URIUtils.java
@@ -50,7 +50,7 @@ import org.apache.olingo.client.api.http.WrappingHttpClientFactory;
import org.apache.olingo.client.api.uri.SegmentType;
import org.apache.olingo.client.core.http.BasicAuthHttpClientFactory;
import org.apache.olingo.commons.api.Constants;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.core.edm.primitivetype.EdmBinary;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
index 873b946..5395472 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntitySetTest.java
@@ -22,8 +22,8 @@ import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.core.AbstractTest;
import org.apache.olingo.commons.api.data.EntityCollection;
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.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientEntitySet;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.apache.olingo.commons.api.serialization.ODataDeserializerException;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
index de35c02..7373da6 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/EntityTest.java
@@ -33,15 +33,15 @@ import org.apache.olingo.client.core.AbstractTest;
import org.apache.olingo.client.core.EdmEnabledODataClientImpl;
import org.apache.olingo.commons.api.data.Entity;
import org.apache.olingo.commons.api.data.ResWrap;
-import org.apache.olingo.commons.api.domain.ClientAnnotation;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientInlineEntitySet;
-import org.apache.olingo.commons.api.domain.ClientLink;
-import org.apache.olingo.commons.api.domain.ClientLinkType;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValuable;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientAnnotation;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientInlineEntitySet;
+import org.apache.olingo.client.api.domain.ClientLink;
+import org.apache.olingo.client.api.domain.ClientLinkType;
+import org.apache.olingo.client.api.domain.ClientProperty;
+import org.apache.olingo.client.api.domain.ClientValuable;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.Edm;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.format.ODataFormat;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
index 21b1f82..c0067bc 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ErrorTest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.v4;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.core.AbstractTest;
-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.junit.Test;
@@ -35,15 +35,15 @@ public class ErrorTest extends AbstractTest {
return v4Client;
}
- private ClientError error(final String name, final ODataFormat format) throws ODataDeserializerException {
- final ClientError error = getClient().getDeserializer(format).toError(
+ private ODataError error(final String name, final ODataFormat format) throws ODataDeserializerException {
+ final ODataError error = getClient().getDeserializer(format).toError(
getClass().getResourceAsStream(name + "." + getSuffix(format)));
assertNotNull(error);
return error;
}
private void simple(final ODataFormat format) throws ODataDeserializerException {
- final ClientError error = error("error", format);
+ final ODataError error = error("error", format);
assertEquals("501", error.getCode());
assertEquals("Unsupported functionality", error.getMessage());
assertEquals("query", error.getTarget());
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
index 49c7c38..83c495c 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/JSONTest.java
@@ -35,10 +35,10 @@ import org.apache.olingo.client.core.AbstractTest;
import org.apache.olingo.commons.api.Constants;
import org.apache.olingo.commons.api.data.Delta;
import org.apache.olingo.commons.api.data.Property;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientEntity;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+import org.apache.olingo.client.api.domain.ClientEntity;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.format.ODataFormat;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
index 8d359a7..e4778cb 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/MetadataTest.java
@@ -174,7 +174,7 @@ public class MetadataTest extends AbstractTest {
final EdmAnnotation annotation = annotationGroup.getAnnotations().get(0);
assertNotNull(annotation);
assertTrue(annotation.getExpression().isConstant());
- assertEquals("Edm.String", annotation.getExpression().asConstant().getValue().getTypeName());
+ assertEquals("Edm.String", annotation.getExpression().asConstant().getValue().getType());
assertEquals(10, schema.getAnnotationGroups().get(3).getAnnotations().size());
}
@@ -273,7 +273,7 @@ public class MetadataTest extends AbstractTest {
assertNotNull(weight);
assertEquals(EdmInt32.getInstance(), weight.getUnderlyingType());
assertFalse(weight.getAnnotations().isEmpty());
- assertEquals("Kilograms", weight.getAnnotations().get(0).getExpression().asConstant().getValue().toString());
+ assertEquals("Kilograms", weight.getAnnotations().get(0).getExpression().asConstant().getValue().getValue());
}
/**
@@ -332,10 +332,10 @@ public class MetadataTest extends AbstractTest {
assertNotNull(group);
final EdmAnnotation time1 = group.getAnnotations().get(0);
- assertEquals("Edm.TimeOfDay", time1.getExpression().asConstant().getValue().getTypeName());
+ assertEquals("Edm.TimeOfDay", time1.getExpression().asConstant().getValue().getType());
final EdmAnnotation time2 = group.getAnnotations().get(1);
- assertEquals("Edm.TimeOfDay", time2.getExpression().asConstant().getValue().getTypeName());
+ assertEquals("Edm.TimeOfDay", time2.getExpression().asConstant().getValue().getType());
}
/**
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
index 760e8ca..d22bb6f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.v4;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.core.AbstractTest;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientValue;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
index e8daeb8..46e0d22 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PropertyTest.java
@@ -20,10 +20,10 @@ package org.apache.olingo.client.core.v4;
import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.core.AbstractTest;
-import org.apache.olingo.commons.api.domain.ClientCollectionValue;
-import org.apache.olingo.commons.api.domain.ClientComplexValue;
-import org.apache.olingo.commons.api.domain.ClientProperty;
-import org.apache.olingo.commons.api.domain.ClientValue;
+import org.apache.olingo.client.api.domain.ClientCollectionValue;
+import org.apache.olingo.client.api.domain.ClientComplexValue;
+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.serialization.ODataDeserializerException;
import org.apache.olingo.commons.api.serialization.ODataSerializerException;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
index e025076..1a2de09 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/ServiceDocumentTest.java
@@ -22,7 +22,7 @@ import org.apache.olingo.client.api.ODataClient;
import org.apache.olingo.client.api.data.ServiceDocument;
import org.apache.olingo.client.core.AbstractTest;
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;
import org.junit.Test;
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
index cec55b3..ba9fd7a 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/Constants.java
@@ -18,6 +18,8 @@
*/
package org.apache.olingo.commons.api;
+import org.apache.olingo.commons.api.format.ContentType;
+
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
@@ -302,4 +304,10 @@ public interface Constants {
public static final String CANONICAL_FUNCTION_URIENCODE = "odata.uriEncode";
+ String MEDIA_EDIT_LINK_TYPE = "*/*";
+ String ENTITY_NAVIGATION_LINK_TYPE = ContentType.APPLICATION_ATOM_XML_ENTRY.toContentTypeString();
+ String ENTITY_SET_NAVIGATION_LINK_TYPE = ContentType.APPLICATION_ATOM_XML_FEED.toContentTypeString();
+ String ASSOCIATION_LINK_TYPE = ContentType.APPLICATION_XML.toContentTypeString();
+ String ENTITY_COLLECTION_BINDING_LINK_TYPE = ContentType.APPLICATION_XML.toContentTypeString();
+ String ENTITY_BINDING_LINK_TYPE = ContentType.APPLICATION_XML.toContentTypeString();
}
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/17152920/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entity.java
index a9db524..b6939c0 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entity.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Entity.java
@@ -18,8 +18,6 @@
*/
package org.apache.olingo.commons.api.data;
-import org.apache.olingo.commons.api.domain.ClientOperation;
-
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
@@ -33,7 +31,7 @@ public class Entity extends Linked {
private Link editLink;
private final List<Link> mediaEditLinks = new ArrayList<Link>();
- private final List<ClientOperation> operations = new ArrayList<ClientOperation>();
+ private final List<Operation> operations = new ArrayList<Operation>();
private final List<Property> properties = new ArrayList<Property>();
@@ -122,7 +120,7 @@ public class Entity extends Linked {
*
* @return operations.
*/
- public List<ClientOperation> getOperations() {
+ public List<Operation> getOperations() {
return operations;
}