You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/05/07 12:39:35 UTC

[2/5] git commit: [OLINGO-264] Introducing data and domain objects to let annotate delta links

[OLINGO-264] Introducing data and domain objects to let annotate delta links


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/4a07d59b
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/4a07d59b
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/4a07d59b

Branch: refs/heads/master
Commit: 4a07d59b4d9806a9fc377b9ab6f9d6d916c15e05
Parents: 70cdaef
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue May 6 11:00:30 2014 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue May 6 11:00:30 2014 +0200

----------------------------------------------------------------------
 .../client/core/op/impl/v4/ODataBinderImpl.java | 17 +++---
 .../olingo/commons/api/data/DeletedEntity.java  | 36 +++++++++++
 .../apache/olingo/commons/api/data/Delta.java   |  8 +--
 .../olingo/commons/api/data/DeltaLink.java      | 36 +++++++++++
 .../commons/api/domain/v4/ODataDeltaLink.java   |  2 +-
 .../commons/core/data/AtomDeserializer.java     |  8 +--
 .../commons/core/data/DeletedEntityImpl.java    | 50 +++++++++++++++
 .../olingo/commons/core/data/DeltaLinkImpl.java | 64 ++++++++++++++++++++
 .../core/data/JSONDeltaDeserializer.java        | 11 +---
 .../commons/core/data/v4/AbstractDelta.java     | 16 ++---
 .../core/domain/v4/ODataDeltaLinkImpl.java      | 10 +++
 11 files changed, 223 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java
index 6c7c888..65b59e8 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/op/impl/v4/ODataBinderImpl.java
@@ -26,9 +26,9 @@ import org.apache.olingo.client.api.v4.EdmEnabledODataClient;
 import org.apache.olingo.client.api.v4.ODataClient;
 import org.apache.olingo.client.core.op.AbstractODataBinder;
 import org.apache.olingo.client.core.uri.URIUtils;
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity;
+import org.apache.olingo.commons.api.data.DeletedEntity;
 import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
+import org.apache.olingo.commons.api.data.DeltaLink;
 import org.apache.olingo.commons.api.data.Entity;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.LinkedComplexValue;
@@ -40,16 +40,17 @@ import org.apache.olingo.commons.api.domain.CommonODataEntitySet;
 import org.apache.olingo.commons.api.domain.CommonODataProperty;
 import org.apache.olingo.commons.api.domain.ODataServiceDocument;
 import org.apache.olingo.commons.api.domain.ODataValue;
+import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity.Reason;
 import org.apache.olingo.commons.api.domain.v4.ODataDelta;
 import org.apache.olingo.commons.api.domain.v4.ODataEntity;
 import org.apache.olingo.commons.api.domain.v4.ODataEntitySet;
 import org.apache.olingo.commons.api.domain.v4.ODataLinkedComplexValue;
 import org.apache.olingo.commons.api.domain.v4.ODataProperty;
 import org.apache.olingo.commons.api.edm.EdmComplexType;
-import org.apache.olingo.commons.core.domain.v4.ODataDeletedEntityImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeltaLinkImpl;
 import org.apache.olingo.commons.core.data.EnumValueImpl;
 import org.apache.olingo.commons.core.data.LinkedComplexValueImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataDeletedEntityImpl;
+import org.apache.olingo.commons.core.domain.v4.ODataDeltaLinkImpl;
 import org.apache.olingo.commons.core.domain.v4.ODataPropertyImpl;
 import org.apache.olingo.commons.core.edm.EdmTypeInfo;
 import org.apache.olingo.commons.core.op.ResourceFactory;
@@ -240,15 +241,15 @@ public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder
       add(delta, getODataEntity(
               new ResWrap<Entity>(resource.getContextURL(), resource.getMetadataETag(), entityResource)));
     }
