atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suma...@apache.org
Subject incubator-atlas git commit: ATLAS-1171 Structured, high-level public APIs - Fix JAXB issues with PList, SearchFilter (mneethiraj via sumasai)
Date Tue, 04 Oct 2016 21:42:30 GMT
Repository: incubator-atlas
Updated Branches:
  refs/heads/master adfdef023 -> 1d84cbbdc


ATLAS-1171 Structured, high-level public APIs - Fix JAXB issues with PList, SearchFilter (mneethiraj via sumasai)


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/1d84cbbd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/1d84cbbd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/1d84cbbd

Branch: refs/heads/master
Commit: 1d84cbbdc3d8acc0a02c94b8c8076500acf6c93c
Parents: adfdef0
Author: Suma Shivaprasad <sumasai.shivaprasad@gmail.com>
Authored: Tue Oct 4 14:42:13 2016 -0700
Committer: Suma Shivaprasad <sumasai.shivaprasad@gmail.com>
Committed: Tue Oct 4 14:42:13 2016 -0700

----------------------------------------------------------------------
 .../org/apache/atlas/api/AtlasApiEntities.java  |   4 +-
 .../org/apache/atlas/api/AtlasApiTypes.java     |  13 +-
 .../main/java/org/apache/atlas/api/PList.java   | 128 ------------------
 .../java/org/apache/atlas/api/SearchFilter.java | 123 -----------------
 .../main/java/org/apache/atlas/model/PList.java | 131 +++++++++++++++++++
 .../org/apache/atlas/model/SearchFilter.java    | 126 ++++++++++++++++++
 .../model/instance/AtlasClassification.java     |  35 ++++-
 .../atlas/model/instance/AtlasEntity.java       |  34 ++++-
 .../atlas/model/instance/AtlasObjectId.java     |  33 +++++
 .../atlas/model/instance/AtlasStruct.java       |  33 +++++
 .../atlas/model/typedef/AtlasBaseTypeDef.java   |   3 +
 .../model/typedef/AtlasClassificationDef.java   |  33 +++++
 .../atlas/model/typedef/AtlasEntityDef.java     |  32 +++++
 .../atlas/model/typedef/AtlasEnumDef.java       |  33 +++++
 .../atlas/model/typedef/AtlasStructDef.java     |  33 +++++
 release-log.txt                                 |   1 +
 .../org/apache/atlas/web/rest/TypesREST.java    |  23 ++--
 17 files changed, 550 insertions(+), 268 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/api/AtlasApiEntities.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/api/AtlasApiEntities.java b/intg/src/main/java/org/apache/atlas/api/AtlasApiEntities.java
index 69b02b9..8eb4604 100644
--- a/intg/src/main/java/org/apache/atlas/api/AtlasApiEntities.java
+++ b/intg/src/main/java/org/apache/atlas/api/AtlasApiEntities.java
@@ -21,8 +21,10 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.atlas.exception.AtlasBaseException;
+import org.apache.atlas.model.SearchFilter;
 import org.apache.atlas.model.instance.AtlasClassification;
 import org.apache.atlas.model.instance.AtlasEntity;
