olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [45/51] [abbrv] [partial] Removing /ODataJClient: merge complete
Date Thu, 22 May 2014 11:43:53 GMT
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataStreamUpdateResponse.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataStreamUpdateResponse.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataStreamUpdateResponse.java
deleted file mode 100644
index 4ee5581..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataStreamUpdateResponse.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 com.msopentech.odatajclient.engine.communication.response;
-
-import java.io.InputStream;
-
-/**
- * This class implements the response to an Odata stream create/update request.
- *
- * @see com.msopentech.odatajclient.engine.communication.request.streamed.ODataStreamUpdateRequest
- */
-public interface ODataStreamUpdateResponse extends ODataResponse {
-
-    /**
-     * Gets created/updated object.
-     *
-     * @return created/updated object.
-     */
-    InputStream getBody();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataValueUpdateResponse.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataValueUpdateResponse.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataValueUpdateResponse.java
deleted file mode 100644
index b4e4a2c..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/communication/response/ODataValueUpdateResponse.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 com.msopentech.odatajclient.engine.communication.response;
-
-import com.msopentech.odatajclient.engine.data.ODataValue;
-
-/**
- * This class implements the response to an OData update entity property request.
- *
- * @see com.msopentech.odatajclient.engine.communication.request.cud.ODataPropertyUpdateRequest
- */
-public interface ODataValueUpdateResponse extends ODataResponse {
-
-    /**
-     * Gets updated object.
-     *
-     * @return updated object.
-     */
-    ODataValue getBody();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/AbstractODataObjectFactory.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/AbstractODataObjectFactory.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/AbstractODataObjectFactory.java
deleted file mode 100644
index 3427781..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/AbstractODataObjectFactory.java
+++ /dev/null
@@ -1,276 +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 com.msopentech.odatajclient.engine.data;
-
-import com.msopentech.odatajclient.engine.client.ODataClient;
-import java.net.URI;
-
-public abstract class AbstractODataObjectFactory implements ODataObjectFactory {
-
-    private static final long serialVersionUID = -3769695665946919447L;
-
-    protected final ODataClient client;
-
-    public AbstractODataObjectFactory(final ODataClient client) {
-        this.client = client;
-    }
-
-    /**
-     * Instantiates a new entity set.
-     *
-     * @return entity set.
-     */
-    @Override
-    public ODataEntitySet newEntitySet() {
-        return new ODataEntitySet();
-    }
-
-    /**
-     * Instantiates a new entity set.
-     *
-     * @param next next link.
-     * @return entity set.
-     */
-    @Override
-    public ODataEntitySet newEntitySet(final URI next) {
-        return new ODataEntitySet(next);
-    }
-
-    /**
-     * Instantiates a new entity.
-     *
-     * @param name OData entity name.
-     * @return entity.
-     */
-    @Override
-    public ODataEntity newEntity(final String name) {
-        return new ODataEntity(name);
-    }
-
-    /**
-     * Instantiates a new entity.
-     *
-     * @param name OData entity name.
-     * @param link self link.
-     * @return entity.
-     */
-    @Override
-    public ODataEntity newEntity(final String name, final URI link) {
-        final ODataEntity result = new ODataEntity(name);
-        result.setLink(link);
-        return result;
-    }
-
-    /**
-     * Instantiates a new in-line entity set.
-     *
-     * @param name name.
-     * @param link edit link.
-     * @param entitySet entity set.
-     * @return in-line entity set.
-     */
-    @Override
-    public ODataInlineEntitySet newInlineEntitySet(final String name, final URI link,
-            final ODataEntitySet entitySet) {
-
-        return new ODataInlineEntitySet(client, link, ODataLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
-    }
-
-    /**
-     * Instantiates a new in-line entity set.
-     *
-     * @param name name.
-     * @param baseURI base URI.
-     * @param href href.
-     * @param entitySet entity set.
-     * @return in-line entity set.
-     */
-    @Override
-    public ODataInlineEntitySet newInlineEntitySet(final String name, final URI baseURI, final String href,
-            final ODataEntitySet entitySet) {
-
-        return new ODataInlineEntitySet(client, baseURI, href, ODataLinkType.ENTITY_SET_NAVIGATION, name, entitySet);
-    }
-
-    /**
-     * Instantiates a new in-line entity.
-     *
-     * @param name name.
-     * @param link edit link.
-     * @param entity entity.
-     * @return in-line entity.
-     */
-    @Override
-    public ODataInlineEntity newInlineEntity(final String name, final URI link, final ODataEntity entity) {
-        return new ODataInlineEntity(client, link, ODataLinkType.ENTITY_NAVIGATION, name, entity);
-    }
-
-    /**
-     * Instantiates a new in-line entity.
-     *
-     * @param name name.
-     * @param baseURI base URI.
-     * @param href href.
-     * @param entity entity.
-     * @return in-line entity.
-     */
-    @Override
-    public ODataInlineEntity newInlineEntity(final String name, final URI baseURI, final String href,
-            final ODataEntity entity) {
-
-        return new ODataInlineEntity(client, baseURI, href, ODataLinkType.ENTITY_NAVIGATION, name, entity);
-    }
-
-    /**
-     * Instantiates a new entity navigation link.
-     *
-     * @param name name.
-     * @param link link.
-     * @return entity navigation link.
-     */
-    @Override
-    public ODataLink newEntityNavigationLink(final String name, final URI link) {
-        return new ODataLink(client, link, ODataLinkType.ENTITY_NAVIGATION, name);
-    }
-
-    /**
-     * Instantiates a new entity navigation link.
-     *
-     * @param name name.
-     * @param baseURI base URI.
-     * @param href href.
-     * @return entity navigation link.
-     */
-    @Override
-    public ODataLink newEntityNavigationLink(final String name, final URI baseURI, final String href) {
-        return new ODataLink(client, baseURI, href, ODataLinkType.ENTITY_NAVIGATION, name);
-    }
-
-    /**
-     * Instantiates a new entity set navigation link.
-     *
-     * @param name name.
-     * @param link link.
-     * @return entity set navigation link.
-     */
-    @Override
-    public ODataLink newFeedNavigationLink(final String name, final URI link) {
-        return new ODataLink(client, link, ODataLinkType.ENTITY_SET_NAVIGATION, name);
-    }
-
-    /**
-     * Instantiates a new entity set navigation link.
-     *
-     * @param name name.
-     * @param baseURI base URI.
-     * @param href href.
-     * @return entity set navigation link.
-     */
-    @Override
-    public ODataLink newFeedNavigationLink(final String name, final URI baseURI, final String href) {
-        return new ODataLink(client, baseURI, href, ODataLinkType.ENTITY_SET_NAVIGATION, name);
-    }
-
-    /**
-     * Instantiates a new association link.
-     *
-     * @param name name.
-     * @param link link.
-     * @return association link.
-     */
-    @Override
-    public ODataLink newAssociationLink(final String name, final URI link) {
-        return new ODataLink(client, link, ODataLinkType.ASSOCIATION, name);
-    }
-
-    /**
-     * Instantiates a new association link.
-     *
-     * @param name name.
-     * @param baseURI base URI.
-     * @param href href.
-     * @return association link.
-     */
-    @Override
-    public ODataLink newAssociationLink(final String name, final URI baseURI, final String href) {
-        return new ODataLink(client, baseURI, href, ODataLinkType.ASSOCIATION, name);
-    }
-
-    /**
-     * Instantiates a new media-edit link.
-     *
-     * @param name name.
-     * @param link link.
-     * @return media-edit link.
-     */
-    @Override
-    public ODataLink newMediaEditLink(final String name, final URI link) {
-        return new ODataLink(client, link, ODataLinkType.MEDIA_EDIT, name);
-    }
-
-    /**
-     * Instantiates a new media-edit link.
-     *
-     * @param name name.
-     * @param baseURI base URI.
-     * @param href href.
-     * @return media-edit link.
-     */
-    @Override
-    public ODataLink newMediaEditLink(final String name, final URI baseURI, final String href) {
-        return new ODataLink(client, baseURI, href, ODataLinkType.MEDIA_EDIT, name);
-    }
-
-    /**
-     * Instantiates a new primitive property.
-     *
-     * @param name name.
-     * @param value value.
-     * @return primitive property.
-     */
-    @Override
-    public ODataProperty newPrimitiveProperty(final String name, final ODataPrimitiveValue value) {
-        return new ODataProperty(name, value);
-    }
-
-    /**
-     * Instantiates a new complex property.
-     *
-     * @param name name.
-     * @param value value.
-     * @return complex property.
-     */
-    @Override
-    public ODataProperty newComplexProperty(final String name, final ODataComplexValue value) {
-        return new ODataProperty(name, value);
-    }
-
-    /**
-     * Instantiates a new collection property.
-     *
-     * @param name name.
-     * @param value value.
-     * @return collection property.
-     */
-    @Override
-    public ODataProperty newCollectionProperty(final String name, final ODataCollectionValue value) {
-        return new ODataProperty(name, value);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Entry.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Entry.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Entry.java
deleted file mode 100644
index df352fa..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Entry.java
+++ /dev/null
@@ -1,247 +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 com.msopentech.odatajclient.engine.data;
-
-import java.net.URI;
-import java.util.List;
-import org.w3c.dom.Element;
-
-/**
- * REST resource for an <tt>ODataEntity</tt>.
- *
- * @see ODataEntity
- */
-public interface Entry {
-
-    /**
-     * Gets ETag.
-     *
-     * @return ETag.
-     */
-    String getETag();
-
-    /**
-     * Sets ETag.
-     *
-     * @param eTag ETag.
-     */
-    void setETag(String eTag);
-
-    /**
-     * Gets base URI.
-     *
-     * @return base URI.
-     */
-    URI getBaseURI();
-
-    /**
-     * Gets entry type.
-     *
-     * @return entry type.
-     */
-    String getType();
-
-    /**
-     * Sets entry type.
-     *
-     * @param type entry type.
-     */
-    void setType(String type);
-
-    /**
-     * Gest entry ID.
-     *
-     * @return entry ID.
-     */
-    String getId();
-
-    /**
-     * Sets entry ID.
-     *
-     * @param id entry ID.
-     */
-    void setId(String id);
-
-    /**
-     * Gets entry self link.
-     *
-     * @return self link.
-     */
-    Link getSelfLink();
-
-    /**
-     * Sets entry self link.
-     *
-     * @param selfLink self link.
-     */
-    void setSelfLink(Link selfLink);
-
-    /**
-     * Gets entry edit link.
-     *
-     * @return edit link.
-     */
-    Link getEditLink();
-
-    /**
-     * Sets entry edit link.
-     *
-     * @param editLink edit link.
-     */
-    void setEditLink(Link editLink);
-
-    /**
-     * Gets association links.
-     *
-     * @return association links.
-     */
-    List<? extends Link> getAssociationLinks();
-
-    /**
-     * Adds an association link.
-     *
-     * @param associationLink link.
-     * @return 'TRUE' in case of success; false otherwise.
-     */
-    boolean addAssociationLink(Link associationLink);
-
-    /**
-     * Sets association links.
-     *
-     * @param associationLinks links.
-     * @return 'TRUE' in case of success; false otherwise.
-     */
-    void setAssociationLinks(List<Link> associationLinks);
-
-    /**
-     * Gets navigation links.
-     *
-     * @return links.
-     */
-    List<? extends Link> getNavigationLinks();
-
-    /**
-     * Adds a navigation link.
-     *
-     * @param navigationLink link.
-     * @return 'TRUE' in case of success; false otherwise.
-     */
-    boolean addNavigationLink(Link navigationLink);
-
-    /**
-     * Sets navigation links.
-     *
-     * @param navigationLink links.
-     * @return 'TRUE' in case of success; false otherwise.
-     */
-    void setNavigationLinks(List<Link> navigationLinks);
-
-    /**
-     * Gets media entity links.
-     *
-     * @return links.
-     */
-    List<? extends Link> getMediaEditLinks();
-
-    /**
-     * Adds a media entity link.
-     *
-     * @param mediaEditLink link.
-     * @return 'TRUE' in case of success; false otherwise.
-     */
-    boolean addMediaEditLink(Link mediaEditLink);
-
-    /**
-     * Sets media entity links.
-     *
-     * @param mediaEditLinks links.
-     * @return 'TRUE' in case of success; false otherwise.
-     */
-    void setMediaEditLinks(List<Link> mediaEditLinks);
-
-    /**
-     * Gets operations.
-     *
-     * @return operations.
-     */
-    List<ODataOperation> getOperations();
-
-    /**
-     * Gets content.
-     *
-     * @return content.
-     */
-    Element getContent();
-
-    /**
-     * Sets content.
-     *
-     * @param content content.
-     */
-    void setContent(Element content);
-
-    /**
-     * Gets media entry properties.
-     *
-     * @return media entry properties.
-     */
-    Element getMediaEntryProperties();
-
-    /**
-     * Sets media entry properties.
-     *
-     * @param content media entry properties.
-     */
-    void setMediaEntryProperties(Element content);
-
-    /**
-     * Gets media content type.
-     *
-     * @return media content type.
-     */
-    String getMediaContentType();
-
-    /**
-     * Gets media content resource.
-     *
-     * @return media content resource.
-     */
-    String getMediaContentSource();
-
-    /**
-     * Set media content source.
-     *
-     * @param mediaContentSource media content source.
-     */
-    void setMediaContentSource(String mediaContentSource);
-
-    /**
-     * Set media content type.
-     *
-     * @param mediaContentType media content type.
-     */
-    void setMediaContentType(String mediaContentType);
-
-    /**
-     * Checks if the current entry is a media entry.
-     *
-     * @return 'TRUE' if is a media entry; 'FALSE' otherwise.
-     */
-    boolean isMediaEntry();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Feed.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Feed.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Feed.java
deleted file mode 100644
index 6138826..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Feed.java
+++ /dev/null
@@ -1,72 +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 com.msopentech.odatajclient.engine.data;
-
-import java.net.URI;
-import java.util.List;
-
-/**
- * REST resource for an <tt>ODataEntitySet</tt>.
- *
- * @see ODataEntitySet
- */
-public interface Feed {
-
-    /**
-     * Gets base URI.
-     *
-     * @return base URI.
-     */
-    URI getBaseURI();
-
-    /**
-     * Gets number of entries if an <tt>inlinecount</tt> was required.
-     *
-     * @return number of entries into the feed.
-     */
-    Integer getCount();
-
-    /**
-     * Gets entries.
-     *
-     * @return entries.
-     */
-    List<? extends Entry> getEntries();
-
-    /**
-     * Sets entries.
-     *
-     * @param entries entries.
-     */
-    void setEntries(List<Entry> entries);
-
-    /**
-     * Sets next link.
-     *
-     * @param next next link.
-     */
-    void setNext(URI next);
-
-    /**
-     * Gets next link if exists.
-     *
-     * @return next link if exists; null otherwise.
-     */
-    URI getNext();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Link.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Link.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Link.java
deleted file mode 100644
index 71c3caf..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/Link.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 com.msopentech.odatajclient.engine.data;
-
-/**
- * REST resource for an <tt>ODataLink</tt>.
- *
- * @see ODataLink
- */
-public interface Link {
-
-    /**
-     * Gets rel info.
-     *
-     * @return rel info.
-     */
-    String getRel();
-
-    /**
-     * Sets rel info.
-     *
-     * @param rel rel info.
-     */
-    void setRel(String rel);
-
-    /**
-     * Gets type.
-     *
-     * @return type.
-     */
-    String getType();
-
-    /**
-     * Sets type.
-     *
-     * @param type type.
-     */
-    void setType(String type);
-
-    /**
-     * Gets title.
-     *
-     * @return title.
-     */
-    String getTitle();
-
-    /**
-     * Sets title.
-     *
-     * @param title title.
-     */
-    void setTitle(String title);
-
-    /**
-     * Gets href.
-     *
-     * @return href.
-     */
-    String getHref();
-
-    /**
-     * Sets href.
-     *
-     * @param href href.
-     */
-    void setHref(String href);
-
-    /**
-     * Gets in-line entry.
-     *
-     * @return in-line entry.
-     */
-    Entry getInlineEntry();
-
-    /**
-     * Sets in-line entry.
-     *
-     * @param entry entry.
-     */
-    void setInlineEntry(Entry entry);
-
-    /**
-     * Gets in-line feed.
-     *
-     * @return in-line feed.
-     */
-    Feed getInlineFeed();
-
-    /**
-     * Sets in-line feed.
-     *
-     * @param feed feed.
-     */
-    void setInlineFeed(Feed feed);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/LinkCollection.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/LinkCollection.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/LinkCollection.java
deleted file mode 100644
index a099e1b..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/LinkCollection.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.msopentech.odatajclient.engine.data;
-
-import java.net.URI;
-import java.util.List;
-
-/**
- * REST resource for an <tt>ODataLinkCollection</tt>.
- *
- * @see ODataLinkCollection
- */
-public interface LinkCollection {
-
-    /**
-     * Smart management of different JSON format produced by OData services when
-     * <tt>$links</tt> is a single or a collection property.
-     *
-     * @return list of URIs for <tt>$links</tt>
-     */
-    List<URI> getLinks();
-
-    /**
-     * Sets next link.
-     *
-     * @param next next link.
-     */
-    void setNext(final URI next);
-
-    /**
-     * Gets next link if exists.
-     *
-     * @return next link if exists; null otherwise.
-     */
-    URI getNext();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/NoValidEntityFound.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/NoValidEntityFound.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/NoValidEntityFound.java
deleted file mode 100644
index fc27962..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/NoValidEntityFound.java
+++ /dev/null
@@ -1,55 +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 com.msopentech.odatajclient.engine.data;
-
-/**
- * Exception indicating that no valid object has been found.
- */
-public class NoValidEntityFound extends Exception {
-
-    private static final long serialVersionUID = -3078954221364213688L;
-
-    /**
-     * Creates a new instance of
-     * <code>NoSuchEntityFound</code> without detail message.
-     */
-    public NoValidEntityFound() {
-        super();
-    }
-
-    /**
-     * Constructs an instance of
-     * <code>NoSuchEntityFound</code> with the specified detail message.
-     *
-     * @param msg the detail message.
-     */
-    public NoValidEntityFound(String msg) {
-        super(msg);
-    }
-
-    /**
-     * Constructs an instance of
-     * <code>NoSuchEntityFound</code> with the specified cause.
-     *
-     * @param t cause.
-     */
-    public NoValidEntityFound(final Throwable t) {
-        this.initCause(t);
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataBinder.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataBinder.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataBinder.java
deleted file mode 100644
index 828f06e..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataBinder.java
+++ /dev/null
@@ -1,128 +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 com.msopentech.odatajclient.engine.data;
-
-import java.io.Serializable;
-import java.net.URI;
-import org.w3c.dom.Element;
-
-public interface ODataBinder extends Serializable {
-
-    /**
-     * Gets <tt>ODataServiceDocument</tt> from the given service document resource.
-     *
-     * @param resource service document resource.
-     * @return <tt>ODataServiceDocument</tt> object.
-     */
-    ODataServiceDocument getODataServiceDocument(ServiceDocument resource);
-
-    /**
-     * Gets a <tt>FeedResource</tt> from the given OData entity set.
-     *
-     * @param <T> feed resource type.
-     * @param feed OData entity set.
-     * @param reference reference class.
-     * @return <tt>FeedResource</tt> object.
-     */
-    <T extends Feed> T getFeed(ODataEntitySet feed, Class<T> reference);
-
-    /**
-     * Gets an <tt>EntryResource</tt> from the given OData entity.
-     *
-     * @param <T> entry resource type.
-     * @param entity OData entity.
-     * @param reference reference class.
-     * @return <tt>EntryResource</tt> object.
-     */
-    <T extends Entry> T getEntry(ODataEntity entity, Class<T> reference);
-
-    /**
-     * Gets an <tt>EntryResource</tt> from the given OData entity.
-     *
-     * @param <T> entry resource type.
-     * @param entity OData entity.
-     * @param reference reference class.
-     * @param setType whether to explicitly output type information.
-     * @return <tt>EntryResource</tt> object.
-     */
-    <T extends Entry> T getEntry(ODataEntity entity, Class<T> reference, boolean setType);
-
-    /**
-     * Gets the given OData property as DOM element.
-     *
-     * @param prop OData property.
-     * @return <tt>Element</tt> object.
-     */
-    Element toDOMElement(ODataProperty prop);
-
-    ODataLinkCollection getLinkCollection(LinkCollection linkCollection);
-
-    /**
-     * Gets <tt>ODataEntitySet</tt> from the given feed resource.
-     *
-     * @param resource feed resource.
-     * @return <tt>ODataEntitySet</tt> object.
-     */
-    ODataEntitySet getODataEntitySet(Feed resource);
-
-    /**
-     * Gets <tt>ODataEntitySet</tt> from the given feed resource.
-     *
-     * @param resource feed resource.
-     * @param defaultBaseURI default base URI.
-     * @return <tt>ODataEntitySet</tt> object.
-     */
-    ODataEntitySet getODataEntitySet(Feed resource, URI defaultBaseURI);
-
-    /**
-     * Gets <tt>ODataEntity</tt> from the given entry resource.
-     *
-     * @param resource entry resource.
-     * @return <tt>ODataEntity</tt> object.
-     */
-    ODataEntity getODataEntity(Entry resource);
-
-    /**
-     * Gets <tt>ODataEntity</tt> from the given entry resource.
-     *
-     * @param resource entry resource.
-     * @param defaultBaseURI default base URI.
-     * @return <tt>ODataEntity</tt> object.
-     */
-    ODataEntity getODataEntity(Entry resource, URI defaultBaseURI);
-
-    /**
-     * Gets a <tt>LinkResource</tt> from the given OData link.
-     *
-     * @param <T> link resource type.
-     * @param link OData link.
-     * @param reference reference class.
-     * @return <tt>LinkResource</tt> object.
-     */
-    @SuppressWarnings("unchecked")
-    <T extends Link> T getLinkResource(ODataLink link, Class<T> reference);
-
-    /**
-     * Gets an <tt>ODataProperty</tt> from the given DOM element.
-     *
-     * @param property content.
-     * @return <tt>ODataProperty</tt> object.
-     */
-    ODataProperty getProperty(Element property);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataCollectionValue.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataCollectionValue.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataCollectionValue.java
deleted file mode 100644
index 91f70bb..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataCollectionValue.java
+++ /dev/null
@@ -1,98 +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 com.msopentech.odatajclient.engine.data;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * OData collection property value.
- */
-public class ODataCollectionValue extends ODataValue implements Iterable<ODataValue> {
-
-    private static final long serialVersionUID = -3665659846001987187L;
-
-    /**
-     * Type name;
-     */
-    private final String typeName;
-
-    /**
-     * Values.
-     */
-    private final List<ODataValue> values = new ArrayList<ODataValue>();
-
-    /**
-     * Constructor.
-     *
-     * @param typeName type name.
-     */
-    public ODataCollectionValue(final String typeName) {
-        this.typeName = typeName;
-    }
-
-    /**
-     * Adds a value to the collection.
-     *
-     * @param value value to be added.
-     */
-    public void add(final ODataValue value) {
-        if (value.isPrimitive() || value.isComplex()) {
-            values.add(value);
-        }
-    }
-
-    /**
-     * Value iterator.
-     *
-     * @return value iterator.
-     */
-    @Override
-    public Iterator<ODataValue> iterator() {
-        return values.iterator();
-    }
-
-    /**
-     * Gets value type name.
-     *
-     * @return value type name.
-     */
-    public String getTypeName() {
-        return typeName;
-    }
-
-    /**
-     * Gets collection size.
-     *
-     * @return collection size.
-     */
-    public int size() {
-        return values.size();
-    }
-
-    /**
-     * Checks if collection is empty.
-     *
-     * @return 'TRUE' if empty; 'FALSE' otherwise.
-     */
-    public boolean isEmpty() {
-        return values.isEmpty();
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataComplexValue.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataComplexValue.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataComplexValue.java
deleted file mode 100644
index 0a8be52..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataComplexValue.java
+++ /dev/null
@@ -1,97 +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 com.msopentech.odatajclient.engine.data;
-
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * OData complex property value.
- */
-public class ODataComplexValue extends ODataValue implements Iterable<ODataProperty> {
-
-    private static final long serialVersionUID = -1878555027714020431L;
-
-    /**
-     * Type name.
-     */
-    private final String typeName;
-
-    /**
-     * Complex type fields.
-     */
-    private final Map<String, ODataProperty> fields = new LinkedHashMap<String, ODataProperty>();
-
-    /**
-     * Constructor.
-     *
-     * @param typeName type name.
-     */
-    public ODataComplexValue(final String typeName) {
-        this.typeName = typeName;
-    }
-
-    /**
-     * Adds field to the complex type.
-     *
-     * @param field field to be added.
-     */
-    public void add(final ODataProperty field) {
-        fields.put(field.getName(), field);
-    }
-
-    /**
-     * Gets field.
-     *
-     * @param name name of the field to be retrieved.
-     * @return requested field.
-     */
-    public ODataProperty get(final String name) {
-        return fields.get(name);
-    }
-
-    /**
-     * Complex property fields iterator.
-     *
-     * @return fields iterator.
-     */
-    @Override
-    public Iterator<ODataProperty> iterator() {
-        return fields.values().iterator();
-    }
-
-    /**
-     * Gest value type name.
-     *
-     * @return value type name.
-     */
-    public String getTypeName() {
-        return typeName;
-    }
-
-    /**
-     * Gets number of fields.
-     *
-     * @return number of fields.
-     */
-    public int size() {
-        return fields.size();
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDeserializer.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDeserializer.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDeserializer.java
deleted file mode 100644
index 04cb56f..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDeserializer.java
+++ /dev/null
@@ -1,97 +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 com.msopentech.odatajclient.engine.data;
-
-import com.msopentech.odatajclient.engine.metadata.edm.AbstractEdmx;
-import com.msopentech.odatajclient.engine.format.ODataFormat;
-import java.io.InputStream;
-import java.io.Serializable;
-import org.w3c.dom.Element;
-
-/**
- * Utility class for serialization.
- */
-public interface ODataDeserializer extends Serializable {
-
-    AbstractEdmx<?, ?, ?, ?, ?, ?> toMetadata(InputStream input);
-
-    /**
-     * Gets the ServiceDocumentResource object represented by the given InputStream.
-     *
-     * @param input stream to be de-serialized.
-     * @param format OData service document format.
-     * @return ServiceDocumentResource object.
-     */
-    ServiceDocument toServiceDocument(InputStream input, ODataFormat format);
-
-    /**
-     * Gets a feed object from the given InputStream.
-     *
-     * @param <T> reference class type
-     * @param input stream to be de-serialized.
-     * @param reference reference class (AtomFeed.class, JSONFeed.class).
-     * @return FeedResource instance.
-     */
-    <T extends Feed> T toFeed(InputStream input, Class<T> reference);
-
-    /**
-     * Gets an entry object from the given InputStream.
-     *
-     * @param <T> reference class type
-     * @param input stream to be de-serialized.
-     * @param reference reference class (AtomEntry.class, JSONV3Entry.class).
-     * @return EntryResource instance.
-     */
-    <T extends Entry> T toEntry(InputStream input, Class<T> reference);
-
-    /**
-     * Gets a DOM representation of the given InputStream.
-     *
-     * @param input stream to be de-serialized.
-     * @param format OData format.
-     * @return DOM.
-     */
-    Element toPropertyDOM(InputStream input, ODataFormat format);
-
-    /**
-     * Gets a list of links from the given InputStream.
-     *
-     * @param input stream to be de-serialized.
-     * @param format OData format.
-     * @return de-serialized links.
-     */
-    LinkCollection toLinkCollection(InputStream input, ODataFormat format);
-
-    /**
-     * Gets the ODataError object represented by the given InputStream.
-     *
-     * @param input stream to be parsed and de-serialized.
-     * @param isXML 'TRUE' if the error is represented by XML; 'FALSE' otherwise.
-     * @return
-     */
-    ODataError toODataError(InputStream input, boolean isXML);
-
-    /**
-     * Parses the given input into a DOM tree.
-     *
-     * @param input stream to be parsed and de-serialized.
-     * @return DOM tree
-     */
-    Element toDOM(InputStream input);
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDuration.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDuration.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDuration.java
deleted file mode 100644
index 2a6e2e4..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataDuration.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.msopentech.odatajclient.engine.data;
-
-import java.io.Serializable;
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.datatype.Duration;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-
-/**
- * Helper class for handling time (as duration) primitive values.
- *
- * @see com.msopentech.odatajclient.engine.data.metadata.edm.EdmSimpleType#TIME
- * @see Duration
- */
-public final class ODataDuration implements Serializable {
-
-    private static final long serialVersionUID = 778404231943967899L;
-
-    private final Duration duration;
-
-    public ODataDuration(final String input) {
-        try {
-            final DatatypeFactory dtFactory = DatatypeFactory.newInstance();
-            this.duration = dtFactory.newDuration(input);
-        } catch (DatatypeConfigurationException e) {
-            throw new IllegalArgumentException("Could not parse '" + input + "' as Duration", e);
-        }
-    }
-
-    public ODataDuration(final Duration duration) {
-        this.duration = duration;
-    }
-
-    public Duration getDuration() {
-        return duration;
-    }
-
-    /**
-     * {@inheritDoc }
-     */
-    @Override
-    public boolean equals(final Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
-    }
-
-    /**
-     * {@inheritDoc }
-     */
-    @Override
-    public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
-    }
-
-    /**
-     * {@inheritDoc }
-     */
-    @Override
-    public String toString() {
-        return this.duration.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntity.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntity.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntity.java
deleted file mode 100644
index 74c9289..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntity.java
+++ /dev/null
@@ -1,361 +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 com.msopentech.odatajclient.engine.data;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.commons.lang3.StringUtils;
-
-/**
- * OData entity.
- */
-public class ODataEntity extends ODataItem implements ODataInvokeResult {
-
-    private static final long serialVersionUID = 8360640095932811034L;
-
-    /**
-     * 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 String mediaContentSource;
-
-    /**
-     * Edit link.
-     */
-    protected URI editLink;
-
-    /**
-     * Navigation links (might contain in-line entities or feeds).
-     */
-    protected final List<ODataLink> navigationLinks = new ArrayList<ODataLink>();
-
-    /**
-     * Association links.
-     */
-    protected final List<ODataLink> associationLinks = new ArrayList<ODataLink>();
-
-    /**
-     * Media edit links.
-     */
-    protected final List<ODataLink> editMediaLinks = new ArrayList<ODataLink>();
-
-    /**
-     * Operations (legacy, functions, actions).
-     */
-    protected final List<ODataOperation> operations = new ArrayList<ODataOperation>();
-
-    /**
-     * Entity properties.
-     */
-    protected final List<ODataProperty> properties = new ArrayList<ODataProperty>();
-
-    /**
-     * Constructor.
-     *
-     * @param name OData entity name.
-     */
-    ODataEntity(final String name) {
-        super(name);
-    }
-
-    /**
-     * Gets ETag.
-     *
-     * @return ETag.
-     */
-    public String getETag() {
-        return eTag;
-    }
-
-    /**
-     * Sets ETag.
-     *
-     * @param eTag ETag.
-     */
-    public void setETag(final String eTag) {
-        this.eTag = eTag;
-    }
-
-    /**
-     * Adds an operation.
-     *
-     * @param operation to be added.
-     * @return whether operation was actually added or not.
-     */
-    public boolean addOperation(final ODataOperation operation) {
-        return this.operations.add(operation);
-    }
-
-    /**
-     * Sets operations.
-     *
-     * @param operations operations.
-     */
-    public void setOperations(final List<ODataOperation> operations) {
-        this.operations.clear();
-        if (operations != null && !operations.isEmpty()) {
-            this.operations.addAll(operations);
-        }
-    }
-
-    /**
-     * Searches for operation with given title.
-     *
-     * @param title operation to look for
-     * @return operation if found with given title, <tt>null</tt> otherwise
-     */
-    public ODataOperation getOperation(final String title) {
-        ODataOperation result = null;
-        for (ODataOperation operation : operations) {
-            if (title.equals(operation.getTitle())) {
-                result = operation;
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * Gets operations.
-     *
-     * @return operations.
-     */
-    public List<ODataOperation> getOperations() {
-        return this.operations;
-    }
-
-    /**
-     * Searches for property with given name.
-     *
-     * @param name property to look for
-     * @return property if found with given name, <tt>null</tt> otherwise
-     */
-    public ODataProperty getProperty(final String name) {
-        ODataProperty result = null;
-
-        if (StringUtils.isNotBlank(name)) {
-            for (ODataProperty property : properties) {
-                if (name.equals(property.getName())) {
-                    result = property;
-                }
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     * Returns OData entity properties.
-     *
-     * @return OData entity properties.
-     */
-    public List<ODataProperty> getProperties() {
-        return properties;
-    }
-
-    /**
-     * Adds new property.
-     *
-     * @param property property to be added.
-     */
-    public boolean addProperty(final ODataProperty property) {
-        return properties.contains(property) ? false : properties.add(property);
-    }
-
-    /**
-     * Removes given property.
-     *
-     * @param property property to be removed.
-     */
-    public boolean removeProperty(final ODataProperty property) {
-        return properties.remove(property);
-    }
-
-    /**
-     * 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
-     */
-    public boolean addLink(final ODataLink 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 = editMediaLinks.contains(link) ? false : editMediaLinks.add(link);
-                break;
-
-            default:
-        }
-
-        return result;
-    }
-
-    /**
-     * 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
-     */
-    public boolean removeLink(final ODataLink link) {
-        return associationLinks.remove(link) || navigationLinks.remove(link) || editMediaLinks.remove(link);
-    }
-
-    /**
-     * Returns all entity navigation links (including inline entities / feeds).
-     *
-     * @return OData entity links.
-     */
-    public List<ODataLink> getNavigationLinks() {
-        return navigationLinks;
-    }
-
-    /**
-     * Returns all entity association links.
-     *
-     * @return OData entity links.
-     */
-    public List<ODataLink> getAssociationLinks() {
-        return associationLinks;
-    }
-
-    /**
-     * Returns all entity media edit links.
-     *
-     * @return OData entity links.
-     */
-    public List<ODataLink> getEditMediaLinks() {
-        return editMediaLinks;
-    }
-
-    /**
-     * Returns OData entity edit link.
-     *
-     * @return entity edit link.
-     */
-    public URI getEditLink() {
-        return editLink;
-    }
-
-    /**
-     * Sets OData entity edit link.
-     *
-     * @param editLink edit link.
-     */
-    public void setEditLink(final URI editLink) {
-        this.editLink = editLink;
-    }
-
-    /**
-     * {@inheritDoc }
-     * <p>
-     * If null the edit link will be returned.
-     */
-    @Override
-    public URI getLink() {
-        return super.getLink() == null ? getEditLink() : super.getLink();
-    }
-
-    /**
-     * TRUE if read-only entity.
-     *
-     * @return TRUE if read-only; FALSE otherwise.
-     */
-    public boolean isReadOnly() {
-        return super.getLink() != null;
-    }
-
-    /**
-     * Checks if the current entity is a media entity.
-     *
-     * @return 'TRUE' if media entity; 'FALSE' otherwise.
-     */
-    public boolean isMediaEntity() {
-        return mediaEntity;
-    }
-
-    /**
-     * Sets media entity flag.
-     *
-     * @param isMediaEntity media entity flag value.
-     */
-    public void setMediaEntity(final boolean isMediaEntity) {
-        this.mediaEntity = isMediaEntity;
-    }
-
-    /**
-     * Gets media content type.
-     *
-     * @return media content type.
-     */
-    public String getMediaContentType() {
-        return mediaContentType;
-    }
-
-    /**
-     * Sets media content type.
-     *
-     * @param mediaContentType media content type.
-     */
-    public void setMediaContentType(final String mediaContentType) {
-        this.mediaContentType = mediaContentType;
-    }
-
-    /**
-     * Gets media content source.
-     *
-     * @return media content source.
-     */
-    public String getMediaContentSource() {
-        return mediaContentSource;
-    }
-
-    /**
-     * Sets media content source.
-     *
-     * @param mediaContentSource media content source.
-     */
-    public void setMediaContentSource(final String mediaContentSource) {
-        this.mediaContentSource = mediaContentSource;
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySet.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySet.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySet.java
deleted file mode 100644
index d8c2cbb..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySet.java
+++ /dev/null
@@ -1,121 +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 com.msopentech.odatajclient.engine.data;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * OData entity collection.
- * If pagination was used to get this instance, forward page navigation URI will be available.
- */
-public class ODataEntitySet extends ODataItem implements ODataInvokeResult {
-
-    private static final long serialVersionUID = 9039605899821494024L;
-
-    /**
-     * Link to the next page.
-     */
-    protected URI next;
-
-    /**
-     * Number of ODataEntities contained in this feed.
-     * If <tt>$inlinecount</tt> was requested, this value comes from there.
-     */
-    protected Integer count;
-
-    /**
-     * OData entities contained in this feed.
-     */
-    protected List<ODataEntity> entities = new ArrayList<ODataEntity>();
-
-    /**
-     * Constructor.
-     */
-    ODataEntitySet() {
-        super(null);
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param next next link.
-     */
-    ODataEntitySet(final URI next) {
-        super(null);
-        this.next = next;
-    }
-
-    /**
-     * Gets next page link.
-     *
-     * @return next page link; null value if single page or last page reached.
-     */
-    public URI getNext() {
-        return next;
-    }
-
-    /**
-     * Sets in-line count.
-     *
-     * @param count in-line count value.
-     */
-    public void setCount(final int count) {
-        this.count = count;
-    }
-
-    /**
-     * Gets in-line count.
-     *
-     * @return in-line count value.
-     */
-    public int getCount() {
-        return count == null ? entities.size() : count;
-    }
-
-    /**
-     * Adds entity to the current feed.
-     *
-     * @param entity entity to be added.
-     * @return 'FALSE' if already exists; 'TRUE' otherwise.
-     */
-    public boolean addEntity(final ODataEntity entity) {
-        return entities.contains(entity) ? false : entities.add(entity);
-    }
-
-    /**
-     * Removes an entity.
-     *
-     * @param entity entity to be removed.
-     * @return 'TRUE' in case of success; 'FALSE' otherwise.
-     */
-    public boolean removeEntity(final ODataEntity entity) {
-        return entities.remove(entity);
-    }
-
-    /**
-     * Gets contained entities.
-     *
-     * @return feed entries.
-     */
-    public List<ODataEntity> getEntities() {
-        return entities;
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySetIterator.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySetIterator.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySetIterator.java
deleted file mode 100644
index 1aa05eb..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataEntitySetIterator.java
+++ /dev/null
@@ -1,319 +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 com.msopentech.odatajclient.engine.data;
-
-import com.msopentech.odatajclient.engine.client.ODataClient;
-import com.msopentech.odatajclient.engine.data.impl.v3.AtomEntry;
-import com.msopentech.odatajclient.engine.data.impl.v3.JSONEntry;
-import com.msopentech.odatajclient.engine.format.ODataPubFormat;
-import com.msopentech.odatajclient.engine.utils.ODataConstants;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URI;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * OData entity set iterator class.
- */
-public class ODataEntitySetIterator implements Iterator<ODataEntity> {
-
-    /**
-     * Logger.
-     */
-    private static final Logger LOG = LoggerFactory.getLogger(ODataEntitySetIterator.class);
-
-    private static final long serialVersionUID = 9039605899821494025L;
-
-    private final ODataClient odataClient;
-
-    private final InputStream stream;
-
-    private final ODataPubFormat format;
-
-    private Entry cached;
-
-    private ODataEntitySet entitySet;
-
-    private final ByteArrayOutputStream osFeed;
-
-    private final String namespaces;
-
-    private boolean available = true;
-
-    /**
-     * Constructor.
-     *
-     * @param odataClient client instance getting this request
-     * @param stream source stream.
-     * @param format OData format.
-     */
-    public ODataEntitySetIterator(final ODataClient odataClient,
-            final InputStream stream, final ODataPubFormat format) {
-
-        this.odataClient = odataClient;
-        this.stream = stream;
-        this.format = format;
-        this.osFeed = new ByteArrayOutputStream();
-
-        if (format == ODataPubFormat.ATOM) {
-            namespaces = getAllElementAttributes(stream, "feed", osFeed);
-        } else {
-            namespaces = null;
-            try {
-                if (consume(stream, "\"value\":", osFeed, true) >= 0) {
-                    int c = 0;
-                    while (c != '[' && (c = stream.read()) >= 0) {
-                        osFeed.write(c);
-                    }
-                }
-            } catch (IOException e) {
-                LOG.error("Error parsing feed", e);
-                throw new IllegalStateException(e);
-            }
-        }
-    }
-
-    /**
-     * {@inheritDoc }
-     */
-    @Override
-    public boolean hasNext() {
-        if (available && cached == null) {
-            if (format == ODataPubFormat.ATOM) {
-                cached = nextAtomEntryFromFeed(stream, osFeed, namespaces);
-            } else {
-                cached = nextJsonEntryFromFeed(stream, osFeed);
-            }
-
-            if (cached == null) {
-                available = false;
-                entitySet = odataClient.getReader().
-                        readEntitySet(new ByteArrayInputStream(osFeed.toByteArray()), format);
-                close();
-            }
-        }
-
-        return available;
-    }
-
-    /**
-     * {@inheritDoc }
-     */
-    @Override
-    public ODataEntity next() {
-        if (hasNext()) {
-            final ODataEntity res = odataClient.getBinder().getODataEntity(cached);
-            cached = null;
-            return res;
-        }
-
-        throw new NoSuchElementException("No entity found");
-    }
-
-    /**
-     * Unsupported operation.
-     */
-    @Override
-    public void remove() {
-        throw new UnsupportedOperationException("Operation not supported");
-    }
-
-    /**
-     * Closes the current iterator.
-     */
-    public void close() {
-        IOUtils.closeQuietly(stream);
-        IOUtils.closeQuietly(osFeed);
-    }
-
-    /**
-     * Gets the next link if exists.
-     *
-     * @return next link if exists; null otherwise.
-     */
-    public URI getNext() {
-        if (entitySet == null) {
-            throw new IllegalStateException("Iteration must be completed in order to retrieve the link for next page");
-        }
-        return entitySet.getNext();
-    }
-
-    /**
-     * Finalize object closing all managed resources.
-     *
-     * @throws Throwable
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        close();
-        super.finalize();
-    }
-
-    private JSONEntry nextJsonEntryFromFeed(final InputStream input, final OutputStream osFeed) {
-        final ByteArrayOutputStream entry = new ByteArrayOutputStream();
-
-        JSONEntry entity = null;
-        try {
-            int c = 0;
-
-            boolean foundNewOne = false;
-
-            do {
-                c = input.read();
-                if (c == '{') {
-                    entry.write(c);
-                    c = -1;
-                    foundNewOne = true;
-                }
-                if (c == ']') {
-                    osFeed.write(c);
-                    c = -1;
-                }
-            } while (c >= 0);
-
-            if (foundNewOne) {
-                int count = 1;
-                c = 0;
-
-                while (count > 0 && c >= 0) {
-                    c = input.read();
-                    if (c == '{') {
-                        count++;
-                    } else if (c == '}') {
-                        count--;
-                    }
-                    entry.write(c);
-                }
-
-                if (c >= 0) {
-                    entity = odataClient.getDeserializer().toEntry(
-                            new ByteArrayInputStream(entry.toByteArray()), JSONEntry.class);
-                }
-            } else {
-                while ((c = input.read()) >= 0) {
-                    osFeed.write(c);
-                }
-            }
-        } catch (Exception e) {
-            LOG.error("Error retrieving entities from EntitySet", e);
-        }
-
-        return entity;
-    }
-
-    /**
-     * De-Serializes a stream into an OData entity set.
-     *
-     * @param input stream to de-serialize.
-     * @param format de-serialize as AtomFeed or JSONFeed
-     * @return de-serialized entity set.
-     */
-    private AtomEntry nextAtomEntryFromFeed(final InputStream input, final OutputStream osFeed, final String namespaces) {
-        final ByteArrayOutputStream entry = new ByteArrayOutputStream();
-
-        AtomEntry entity = null;
-
-        try {
-            if (consume(input, "<entry>", osFeed, false) >= 0) {
-                entry.write("<entry ".getBytes(ODataConstants.UTF8));
-                entry.write(namespaces.getBytes(ODataConstants.UTF8));
-                entry.write(">".getBytes(ODataConstants.UTF8));
-
-                if (consume(input, "</entry>", entry, true) >= 0) {
-                    entity = odataClient.getDeserializer().
-                            toEntry(new ByteArrayInputStream(entry.toByteArray()), AtomEntry.class);
-                }
-            }
-        } catch (Exception e) {
-            LOG.error("Error retrieving entities from EntitySet", e);
-        }
-
-        return entity;
-    }
-
-    private String getAllElementAttributes(final InputStream input, final String name, final OutputStream os) {
-        final ByteArrayOutputStream attrs = new ByteArrayOutputStream();
-
-        String res;
-
-        try {
-            byte[] attrsDeclaration = null;
-
-            final String key = "<" + name + " ";
-            if (consume(input, key, os, true) >= 0 && consume(input, ">", attrs, false) >= 0) {
-                attrsDeclaration = attrs.toByteArray();
-                os.write(attrsDeclaration);
-                os.write('>');
-            }
-
-            res = attrsDeclaration == null
-                    ? StringUtils.EMPTY
-                    : new String(attrsDeclaration, ODataConstants.UTF8).trim();
-        } catch (Exception e) {
-            LOG.error("Error retrieving entities from EntitySet", e);
-            res = StringUtils.EMPTY;
-        }
-
-        return res.endsWith("/") ? res.substring(0, res.length() - 1) : res;
-    }
-
-    private int consume(
-            final InputStream input, final String end, final OutputStream os, final boolean includeEndKey)
-            throws IOException {
-
-        final char[] endKey = end.toCharArray();
-        final char[] endLowerKey = end.toLowerCase().toCharArray();
-        final char[] endUpperKey = end.toUpperCase().toCharArray();
-
-        int pos = 0;
-        int c = 0;
-        while (pos < endKey.length && (c = input.read()) >= 0) {
-            if (c == endLowerKey[pos] || c == endUpperKey[pos]) {
-                pos++;
-                if (includeEndKey && os != null) {
-                    os.write(c);
-                }
-            } else if (pos > 0) {
-                if (!includeEndKey && os != null) {
-                    for (int i = 0; i < pos; i++) {
-                        os.write(endKey[i]);
-                    }
-                }
-                if (os != null) {
-                    os.write(c);
-                }
-                pos = 0;
-            } else {
-                if (os != null) {
-                    os.write(c);
-                }
-            }
-        }
-
-        return c;
-    }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/19f3792f/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataError.java
----------------------------------------------------------------------
diff --git a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataError.java b/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataError.java
deleted file mode 100644
index ad53ff7..0000000
--- a/ODataJClient/engine/src/main/java/com/msopentech/odatajclient/engine/data/ODataError.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.msopentech.odatajclient.engine.data;
-
-/**
- * OData error.
- */
-public interface ODataError {
-
-    /**
-     * Gets error code.
-     *
-     * @return error code.
-     */
-    String getCode();
-
-    /**
-     * Gets error message language.
-     *
-     * @return error message language.
-     */
-    String getMessageLang();
-
-    /**
-     * Gets error message.
-     *
-     * @return error message.
-     */
-    String getMessageValue();
-
-    /**
-     * Gets inner error message.
-     *
-     * @return inner error message.
-     */
-    String getInnerErrorMessage();
-
-    /**
-     * Gets inner error type.
-     *
-     * @return inner error type.
-     */
-    String getInnerErrorType();
-
-    /**
-     * Gets inner error stack-trace.
-     *
-     * @return inner error stack-trace
-     */
-    String getInnerErrorStacktrace();
-}


Mime
View raw message