-    for (ODataDeletedEntity deletedEntity : resource.getPayload().getDeletedEntities()) {
+    for (DeletedEntity deletedEntity : resource.getPayload().getDeletedEntities()) {
       final ODataDeletedEntityImpl impl = new ODataDeletedEntityImpl();
       impl.setId(URIUtils.getURI(base, deletedEntity.getId()));
-      impl.setReason(deletedEntity.getReason());
+      impl.setReason(Reason.valueOf(deletedEntity.getReason().name()));
 
       delta.getDeletedEntities().add(impl);
     }
 
-    for (ODataDeltaLink link : resource.getPayload().getAddedLinks()) {
+    for (DeltaLink link : resource.getPayload().getAddedLinks()) {
       final ODataDeltaLinkImpl impl = new ODataDeltaLinkImpl();
       impl.setRelationship(link.getRelationship());
       impl.setSource(URIUtils.getURI(base, link.getSource()));
@@ -256,7 +257,7 @@ public class ODataBinderImpl extends AbstractODataBinder implements ODataBinder
 
       delta.getAddedLinks().add(impl);
     }
-    for (ODataDeltaLink link : resource.getPayload().getDeletedLinks()) {
+    for (DeltaLink link : resource.getPayload().getDeletedLinks()) {
       final ODataDeltaLinkImpl impl = new ODataDeltaLinkImpl();
       impl.setRelationship(link.getRelationship());
       impl.setSource(URIUtils.getURI(base, link.getSource()));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.java
new file mode 100644
index 0000000..49ef737
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeletedEntity.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.commons.api.data;
+
+import java.net.URI;
+
+public interface DeletedEntity {
+
+  enum Reason {
+
+    deleted,
+    changed;
+
+  }
+
+  URI getId();
+
+  Reason getReason();
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Delta.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Delta.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Delta.java
index 2b80220..29b2fa9 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Delta.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/Delta.java
@@ -18,16 +18,14 @@
  */
 package org.apache.olingo.commons.api.data;
 
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity;
-import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
 import java.util.List;
 
 public interface Delta extends EntitySet {
 
-  List<ODataDeletedEntity> getDeletedEntities();
+  List<DeletedEntity> getDeletedEntities();
 
-  List<ODataDeltaLink> getAddedLinks();
+  List<DeltaLink> getAddedLinks();
 
-  List<ODataDeltaLink> getDeletedLinks();
+  List<DeltaLink> getDeletedLinks();
 
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeltaLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeltaLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeltaLink.java
new file mode 100644
index 0000000..77f3982
--- /dev/null
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/data/DeltaLink.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.commons.api.data;
+
+import java.net.URI;
+
+public interface DeltaLink extends Annotatable {
+
+  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/4a07d59b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java
index d42e2d6..ff9e088 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/domain/v4/ODataDeltaLink.java
@@ -20,7 +20,7 @@ package org.apache.olingo.commons.api.domain.v4;
 
 import java.net.URI;
 
-public interface ODataDeltaLink {
+public interface ODataDeltaLink extends ODataAnnotatatable {
 
   URI getSource();
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java
index fb9b0df..a5171ba 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/AtomDeserializer.java
@@ -20,8 +20,6 @@ package org.apache.olingo.commons.core.data;
 
 import com.fasterxml.aalto.stax.InputFactoryImpl;
 import org.apache.olingo.commons.core.data.v4.AtomDeltaImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeltaLinkImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeletedEntityImpl;
 import java.io.InputStream;
 import java.net.URI;
 import java.text.ParseException;
@@ -35,7 +33,7 @@ import javax.xml.stream.events.XMLEvent;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.data.CollectionValue;
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity.Reason;
+import org.apache.olingo.commons.api.data.DeletedEntity.Reason;
 import org.apache.olingo.commons.api.data.EntitySet;
 import org.apache.olingo.commons.api.data.ResWrap;
 import org.apache.olingo.commons.api.data.Value;
@@ -421,7 +419,7 @@ public class AtomDeserializer extends AbstractAtomDealer {
         } else if (Constants.QNAME_ATOM_ELEM_ENTRY.equals(event.asStartElement().getName())) {
           delta.getEntities().add(entity(reader, event.asStartElement()));
         } else if (deletedEntryQName.equals(event.asStartElement().getName())) {
-          final ODataDeletedEntityImpl deletedEntity = new ODataDeletedEntityImpl();
+          final DeletedEntityImpl deletedEntity = new DeletedEntityImpl();
 
           final Attribute ref = event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_REF));
           if (ref != null) {
@@ -436,7 +434,7 @@ public class AtomDeserializer extends AbstractAtomDealer {
         } else if (linkQName.equals(event.asStartElement().getName())
                 || deletedLinkQName.equals(event.asStartElement().getName())) {
 
-          final ODataDeltaLinkImpl link = new ODataDeltaLinkImpl();
+          final DeltaLinkImpl link = new DeltaLinkImpl();
 
           final Attribute source = event.asStartElement().getAttributeByName(QName.valueOf(Constants.ATTR_SOURCE));
           if (source != null) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeletedEntityImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeletedEntityImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeletedEntityImpl.java
new file mode 100644
index 0000000..67ab03b
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeletedEntityImpl.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.commons.core.data;
+
+import java.net.URI;
+import org.apache.olingo.commons.api.data.DeletedEntity;
+
+public class DeletedEntityImpl extends AbstractAnnotatedObject implements DeletedEntity {
+
+  private static final long serialVersionUID = 2075093398299488510L;
+
+  private URI id;
+
+  private Reason reason;
+
+  @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/4a07d59b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaLinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaLinkImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaLinkImpl.java
new file mode 100644
index 0000000..0834b55
--- /dev/null
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/DeltaLinkImpl.java
@@ -0,0 +1,64 @@
+/*
+ * 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.data;
+
+import java.net.URI;
+import org.apache.olingo.commons.api.data.DeltaLink;
+
+public class DeltaLinkImpl extends AbstractAnnotatedObject implements DeltaLink {
+
+  private static final long serialVersionUID = 581329273399308799L;
+
+  private URI source;
+
+  private String relationship;
+
+  private URI target;
+
+  @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;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java
index 6b7f121..f712e74 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/JSONDeltaDeserializer.java
@@ -19,8 +19,6 @@
 package org.apache.olingo.commons.core.data;
 
 import org.apache.olingo.commons.core.data.v4.JSONDeltaImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeltaLinkImpl;
-import org.apache.olingo.commons.core.domain.v4.ODataDeletedEntityImpl;
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
@@ -78,14 +76,11 @@ public class JSONDeltaDeserializer extends AbstractJsonDeserializer<JSONDeltaImp
                   });
           delta.getEntities().add(entity.getPayload());
         } else if (itemContextURL.isDeltaDeletedEntity()) {
-          delta.getDeletedEntities().
-                  add(parser.getCodec().treeToValue(item, ODataDeletedEntityImpl.class));
+          delta.getDeletedEntities().add(parser.getCodec().treeToValue(item, DeletedEntityImpl.class));
         } else if (itemContextURL.isDeltaLink()) {
-          delta.getAddedLinks().
-                  add(parser.getCodec().treeToValue(item, ODataDeltaLinkImpl.class));
+          delta.getAddedLinks().add(parser.getCodec().treeToValue(item, DeltaLinkImpl.class));
         } else if (itemContextURL.isDeltaDeletedLink()) {
-          delta.getDeletedLinks().
-                  add(parser.getCodec().treeToValue(item, ODataDeltaLinkImpl.class));
+          delta.getDeletedLinks().add(parser.getCodec().treeToValue(item, DeltaLinkImpl.class));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/AbstractDelta.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/AbstractDelta.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/AbstractDelta.java
index c2df46c..d4a50ed 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/AbstractDelta.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/data/v4/AbstractDelta.java
@@ -20,33 +20,33 @@ package org.apache.olingo.commons.core.data.v4;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.olingo.commons.api.domain.v4.ODataDeletedEntity;
+import org.apache.olingo.commons.api.data.DeletedEntity;
 import org.apache.olingo.commons.api.data.Delta;
-import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
+import org.apache.olingo.commons.api.data.DeltaLink;
 import org.apache.olingo.commons.core.data.AbstractEntitySet;
 
 public abstract class AbstractDelta extends AbstractEntitySet implements Delta {
 
   private static final long serialVersionUID = 4576771708961553195L;
 
-  private final List<ODataDeletedEntity> deletedEntities = new ArrayList<ODataDeletedEntity>();
+  private final List<DeletedEntity> deletedEntities = new ArrayList<DeletedEntity>();
 
-  private final List<ODataDeltaLink> addedLinks = new ArrayList<ODataDeltaLink>();
+  private final List<DeltaLink> addedLinks = new ArrayList<DeltaLink>();
 
-  private final List<ODataDeltaLink> deletedLinks = new ArrayList<ODataDeltaLink>();
+  private final List<DeltaLink> deletedLinks = new ArrayList<DeltaLink>();
 
   @Override
-  public List<ODataDeletedEntity> getDeletedEntities() {
+  public List<DeletedEntity> getDeletedEntities() {
     return deletedEntities;
   }
 
   @Override
-  public List<ODataDeltaLink> getAddedLinks() {
+  public List<DeltaLink> getAddedLinks() {
     return addedLinks;
   }
 
   @Override
-  public List<ODataDeltaLink> getDeletedLinks() {
+  public List<DeltaLink> getDeletedLinks() {
     return deletedLinks;
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/4a07d59b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java
index ed9ad15..9e2cadc 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/domain/v4/ODataDeltaLinkImpl.java
@@ -19,7 +19,10 @@
 package org.apache.olingo.commons.core.domain.v4;
 
 import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
 import org.apache.olingo.commons.api.domain.ODataItem;
+import org.apache.olingo.commons.api.domain.v4.ODataAnnotation;
 import org.apache.olingo.commons.api.domain.v4.ODataDeltaLink;
 
 public class ODataDeltaLinkImpl extends ODataItem implements ODataDeltaLink {
@@ -32,6 +35,8 @@ public class ODataDeltaLinkImpl extends ODataItem implements ODataDeltaLink {
 
   private URI target;
 
+  private final List<ODataAnnotation> annotations = new ArrayList<ODataAnnotation>();
+
   public ODataDeltaLinkImpl() {
     super(null);
   }
@@ -66,4 +71,9 @@ public class ODataDeltaLinkImpl extends ODataItem implements ODataDeltaLink {
     this.target = target;
   }
 
+  @Override
+  public List<ODataAnnotation> getAnnotations() {
+    return annotations;
+  }
+
 }