+import org.apache.atlas.model.instance.AtlasEntity.AtlasEntities;
 import org.apache.atlas.model.instance.AtlasObjectId;
 
 /**
@@ -39,7 +41,7 @@ public interface AtlasApiEntities {
 
     void deleteEntity(AtlasObjectId objId) throws AtlasBaseException;
 
-    PList<AtlasEntity> searchEntities(SearchFilter filter) throws AtlasBaseException;
+    AtlasEntities searchEntities(SearchFilter filter) throws AtlasBaseException;
 
 
     void addEntityClassification(AtlasObjectId entityId, AtlasClassification classification) throws AtlasBaseException;

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/api/AtlasApiTypes.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/api/AtlasApiTypes.java b/intg/src/main/java/org/apache/atlas/api/AtlasApiTypes.java
index 6950406..52a3585 100644
--- a/intg/src/main/java/org/apache/atlas/api/AtlasApiTypes.java
+++ b/intg/src/main/java/org/apache/atlas/api/AtlasApiTypes.java
@@ -19,10 +19,15 @@ package org.apache.atlas.api;
 
 
 import org.apache.atlas.exception.AtlasBaseException;
+import org.apache.atlas.model.SearchFilter;
 import org.apache.atlas.model.typedef.AtlasClassificationDef;
+import org.apache.atlas.model.typedef.AtlasClassificationDef.AtlasClassificationDefs;
 import org.apache.atlas.model.typedef.AtlasEntityDef;
+import org.apache.atlas.model.typedef.AtlasEntityDef.AtlasEntityDefs;
 import org.apache.atlas.model.typedef.AtlasEnumDef;
+import org.apache.atlas.model.typedef.AtlasEnumDef.AtlasEnumDefs;
 import org.apache.atlas.model.typedef.AtlasStructDef;
+import org.apache.atlas.model.typedef.AtlasStructDef.AtlasStructDefs;
 
 /**
  * API to work with CRUD of Atlas types - enum/struct/classification/entity.
@@ -42,7 +47,7 @@ public interface AtlasApiTypes {
 
     void deleteEnumDefByGuid(String guid) throws AtlasBaseException;
 
-    PList<AtlasEnumDef> searchEnumDefs(SearchFilter filter) throws AtlasBaseException;
+    AtlasEnumDefs searchEnumDefs(SearchFilter filter) throws AtlasBaseException;
 
 
     AtlasStructDef createStructDef(AtlasStructDef structDef) throws AtlasBaseException;
@@ -59,7 +64,7 @@ public interface AtlasApiTypes {
 
     void deleteStructDefByGuid(String guid) throws AtlasBaseException;
 
-    PList<AtlasStructDef> searchStructDefs(SearchFilter filter) throws AtlasBaseException;
+    AtlasStructDefs searchStructDefs(SearchFilter filter) throws AtlasBaseException;
 
 
     AtlasClassificationDef createClassificationDef(AtlasClassificationDef classificationDef) throws AtlasBaseException;
@@ -78,7 +83,7 @@ public interface AtlasApiTypes {
 
     void deleteClassificationDefByGuid(String guid) throws AtlasBaseException;
 
-    PList<AtlasClassificationDef> searchClassificationDefs(SearchFilter filter) throws AtlasBaseException;
+    AtlasClassificationDefs searchClassificationDefs(SearchFilter filter) throws AtlasBaseException;
 
 
     AtlasEntityDef createEntityDef(AtlasEntityDef entityDef) throws AtlasBaseException;
@@ -95,5 +100,5 @@ public interface AtlasApiTypes {
 
     void deleteEntityDefByGuid(String guid) throws AtlasBaseException;
 
-    PList<AtlasEntityDef> searchEntityDefs(SearchFilter filter) throws AtlasBaseException;
+    AtlasEntityDefs searchEntityDefs(SearchFilter filter) throws AtlasBaseException;
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/api/PList.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/api/PList.java b/intg/src/main/java/org/apache/atlas/api/PList.java
deleted file mode 100644
index c6a3025..0000000
--- a/intg/src/main/java/org/apache/atlas/api/PList.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 org.apache.atlas.api;
-
-import java.util.List;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import org.apache.atlas.api.SearchFilter.SortType;
-
-/**
- * Paged-list, for returning search results.
- */
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-public class PList<T> implements java.io.Serializable {
-    private static final long serialVersionUID = 1L;
-
-    private List<T>  list       = null;
-    private long     startIndex = 0;
-    private int      pageSize   = 0;
-    private long     totalCount = 0;
-    private String   sortBy     = null;
-    private SortType sortType   = null;
-
-    public PList() {
-    }
-
-    public PList(List<T> list, long startIndex, int pageSize, long totalCount, SortType sortType, String sortBy) {
-        setList(list);
-        setStartIndex(startIndex);
-        setPageSize(pageSize);
-        setTotalCount(totalCount);
-        setSortType(sortType);
-        setSortBy(sortBy);
-    }
-
-    public List<T> getList() {
-        return list;
-    }
-
-    public void setList(List<T> list) {
-        this.list = list;
-    }
-
-    public long getStartIndex() {
-        return startIndex;
-    }
-
-    public void setStartIndex(long startIndex) {
-        this.startIndex = startIndex;
-    }
-
-    public int getPageSize() {
-        return pageSize;
-    }
-
-    public void setPageSize(int pageSize) {
-        this.pageSize = pageSize;
-    }
-
-    public long getTotalCount() {
-        return totalCount;
-    }
-
-    public void setTotalCount(long totalCount) {
-        this.totalCount = totalCount;
-    }
-
-    public SortType getSortType() {
-        return sortType;
-    }
-
-    public void setSortType(SortType sortType) {
-        this.sortType = sortType;
-    }
-
-    public String getSortBy() {
-        return sortBy;
-    }
-
-    public void setSortBy(String sortBy) {
-        this.sortBy = sortBy;
-    }
-
-
-    public StringBuilder toString(StringBuilder sb) {
-        if (sb == null) {
-            sb = new StringBuilder();
-        }
-
-        sb.append("PList<T>{");
-        sb.append("list='").append((list == null ? "null" : ("size:" + list.size()))).append('\'');
-        sb.append(", startIndex=").append(startIndex);
-        sb.append(", pageSize=").append(pageSize);
-        sb.append(", totalCount=").append(totalCount);
-        sb.append(", sortType=").append(sortType);
-        sb.append(", version=").append(sortBy);
-        sb.append('}');
-
-        return sb;
-    }
-
-    @Override
-    public String toString() {
-        return toString(new StringBuilder()).toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/api/SearchFilter.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/api/SearchFilter.java b/intg/src/main/java/org/apache/atlas/api/SearchFilter.java
deleted file mode 100644
index f9235ad..0000000
--- a/intg/src/main/java/org/apache/atlas/api/SearchFilter.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.atlas.api;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-/**
- * Generic filter, to specify search criteria using name/value pairs.
- */
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-public class SearchFilter {
-    /**
-     * to specify whether the result should be sorted? If yes, whether asc or desc.
-     */
-    public enum SortType { NONE, ASC, DESC };
-
-    private Map<String, String> params     = null;
-    private long                startIndex = 0;
-    private long                maxRows    = Long.MAX_VALUE;
-    private boolean             getCount   = true;
-    private String              sortBy     = null;
-    private SortType            sortType   = null;
-
-    public SearchFilter() {
-        setParams(null);
-    }
-
-    public SearchFilter(Map<String, String> params) {
-        setParams(params);
-    }
-
-    public Map<String, String> getParams() {
-        return params;
-    }
-
-    public void setParams(Map<String, String> params) {
-        this.params = params;
-    }
-
-    public String getParam(String name) {
-        String ret = null;
-
-        if (name != null && params != null) {
-            ret = params.get(name);
-        }
-
-        return ret;
-    }
-
-    public void setParam(String name, String value) {
-        if (name != null) {
-            if (params == null) {
-                params = new HashMap<String, String>();
-            }
-
-            params.put(name, value);
-        }
-    }
-
-    public long getStartIndex() {
-        return startIndex;
-    }
-
-    public void setStartIndex(long startIndex) {
-        this.startIndex = startIndex;
-    }
-
-    public long getMaxRows() {
-        return maxRows;
-    }
-
-    public void setMaxRows(long maxRows) {
-        this.maxRows = maxRows;
-    }
-
-    public boolean isGetCount() {
-        return getCount;
-    }
-
-    public void setGetCount(boolean getCount) {
-        this.getCount = getCount;
-    }
-
-    public String getSortBy() {
-        return sortBy;
-    }
-
-    public void setSortBy(String sortBy) {
-        this.sortBy = sortBy;
-    }
-
-    public SortType getSortType() {
-        return sortType;
-    }
-
-    public void setSortType(SortType sortType) {
-        this.sortType = sortType;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/PList.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/PList.java b/intg/src/main/java/org/apache/atlas/model/PList.java
new file mode 100644
index 0000000..a56b774
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/model/PList.java
@@ -0,0 +1,131 @@
+/**
+ * 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.atlas.model;
+
+import java.util.List;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import org.apache.atlas.model.SearchFilter.SortType;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Paginated-list, for returning search results.
+ */
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+public class PList<T> implements java.io.Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private List<T>  list       = null;
+    private long     startIndex = 0;
+    private int      pageSize   = 0;
+    private long     totalCount = 0;
+    private String   sortBy     = null;
+    private SortType sortType   = null;
+
+    public PList() {
+    }
+
+    public PList(List<T> list) {
+        this(list, 0, list.size(), list.size(), SortType.NONE, null);
+    }
+
+    public PList(List<T> list, long startIndex, int pageSize, long totalCount, SortType sortType, String sortBy) {
+        setList(list);
+        setStartIndex(startIndex);
+        setPageSize(pageSize);
+        setTotalCount(totalCount);
+        setSortType(sortType);
+        setSortBy(sortBy);
+    }
+
+    public void setList(List<T> list) { this.list = list; }
+
+    public List<T> getList() { return this.list; }
+
+    public long getStartIndex() {
+        return startIndex;
+    }
+
+    public void setStartIndex(long startIndex) {
+        this.startIndex = startIndex;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public long getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(long totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    public SortType getSortType() {
+        return sortType;
+    }
+
+    public void setSortType(SortType sortType) {
+        this.sortType = sortType;
+    }
+
+    public String getSortBy() {
+        return sortBy;
+    }
+
+    public void setSortBy(String sortBy) {
+        this.sortBy = sortBy;
+    }
+
+
+    public StringBuilder toString(StringBuilder sb) {
+        if (sb == null) {
+            sb = new StringBuilder();
+        }
+
+        sb.append("PList{");
+        sb.append("listSize=").append((list == null ? 0 : list.size()));
+        sb.append(", startIndex=").append(startIndex);
+        sb.append(", pageSize=").append(pageSize);
+        sb.append(", totalCount=").append(totalCount);
+        sb.append(", sortType=").append(sortType);
+        sb.append(", sortBy=").append(sortBy);
+        sb.append('}');
+
+        return sb;
+    }
+
+    @Override
+    public String toString() {
+        return toString(new StringBuilder()).toString();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/SearchFilter.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/SearchFilter.java b/intg/src/main/java/org/apache/atlas/model/SearchFilter.java
new file mode 100644
index 0000000..e35715f
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/model/SearchFilter.java
@@ -0,0 +1,126 @@
+/**
+ * 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.atlas.model;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Generic filter, to specify search criteria using name/value pairs.
+ */
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+public class SearchFilter {
+    /**
+     * to specify whether the result should be sorted? If yes, whether asc or desc.
+     */
+    public enum SortType { NONE, ASC, DESC };
+
+    private Map<String, String> params     = null;
+    private long                startIndex = 0;
+    private long                maxRows    = Long.MAX_VALUE;
+    private boolean             getCount   = true;
+    private String              sortBy     = null;
+    private SortType            sortType   = null;
+
+    public SearchFilter() {
+        setParams(null);
+    }
+
+    public SearchFilter(Map<String, String> params) {
+        setParams(params);
+    }
+
+    public Map<String, String> getParams() {
+        return params;
+    }
+
+    public void setParams(Map<String, String> params) {
+        this.params = params;
+    }
+
+    public String getParam(String name) {
+        String ret = null;
+
+        if (name != null && params != null) {
+            ret = params.get(name);
+        }
+
+        return ret;
+    }
+
+    public void setParam(String name, String value) {
+        if (name != null) {
+            if (params == null) {
+                params = new HashMap<String, String>();
+            }
+
+            params.put(name, value);
+        }
+    }
+
+    public long getStartIndex() {
+        return startIndex;
+    }
+
+    public void setStartIndex(long startIndex) {
+        this.startIndex = startIndex;
+    }
+
+    public long getMaxRows() {
+        return maxRows;
+    }
+
+    public void setMaxRows(long maxRows) {
+        this.maxRows = maxRows;
+    }
+
+    public boolean isGetCount() {
+        return getCount;
+    }
+
+    public void setGetCount(boolean getCount) {
+        this.getCount = getCount;
+    }
+
+    public String getSortBy() {
+        return sortBy;
+    }
+
+    public void setSortBy(String sortBy) {
+        this.sortBy = sortBy;
+    }
+
+    public SortType getSortType() {
+        return sortType;
+    }
+
+    public void setSortType(SortType sortType) {
+        this.sortType = sortType;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java b/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
index 2f034d4..31a03f1 100644
--- a/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
+++ b/intg/src/main/java/org/apache/atlas/model/instance/AtlasClassification.java
@@ -18,20 +18,28 @@
 package org.apache.atlas.model.instance;
 
 import java.io.Serializable;
+import java.util.List;
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
 import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
 import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+
 /**
- * An instance of a classfication; it doesn't have an identity, this object exists only when associated with an entity.
+ * An instance of a classification; it doesn't have an identity, this object exists only when associated with an entity.
  */
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasClassification extends AtlasStruct implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -57,4 +65,29 @@ public class AtlasClassification extends AtlasStruct implements Serializable {
             setAttributes(other.getAttributes());
         }
     }
+
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasClassification.class)
+    public static class AtlasClassifications extends PList<AtlasClassification> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasClassifications() {
+            super();
+        }
+
+        public AtlasClassifications(List<AtlasClassification> list) {
+            super(list);
+        }
+
+        public AtlasClassifications(List list, long startIndex, int pageSize, long totalCount,
+                                    SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java b/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
index e1d7bc6..3a8d38b 100644
--- a/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
+++ b/intg/src/main/java/org/apache/atlas/model/instance/AtlasEntity.java
@@ -19,8 +19,14 @@ package org.apache.atlas.model.instance;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.apache.atlas.model.typedef.AtlasEntityDef;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
 import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
@@ -35,6 +41,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasEntity extends AtlasStruct implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -189,7 +196,7 @@ public class AtlasEntity extends AtlasStruct implements Serializable {
     public int hashCode() {
         int result = super.hashCode();
 
-        result = 31 * result + guid != null ? guid.hashCode() : 0;
+        result = 31 * result + (guid != null ? guid.hashCode() : 0);
         result = 31 * result + (status != null ? status.hashCode() : 0);
         result = 31 * result + (createdBy != null ? createdBy.hashCode() : 0);
         result = 31 * result + (updatedBy != null ? updatedBy.hashCode() : 0);
@@ -203,4 +210,29 @@ public class AtlasEntity extends AtlasStruct implements Serializable {
     public String toString() {
         return toString(new StringBuilder()).toString();
     }
+
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasEntity.class)
+    public static class AtlasEntities extends PList<AtlasEntity> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasEntities() {
+            super();
+        }
+
+        public AtlasEntities(List<AtlasEntity> list) {
+            super(list);
+        }
+
+        public AtlasEntities(List list, long startIndex, int pageSize, long totalCount,
+                             SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java b/intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java
index 6936cdc..087006c 100644
--- a/intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java
+++ b/intg/src/main/java/org/apache/atlas/model/instance/AtlasObjectId.java
@@ -18,8 +18,14 @@
 package org.apache.atlas.model.instance;
 
 import java.io.Serializable;
+import java.util.List;
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
 import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
 import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
@@ -32,6 +38,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasObjectId  implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -129,4 +136,30 @@ public class AtlasObjectId  implements Serializable {
     public String toString() {
         return toString(new StringBuilder()).toString();
     }
+
+
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasObjectId.class)
+    public static class AtlasObjectIds extends PList<AtlasObjectId> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasObjectIds() {
+            super();
+        }
+
+        public AtlasObjectIds(List<AtlasObjectId> list) {
+            super(list);
+        }
+
+        public AtlasObjectIds(List list, long startIndex, int pageSize, long totalCount,
+                              SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java b/intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java
index cfe4938..017fb06 100644
--- a/intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java
+++ b/intg/src/main/java/org/apache/atlas/model/instance/AtlasStruct.java
@@ -23,8 +23,14 @@ import java.text.SimpleDateFormat;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.MapUtils;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
@@ -40,6 +46,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasStruct implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -156,6 +163,32 @@ public class AtlasStruct implements Serializable {
     }
 
 
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasStruct.class)
+    public static class AtlasStructs extends PList<AtlasStruct> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasStructs() {
+            super();
+        }
+
+        public AtlasStructs(List<AtlasStruct> list) {
+            super(list);
+        }
+
+        public AtlasStructs(List list, long startIndex, int pageSize, long totalCount,
+                            SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
+
+
     public static StringBuilder dumpModelObjects(Collection<? extends AtlasStruct> objList, StringBuilder sb) {
         if (sb == null) {
             sb = new StringBuilder();

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
index d40354c..a3fdbcc 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasBaseTypeDef.java
@@ -23,6 +23,8 @@ import java.util.Collection;
 import java.util.Date;
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlRootElement;
+
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.MapUtils;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
@@ -38,6 +40,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public abstract class AtlasBaseTypeDef implements java.io.Serializable {
     private static final long serialVersionUID = 1L;
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/typedef/AtlasClassificationDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasClassificationDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasClassificationDef.java
index f0188d9..44d410f 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasClassificationDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasClassificationDef.java
@@ -22,6 +22,11 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.apache.commons.collections.CollectionUtils;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
 import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
@@ -36,6 +41,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasClassificationDef extends AtlasStructDef implements java.io.Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -166,4 +172,31 @@ public class AtlasClassificationDef extends AtlasStructDef implements java.io.Se
     public String toString() {
         return toString(new StringBuilder()).toString();
     }
+
+
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasClassificationDef.class)
+    public static class AtlasClassificationDefs extends PList<AtlasClassificationDef> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasClassificationDefs() {
+            super();
+        }
+
+        public AtlasClassificationDefs(List<AtlasClassificationDef> list) {
+            super(list);
+        }
+
+        public AtlasClassificationDefs(List list, long startIndex, int pageSize, long totalCount,
+                                       SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEntityDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEntityDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEntityDef.java
index aaa2bac..648d705 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEntityDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEntityDef.java
@@ -22,6 +22,11 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.apache.commons.collections.CollectionUtils;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
 import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
@@ -36,6 +41,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasEntityDef extends AtlasStructDef implements java.io.Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -163,4 +169,30 @@ public class AtlasEntityDef extends AtlasStructDef implements java.io.Serializab
     public String toString() {
         return toString(new StringBuilder()).toString();
     }
+
+
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasEntityDef.class)
+    public static class AtlasEntityDefs extends PList<AtlasEntityDef> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasEntityDefs() {
+            super();
+        }
+
+        public AtlasEntityDefs(List<AtlasEntityDef> list) {
+            super(list);
+        }
+
+        public AtlasEntityDefs(List list, long startIndex, int pageSize, long totalCount,
+                               SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
index 5347461..b3b2d04 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasEnumDef.java
@@ -20,6 +20,11 @@ package org.apache.atlas.model.typedef;
 import java.io.Serializable;
 import java.util.*;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.hadoop.util.StringUtils;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
@@ -35,6 +40,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasEnumDef extends AtlasBaseTypeDef implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -240,6 +246,7 @@ public class AtlasEnumDef extends AtlasBaseTypeDef implements Serializable {
     @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
     @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
     @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
     public static class AtlasEnumElementDef implements Serializable {
         private static final long serialVersionUID = 1L;
 
@@ -332,4 +339,30 @@ public class AtlasEnumDef extends AtlasBaseTypeDef implements Serializable {
             return toString(new StringBuilder()).toString();
         }
     }
+
+
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasEnumDef.class)
+    public static class AtlasEnumDefs extends PList<AtlasEnumDef> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasEnumDefs() {
+            super();
+        }
+
+        public AtlasEnumDefs(List<AtlasEnumDef> list) {
+            super(list);
+        }
+
+        public AtlasEnumDefs(List list, long startIndex, int pageSize, long totalCount,
+                             SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
index af42c05..607d477 100644
--- a/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
+++ b/intg/src/main/java/org/apache/atlas/model/typedef/AtlasStructDef.java
@@ -25,6 +25,11 @@ import java.util.List;
 import java.util.ListIterator;
 import java.util.Set;
 
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
+
+import org.apache.atlas.model.PList;
+import org.apache.atlas.model.SearchFilter.SortType;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.hadoop.util.StringUtils;
 import org.codehaus.jackson.annotate.JsonAutoDetect;
@@ -40,6 +45,7 @@ import org.codehaus.jackson.map.annotate.JsonSerialize;
 @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
 public class AtlasStructDef extends AtlasBaseTypeDef implements Serializable {
     private static final long serialVersionUID = 1L;
 
@@ -226,6 +232,7 @@ public class AtlasStructDef extends AtlasBaseTypeDef implements Serializable {
     @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
     @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
     @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
     public static class AtlasAttributeDef implements Serializable {
         private static final long serialVersionUID = 1L;
 
@@ -398,4 +405,30 @@ public class AtlasStructDef extends AtlasBaseTypeDef implements Serializable {
             return toString(new StringBuilder()).toString();
         }
     }
+
+
+    /**
+     * REST serialization friendly list.
+     */
+    @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+    @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+    @JsonIgnoreProperties(ignoreUnknown=true)
+    @XmlRootElement
+    @XmlSeeAlso(AtlasStructDef.class)
+    public static class AtlasStructDefs extends PList<AtlasStructDef> {
+        private static final long serialVersionUID = 1L;
+
+        public AtlasStructDefs() {
+            super();
+        }
+
+        public AtlasStructDefs(List<AtlasStructDef> list) {
+            super(list);
+        }
+
+        public AtlasStructDefs(List list, long startIndex, int pageSize, long totalCount,
+                               SortType sortType, String sortBy) {
+            super(list, startIndex, pageSize, totalCount, sortType, sortBy);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index b012228..fd90f6f 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1171 Structured, high-level public APIs - Fix JAXB issues with PList, SearchFilter (mneethiraj via sumasai)
 ATLAS-1206 Atlas UI not working with IE or Chrome on Windows OS in Kerberos mode (nixonrodrigues via sumasai)
 ATLAS-1205 Improve atlas build time (shwethags)
 ATLAS-1203 'Invalid type definition' due to no new types to be created at startup (mneethiraj via shwethags)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/1d84cbbd/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
index 42cfd42..429df65 100644
--- a/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
+++ b/webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
@@ -27,12 +27,15 @@ import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
 
-import org.apache.atlas.api.PList;
-import org.apache.atlas.api.SearchFilter;
+import org.apache.atlas.model.SearchFilter;
 import org.apache.atlas.model.typedef.AtlasClassificationDef;
+import org.apache.atlas.model.typedef.AtlasClassificationDef.AtlasClassificationDefs;
 import org.apache.atlas.model.typedef.AtlasEntityDef;
+import org.apache.atlas.model.typedef.AtlasEntityDef.AtlasEntityDefs;
 import org.apache.atlas.model.typedef.AtlasEnumDef;
+import org.apache.atlas.model.typedef.AtlasEnumDef.AtlasEnumDefs;
 import org.apache.atlas.model.typedef.AtlasStructDef;
+import org.apache.atlas.model.typedef.AtlasStructDef.AtlasStructDefs;
 import org.apache.atlas.web.util.Servlets;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -114,8 +117,8 @@ public class TypesREST {
     @GET
     @Path("/enumdef")
     @Produces(Servlets.JSON_MEDIA_TYPE)
-    public PList<AtlasEnumDef> searchEnumDefs(@Context HttpServletRequest request) throws Exception {
-        PList<AtlasEnumDef> ret = null;
+    public AtlasEnumDefs searchEnumDefs(@Context HttpServletRequest request) throws Exception {
+        AtlasEnumDefs ret = null;
 
         // TODO: SearchFilter filter = getSearchFilter(request);
         // TODO: ret = store.searchEnumDefs(filter);
@@ -196,8 +199,8 @@ public class TypesREST {
     @GET
     @Path("/structdef")
     @Produces(Servlets.JSON_MEDIA_TYPE)
-    public PList<AtlasStructDef> searchStructDefs(@Context HttpServletRequest request) throws Exception {
-        PList<AtlasStructDef> ret = null;
+    public AtlasStructDefs searchStructDefs(@Context HttpServletRequest request) throws Exception {
+        AtlasStructDefs ret = null;
 
         // TODO: SearchFilter filter = getSearchFilter(request);
         // TODO: ret = store.searchStructDefs(filter);
@@ -278,8 +281,8 @@ public class TypesREST {
     @GET
     @Path("/classificationdef")
     @Produces(Servlets.JSON_MEDIA_TYPE)
-    public PList<AtlasClassificationDef> searchClassificationDefs(SearchFilter filter) throws Exception {
-        PList<AtlasClassificationDef> ret = null;
+    public AtlasClassificationDefs searchClassificationDefs(SearchFilter filter) throws Exception {
+        AtlasClassificationDefs ret = null;
 
         // TODO: SearchFilter filter = getSearchFilter(request);
         // TODO: ret = store.searchClassificationDefs(filter);
@@ -360,8 +363,8 @@ public class TypesREST {
     @GET
     @Path("/entitydef")
     @Produces(Servlets.JSON_MEDIA_TYPE)
-    public PList<AtlasEntityDef> searchEntityDefs(SearchFilter filter) throws Exception {
-        PList<AtlasEntityDef> ret = null;
+    public AtlasEntityDefs searchEntityDefs(SearchFilter filter) throws Exception {
+        AtlasEntityDefs ret = null;
 
         // TODO: SearchFilter filter = getSearchFilter(request);
         // TODO: ret = store.searchEntityDefs(filter);


Mime
View raw message