You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/11/05 20:43:41 UTC
[1/5] atlas git commit: Restoring removed legacy REST APIs
Repository: atlas
Updated Branches:
refs/heads/ATLAS-2251 10c19eac7 -> 3f44770da
Restoring removed legacy REST APIs
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/da4cf2dd
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/da4cf2dd
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/da4cf2dd
Branch: refs/heads/ATLAS-2251
Commit: da4cf2dd485f90717fbc535c1fa1aa95030586fa
Parents: 0877e47
Author: Madhan Neethiraj <ma...@apache.org>
Authored: Sun Nov 5 12:29:56 2017 -0800
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Sun Nov 5 12:31:45 2017 -0800
----------------------------------------------------------------------
.../web/resources/DataSetLineageResource.java | 185 +++++++++
.../atlas/web/resources/LineageResource.java | 207 ++++++++++
.../resources/MetadataDiscoveryResource.java | 405 +++++++++++++++++++
3 files changed, 797 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/da4cf2dd/webapp/src/main/java/org/apache/atlas/web/resources/DataSetLineageResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/DataSetLineageResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/DataSetLineageResource.java
new file mode 100644
index 0000000..278d7ca
--- /dev/null
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/DataSetLineageResource.java
@@ -0,0 +1,185 @@
+/**
+ * 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.web.resources;
+
+import org.apache.atlas.AtlasClient;
+import org.apache.atlas.utils.AtlasPerfTracer;
+import org.apache.atlas.web.util.Servlets;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.*;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+
+/**
+ * Jersey Resource for Hive Table Lineage.
+ */
+@Path("lineage/hive")
+@Singleton
+@Service
+@Deprecated
+public class DataSetLineageResource {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageResource.class);
+ private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.DataSetLineageResource");
+
+ /**
+ * Created by the Guice ServletModule and injected with the
+ * configured LineageService.
+ *
+ */
+ @Inject
+ public DataSetLineageResource() {
+ }
+
+ /**
+ * Returns the inputs graph for a given entity.
+ *
+ * @param tableName table name
+ */
+ @GET
+ @Path("table/{tableName}/inputs/graph")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response inputsGraph(@Context HttpServletRequest request, @PathParam("tableName") String tableName) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> DataSetLineageResource.inputsGraph({})", tableName);
+ }
+
+ AtlasPerfTracer perf = null;
+
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DataSetLineageResource.inputsGraph(tableName=" + tableName + ")");
+ }
+
+ final String jsonResult = ""; // TODO-typeSystem-removal: lineageService.getInputsGraph(tableName);
+
+ JSONObject response = new JSONObject();
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put("tableName", tableName);
+ response.put(AtlasClient.RESULTS, new JSONObject(jsonResult));
+
+ return Response.ok(response).build();
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unable to get lineage inputs graph for table {}", tableName, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get lineage inputs graph for table {}", tableName, e);
+ throw e;
+ } catch (Throwable e) {
+ LOG.error("Unable to get lineage inputs graph for table {}", tableName, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+ }
+ }
+
+ /**
+ * Returns the outputs graph for a given entity.
+ *
+ * @param tableName table name
+ */
+ @GET
+ @Path("table/{tableName}/outputs/graph")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response outputsGraph(@Context HttpServletRequest request, @PathParam("tableName") String tableName) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> DataSetLineageResource.outputsGraph({})", tableName);
+ }
+
+ AtlasPerfTracer perf = null;
+
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DataSetLineageResource.outputsGraph(tableName=" + tableName + ")");
+ }
+
+ final String jsonResult = ""; // TODO-typeSystem-removal: lineageService.getOutputsGraph(tableName);
+
+ JSONObject response = new JSONObject();
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put("tableName", tableName);
+ response.put(AtlasClient.RESULTS, new JSONObject(jsonResult));
+
+ return Response.ok(response).build();
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unable to get lineage outputs graph for table {}", tableName, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get lineage outputs graph for table {}", tableName, e);
+ throw e;
+ } catch (Throwable e) {
+ LOG.error("Unable to get lineage outputs graph for table {}", tableName, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+ }
+ }
+
+ /**
+ * Return the schema for the given tableName.
+ *
+ * @param tableName table name
+ */
+ @GET
+ @Path("table/{tableName}/schema")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response schema(@Context HttpServletRequest request, @PathParam("tableName") String tableName) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> DataSetLineageResource.schema({})", tableName);
+ }
+
+ AtlasPerfTracer perf = null;
+
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DataSetLineageResource.schema(tableName=" + tableName + ")");
+ }
+
+ final String jsonResult = ""; // TODO-typeSystem-removal: lineageService.getSchema(tableName);
+
+ JSONObject response = new JSONObject();
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put("tableName", tableName);
+ response.put(AtlasClient.RESULTS, new JSONObject(jsonResult));
+
+ return Response.ok(response).build();
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unable to get schema for table {}", tableName, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get schema for table {}", tableName, e);
+ throw e;
+ } catch (Throwable e) {
+ LOG.error("Unable to get schema for table {}", tableName, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/da4cf2dd/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java
new file mode 100644
index 0000000..cada5ee
--- /dev/null
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/LineageResource.java
@@ -0,0 +1,207 @@
+/**
+ * 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.web.resources;
+
+import org.apache.atlas.AtlasClient;
+import org.apache.atlas.discovery.AtlasLineageService;
+import org.apache.atlas.exception.AtlasBaseException;
+import org.apache.atlas.model.lineage.AtlasLineageInfo;
+import org.apache.atlas.model.lineage.AtlasLineageInfo.LineageDirection;
+import org.apache.atlas.type.AtlasTypeRegistry;
+import org.apache.atlas.utils.AtlasPerfTracer;
+import org.apache.atlas.web.util.LineageUtils;
+import org.apache.atlas.web.util.Servlets;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+
+@Path("lineage")
+@Singleton
+@Service
+@Deprecated
+public class LineageResource {
+ private static final Logger LOG = LoggerFactory.getLogger(DataSetLineageResource.class);
+ private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.LineageResource");
+
+ private final AtlasLineageService atlasLineageService;
+ private final AtlasTypeRegistry typeRegistry;
+
+ /**
+ * Created by the Guice ServletModule and injected with the
+ * configured LineageService.
+ *
+ * @param atlasLineageService lineage service handle
+ * @param typeRegistry type registry
+ */
+ @Inject
+ public LineageResource(AtlasLineageService atlasLineageService, AtlasTypeRegistry typeRegistry) {
+ this.atlasLineageService = atlasLineageService;
+ this.typeRegistry = typeRegistry;
+ }
+
+ /**
+ * Returns input lineage graph for the given entity id.
+ * @param guid dataset entity id
+ * @return
+ */
+ @GET
+ @Path("{guid}/inputs/graph")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response inputsGraph(@PathParam("guid") String guid) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> LineageResource.inputsGraph({})", guid);
+ }
+
+ AtlasPerfTracer perf = null;
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "LineageResource.inputsGraph(" + guid + ")");
+ }
+
+ AtlasLineageInfo lineageInfo = atlasLineageService.getAtlasLineageInfo(guid, LineageDirection.INPUT, -1);
+ final String result = LineageUtils.toLineageStruct(lineageInfo, typeRegistry);
+
+ JSONObject response = new JSONObject();
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put(AtlasClient.RESULTS, new JSONObject(result));
+
+ return Response.ok(response).build();
+ } catch (AtlasBaseException e) {
+ LOG.error("Unable to get lineage inputs graph for entity guid={}", guid, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get lineage inputs graph for entity guid={}", guid, e);
+ throw e;
+ } catch (JSONException e) {
+ LOG.error("Unable to get lineage inputs graph for entity guid={}", guid, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("<== LineageResource.inputsGraph({})", guid);
+ }
+ }
+ }
+
+ /**
+ * Returns the outputs graph for a given entity id.
+ *
+ * @param guid dataset entity id
+ */
+ @GET
+ @Path("{guid}/outputs/graph")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response outputsGraph(@PathParam("guid") String guid) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> LineageResource.outputsGraph({})", guid);
+ }
+
+ AtlasPerfTracer perf = null;
+
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "LineageResource.outputsGraph(" + guid + ")");
+ }
+
+ AtlasLineageInfo lineageInfo = atlasLineageService.getAtlasLineageInfo(guid, LineageDirection.OUTPUT, -1);
+ final String result = LineageUtils.toLineageStruct(lineageInfo, typeRegistry);
+
+ JSONObject response = new JSONObject();
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put(AtlasClient.RESULTS, new JSONObject(result));
+
+ return Response.ok(response).build();
+ } catch (AtlasBaseException e) {
+ LOG.error("Unable to get lineage outputs graph for entity guid={}", guid, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get lineage outputs graph for entity guid={}", guid, e);
+ throw e;
+ } catch (JSONException e) {
+ LOG.error("Unable to get lineage outputs graph for entity guid={}", guid, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("<== LineageResource.outputsGraph({})", guid);
+ }
+ }
+ }
+
+ /**
+ * Returns the schema for the given dataset id.
+ *
+ * @param guid dataset entity id
+ */
+ @GET
+ @Path("{guid}/schema")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response schema(@PathParam("guid") String guid) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> LineageResource.schema({})", guid);
+ }
+
+ AtlasPerfTracer perf = null;
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "LineageResource.schema(" + guid + ")");
+ }
+
+ final String jsonResult = ""; // TODO-typeSystem-removal: lineageService.getSchemaForEntity(guid);
+
+ JSONObject response = new JSONObject();
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put(AtlasClient.RESULTS, new JSONObject(jsonResult));
+
+ return Response.ok(response).build();
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unable to get schema for entity guid={}", guid, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get schema for entity guid={}", guid, e);
+ throw e;
+ } catch (Throwable e) {
+ LOG.error("Unable to get schema for entity={}", guid, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("<== LineageResource.schema({})", guid);
+ }
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/da4cf2dd/webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java
new file mode 100755
index 0000000..ff1751d
--- /dev/null
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/MetadataDiscoveryResource.java
@@ -0,0 +1,405 @@
+/**
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.web.resources;
+
+import com.google.common.base.Preconditions;
+import org.apache.atlas.AtlasClient;
+import org.apache.atlas.AtlasConfiguration;
+import org.apache.atlas.classification.InterfaceAudience;
+import org.apache.atlas.query.QueryParams;
+import org.apache.atlas.utils.AtlasPerfTracer;
+import org.apache.atlas.utils.ParamChecker;
+import org.apache.atlas.web.util.Servlets;
+import org.apache.commons.configuration.Configuration;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DefaultValue;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Jersey Resource for metadata operations.
+ */
+@Path("discovery")
+@Singleton
+@Service
+@Deprecated
+public class MetadataDiscoveryResource {
+
+ private static final Logger LOG = LoggerFactory.getLogger(MetadataDiscoveryResource.class);
+ private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.MetadataDiscoveryResource");
+ private static final String QUERY_TYPE_DSL = "dsl";
+ private static final String QUERY_TYPE_GREMLIN = "gremlin";
+ private static final String QUERY_TYPE_FULLTEXT = "full-text";
+ private static final String LIMIT_OFFSET_DEFAULT = "-1";
+
+ private final boolean gremlinSearchEnabled;
+ private static Configuration applicationProperties = null;
+ private static final String ENABLE_GREMLIN_SEARCH_PROPERTY = "atlas.search.gremlin.enable";
+
+ /**
+ * Created by the Guice ServletModule and injected with the
+ * configured DiscoveryService.
+ *
+ * @param configuration configuration
+ */
+ @Inject
+ public MetadataDiscoveryResource(Configuration configuration) {
+ applicationProperties = configuration;
+ gremlinSearchEnabled = applicationProperties != null && applicationProperties.getBoolean(ENABLE_GREMLIN_SEARCH_PROPERTY, false);
+ }
+
+ /**
+ * Search using a given query.
+ *
+ * @param query search query in DSL format falling back to full text.
+ * @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value
+ * @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0
+ * @return JSON representing the type and results.
+ */
+ @GET
+ @Path("search")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response search(@QueryParam("query") String query,
+ @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("limit") int limit,
+ @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("offset") int offset) {
+ boolean dslQueryFailed = false;
+ Response response = null;
+ try {
+ response = searchUsingQueryDSL(query, limit, offset);
+ if (response.getStatus() != Response.Status.OK.getStatusCode()) {
+ dslQueryFailed = true;
+ }
+ } catch (Exception e) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Error while running DSL. Switching to fulltext for query {}", query, e);
+ }
+
+ dslQueryFailed = true;
+ }
+
+ if ( dslQueryFailed ) {
+ response = searchUsingFullText(query, limit, offset);
+ }
+
+ return response;
+ }
+
+ /**
+ * Search using query DSL format.
+ *
+ * @param dslQuery search query in DSL format.
+ * @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value
+ * @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0
+ * Limit and offset in API are used in conjunction with limit and offset in DSL query
+ * Final limit = min(API limit, max(query limit - API offset, 0))
+ * Final offset = API offset + query offset
+ *
+ * @return JSON representing the type and results.
+ */
+ @GET
+ @Path("search/dsl")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response searchUsingQueryDSL(@QueryParam("query") String dslQuery,
+ @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("limit") int limit,
+ @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("offset") int offset) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> MetadataDiscoveryResource.searchUsingQueryDSL({}, {}, {})", dslQuery, limit, offset);
+ }
+
+ AtlasPerfTracer perf = null;
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "MetadataDiscoveryResource.searchUsingQueryDSL(" + dslQuery + ", " + limit + ", " + offset + ")");
+ }
+
+ dslQuery = ParamChecker.notEmpty(dslQuery, "dslQuery cannot be null");
+ QueryParams queryParams = validateQueryParams(limit, offset);
+ final String jsonResultStr = ""; // TODO-typeSystem-removal: discoveryService.searchByDSL(dslQuery, queryParams);
+
+ JSONObject response = new DSLJSONResponseBuilder().results(jsonResultStr).query(dslQuery).build();
+
+ return Response.ok(response).build();
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unable to get entity list for dslQuery {}", dslQuery, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get entity list for dslQuery {}", dslQuery, e);
+ throw e;
+ } catch (Throwable e) {
+ LOG.error("Unable to get entity list for dslQuery {}", dslQuery, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("<== MetadataDiscoveryResource.searchUsingQueryDSL({}, {}, {})", dslQuery, limit, offset);
+ }
+ }
+ }
+
+ private QueryParams validateQueryParams(int limitParam, int offsetParam) {
+ int maxLimit = AtlasConfiguration.SEARCH_MAX_LIMIT.getInt();
+ int defaultLimit = AtlasConfiguration.SEARCH_DEFAULT_LIMIT.getInt();
+
+ int limit = defaultLimit;
+ boolean limitSet = (limitParam != Integer.valueOf(LIMIT_OFFSET_DEFAULT));
+ if (limitSet) {
+ ParamChecker.lessThan(limitParam, maxLimit, "limit");
+ ParamChecker.greaterThan(limitParam, 0, "limit");
+ limit = limitParam;
+ }
+
+ int offset = 0;
+ boolean offsetSet = (offsetParam != Integer.valueOf(LIMIT_OFFSET_DEFAULT));
+ if (offsetSet) {
+ ParamChecker.greaterThan(offsetParam, -1, "offset");
+ offset = offsetParam;
+ }
+
+ return new QueryParams(limit, offset);
+ }
+
+ /**
+ * Search using raw gremlin query format.
+ *
+ * @param gremlinQuery search query in raw gremlin format.
+ * @return JSON representing the type and results.
+ */
+ @GET
+ @Path("search/gremlin")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ @InterfaceAudience.Private
+ public Response searchUsingGremlinQuery(@QueryParam("query") String gremlinQuery) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> MetadataDiscoveryResource.searchUsingGremlinQuery({})", gremlinQuery);
+ }
+
+ AtlasPerfTracer perf = null;
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "MetadataDiscoveryResource.searchUsingGremlinQuery(" + gremlinQuery + ")");
+ }
+
+ if (!gremlinSearchEnabled) {
+ throw new Exception("Gremlin search is not enabled.");
+ }
+
+ gremlinQuery = ParamChecker.notEmpty(gremlinQuery, "gremlinQuery cannot be null or empty");
+ final List<Map<String, String>> results = new ArrayList<>(); // TODO-typeSystem-removal: discoveryService.searchByGremlin(gremlinQuery);
+
+ JSONObject response = new JSONObject();
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put(AtlasClient.QUERY, gremlinQuery);
+ response.put(AtlasClient.QUERY_TYPE, QUERY_TYPE_GREMLIN);
+
+ JSONArray list = new JSONArray();
+ for (Map<String, String> result : results) {
+ list.put(new JSONObject(result));
+ }
+ response.put(AtlasClient.RESULTS, list);
+ response.put(AtlasClient.COUNT, list.length());
+
+ return Response.ok(response).build();
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unable to get entity list for gremlinQuery {}", gremlinQuery, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get entity list for gremlinQuery {}", gremlinQuery, e);
+ throw e;
+ } catch (Throwable e) {
+ LOG.error("Unable to get entity list for gremlinQuery {}", gremlinQuery, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("<== MetadataDiscoveryResource.searchUsingGremlinQuery({})", gremlinQuery);
+ }
+ }
+ }
+
+ /**
+ * Search using full text search.
+ *
+ * @param query search query.
+ * @param limit number of rows to be returned in the result, used for pagination. maxlimit > limit > 0. -1 maps to atlas.search.defaultlimit property value
+ * @param offset offset to the results returned, used for pagination. offset >= 0. -1 maps to offset 0
+ * @return JSON representing the type and results.
+ */
+ @GET
+ @Path("search/fulltext")
+ @Consumes(Servlets.JSON_MEDIA_TYPE)
+ @Produces(Servlets.JSON_MEDIA_TYPE)
+ public Response searchUsingFullText(@QueryParam("query") String query,
+ @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("limit") int limit,
+ @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("offset") int offset) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("==> MetadataDiscoveryResource.searchUsingFullText({}, {}, {})", query, limit, offset);
+ }
+
+ AtlasPerfTracer perf = null;
+ try {
+ if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
+ perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "MetadataDiscoveryResource.searchUsingFullText(" + query + ", " + limit + ", " + offset + ")");
+ }
+
+ query = ParamChecker.notEmpty(query, "query cannot be null or empty");
+ QueryParams queryParams = validateQueryParams(limit, offset);
+ final String jsonResultStr = ""; // TODO-typeSystem-removal: discoveryService.searchByFullText(query, queryParams);
+ JSONArray rowsJsonArr = new JSONArray(jsonResultStr);
+
+ JSONObject response = new FullTextJSonResponseBuilder().results(rowsJsonArr).query(query).build();
+ return Response.ok(response).build();
+ } catch (IllegalArgumentException e) {
+ LOG.error("Unable to get entity list for query {}", query, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.BAD_REQUEST));
+ } catch (WebApplicationException e) {
+ LOG.error("Unable to get entity list for query {}", query, e);
+ throw e;
+ } catch (Throwable e) {
+ LOG.error("Unable to get entity list for query {}", query, e);
+ throw new WebApplicationException(Servlets.getErrorResponse(e, Response.Status.INTERNAL_SERVER_ERROR));
+ } finally {
+ AtlasPerfTracer.log(perf);
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("<== MetadataDiscoveryResource.searchUsingFullText({}, {}, {})", query, limit, offset);
+ }
+ }
+ }
+
+ private class JsonResponseBuilder {
+
+ protected int count = 0;
+ protected String query;
+ protected String queryType;
+ protected JSONObject response;
+
+ JsonResponseBuilder() {
+ this.response = new JSONObject();
+ }
+
+ protected JsonResponseBuilder count(int count) {
+ this.count = count;
+ return this;
+ }
+
+ public JsonResponseBuilder query(String query) {
+ this.query = query;
+ return this;
+ }
+
+ public JsonResponseBuilder queryType(String queryType) {
+ this.queryType = queryType;
+ return this;
+ }
+
+ protected JSONObject build() throws JSONException {
+
+ Preconditions.checkNotNull(query, "Query cannot be null");
+ Preconditions.checkNotNull(queryType, "Query Type must be specified");
+ Preconditions.checkArgument(count >= 0, "Search Result count should be > 0");
+
+ response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId());
+ response.put(AtlasClient.QUERY, query);
+ response.put(AtlasClient.QUERY_TYPE, queryType);
+ response.put(AtlasClient.COUNT, count);
+ return response;
+ }
+ }
+
+ private class DSLJSONResponseBuilder extends JsonResponseBuilder {
+
+ DSLJSONResponseBuilder() {
+ super();
+ }
+
+ private JSONObject dslResults;
+
+ public DSLJSONResponseBuilder results(JSONObject dslResults) {
+ this.dslResults = dslResults;
+ return this;
+ }
+
+ public DSLJSONResponseBuilder results(String dslResults) throws JSONException {
+ return results(new JSONObject(dslResults));
+ }
+
+ @Override
+ public JSONObject build() throws JSONException {
+ Preconditions.checkNotNull(dslResults);
+ JSONArray rowsJsonArr = dslResults.getJSONArray(AtlasClient.ROWS);
+ count(rowsJsonArr.length());
+ queryType(QUERY_TYPE_DSL);
+ JSONObject response = super.build();
+ response.put(AtlasClient.RESULTS, rowsJsonArr);
+ response.put(AtlasClient.DATATYPE, dslResults.get(AtlasClient.DATATYPE));
+ return response;
+ }
+
+ }
+
+ private class FullTextJSonResponseBuilder extends JsonResponseBuilder {
+
+ private JSONArray fullTextResults;
+
+ public FullTextJSonResponseBuilder results(JSONArray fullTextResults) {
+ this.fullTextResults = fullTextResults;
+ return this;
+ }
+
+ public FullTextJSonResponseBuilder results(String dslResults) throws JSONException {
+ return results(new JSONArray(dslResults));
+ }
+
+ public FullTextJSonResponseBuilder() {
+ super();
+ }
+
+ @Override
+ public JSONObject build() throws JSONException {
+ Preconditions.checkNotNull(fullTextResults);
+ count(fullTextResults.length());
+ queryType(QUERY_TYPE_FULLTEXT);
+
+ JSONObject response = super.build();
+ response.put(AtlasClient.RESULTS, fullTextResults);
+ return response;
+ }
+ }
+}
[3/5] atlas git commit: ATLAS-2251: relocated legacy classes in intg
module
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/instance/AtlasSystemAttributes.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/instance/AtlasSystemAttributes.java b/intg/src/main/java/org/apache/atlas/v1/model/instance/AtlasSystemAttributes.java
new file mode 100644
index 0000000..43eca0b
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/instance/AtlasSystemAttributes.java
@@ -0,0 +1,123 @@
+/**
+ * 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.v1.model.instance;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Objects;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class AtlasSystemAttributes implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String createdBy;
+ private String modifiedBy;
+ private Date createdTime;
+ private Date modifiedTime;
+
+
+ public AtlasSystemAttributes() {
+ }
+
+ public AtlasSystemAttributes(AtlasSystemAttributes that) {
+ if (that != null) {
+ this.createdBy = that.createdBy;
+ this.modifiedBy = that.modifiedBy;
+ this.createdTime = that.createdTime;
+ this.modifiedTime = that.modifiedTime;
+ }
+ }
+
+ public AtlasSystemAttributes(String createdBy, String modifiedBy, Date createdTime, Date modifiedTime){
+ this.createdBy = createdBy;
+ this.modifiedBy = modifiedBy;
+ this.createdTime = createdTime;
+ this.modifiedTime = modifiedTime;
+ }
+
+ public String getCreatedBy(){
+ return createdBy;
+ }
+
+ public void setCreatedBy(String createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ public String getModifiedBy(){
+ return modifiedBy;
+ }
+
+ public void setModifiedBy(String modifiedBy) {
+ this.modifiedBy = modifiedBy;
+ }
+
+ public Date getCreatedTime(){
+ return createdTime;
+ }
+
+ public void setCreatedTime(Date createdTime) {
+ this.createdTime = createdTime;
+ }
+
+ public Date getModifiedTime(){
+ return modifiedTime;
+ }
+
+ public void setModifiedTime(Date modifiedTime) {
+ this.modifiedTime = modifiedTime;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ AtlasSystemAttributes obj = (AtlasSystemAttributes) o;
+
+ return Objects.equals(createdBy, obj.createdBy) &&
+ Objects.equals(modifiedBy, obj.modifiedBy) &&
+ Objects.equals(createdTime, obj.createdTime) &&
+ Objects.equals(modifiedTime, obj.modifiedTime);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(createdBy, modifiedBy, createdTime, modifiedTime);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/instance/Id.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/instance/Id.java b/intg/src/main/java/org/apache/atlas/v1/model/instance/Id.java
new file mode 100644
index 0000000..1b250f0
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/instance/Id.java
@@ -0,0 +1,171 @@
+/**
+ * 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.v1.model.instance;
+
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class Id implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ @JsonIgnore
+ private static AtomicLong s_nextId = new AtomicLong(System.nanoTime());
+
+ public enum EntityState { ACTIVE, DELETED }
+
+ private String id;
+ private String typeName;
+ private int version;
+ private EntityState state;
+
+
+ public Id() {
+ }
+
+ public Id(Id that) {
+ if (that != null) {
+ this.id = that.id;
+ this.typeName = that.typeName;
+ this.version = that.version;
+ this.state = that.state;
+ }
+ }
+
+ public Id(String typeName) {
+ this("" + nextNegativeLong(), 0, typeName);
+ }
+
+ public Id(String id, int version, String typeName) {
+ this(id, version, typeName, null);
+ }
+
+ public Id(long id, int version, String typeName) {
+ this(id, version, typeName, null);
+ }
+
+ public Id(long id, int version, String typeName, String state) {
+ this("" + id, version, typeName, state);
+ }
+
+ public Id(String id, int version, String typeName, String state) {
+ this.id = id;
+ this.typeName = typeName;
+ this.version = version;
+ this.state = state == null ? EntityState.ACTIVE : EntityState.valueOf(state.toUpperCase());
+ }
+
+ // for serialization backward compatibility
+ public String getJsonClass() {
+ return "org.apache.atlas.typesystem.json.InstanceSerialization$_Id";
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ public int getVersion() {
+ return version;
+ }
+
+ public void setVersion(int version) {
+ this.version = version;
+ }
+
+ public EntityState getState() {
+ return state;
+ }
+
+ public void setState(EntityState state) {
+ this.state = state;
+ }
+
+ @JsonIgnore
+ public String _getId() {
+ return id;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ Id obj = (Id) o;
+
+ return version == obj.version &&
+ Objects.equals(id, obj.id) &&
+ Objects.equals(typeName, obj.typeName) &&
+ Objects.equals(state, obj.state);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, typeName, version, state);
+ }
+
+
+
+ private static long nextNegativeLong() {
+ long ret = s_nextId.getAndDecrement();
+
+ if (ret > 0) {
+ ret *= -1;
+ } else if (ret == 0) {
+ ret = Long.MIN_VALUE;
+ }
+
+ return ret;
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/instance/Referenceable.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/instance/Referenceable.java b/intg/src/main/java/org/apache/atlas/v1/model/instance/Referenceable.java
new file mode 100644
index 0000000..44b7a5c
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/instance/Referenceable.java
@@ -0,0 +1,201 @@
+/**
+ * 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.v1.model.instance;
+
+
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class Referenceable extends Struct implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Id id;
+ private Map<String, Struct> traits = new HashMap<>();
+ private List<String> traitNames = new ArrayList<>();
+ private AtlasSystemAttributes systemAttributes;
+
+
+ public Referenceable() {
+ super();
+ }
+
+ public Referenceable(Referenceable that) {
+ super(that);
+
+ if (that != null) {
+ this.id = new Id(that.id);
+
+ if (that.traits != null) {
+ this.traits.putAll(that.traits);
+ }
+
+ if (that.traitNames != null) {
+ this.traitNames.addAll(that.traitNames);
+ }
+
+ this.systemAttributes = new AtlasSystemAttributes(that.systemAttributes);
+ }
+ }
+
+ public Referenceable(String typeName, String... traitNames) {
+ super(typeName);
+
+ this.id = new Id(typeName);
+ this.systemAttributes = null;
+
+ if (traitNames != null) {
+ for (String traitName : traitNames) {
+ this.traitNames.add(traitName);
+ this.traits.put(traitName, new Struct(traitName));
+ }
+ }
+ }
+
+ public Referenceable(String typeName, Map<String, Object> values) {
+ this(new Id(typeName), typeName, values, null, null);
+ }
+
+ public Referenceable(String guid, String typeName, Map<String, Object> values) {
+ this(new Id(guid, 0, typeName), typeName, values, null, null, null);
+ }
+
+ public Referenceable(String guid, String typeName, Map<String, Object> values, AtlasSystemAttributes systemAttributes) {
+ this(new Id(guid, 0, typeName), typeName, values, systemAttributes, null, null);
+ }
+
+ public Referenceable(String guid, String typeName, Map<String, Object> values, AtlasSystemAttributes systemAttributes, List<String> traitNames, Map<String, Struct> traits) {
+ this(new Id(guid, 0, typeName), typeName, values, systemAttributes, traitNames, traits);
+ }
+
+ public Referenceable(String guid, String typeName, Map<String, Object> values, List<String> traitNames, Map<String, Struct> traits) {
+ this(new Id(guid, 0, typeName), typeName, values, null, traitNames, traits);
+ }
+
+ public Referenceable(Id id, String typeName, Map<String, Object> values, List<String> traitNames, Map<String, Struct> traits) {
+ this(id, typeName, values, null, traitNames, traits);
+ }
+
+ public Referenceable(Id id, String typeName, Map<String, Object> values, AtlasSystemAttributes systemAttributes, List<String> traitNames, Map<String, Struct> traits) {
+ super(typeName, values);
+
+ this.id = id;
+ this.systemAttributes = systemAttributes;
+
+ if (traitNames != null) {
+ this.traitNames = traitNames;
+ }
+
+ if (traits != null) {
+ this.traits = traits;
+ }
+ }
+
+
+ // for serialization backward compatibility
+ public String getJsonClass() {
+ return "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference";
+ }
+
+ public Id getId() {
+ return id;
+ }
+
+ public void setId(Id id) {
+ this.id = id;
+ }
+
+ public Map<String, Struct> getTraits() {
+ return traits;
+ }
+
+ public void setTraits(Map<String, Struct> traits) {
+ this.traits = traits;
+ }
+
+ public List<String> getTraitNames() {
+ return traitNames;
+ }
+
+ public void setTraitNames(List<String> traitNames) {
+ this.traitNames = traitNames;
+ }
+
+ public AtlasSystemAttributes getSystemAttributes() {
+ return systemAttributes;
+ }
+
+ public void setSystemAttributes(AtlasSystemAttributes systemAttributes) {
+ this.systemAttributes = systemAttributes;
+ }
+
+ @JsonIgnore
+ public Struct getTrait(String name) {
+ return traits != null ? traits.get(name) : null;
+ }
+
+ @JsonIgnore
+ public String toShortString() {
+ return String.format("entity[type=%s guid=%s]", getTypeName(), id._getId());
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || o.getClass() != getClass()) {
+ return false;
+ }
+
+ Referenceable obj = (Referenceable)o;
+
+ return Objects.equals(id, obj.id) &&
+ Objects.equals(traits, obj.traits) &&
+ Objects.equals(traitNames, obj.traitNames) &&
+ Objects.equals(systemAttributes, obj.systemAttributes);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, traits, traitNames, systemAttributes);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/instance/Struct.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/instance/Struct.java b/intg/src/main/java/org/apache/atlas/v1/model/instance/Struct.java
new file mode 100644
index 0000000..53e00ca
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/instance/Struct.java
@@ -0,0 +1,141 @@
+/**
+ * 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.v1.model.instance;
+
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnore;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class Struct implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String typeName;
+ private Map<String, Object> values;
+
+
+ public Struct() {
+ }
+
+ public Struct(Struct that) {
+ if (that != null) {
+ this.typeName = that.typeName;
+
+ if (that.values != null) {
+ this.values = new HashMap<>(that.values);
+ }
+ }
+ }
+
+ public Struct(String typeName) {
+ this(typeName, null);
+ }
+
+ public Struct(String typeName, Map<String, Object> values) {
+ this.typeName = typeName;
+ this.values = values;
+ }
+
+ // for serialization backward compatibility
+ public String getJsonClass() {
+ return "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct";
+ }
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ public Map<String, Object> getValues() {
+ return values;
+ }
+
+ public void setValues(Map<String, Object> values) {
+ this.values = values;
+ }
+
+ @JsonIgnore
+ public Map<String, Object> getValuesMap() {
+ return values;
+ }
+
+ @JsonIgnore
+ public void set(String attrName, Object attrValue) {
+ if (values == null) {
+ values = new HashMap<>();
+ }
+
+ values.put(attrName, attrValue);
+ }
+
+ @JsonIgnore
+ public Object get(String attrName) {
+ return values != null ? values.get(attrName) : null;
+ }
+
+ @JsonIgnore
+ public void setNull(String attrName) {
+ if (values != null) {
+ values.remove(attrName);
+ }
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || o.getClass() != getClass()) {
+ return false;
+ }
+
+ Struct obj = (Struct)o;
+
+ return Objects.equals(typeName, obj.typeName) &&
+ Objects.equals(values, obj.values);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(typeName, values);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/AttributeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/AttributeDefinition.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/AttributeDefinition.java
new file mode 100644
index 0000000..6afc624
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/AttributeDefinition.java
@@ -0,0 +1,159 @@
+/**
+ * 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.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class AttributeDefinition implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String name;
+ private String dataTypeName;
+ private Multiplicity multiplicity;
+ private boolean isComposite; // A composite is the one whose lifecycle is dependent on the enclosing type and is not just a reference
+ private boolean isUnique;
+ private boolean isIndexable;
+ private String reverseAttributeName; // If this is a reference attribute, then the name of the attribute on the Class that this refers to.
+
+
+
+ public AttributeDefinition() {
+ }
+
+ public AttributeDefinition(String name, String dataTypeName, Multiplicity multiplicity) {
+ this(name, dataTypeName, multiplicity, false, false, true, null);
+ }
+
+ public AttributeDefinition(String name, String dataTypeName, Multiplicity multiplicity, boolean isComposite,
+ String reverseAttributeName) {
+ this(name, dataTypeName, multiplicity, isComposite, false, false, reverseAttributeName);
+ }
+
+ public AttributeDefinition(String name, String dataTypeName, Multiplicity multiplicity, boolean isComposite, boolean isUnique, boolean isIndexable, String reverseAttributeName) {
+ this.name = name;
+ this.dataTypeName = dataTypeName;
+ this.multiplicity = multiplicity;
+ this.isComposite = isComposite;
+ this.isUnique = isUnique;
+ this.isIndexable = isIndexable;
+ this.reverseAttributeName = reverseAttributeName;
+ }
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDataTypeName() {
+ return dataTypeName;
+ }
+
+ public void setDataTypeName(String dataTypeName) {
+ this.dataTypeName = dataTypeName;
+ }
+
+ public Multiplicity getMultiplicity() {
+ return multiplicity;
+ }
+
+ public void setMultiplicity(Multiplicity multiplicity) {
+ this.multiplicity = multiplicity;
+ }
+
+ public boolean getIsComposite() {
+ return isComposite;
+ }
+
+ public void setIsComposite(boolean isComposite) {
+ this.isComposite = isComposite;
+ }
+
+ public boolean getIsUnique() {
+ return isUnique;
+ }
+
+ public void setIsUnique(boolean isUnique) {
+ this.isUnique = isUnique;
+ }
+
+ public boolean getIsIndexable() {
+ return isIndexable;
+ }
+
+ public void setIsIndexable(boolean isIndexable) {
+ this.isIndexable = isIndexable;
+ }
+
+ public String getReverseAttributeName() {
+ return reverseAttributeName;
+ }
+
+ public void setReverseAttributeName(String reverseAttributeName) {
+ this.reverseAttributeName = reverseAttributeName;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ AttributeDefinition that = (AttributeDefinition) o;
+
+ return isComposite == that.isComposite &&
+ isUnique == that.isUnique &&
+ isIndexable == that.isIndexable &&
+ Objects.equals(name, that.name) &&
+ Objects.equals(dataTypeName, that.dataTypeName) &&
+ Objects.equals(multiplicity, that.multiplicity) &&
+ Objects.equals(reverseAttributeName, that.reverseAttributeName);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, dataTypeName, multiplicity, isComposite, isUnique, isIndexable, reverseAttributeName);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/ClassTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/ClassTypeDefinition.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/ClassTypeDefinition.java
new file mode 100644
index 0000000..8fae175
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/ClassTypeDefinition.java
@@ -0,0 +1,51 @@
+/**
+ * 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.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class ClassTypeDefinition extends HierarchicalTypeDefinition implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+ public ClassTypeDefinition() {
+ }
+
+ public ClassTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions, Set<String> superTypes) {
+ super(typeName, typeDescription, typeVersion, attributeDefinitions, "org.apache.atlas.typesystem.types.ClassType", superTypes);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/EnumTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/EnumTypeDefinition.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/EnumTypeDefinition.java
new file mode 100644
index 0000000..d2fdaf8
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/EnumTypeDefinition.java
@@ -0,0 +1,174 @@
+/**
+ * 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.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Objects;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class EnumTypeDefinition implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String name;
+ private String description;
+ private String version;
+ private List<EnumValue> enumValues;
+
+
+ public EnumTypeDefinition() {
+ }
+
+ public EnumTypeDefinition(String name, String description, String version, List<EnumValue> enumValues) {
+ this.name = name;
+ this.description = description;
+ this.version = version;
+ this.enumValues = enumValues;
+ }
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public List<EnumValue> getEnumValues() {
+ return enumValues;
+ }
+
+ public void setEnumValues(List<EnumValue> enumValues) {
+ this.enumValues = enumValues;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ EnumTypeDefinition that = (EnumTypeDefinition) o;
+
+ return Objects.equals(name, that.name) &&
+ Objects.equals(description, that.description) &&
+ Objects.equals(version, that.version) &&
+ Objects.equals(enumValues, that.enumValues);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, description, version, enumValues);
+ }
+
+
+ @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+ @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+ @JsonIgnoreProperties(ignoreUnknown=true)
+ @XmlRootElement
+ @XmlAccessorType(XmlAccessType.PROPERTY)
+ public static class EnumValue implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String value;
+ private int ordinal;
+
+ public EnumValue() {
+ }
+
+ public EnumValue(String value, int ordinal) {
+ this.value = value;
+ this.ordinal = ordinal;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public int getOrdinal() {
+ return ordinal;
+ }
+
+ public void setOrdinal(int ordinal) {
+ this.ordinal = ordinal;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ EnumValue that = (EnumValue) o;
+
+ return ordinal == that.ordinal &&
+ Objects.equals(value, that.value);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(value, ordinal);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/HierarchicalTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/HierarchicalTypeDefinition.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/HierarchicalTypeDefinition.java
new file mode 100644
index 0000000..65d63a7
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/HierarchicalTypeDefinition.java
@@ -0,0 +1,96 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.atlas.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class HierarchicalTypeDefinition extends StructTypeDefinition implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+ private String hierarchicalMetaTypeName = "org.apache.atlas.typesystem.types.TraitType";
+ private Set<String> superTypes;
+
+
+ public HierarchicalTypeDefinition() {
+ }
+
+ public HierarchicalTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions, String hierarchicalMetaTypeName, Set<String> superTypes) {
+ super(typeName, typeDescription, typeVersion, attributeDefinitions);
+
+ this.hierarchicalMetaTypeName = hierarchicalMetaTypeName;
+ this.superTypes = superTypes;
+ }
+
+ public String getHierarchicalMetaTypeName() {
+ return hierarchicalMetaTypeName;
+ }
+
+ public void setHierarchicalMetaTypeName(String hierarchicalMetaTypeName) {
+ this.hierarchicalMetaTypeName = hierarchicalMetaTypeName;
+ }
+
+ public Set<String> getSuperTypes() {
+ return superTypes;
+ }
+
+ public void setSuperTypes(Set<String> superTypes) {
+ this.superTypes = superTypes;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass() || !super.equals(o)) {
+ return false;
+ }
+
+ HierarchicalTypeDefinition that = (HierarchicalTypeDefinition) o;
+
+ return Objects.equals(superTypes, that.superTypes) &&
+ Objects.equals(hierarchicalMetaTypeName, that.hierarchicalMetaTypeName);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(super.hashCode(), superTypes, hierarchicalMetaTypeName);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/Multiplicity.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/Multiplicity.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/Multiplicity.java
new file mode 100644
index 0000000..8ac5732
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/Multiplicity.java
@@ -0,0 +1,113 @@
+/**
+ * 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.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class Multiplicity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final Multiplicity OPTIONAL = new Multiplicity(0, 1, false);
+ public static final Multiplicity REQUIRED = new Multiplicity(1, 1, false);
+ public static final Multiplicity COLLECTION = new Multiplicity(1, Integer.MAX_VALUE, false);
+ public static final Multiplicity SET = new Multiplicity(1, Integer.MAX_VALUE, true);
+
+ private int lower;
+ private int upper;
+ private boolean isUnique;
+
+ public Multiplicity() {
+ this(Multiplicity.REQUIRED);
+ }
+
+ public Multiplicity(Multiplicity copyFrom) {
+ this(copyFrom.lower, copyFrom.upper, copyFrom.isUnique);
+ }
+
+ public Multiplicity(int lower, int upper, boolean isUnique) {
+ this.lower = lower;
+ this.upper = upper;
+ this.isUnique = isUnique;
+ }
+
+ public int getLower() {
+ return lower;
+ }
+
+ public void setLower(int lower) {
+ this.lower = lower;
+ }
+
+ public int getUpper() {
+ return upper;
+ }
+
+ public void setUpper(int upper) {
+ this.upper = upper;
+ }
+
+ public boolean getIsUnique() {
+ return isUnique;
+ }
+
+ public void setIsUnique(boolean isUnique) {
+ this.isUnique = isUnique;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ Multiplicity that = (Multiplicity) o;
+
+ return lower == that.lower &&
+ upper == that.upper &&
+ isUnique == that.isUnique;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(lower, upper, isUnique);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/StructTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/StructTypeDefinition.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/StructTypeDefinition.java
new file mode 100644
index 0000000..842439d
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/StructTypeDefinition.java
@@ -0,0 +1,119 @@
+/**
+ * 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.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Objects;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class StructTypeDefinition implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private String typeName;
+ private String typeDescription;
+ private String typeVersion;
+ private List<AttributeDefinition> attributeDefinitions;
+
+
+ public StructTypeDefinition() {
+ }
+
+ public StructTypeDefinition(String typeName, String typeDescription, List<AttributeDefinition> attributeDefinitions) {
+ this(typeName, typeDescription, "1.0", attributeDefinitions);
+ }
+
+ public StructTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions) {
+ this.typeName = typeName;
+ this.typeDescription = typeDescription;
+ this.typeVersion = typeVersion;
+ this.attributeDefinitions = attributeDefinitions;
+ }
+
+
+ public String getTypeName() {
+ return typeName;
+ }
+
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ public String getTypeDescription() {
+ return typeDescription;
+ }
+
+ public void setTypeDescription(String typeDescription) {
+ this.typeDescription = typeDescription;
+ }
+
+ public String getTypeVersion() {
+ return typeVersion;
+ }
+
+ public void setTypeVersion(String typeVersion) {
+ this.typeVersion = typeVersion;
+ }
+
+ public List<AttributeDefinition> getAttributeDefinitions() {
+ return attributeDefinitions;
+ }
+
+ public void setAttributeDefinitions(List<AttributeDefinition> attributeDefinitions) {
+ this.attributeDefinitions = attributeDefinitions;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ StructTypeDefinition that = (StructTypeDefinition) o;
+
+ return Objects.equals(typeName, that.typeName) &&
+ Objects.equals(typeDescription, that.typeDescription) &&
+ Objects.equals(typeVersion, that.typeVersion) &&
+ Objects.equals(attributeDefinitions, that.attributeDefinitions);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(typeName, typeDescription, typeVersion, attributeDefinitions);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/TraitTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/TraitTypeDefinition.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/TraitTypeDefinition.java
new file mode 100644
index 0000000..9caf62a
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/TraitTypeDefinition.java
@@ -0,0 +1,51 @@
+/**
+ * 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.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Set;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class TraitTypeDefinition extends HierarchicalTypeDefinition implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+ public TraitTypeDefinition() {
+ }
+
+ public TraitTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions, Set<String> superTypes) {
+ super(typeName, typeDescription, typeVersion, attributeDefinitions, "org.apache.atlas.typesystem.types.TraitType", superTypes);
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/model/typedef/TypesDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/model/typedef/TypesDef.java b/intg/src/main/java/org/apache/atlas/v1/model/typedef/TypesDef.java
new file mode 100644
index 0000000..1e67839
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/model/typedef/TypesDef.java
@@ -0,0 +1,91 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.atlas.v1.model.typedef;
+
+import org.codehaus.jackson.annotate.JsonAutoDetect;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.map.annotate.JsonSerialize;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.Serializable;
+import java.util.List;
+
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
+import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.PROPERTY)
+public class TypesDef implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private List<EnumTypeDefinition> enumTypes;
+ private List<StructTypeDefinition> structTypes;
+ private List<TraitTypeDefinition> traitTypes;
+ private List<ClassTypeDefinition> classTypes;
+
+
+ public TypesDef() {
+ }
+
+ public TypesDef(List<EnumTypeDefinition> enumTypes, List<StructTypeDefinition> structTypes, List<TraitTypeDefinition> traitTypes, List<ClassTypeDefinition> classTypes) {
+ this.enumTypes = enumTypes;
+ this.structTypes = structTypes;
+ this.traitTypes = traitTypes;
+ this.classTypes = classTypes;
+ }
+
+
+ public List<EnumTypeDefinition> getEnumTypes() {
+ return enumTypes;
+ }
+
+ public void setEnumTypes(List<EnumTypeDefinition> enumTypes) {
+ this.enumTypes = enumTypes;
+ }
+
+ public List<StructTypeDefinition> getStructTypes() {
+ return structTypes;
+ }
+
+ public void setStructTypes(List<StructTypeDefinition> structTypes) {
+ this.structTypes = structTypes;
+ }
+
+ public List<TraitTypeDefinition> getTraitTypes() {
+ return traitTypes;
+ }
+
+ public void setTraitTypes(List<TraitTypeDefinition> traitTypes) {
+ this.traitTypes = traitTypes;
+ }
+
+ public List<ClassTypeDefinition> getClassTypes() {
+ return classTypes;
+ }
+
+ public void setClassTypes(List<ClassTypeDefinition> classTypes) {
+ this.classTypes = classTypes;
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/v1/typesystem/types/utils/TypesUtil.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/v1/typesystem/types/utils/TypesUtil.java b/intg/src/main/java/org/apache/atlas/v1/typesystem/types/utils/TypesUtil.java
new file mode 100644
index 0000000..864623a
--- /dev/null
+++ b/intg/src/main/java/org/apache/atlas/v1/typesystem/types/utils/TypesUtil.java
@@ -0,0 +1,112 @@
+/**
+ * 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.v1.typesystem.types.utils;
+
+
+import org.apache.atlas.v1.model.typedef.AttributeDefinition;
+import org.apache.atlas.v1.model.typedef.ClassTypeDefinition;
+import org.apache.atlas.v1.model.typedef.Multiplicity;
+import org.apache.atlas.v1.model.typedef.TraitTypeDefinition;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+
+public class TypesUtil {
+ public static ClassTypeDefinition createClassTypeDef(String name, String description, Set<String> superTypes, AttributeDefinition... attributes) {
+ ClassTypeDefinition ret = new ClassTypeDefinition(name, description, "1.0", Arrays.asList(attributes), superTypes);
+
+ return ret;
+ }
+
+ public static ClassTypeDefinition createClassTypeDef(String name, String description, String typeVersion, Set<String> superTypes, AttributeDefinition... attributes) {
+ ClassTypeDefinition ret = new ClassTypeDefinition(name, description, typeVersion, Arrays.asList(attributes), superTypes);
+
+ return ret;
+ }
+
+ public static TraitTypeDefinition createTraitTypeDef(String name, String description, Set<String> superTypes, AttributeDefinition... attributes) {
+ return createTraitTypeDef(name, description, superTypes, Arrays.asList(attributes));
+ }
+
+ public static TraitTypeDefinition createTraitTypeDef(String name, String description, String typeVersion, Set<String> superTypes, AttributeDefinition... attributes) {
+ return createTraitTypeDef(name, description, typeVersion, superTypes, Arrays.asList(attributes));
+ }
+
+ public static TraitTypeDefinition createTraitTypeDef(String name, String description, Set<String> superTypes, List<AttributeDefinition> attributes) {
+ TraitTypeDefinition ret = new TraitTypeDefinition(name, description, "1.0", attributes, superTypes);
+
+ return ret;
+ }
+
+ public static TraitTypeDefinition createTraitTypeDef(String name, String description, String typeVersion, Set<String> superTypes, List<AttributeDefinition> attributes) {
+ TraitTypeDefinition ret = new TraitTypeDefinition(name, description, typeVersion, attributes, superTypes);
+
+ return ret;
+ }
+
+ public static AttributeDefinition createUniqueRequiredAttrDef(String name, String dataTypeName) {
+ AttributeDefinition ret = new AttributeDefinition(name, dataTypeName, Multiplicity.REQUIRED, false, true, true, null);
+
+ return ret;
+ }
+
+ public static AttributeDefinition createRequiredAttrDef(String name, String dataTypeName) {
+ AttributeDefinition ret = new AttributeDefinition(name, dataTypeName, Multiplicity.REQUIRED, false, false, true, null);
+
+ return ret;
+ }
+
+ public static AttributeDefinition createOptionalAttrDef(String name, String dataTypeName) {
+ AttributeDefinition ret = new AttributeDefinition(name, dataTypeName, Multiplicity.OPTIONAL, false, false, true, null);
+
+ return ret;
+ }
+
+ public static class Pair<L, R> {
+ public L left;
+ public R right;
+
+ public Pair(L left, R right) {
+ this.left = left;
+ this.right = right;
+ }
+
+ public static <L, R> Pair<L, R> of(L left, R right) {
+ return new Pair<>(left, right);
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ Pair p = (Pair)o;
+
+ return Objects.equals(left, p.left) && Objects.equals(right, p.right);
+ }
+
+ public int hashCode() { return Objects.hash(left, right); }
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java b/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
index efe0b88..f412217 100644
--- a/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
+++ b/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
@@ -21,7 +21,7 @@ package org.apache.atlas.hook;
import com.google.common.annotations.VisibleForTesting;
import org.apache.atlas.ApplicationProperties;
import org.apache.atlas.kafka.NotificationProvider;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.NotificationException;
import org.apache.atlas.notification.NotificationInterface;
import org.apache.atlas.notification.hook.HookNotification;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/main/java/org/apache/atlas/notification/AbstractMessageDeserializer.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/notification/AbstractMessageDeserializer.java b/notification/src/main/java/org/apache/atlas/notification/AbstractMessageDeserializer.java
index 67bbb22..5bfe90e 100644
--- a/notification/src/main/java/org/apache/atlas/notification/AbstractMessageDeserializer.java
+++ b/notification/src/main/java/org/apache/atlas/notification/AbstractMessageDeserializer.java
@@ -27,8 +27,8 @@ import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.reflect.TypeToken;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasType;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/main/java/org/apache/atlas/notification/AbstractNotification.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/notification/AbstractNotification.java b/notification/src/main/java/org/apache/atlas/notification/AbstractNotification.java
index 9dcda57..988d98a 100644
--- a/notification/src/main/java/org/apache/atlas/notification/AbstractNotification.java
+++ b/notification/src/main/java/org/apache/atlas/notification/AbstractNotification.java
@@ -26,7 +26,7 @@ import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import org.apache.atlas.AtlasException;
import org.apache.atlas.ha.HAConfiguration;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.AtlasNotificationBaseMessage.CompressionKind;
import org.apache.atlas.type.AtlasType;
import org.apache.commons.configuration.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotification.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotification.java b/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotification.java
index 9ccb699..96e2e2f 100644
--- a/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotification.java
+++ b/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotification.java
@@ -18,8 +18,8 @@
package org.apache.atlas.notification.entity;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotificationImpl.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotificationImpl.java b/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotificationImpl.java
index ce3cde6..ab8e4c8 100644
--- a/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotificationImpl.java
+++ b/notification/src/main/java/org/apache/atlas/notification/entity/EntityNotificationImpl.java
@@ -18,8 +18,8 @@
package org.apache.atlas.notification.entity;
import org.apache.atlas.AtlasException;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasTypeRegistry;
import org.apache.commons.collections.CollectionUtils;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/main/java/org/apache/atlas/notification/hook/HookNotification.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/notification/hook/HookNotification.java b/notification/src/main/java/org/apache/atlas/notification/hook/HookNotification.java
index d80c466..ca596ea 100644
--- a/notification/src/main/java/org/apache/atlas/notification/hook/HookNotification.java
+++ b/notification/src/main/java/org/apache/atlas/notification/hook/HookNotification.java
@@ -22,8 +22,8 @@ import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.typedef.TypesDef;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.typedef.TypesDef;
import org.apache.atlas.type.AtlasType;
import org.apache.commons.lang.StringUtils;
import org.codehaus.jettison.json.JSONArray;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/test/java/org/apache/atlas/kafka/KafkaConsumerTest.java
----------------------------------------------------------------------
diff --git a/notification/src/test/java/org/apache/atlas/kafka/KafkaConsumerTest.java b/notification/src/test/java/org/apache/atlas/kafka/KafkaConsumerTest.java
index 2b9a96d..071a725 100644
--- a/notification/src/test/java/org/apache/atlas/kafka/KafkaConsumerTest.java
+++ b/notification/src/test/java/org/apache/atlas/kafka/KafkaConsumerTest.java
@@ -19,8 +19,8 @@
package org.apache.atlas.kafka;
import kafka.message.MessageAndMetadata;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.notification.*;
import org.apache.atlas.notification.AtlasNotificationMessage;
import org.apache.atlas.notification.entity.EntityNotificationImplTest;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/test/java/org/apache/atlas/kafka/KafkaNotificationTest.java
----------------------------------------------------------------------
diff --git a/notification/src/test/java/org/apache/atlas/kafka/KafkaNotificationTest.java b/notification/src/test/java/org/apache/atlas/kafka/KafkaNotificationTest.java
index e300d8b..5e3cf41 100644
--- a/notification/src/test/java/org/apache/atlas/kafka/KafkaNotificationTest.java
+++ b/notification/src/test/java/org/apache/atlas/kafka/KafkaNotificationTest.java
@@ -19,7 +19,7 @@
package org.apache.atlas.kafka;
import org.apache.atlas.ApplicationProperties;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.NotificationConsumer;
import org.apache.atlas.notification.NotificationInterface;
import org.apache.atlas.notification.hook.HookNotification;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/test/java/org/apache/atlas/notification/entity/EntityMessageDeserializerTest.java
----------------------------------------------------------------------
diff --git a/notification/src/test/java/org/apache/atlas/notification/entity/EntityMessageDeserializerTest.java b/notification/src/test/java/org/apache/atlas/notification/entity/EntityMessageDeserializerTest.java
index 4d8d991..faafb87 100644
--- a/notification/src/test/java/org/apache/atlas/notification/entity/EntityMessageDeserializerTest.java
+++ b/notification/src/test/java/org/apache/atlas/notification/entity/EntityMessageDeserializerTest.java
@@ -18,8 +18,8 @@
package org.apache.atlas.notification.entity;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.notification.AbstractNotification;
import org.testng.annotations.Test;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java
----------------------------------------------------------------------
diff --git a/notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java b/notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java
index 7530431..81a0784 100644
--- a/notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java
+++ b/notification/src/test/java/org/apache/atlas/notification/entity/EntityNotificationImplTest.java
@@ -18,8 +18,8 @@
package org.apache.atlas.notification.entity;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasTypeRegistry;
import org.testng.annotations.Test;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/test/java/org/apache/atlas/notification/hook/HookMessageDeserializerTest.java
----------------------------------------------------------------------
diff --git a/notification/src/test/java/org/apache/atlas/notification/hook/HookMessageDeserializerTest.java b/notification/src/test/java/org/apache/atlas/notification/hook/HookMessageDeserializerTest.java
index 3e1c3dd..758abad 100644
--- a/notification/src/test/java/org/apache/atlas/notification/hook/HookMessageDeserializerTest.java
+++ b/notification/src/test/java/org/apache/atlas/notification/hook/HookMessageDeserializerTest.java
@@ -18,8 +18,8 @@
package org.apache.atlas.notification.hook;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.notification.AbstractNotification;
import org.apache.atlas.notification.entity.EntityNotificationImplTest;
import org.apache.atlas.notification.hook.HookNotification.EntityUpdateRequest;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/notification/src/test/java/org/apache/atlas/notification/hook/HookNotificationTest.java
----------------------------------------------------------------------
diff --git a/notification/src/test/java/org/apache/atlas/notification/hook/HookNotificationTest.java b/notification/src/test/java/org/apache/atlas/notification/hook/HookNotificationTest.java
index 786fbfe..9ea688c 100644
--- a/notification/src/test/java/org/apache/atlas/notification/hook/HookNotificationTest.java
+++ b/notification/src/test/java/org/apache/atlas/notification/hook/HookNotificationTest.java
@@ -17,7 +17,7 @@
*/
package org.apache.atlas.notification.hook;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.type.AtlasType;
import org.testng.annotations.Test;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListener.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListener.java b/repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListener.java
index 36a2d54..47d4e1d 100644
--- a/repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListener.java
+++ b/repository/src/main/java/org/apache/atlas/repository/audit/EntityAuditListener.java
@@ -23,8 +23,8 @@ import org.apache.atlas.EntityAuditEvent;
import org.apache.atlas.EntityAuditEvent.EntityAuditAction;
import org.apache.atlas.RequestContextV1;
import org.apache.atlas.listener.EntityChangeListener;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasEntityType;
import org.apache.atlas.type.AtlasStructType;
import org.apache.atlas.type.AtlasType;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/converters/AtlasClassificationFormatConverter.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasClassificationFormatConverter.java b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasClassificationFormatConverter.java
index 39e7c2f..d91772c 100644
--- a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasClassificationFormatConverter.java
+++ b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasClassificationFormatConverter.java
@@ -21,7 +21,7 @@ import org.apache.atlas.AtlasErrorCode;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.TypeCategory;
import org.apache.atlas.model.instance.AtlasClassification;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.type.AtlasTypeRegistry;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEntityFormatConverter.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEntityFormatConverter.java b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEntityFormatConverter.java
index 940890c..a529dc1 100644
--- a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEntityFormatConverter.java
+++ b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEntityFormatConverter.java
@@ -24,10 +24,10 @@ import org.apache.atlas.model.instance.AtlasClassification;
import org.apache.atlas.model.instance.AtlasEntity;
import org.apache.atlas.model.instance.AtlasEntity.Status;
import org.apache.atlas.model.instance.AtlasObjectId;
-import org.apache.atlas.model.v1.instance.AtlasSystemAttributes;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.AtlasSystemAttributes;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasEntityType;
import org.apache.atlas.type.AtlasType;
@@ -39,7 +39,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEnumFormatConverter.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEnumFormatConverter.java b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEnumFormatConverter.java
index 29c74dc..da76c5a 100644
--- a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEnumFormatConverter.java
+++ b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasEnumFormatConverter.java
@@ -21,7 +21,7 @@ package org.apache.atlas.repository.converters;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.TypeCategory;
import org.apache.atlas.model.typedef.AtlasEnumDef.AtlasEnumElementDef;
-import org.apache.atlas.model.v1.typedef.EnumTypeDefinition.EnumValue;
+import org.apache.atlas.v1.model.typedef.EnumTypeDefinition.EnumValue;
import org.apache.atlas.type.AtlasEnumType;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.type.AtlasTypeRegistry;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/converters/AtlasInstanceConverter.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasInstanceConverter.java b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasInstanceConverter.java
index 6f27fff..87448ee 100644
--- a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasInstanceConverter.java
+++ b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasInstanceConverter.java
@@ -30,8 +30,8 @@ import org.apache.atlas.model.instance.EntityMutationResponse;
import org.apache.atlas.model.instance.EntityMutations.EntityOperation;
import org.apache.atlas.model.instance.GuidMapping;
import org.apache.atlas.model.legacy.EntityResult;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.repository.converters.AtlasFormatConverter.ConverterContext;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasEntityType;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/converters/AtlasObjectIdConverter.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasObjectIdConverter.java b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasObjectIdConverter.java
index e03a6a9..a5b6d84 100644
--- a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasObjectIdConverter.java
+++ b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasObjectIdConverter.java
@@ -23,8 +23,8 @@ import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.TypeCategory;
import org.apache.atlas.model.instance.AtlasEntity;
import org.apache.atlas.model.instance.AtlasObjectId;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.type.AtlasEntityType;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.type.AtlasTypeRegistry;
@@ -102,7 +102,7 @@ public class AtlasObjectIdConverter extends AtlasAbstractFormatConverter {
return ret;
}
- private boolean hasAnyAssignedAttribute(org.apache.atlas.model.v1.instance.Referenceable rInstance) {
+ private boolean hasAnyAssignedAttribute(org.apache.atlas.v1.model.instance.Referenceable rInstance) {
boolean ret = false;
Map<String, Object> attributes = rInstance.getValues();
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/converters/AtlasStructFormatConverter.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasStructFormatConverter.java b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasStructFormatConverter.java
index b03eda3..70b23c5 100644
--- a/repository/src/main/java/org/apache/atlas/repository/converters/AtlasStructFormatConverter.java
+++ b/repository/src/main/java/org/apache/atlas/repository/converters/AtlasStructFormatConverter.java
@@ -23,7 +23,7 @@ import org.apache.atlas.model.TypeCategory;
import org.apache.atlas.model.instance.AtlasEntity;
import org.apache.atlas.model.instance.AtlasObjectId;
import org.apache.atlas.model.instance.AtlasStruct;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.*;
import org.apache.atlas.type.AtlasBuiltInTypes.AtlasObjectIdType;
import org.apache.atlas.type.AtlasStructType.AtlasAttribute;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/converters/TypeConverterUtil.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/converters/TypeConverterUtil.java b/repository/src/main/java/org/apache/atlas/repository/converters/TypeConverterUtil.java
index 564f459..33f092e 100644
--- a/repository/src/main/java/org/apache/atlas/repository/converters/TypeConverterUtil.java
+++ b/repository/src/main/java/org/apache/atlas/repository/converters/TypeConverterUtil.java
@@ -37,13 +37,13 @@ import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.Cardinali
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasConstraintDef;
import org.apache.atlas.model.typedef.AtlasTypeDefHeader;
import org.apache.atlas.model.typedef.AtlasTypesDef;
-import org.apache.atlas.model.v1.typedef.AttributeDefinition;
-import org.apache.atlas.model.v1.typedef.ClassTypeDefinition;
-import org.apache.atlas.model.v1.typedef.EnumTypeDefinition;
-import org.apache.atlas.model.v1.typedef.Multiplicity;
-import org.apache.atlas.model.v1.typedef.StructTypeDefinition;
-import org.apache.atlas.model.v1.typedef.TraitTypeDefinition;
-import org.apache.atlas.model.v1.typedef.TypesDef;
+import org.apache.atlas.v1.model.typedef.AttributeDefinition;
+import org.apache.atlas.v1.model.typedef.ClassTypeDefinition;
+import org.apache.atlas.v1.model.typedef.EnumTypeDefinition;
+import org.apache.atlas.v1.model.typedef.Multiplicity;
+import org.apache.atlas.v1.model.typedef.StructTypeDefinition;
+import org.apache.atlas.v1.model.typedef.TraitTypeDefinition;
+import org.apache.atlas.v1.model.typedef.TypesDef;
import org.apache.atlas.repository.store.graph.v1.AtlasStructDefStoreV1;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasEntityType;
@@ -53,7 +53,7 @@ import org.apache.atlas.type.AtlasStructType.AtlasAttribute;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.type.AtlasTypeRegistry;
import org.apache.atlas.type.AtlasTypeUtil;
-import org.apache.atlas.model.v1.typedef.EnumTypeDefinition.EnumValue;
+import org.apache.atlas.v1.model.typedef.EnumTypeDefinition.EnumValue;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
index fab8ffc..a0a3df1 100755
--- a/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
+++ b/repository/src/main/java/org/apache/atlas/repository/graph/GraphHelper.java
@@ -30,8 +30,8 @@ import org.apache.atlas.model.instance.AtlasEntity.Status;
import org.apache.atlas.model.instance.AtlasObjectId;
import org.apache.atlas.model.instance.AtlasRelationship;
import org.apache.atlas.model.typedef.AtlasRelationshipDef;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.type.AtlasStructType.AtlasAttribute;
import org.apache.atlas.type.AtlasStructType.AtlasAttribute.AtlasRelationshipEdgeDirection;
import org.apache.atlas.repository.Constants;
@@ -46,18 +46,12 @@ import org.apache.atlas.repository.store.graph.v1.AtlasGraphUtilsV1;
import org.apache.atlas.type.AtlasEntityType;
import org.apache.atlas.type.AtlasRelationshipType;
import org.apache.atlas.type.AtlasType;
-import org.apache.atlas.type.AtlasTypeRegistry;
import org.apache.atlas.typesystem.exception.EntityNotFoundException;
-import org.apache.atlas.typesystem.exception.TypeNotFoundException;
-import org.apache.atlas.typesystem.types.DataTypes;
-import org.apache.atlas.typesystem.types.DataTypes.TypeCategory;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
import org.apache.atlas.util.AttributeValueMap;
import org.apache.atlas.util.IndexedInstance;
import org.apache.atlas.utils.ParamChecker;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
-import org.codehaus.jettison.json.JSONArray;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -72,7 +66,6 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
-import java.util.Stack;
import java.util.UUID;
import static org.apache.atlas.type.AtlasStructType.AtlasAttribute.AtlasRelationshipEdgeDirection.BOTH;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java
index 88b76cc..1d5a6ac 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasEntityChangeNotifier.java
@@ -18,7 +18,6 @@
package org.apache.atlas.repository.store.graph.v1;
-import org.apache.atlas.AtlasErrorCode;
import org.apache.atlas.AtlasException;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.listener.EntityChangeListener;
@@ -26,8 +25,8 @@ import org.apache.atlas.model.instance.AtlasClassification;
import org.apache.atlas.model.instance.AtlasEntityHeader;
import org.apache.atlas.model.instance.EntityMutationResponse;
import org.apache.atlas.model.instance.EntityMutations.EntityOperation;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.repository.Constants;
import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import org.apache.atlas.repository.graph.FullTextMapperV2;
[4/5] atlas git commit: ATLAS-2251: relocated legacy classes in intg
module
Posted by ma...@apache.org.
ATLAS-2251: relocated legacy classes in intg module
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/eacf8513
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/eacf8513
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/eacf8513
Branch: refs/heads/ATLAS-2251
Commit: eacf85133bf9facc6bcd5c09d016aa28d7ef1873
Parents: da4cf2d
Author: Madhan Neethiraj <ma...@apache.org>
Authored: Sun Nov 5 12:41:07 2017 -0800
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Sun Nov 5 12:41:07 2017 -0800
----------------------------------------------------------------------
.../atlas/falcon/bridge/FalconBridge.java | 2 +-
.../apache/atlas/falcon/hook/FalconHook.java | 2 +-
.../apache/atlas/falcon/hook/FalconHookIT.java | 6 +-
.../atlas/hbase/bridge/HBaseAtlasHook.java | 2 +-
.../apache/atlas/hbase/HBaseAtlasHookIT.java | 2 +-
.../atlas/hive/bridge/ColumnLineageUtils.java | 2 +-
.../atlas/hive/bridge/HiveMetaStoreBridge.java | 6 +-
.../org/apache/atlas/hive/hook/HiveHook.java | 2 +-
.../java/org/apache/atlas/hive/HiveITBase.java | 4 +-
.../hive/bridge/HiveMetaStoreBridgeTest.java | 2 +-
.../hive/bridge/HiveMetastoreBridgeIT.java | 4 +-
.../org/apache/atlas/hive/hook/HiveHookIT.java | 6 +-
.../org/apache/atlas/sqoop/hook/SqoopHook.java | 2 +-
.../apache/atlas/storm/hook/StormAtlasHook.java | 2 +-
.../atlas/storm/hook/StormAtlasHookIT.java | 2 +-
.../main/java/org/apache/atlas/AtlasClient.java | 12 +-
.../java/org/apache/atlas/EntityAuditEvent.java | 2 +-
.../java/org/apache/atlas/AtlasClientTest.java | 2 +-
.../v1/instance/AtlasSystemAttributes.java | 123 ------------
.../org/apache/atlas/model/v1/instance/Id.java | 171 ----------------
.../atlas/model/v1/instance/Referenceable.java | 201 -------------------
.../apache/atlas/model/v1/instance/Struct.java | 141 -------------
.../model/v1/typedef/AttributeDefinition.java | 159 ---------------
.../model/v1/typedef/ClassTypeDefinition.java | 51 -----
.../model/v1/typedef/EnumTypeDefinition.java | 174 ----------------
.../v1/typedef/HierarchicalTypeDefinition.java | 96 ---------
.../atlas/model/v1/typedef/Multiplicity.java | 113 -----------
.../model/v1/typedef/StructTypeDefinition.java | 119 -----------
.../model/v1/typedef/TraitTypeDefinition.java | 51 -----
.../apache/atlas/model/v1/typedef/TypesDef.java | 91 ---------
.../java/org/apache/atlas/type/AtlasType.java | 2 +-
.../atlas/typesystem/types/utils/TypesUtil.java | 112 -----------
.../model/instance/AtlasSystemAttributes.java | 123 ++++++++++++
.../org/apache/atlas/v1/model/instance/Id.java | 171 ++++++++++++++++
.../atlas/v1/model/instance/Referenceable.java | 201 +++++++++++++++++++
.../apache/atlas/v1/model/instance/Struct.java | 141 +++++++++++++
.../v1/model/typedef/AttributeDefinition.java | 159 +++++++++++++++
.../v1/model/typedef/ClassTypeDefinition.java | 51 +++++
.../v1/model/typedef/EnumTypeDefinition.java | 174 ++++++++++++++++
.../typedef/HierarchicalTypeDefinition.java | 96 +++++++++
.../atlas/v1/model/typedef/Multiplicity.java | 113 +++++++++++
.../v1/model/typedef/StructTypeDefinition.java | 119 +++++++++++
.../v1/model/typedef/TraitTypeDefinition.java | 51 +++++
.../apache/atlas/v1/model/typedef/TypesDef.java | 91 +++++++++
.../v1/typesystem/types/utils/TypesUtil.java | 112 +++++++++++
.../java/org/apache/atlas/hook/AtlasHook.java | 2 +-
.../AbstractMessageDeserializer.java | 4 +-
.../notification/AbstractNotification.java | 2 +-
.../notification/entity/EntityNotification.java | 4 +-
.../entity/EntityNotificationImpl.java | 4 +-
.../notification/hook/HookNotification.java | 4 +-
.../apache/atlas/kafka/KafkaConsumerTest.java | 4 +-
.../atlas/kafka/KafkaNotificationTest.java | 2 +-
.../entity/EntityMessageDeserializerTest.java | 4 +-
.../entity/EntityNotificationImplTest.java | 4 +-
.../hook/HookMessageDeserializerTest.java | 4 +-
.../notification/hook/HookNotificationTest.java | 2 +-
.../repository/audit/EntityAuditListener.java | 4 +-
.../AtlasClassificationFormatConverter.java | 2 +-
.../converters/AtlasEntityFormatConverter.java | 9 +-
.../converters/AtlasEnumFormatConverter.java | 2 +-
.../converters/AtlasInstanceConverter.java | 4 +-
.../converters/AtlasObjectIdConverter.java | 6 +-
.../converters/AtlasStructFormatConverter.java | 2 +-
.../converters/TypeConverterUtil.java | 16 +-
.../atlas/repository/graph/GraphHelper.java | 11 +-
.../graph/v1/AtlasEntityChangeNotifier.java | 5 +-
.../store/graph/v1/AtlasStructDefStoreV1.java | 2 +-
.../apache/atlas/util/AttributeValueMap.java | 2 +-
.../org/apache/atlas/util/IndexedInstance.java | 2 +-
.../atlas/listener/EntityChangeListener.java | 4 +-
.../org/apache/atlas/examples/QuickStart.java | 8 +-
.../NotificationEntityChangeListener.java | 4 +-
.../notification/NotificationHookConsumer.java | 2 +-
.../atlas/web/resources/EntityResource.java | 6 +-
.../atlas/web/resources/TypesResource.java | 2 +-
.../org/apache/atlas/web/util/LineageUtils.java | 2 +-
.../org/apache/atlas/examples/QuickStartIT.java | 4 +-
.../notification/EntityNotificationIT.java | 10 +-
.../NotificationEntityChangeListenerTest.java | 4 +-
.../NotificationHookConsumerIT.java | 4 +-
.../NotificationHookConsumerKafkaTest.java | 2 +-
.../NotificationHookConsumerTest.java | 2 +-
.../atlas/web/integration/BaseResourceIT.java | 12 +-
.../DataSetLineageJerseyResourceIT.java | 10 +-
.../EntityDiscoveryJerseyResourceIT.java | 4 +-
.../web/integration/EntityJerseyResourceIT.java | 10 +-
.../EntityLineageJerseyResourceIT.java | 4 +-
.../integration/EntityV2JerseyResourceIT.java | 2 +-
.../MetadataDiscoveryJerseyResourceIT.java | 10 +-
.../web/integration/TypesJerseyResourceIT.java | 6 +-
91 files changed, 1739 insertions(+), 1748 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
----------------------------------------------------------------------
diff --git a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
index cd61c9b..11d13b3 100644
--- a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
+++ b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/bridge/FalconBridge.java
@@ -24,7 +24,7 @@ import org.apache.atlas.falcon.Util.EventUtil;
import org.apache.atlas.falcon.model.FalconDataTypes;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.falcon.FalconException;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
----------------------------------------------------------------------
diff --git a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
index 54335e0..e9b9765 100644
--- a/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
+++ b/addons/falcon-bridge/src/main/java/org/apache/atlas/falcon/hook/FalconHook.java
@@ -25,7 +25,7 @@ import org.apache.atlas.falcon.event.FalconEvent;
import org.apache.atlas.falcon.publisher.FalconEventPublisher;
import org.apache.atlas.hook.AtlasHook;
import org.apache.atlas.kafka.NotificationProvider;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification;
import org.apache.falcon.FalconException;
import org.apache.falcon.entity.store.ConfigurationStore;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
----------------------------------------------------------------------
diff --git a/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java b/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
index baa2ad2..c073b3e 100644
--- a/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
+++ b/addons/falcon-bridge/src/test/java/org/apache/atlas/falcon/hook/FalconHookIT.java
@@ -26,9 +26,9 @@ import org.apache.atlas.falcon.bridge.FalconBridge;
import org.apache.atlas.falcon.model.FalconDataTypes;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.atlas.utils.ParamChecker;
import org.apache.commons.configuration.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
----------------------------------------------------------------------
diff --git a/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java b/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
index a16e6ae..af5eda8 100644
--- a/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
+++ b/addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/bridge/HBaseAtlasHook.java
@@ -23,7 +23,7 @@ import org.apache.atlas.AtlasConstants;
import org.apache.atlas.hbase.model.HBaseOperationContext;
import org.apache.atlas.hbase.model.HBaseDataTypes;
import org.apache.atlas.hook.AtlasHook;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification;
import org.apache.commons.configuration.Configuration;
import org.apache.hadoop.hbase.HTableDescriptor;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
----------------------------------------------------------------------
diff --git a/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java b/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
index abdf502..0d2e8df 100644
--- a/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
+++ b/addons/hbase-bridge/src/test/java/org/apache/atlas/hbase/HBaseAtlasHookIT.java
@@ -22,7 +22,7 @@ import org.apache.atlas.ApplicationProperties;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.hbase.bridge.HBaseAtlasHook;
import org.apache.atlas.hbase.model.HBaseDataTypes;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.atlas.utils.ParamChecker;
import org.apache.hadoop.conf.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
index 0aab7b8..ba10008 100644
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/ColumnLineageUtils.java
@@ -20,7 +20,7 @@ package org.apache.atlas.hive.bridge;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.hadoop.hive.ql.hooks.LineageInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
index 8d34492..ab0094b 100755
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
@@ -27,9 +27,9 @@ import org.apache.atlas.AtlasServiceException;
import org.apache.atlas.hive.hook.HiveHook;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.hook.AtlasHookException;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.commons.cli.BasicParser;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
index 18e7950..9a5d1b9 100755
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
@@ -28,7 +28,7 @@ import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.hook.AtlasHook;
import org.apache.atlas.hook.AtlasHookException;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
index 608b6a0..d9fb46e 100644
--- a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
+++ b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/HiveITBase.java
@@ -23,8 +23,8 @@ import org.apache.atlas.AtlasClient;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.hook.HiveHookIT;
import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.atlas.utils.ParamChecker;
import org.apache.commons.configuration.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
index aed2644..8cc1bc9 100644
--- a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
+++ b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridgeTest.java
@@ -21,7 +21,7 @@ package org.apache.atlas.hive.bridge;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.AtlasServiceException;
import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.metastore.TableType;
import org.apache.hadoop.hive.metastore.api.Database;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
index 83c195e..22d3c59 100644
--- a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
+++ b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/bridge/HiveMetastoreBridgeIT.java
@@ -21,8 +21,8 @@ package org.apache.atlas.hive.bridge;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.hive.HiveITBase;
import org.apache.atlas.hive.model.HiveDataTypes;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
import org.testng.annotations.Test;
import java.util.List;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
index 0e4a61b..e90e7e3 100755
--- a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
+++ b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java
@@ -27,9 +27,9 @@ import org.apache.atlas.hive.HiveITBase;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Struct;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.commons.lang.StringUtils;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.metastore.TableType;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/hook/SqoopHook.java
----------------------------------------------------------------------
diff --git a/addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/hook/SqoopHook.java b/addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/hook/SqoopHook.java
index 79c0177..6c1aa99 100644
--- a/addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/hook/SqoopHook.java
+++ b/addons/sqoop-bridge/src/main/java/org/apache/atlas/sqoop/hook/SqoopHook.java
@@ -26,7 +26,7 @@ import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
import org.apache.atlas.hive.model.HiveDataTypes;
import org.apache.atlas.hook.AtlasHook;
import org.apache.atlas.hook.AtlasHookException;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification;
import org.apache.atlas.sqoop.model.SqoopDataTypes;
import org.apache.commons.configuration.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/storm-bridge/src/main/java/org/apache/atlas/storm/hook/StormAtlasHook.java
----------------------------------------------------------------------
diff --git a/addons/storm-bridge/src/main/java/org/apache/atlas/storm/hook/StormAtlasHook.java b/addons/storm-bridge/src/main/java/org/apache/atlas/storm/hook/StormAtlasHook.java
index 4114323..57fc7a1 100644
--- a/addons/storm-bridge/src/main/java/org/apache/atlas/storm/hook/StormAtlasHook.java
+++ b/addons/storm-bridge/src/main/java/org/apache/atlas/storm/hook/StormAtlasHook.java
@@ -18,7 +18,7 @@
package org.apache.atlas.storm.hook;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.storm.ISubmitterHook;
import org.apache.storm.generated.Bolt;
import org.apache.storm.generated.SpoutSpec;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/addons/storm-bridge/src/test/java/org/apache/atlas/storm/hook/StormAtlasHookIT.java
----------------------------------------------------------------------
diff --git a/addons/storm-bridge/src/test/java/org/apache/atlas/storm/hook/StormAtlasHookIT.java b/addons/storm-bridge/src/test/java/org/apache/atlas/storm/hook/StormAtlasHookIT.java
index 3ff3052..5fef38d 100644
--- a/addons/storm-bridge/src/test/java/org/apache/atlas/storm/hook/StormAtlasHookIT.java
+++ b/addons/storm-bridge/src/test/java/org/apache/atlas/storm/hook/StormAtlasHookIT.java
@@ -21,7 +21,7 @@ package org.apache.atlas.storm.hook;
import org.apache.atlas.ApplicationProperties;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.hive.bridge.HiveMetaStoreBridge;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.storm.model.StormDataTypes;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.commons.configuration.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/client/client-v1/src/main/java/org/apache/atlas/AtlasClient.java
----------------------------------------------------------------------
diff --git a/client/client-v1/src/main/java/org/apache/atlas/AtlasClient.java b/client/client-v1/src/main/java/org/apache/atlas/AtlasClient.java
index c3f8602..bcdec71 100644
--- a/client/client-v1/src/main/java/org/apache/atlas/AtlasClient.java
+++ b/client/client-v1/src/main/java/org/apache/atlas/AtlasClient.java
@@ -21,12 +21,12 @@ package org.apache.atlas;
import com.google.common.annotations.VisibleForTesting;
import com.sun.jersey.api.client.WebResource;
import org.apache.atlas.model.legacy.EntityResult;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
-import org.apache.atlas.model.v1.typedef.AttributeDefinition;
-import org.apache.atlas.model.v1.typedef.TraitTypeDefinition;
-import org.apache.atlas.model.v1.typedef.TypesDef;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.v1.model.typedef.AttributeDefinition;
+import org.apache.atlas.v1.model.typedef.TraitTypeDefinition;
+import org.apache.atlas.v1.model.typedef.TypesDef;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.typesystem.types.DataTypes;
import org.apache.commons.configuration.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/client/client-v1/src/main/java/org/apache/atlas/EntityAuditEvent.java
----------------------------------------------------------------------
diff --git a/client/client-v1/src/main/java/org/apache/atlas/EntityAuditEvent.java b/client/client-v1/src/main/java/org/apache/atlas/EntityAuditEvent.java
index 05b9282..567205f 100644
--- a/client/client-v1/src/main/java/org/apache/atlas/EntityAuditEvent.java
+++ b/client/client-v1/src/main/java/org/apache/atlas/EntityAuditEvent.java
@@ -19,7 +19,7 @@
package org.apache.atlas;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.type.AtlasType;
import java.util.Objects;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/client/client-v1/src/test/java/org/apache/atlas/AtlasClientTest.java
----------------------------------------------------------------------
diff --git a/client/client-v1/src/test/java/org/apache/atlas/AtlasClientTest.java b/client/client-v1/src/test/java/org/apache/atlas/AtlasClientTest.java
index 99d1328..5287af4 100644
--- a/client/client-v1/src/test/java/org/apache/atlas/AtlasClientTest.java
+++ b/client/client-v1/src/test/java/org/apache/atlas/AtlasClientTest.java
@@ -22,7 +22,7 @@ import com.sun.jersey.api.client.ClientHandlerException;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import org.apache.atlas.model.legacy.EntityResult;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.type.AtlasType;
import org.apache.commons.configuration.Configuration;
import org.apache.hadoop.security.UserGroupInformation;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/instance/AtlasSystemAttributes.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/instance/AtlasSystemAttributes.java b/intg/src/main/java/org/apache/atlas/model/v1/instance/AtlasSystemAttributes.java
deleted file mode 100644
index 43a2fe1..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/instance/AtlasSystemAttributes.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.model.v1.instance;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.Date;
-import java.util.Objects;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class AtlasSystemAttributes implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String createdBy;
- private String modifiedBy;
- private Date createdTime;
- private Date modifiedTime;
-
-
- public AtlasSystemAttributes() {
- }
-
- public AtlasSystemAttributes(AtlasSystemAttributes that) {
- if (that != null) {
- this.createdBy = that.createdBy;
- this.modifiedBy = that.modifiedBy;
- this.createdTime = that.createdTime;
- this.modifiedTime = that.modifiedTime;
- }
- }
-
- public AtlasSystemAttributes(String createdBy, String modifiedBy, Date createdTime, Date modifiedTime){
- this.createdBy = createdBy;
- this.modifiedBy = modifiedBy;
- this.createdTime = createdTime;
- this.modifiedTime = modifiedTime;
- }
-
- public String getCreatedBy(){
- return createdBy;
- }
-
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- public String getModifiedBy(){
- return modifiedBy;
- }
-
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
- public Date getCreatedTime(){
- return createdTime;
- }
-
- public void setCreatedTime(Date createdTime) {
- this.createdTime = createdTime;
- }
-
- public Date getModifiedTime(){
- return modifiedTime;
- }
-
- public void setModifiedTime(Date modifiedTime) {
- this.modifiedTime = modifiedTime;
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- AtlasSystemAttributes obj = (AtlasSystemAttributes) o;
-
- return Objects.equals(createdBy, obj.createdBy) &&
- Objects.equals(modifiedBy, obj.modifiedBy) &&
- Objects.equals(createdTime, obj.createdTime) &&
- Objects.equals(modifiedTime, obj.modifiedTime);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(createdBy, modifiedBy, createdTime, modifiedTime);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/instance/Id.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/instance/Id.java b/intg/src/main/java/org/apache/atlas/model/v1/instance/Id.java
deleted file mode 100644
index 5ff4c3d..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/instance/Id.java
+++ /dev/null
@@ -1,171 +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.model.v1.instance;
-
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.Objects;
-import java.util.concurrent.atomic.AtomicLong;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class Id implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @JsonIgnore
- private static AtomicLong s_nextId = new AtomicLong(System.nanoTime());
-
- public enum EntityState { ACTIVE, DELETED }
-
- private String id;
- private String typeName;
- private int version;
- private EntityState state;
-
-
- public Id() {
- }
-
- public Id(Id that) {
- if (that != null) {
- this.id = that.id;
- this.typeName = that.typeName;
- this.version = that.version;
- this.state = that.state;
- }
- }
-
- public Id(String typeName) {
- this("" + nextNegativeLong(), 0, typeName);
- }
-
- public Id(String id, int version, String typeName) {
- this(id, version, typeName, null);
- }
-
- public Id(long id, int version, String typeName) {
- this(id, version, typeName, null);
- }
-
- public Id(long id, int version, String typeName, String state) {
- this("" + id, version, typeName, state);
- }
-
- public Id(String id, int version, String typeName, String state) {
- this.id = id;
- this.typeName = typeName;
- this.version = version;
- this.state = state == null ? EntityState.ACTIVE : EntityState.valueOf(state.toUpperCase());
- }
-
- // for serialization backward compatibility
- public String getJsonClass() {
- return "org.apache.atlas.typesystem.json.InstanceSerialization$_Id";
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getTypeName() {
- return typeName;
- }
-
- public void setTypeName(String typeName) {
- this.typeName = typeName;
- }
-
- public int getVersion() {
- return version;
- }
-
- public void setVersion(int version) {
- this.version = version;
- }
-
- public EntityState getState() {
- return state;
- }
-
- public void setState(EntityState state) {
- this.state = state;
- }
-
- @JsonIgnore
- public String _getId() {
- return id;
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- Id obj = (Id) o;
-
- return version == obj.version &&
- Objects.equals(id, obj.id) &&
- Objects.equals(typeName, obj.typeName) &&
- Objects.equals(state, obj.state);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, typeName, version, state);
- }
-
-
-
- private static long nextNegativeLong() {
- long ret = s_nextId.getAndDecrement();
-
- if (ret > 0) {
- ret *= -1;
- } else if (ret == 0) {
- ret = Long.MIN_VALUE;
- }
-
- return ret;
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/instance/Referenceable.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/instance/Referenceable.java b/intg/src/main/java/org/apache/atlas/model/v1/instance/Referenceable.java
deleted file mode 100644
index df541b7..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/instance/Referenceable.java
+++ /dev/null
@@ -1,201 +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.model.v1.instance;
-
-
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class Referenceable extends Struct implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private Id id;
- private Map<String, Struct> traits = new HashMap<>();
- private List<String> traitNames = new ArrayList<>();
- private AtlasSystemAttributes systemAttributes;
-
-
- public Referenceable() {
- super();
- }
-
- public Referenceable(Referenceable that) {
- super(that);
-
- if (that != null) {
- this.id = new Id(that.id);
-
- if (that.traits != null) {
- this.traits.putAll(that.traits);
- }
-
- if (that.traitNames != null) {
- this.traitNames.addAll(that.traitNames);
- }
-
- this.systemAttributes = new AtlasSystemAttributes(that.systemAttributes);
- }
- }
-
- public Referenceable(String typeName, String... traitNames) {
- super(typeName);
-
- this.id = new Id(typeName);
- this.systemAttributes = null;
-
- if (traitNames != null) {
- for (String traitName : traitNames) {
- this.traitNames.add(traitName);
- this.traits.put(traitName, new Struct(traitName));
- }
- }
- }
-
- public Referenceable(String typeName, Map<String, Object> values) {
- this(new Id(typeName), typeName, values, null, null);
- }
-
- public Referenceable(String guid, String typeName, Map<String, Object> values) {
- this(new Id(guid, 0, typeName), typeName, values, null, null, null);
- }
-
- public Referenceable(String guid, String typeName, Map<String, Object> values, AtlasSystemAttributes systemAttributes) {
- this(new Id(guid, 0, typeName), typeName, values, systemAttributes, null, null);
- }
-
- public Referenceable(String guid, String typeName, Map<String, Object> values, AtlasSystemAttributes systemAttributes, List<String> traitNames, Map<String, Struct> traits) {
- this(new Id(guid, 0, typeName), typeName, values, systemAttributes, traitNames, traits);
- }
-
- public Referenceable(String guid, String typeName, Map<String, Object> values, List<String> traitNames, Map<String, Struct> traits) {
- this(new Id(guid, 0, typeName), typeName, values, null, traitNames, traits);
- }
-
- public Referenceable(Id id, String typeName, Map<String, Object> values, List<String> traitNames, Map<String, Struct> traits) {
- this(id, typeName, values, null, traitNames, traits);
- }
-
- public Referenceable(Id id, String typeName, Map<String, Object> values, AtlasSystemAttributes systemAttributes, List<String> traitNames, Map<String, Struct> traits) {
- super(typeName, values);
-
- this.id = id;
- this.systemAttributes = systemAttributes;
-
- if (traitNames != null) {
- this.traitNames = traitNames;
- }
-
- if (traits != null) {
- this.traits = traits;
- }
- }
-
-
- // for serialization backward compatibility
- public String getJsonClass() {
- return "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference";
- }
-
- public Id getId() {
- return id;
- }
-
- public void setId(Id id) {
- this.id = id;
- }
-
- public Map<String, Struct> getTraits() {
- return traits;
- }
-
- public void setTraits(Map<String, Struct> traits) {
- this.traits = traits;
- }
-
- public List<String> getTraitNames() {
- return traitNames;
- }
-
- public void setTraitNames(List<String> traitNames) {
- this.traitNames = traitNames;
- }
-
- public AtlasSystemAttributes getSystemAttributes() {
- return systemAttributes;
- }
-
- public void setSystemAttributes(AtlasSystemAttributes systemAttributes) {
- this.systemAttributes = systemAttributes;
- }
-
- @JsonIgnore
- public Struct getTrait(String name) {
- return traits != null ? traits.get(name) : null;
- }
-
- @JsonIgnore
- public String toShortString() {
- return String.format("entity[type=%s guid=%s]", getTypeName(), id._getId());
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || o.getClass() != getClass()) {
- return false;
- }
-
- Referenceable obj = (Referenceable)o;
-
- return Objects.equals(id, obj.id) &&
- Objects.equals(traits, obj.traits) &&
- Objects.equals(traitNames, obj.traitNames) &&
- Objects.equals(systemAttributes, obj.systemAttributes);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(id, traits, traitNames, systemAttributes);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/instance/Struct.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/instance/Struct.java b/intg/src/main/java/org/apache/atlas/model/v1/instance/Struct.java
deleted file mode 100644
index 52bf98e..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/instance/Struct.java
+++ /dev/null
@@ -1,141 +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.model.v1.instance;
-
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnore;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class Struct implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String typeName;
- private Map<String, Object> values;
-
-
- public Struct() {
- }
-
- public Struct(Struct that) {
- if (that != null) {
- this.typeName = that.typeName;
-
- if (that.values != null) {
- this.values = new HashMap<>(that.values);
- }
- }
- }
-
- public Struct(String typeName) {
- this(typeName, null);
- }
-
- public Struct(String typeName, Map<String, Object> values) {
- this.typeName = typeName;
- this.values = values;
- }
-
- // for serialization backward compatibility
- public String getJsonClass() {
- return "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct";
- }
-
- public String getTypeName() {
- return typeName;
- }
-
- public void setTypeName(String typeName) {
- this.typeName = typeName;
- }
-
- public Map<String, Object> getValues() {
- return values;
- }
-
- public void setValues(Map<String, Object> values) {
- this.values = values;
- }
-
- @JsonIgnore
- public Map<String, Object> getValuesMap() {
- return values;
- }
-
- @JsonIgnore
- public void set(String attrName, Object attrValue) {
- if (values == null) {
- values = new HashMap<>();
- }
-
- values.put(attrName, attrValue);
- }
-
- @JsonIgnore
- public Object get(String attrName) {
- return values != null ? values.get(attrName) : null;
- }
-
- @JsonIgnore
- public void setNull(String attrName) {
- if (values != null) {
- values.remove(attrName);
- }
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || o.getClass() != getClass()) {
- return false;
- }
-
- Struct obj = (Struct)o;
-
- return Objects.equals(typeName, obj.typeName) &&
- Objects.equals(values, obj.values);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(typeName, values);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/AttributeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/AttributeDefinition.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/AttributeDefinition.java
deleted file mode 100644
index c1369f7..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/AttributeDefinition.java
+++ /dev/null
@@ -1,159 +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.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class AttributeDefinition implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String name;
- private String dataTypeName;
- private Multiplicity multiplicity;
- private boolean isComposite; // A composite is the one whose lifecycle is dependent on the enclosing type and is not just a reference
- private boolean isUnique;
- private boolean isIndexable;
- private String reverseAttributeName; // If this is a reference attribute, then the name of the attribute on the Class that this refers to.
-
-
-
- public AttributeDefinition() {
- }
-
- public AttributeDefinition(String name, String dataTypeName, Multiplicity multiplicity) {
- this(name, dataTypeName, multiplicity, false, false, true, null);
- }
-
- public AttributeDefinition(String name, String dataTypeName, Multiplicity multiplicity, boolean isComposite,
- String reverseAttributeName) {
- this(name, dataTypeName, multiplicity, isComposite, false, false, reverseAttributeName);
- }
-
- public AttributeDefinition(String name, String dataTypeName, Multiplicity multiplicity, boolean isComposite, boolean isUnique, boolean isIndexable, String reverseAttributeName) {
- this.name = name;
- this.dataTypeName = dataTypeName;
- this.multiplicity = multiplicity;
- this.isComposite = isComposite;
- this.isUnique = isUnique;
- this.isIndexable = isIndexable;
- this.reverseAttributeName = reverseAttributeName;
- }
-
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDataTypeName() {
- return dataTypeName;
- }
-
- public void setDataTypeName(String dataTypeName) {
- this.dataTypeName = dataTypeName;
- }
-
- public Multiplicity getMultiplicity() {
- return multiplicity;
- }
-
- public void setMultiplicity(Multiplicity multiplicity) {
- this.multiplicity = multiplicity;
- }
-
- public boolean getIsComposite() {
- return isComposite;
- }
-
- public void setIsComposite(boolean isComposite) {
- this.isComposite = isComposite;
- }
-
- public boolean getIsUnique() {
- return isUnique;
- }
-
- public void setIsUnique(boolean isUnique) {
- this.isUnique = isUnique;
- }
-
- public boolean getIsIndexable() {
- return isIndexable;
- }
-
- public void setIsIndexable(boolean isIndexable) {
- this.isIndexable = isIndexable;
- }
-
- public String getReverseAttributeName() {
- return reverseAttributeName;
- }
-
- public void setReverseAttributeName(String reverseAttributeName) {
- this.reverseAttributeName = reverseAttributeName;
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- AttributeDefinition that = (AttributeDefinition) o;
-
- return isComposite == that.isComposite &&
- isUnique == that.isUnique &&
- isIndexable == that.isIndexable &&
- Objects.equals(name, that.name) &&
- Objects.equals(dataTypeName, that.dataTypeName) &&
- Objects.equals(multiplicity, that.multiplicity) &&
- Objects.equals(reverseAttributeName, that.reverseAttributeName);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, dataTypeName, multiplicity, isComposite, isUnique, isIndexable, reverseAttributeName);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/ClassTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/ClassTypeDefinition.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/ClassTypeDefinition.java
deleted file mode 100644
index 54440e6..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/ClassTypeDefinition.java
+++ /dev/null
@@ -1,51 +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.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Set;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class ClassTypeDefinition extends HierarchicalTypeDefinition implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- public ClassTypeDefinition() {
- }
-
- public ClassTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions, Set<String> superTypes) {
- super(typeName, typeDescription, typeVersion, attributeDefinitions, "org.apache.atlas.typesystem.types.ClassType", superTypes);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/EnumTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/EnumTypeDefinition.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/EnumTypeDefinition.java
deleted file mode 100644
index 45ffce5..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/EnumTypeDefinition.java
+++ /dev/null
@@ -1,174 +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.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Objects;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class EnumTypeDefinition implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String name;
- private String description;
- private String version;
- private List<EnumValue> enumValues;
-
-
- public EnumTypeDefinition() {
- }
-
- public EnumTypeDefinition(String name, String description, String version, List<EnumValue> enumValues) {
- this.name = name;
- this.description = description;
- this.version = version;
- this.enumValues = enumValues;
- }
-
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- public List<EnumValue> getEnumValues() {
- return enumValues;
- }
-
- public void setEnumValues(List<EnumValue> enumValues) {
- this.enumValues = enumValues;
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- EnumTypeDefinition that = (EnumTypeDefinition) o;
-
- return Objects.equals(name, that.name) &&
- Objects.equals(description, that.description) &&
- Objects.equals(version, that.version) &&
- Objects.equals(enumValues, that.enumValues);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(name, description, version, enumValues);
- }
-
-
- @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
- @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
- @JsonIgnoreProperties(ignoreUnknown=true)
- @XmlRootElement
- @XmlAccessorType(XmlAccessType.PROPERTY)
- public static class EnumValue implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String value;
- private int ordinal;
-
- public EnumValue() {
- }
-
- public EnumValue(String value, int ordinal) {
- this.value = value;
- this.ordinal = ordinal;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public int getOrdinal() {
- return ordinal;
- }
-
- public void setOrdinal(int ordinal) {
- this.ordinal = ordinal;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- EnumValue that = (EnumValue) o;
-
- return ordinal == that.ordinal &&
- Objects.equals(value, that.value);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(value, ordinal);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/HierarchicalTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/HierarchicalTypeDefinition.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/HierarchicalTypeDefinition.java
deleted file mode 100644
index 0a3daba..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/HierarchicalTypeDefinition.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.atlas.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Objects;
-import java.util.Set;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class HierarchicalTypeDefinition extends StructTypeDefinition implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- private String hierarchicalMetaTypeName = "org.apache.atlas.typesystem.types.TraitType";
- private Set<String> superTypes;
-
-
- public HierarchicalTypeDefinition() {
- }
-
- public HierarchicalTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions, String hierarchicalMetaTypeName, Set<String> superTypes) {
- super(typeName, typeDescription, typeVersion, attributeDefinitions);
-
- this.hierarchicalMetaTypeName = hierarchicalMetaTypeName;
- this.superTypes = superTypes;
- }
-
- public String getHierarchicalMetaTypeName() {
- return hierarchicalMetaTypeName;
- }
-
- public void setHierarchicalMetaTypeName(String hierarchicalMetaTypeName) {
- this.hierarchicalMetaTypeName = hierarchicalMetaTypeName;
- }
-
- public Set<String> getSuperTypes() {
- return superTypes;
- }
-
- public void setSuperTypes(Set<String> superTypes) {
- this.superTypes = superTypes;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass() || !super.equals(o)) {
- return false;
- }
-
- HierarchicalTypeDefinition that = (HierarchicalTypeDefinition) o;
-
- return Objects.equals(superTypes, that.superTypes) &&
- Objects.equals(hierarchicalMetaTypeName, that.hierarchicalMetaTypeName);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(super.hashCode(), superTypes, hierarchicalMetaTypeName);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/Multiplicity.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/Multiplicity.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/Multiplicity.java
deleted file mode 100644
index b975834..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/Multiplicity.java
+++ /dev/null
@@ -1,113 +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.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import java.io.Serializable;
-import java.util.Objects;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class Multiplicity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final Multiplicity OPTIONAL = new Multiplicity(0, 1, false);
- public static final Multiplicity REQUIRED = new Multiplicity(1, 1, false);
- public static final Multiplicity COLLECTION = new Multiplicity(1, Integer.MAX_VALUE, false);
- public static final Multiplicity SET = new Multiplicity(1, Integer.MAX_VALUE, true);
-
- private int lower;
- private int upper;
- private boolean isUnique;
-
- public Multiplicity() {
- this(Multiplicity.REQUIRED);
- }
-
- public Multiplicity(Multiplicity copyFrom) {
- this(copyFrom.lower, copyFrom.upper, copyFrom.isUnique);
- }
-
- public Multiplicity(int lower, int upper, boolean isUnique) {
- this.lower = lower;
- this.upper = upper;
- this.isUnique = isUnique;
- }
-
- public int getLower() {
- return lower;
- }
-
- public void setLower(int lower) {
- this.lower = lower;
- }
-
- public int getUpper() {
- return upper;
- }
-
- public void setUpper(int upper) {
- this.upper = upper;
- }
-
- public boolean getIsUnique() {
- return isUnique;
- }
-
- public void setIsUnique(boolean isUnique) {
- this.isUnique = isUnique;
- }
-
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- Multiplicity that = (Multiplicity) o;
-
- return lower == that.lower &&
- upper == that.upper &&
- isUnique == that.isUnique;
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(lower, upper, isUnique);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/StructTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/StructTypeDefinition.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/StructTypeDefinition.java
deleted file mode 100644
index e030a8f..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/StructTypeDefinition.java
+++ /dev/null
@@ -1,119 +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.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Objects;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class StructTypeDefinition implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private String typeName;
- private String typeDescription;
- private String typeVersion;
- private List<AttributeDefinition> attributeDefinitions;
-
-
- public StructTypeDefinition() {
- }
-
- public StructTypeDefinition(String typeName, String typeDescription, List<AttributeDefinition> attributeDefinitions) {
- this(typeName, typeDescription, "1.0", attributeDefinitions);
- }
-
- public StructTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions) {
- this.typeName = typeName;
- this.typeDescription = typeDescription;
- this.typeVersion = typeVersion;
- this.attributeDefinitions = attributeDefinitions;
- }
-
-
- public String getTypeName() {
- return typeName;
- }
-
- public void setTypeName(String typeName) {
- this.typeName = typeName;
- }
-
- public String getTypeDescription() {
- return typeDescription;
- }
-
- public void setTypeDescription(String typeDescription) {
- this.typeDescription = typeDescription;
- }
-
- public String getTypeVersion() {
- return typeVersion;
- }
-
- public void setTypeVersion(String typeVersion) {
- this.typeVersion = typeVersion;
- }
-
- public List<AttributeDefinition> getAttributeDefinitions() {
- return attributeDefinitions;
- }
-
- public void setAttributeDefinitions(List<AttributeDefinition> attributeDefinitions) {
- this.attributeDefinitions = attributeDefinitions;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- StructTypeDefinition that = (StructTypeDefinition) o;
-
- return Objects.equals(typeName, that.typeName) &&
- Objects.equals(typeDescription, that.typeDescription) &&
- Objects.equals(typeVersion, that.typeVersion) &&
- Objects.equals(attributeDefinitions, that.attributeDefinitions);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(typeName, typeDescription, typeVersion, attributeDefinitions);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/TraitTypeDefinition.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/TraitTypeDefinition.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/TraitTypeDefinition.java
deleted file mode 100644
index 0e99201..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/TraitTypeDefinition.java
+++ /dev/null
@@ -1,51 +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.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-import java.util.Set;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class TraitTypeDefinition extends HierarchicalTypeDefinition implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- public TraitTypeDefinition() {
- }
-
- public TraitTypeDefinition(String typeName, String typeDescription, String typeVersion, List<AttributeDefinition> attributeDefinitions, Set<String> superTypes) {
- super(typeName, typeDescription, typeVersion, attributeDefinitions, "org.apache.atlas.typesystem.types.TraitType", superTypes);
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/model/v1/typedef/TypesDef.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/model/v1/typedef/TypesDef.java b/intg/src/main/java/org/apache/atlas/model/v1/typedef/TypesDef.java
deleted file mode 100644
index 6e11841..0000000
--- a/intg/src/main/java/org/apache/atlas/model/v1/typedef/TypesDef.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.atlas.model.v1.typedef;
-
-import org.codehaus.jackson.annotate.JsonAutoDetect;
-import org.codehaus.jackson.annotate.JsonIgnoreProperties;
-import org.codehaus.jackson.map.annotate.JsonSerialize;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.io.Serializable;
-import java.util.List;
-
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.NONE;
-import static org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-@XmlRootElement
-@XmlAccessorType(XmlAccessType.PROPERTY)
-public class TypesDef implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private List<EnumTypeDefinition> enumTypes;
- private List<StructTypeDefinition> structTypes;
- private List<TraitTypeDefinition> traitTypes;
- private List<ClassTypeDefinition> classTypes;
-
-
- public TypesDef() {
- }
-
- public TypesDef(List<EnumTypeDefinition> enumTypes, List<StructTypeDefinition> structTypes, List<TraitTypeDefinition> traitTypes, List<ClassTypeDefinition> classTypes) {
- this.enumTypes = enumTypes;
- this.structTypes = structTypes;
- this.traitTypes = traitTypes;
- this.classTypes = classTypes;
- }
-
-
- public List<EnumTypeDefinition> getEnumTypes() {
- return enumTypes;
- }
-
- public void setEnumTypes(List<EnumTypeDefinition> enumTypes) {
- this.enumTypes = enumTypes;
- }
-
- public List<StructTypeDefinition> getStructTypes() {
- return structTypes;
- }
-
- public void setStructTypes(List<StructTypeDefinition> structTypes) {
- this.structTypes = structTypes;
- }
-
- public List<TraitTypeDefinition> getTraitTypes() {
- return traitTypes;
- }
-
- public void setTraitTypes(List<TraitTypeDefinition> traitTypes) {
- this.traitTypes = traitTypes;
- }
-
- public List<ClassTypeDefinition> getClassTypes() {
- return classTypes;
- }
-
- public void setClassTypes(List<ClassTypeDefinition> classTypes) {
- this.classTypes = classTypes;
- }
-}
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/type/AtlasType.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasType.java b/intg/src/main/java/org/apache/atlas/type/AtlasType.java
index b5c89af..551ee21 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasType.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasType.java
@@ -21,7 +21,7 @@ package org.apache.atlas.type;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.TypeCategory;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.typedef.Multiplicity;
+import org.apache.atlas.v1.model.typedef.Multiplicity;
import org.codehaus.jackson.*;
import org.codehaus.jackson.map.*;
import org.codehaus.jackson.map.module.SimpleModule;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/intg/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java b/intg/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java
deleted file mode 100644
index ed82e2a..0000000
--- a/intg/src/main/java/org/apache/atlas/typesystem/types/utils/TypesUtil.java
+++ /dev/null
@@ -1,112 +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.typesystem.types.utils;
-
-
-import org.apache.atlas.model.v1.typedef.AttributeDefinition;
-import org.apache.atlas.model.v1.typedef.ClassTypeDefinition;
-import org.apache.atlas.model.v1.typedef.Multiplicity;
-import org.apache.atlas.model.v1.typedef.TraitTypeDefinition;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Objects;
-import java.util.Set;
-
-public class TypesUtil {
- public static ClassTypeDefinition createClassTypeDef(String name, String description, Set<String> superTypes, AttributeDefinition... attributes) {
- ClassTypeDefinition ret = new ClassTypeDefinition(name, description, "1.0", Arrays.asList(attributes), superTypes);
-
- return ret;
- }
-
- public static ClassTypeDefinition createClassTypeDef(String name, String description, String typeVersion, Set<String> superTypes, AttributeDefinition... attributes) {
- ClassTypeDefinition ret = new ClassTypeDefinition(name, description, typeVersion, Arrays.asList(attributes), superTypes);
-
- return ret;
- }
-
- public static TraitTypeDefinition createTraitTypeDef(String name, String description, Set<String> superTypes, AttributeDefinition... attributes) {
- return createTraitTypeDef(name, description, superTypes, Arrays.asList(attributes));
- }
-
- public static TraitTypeDefinition createTraitTypeDef(String name, String description, String typeVersion, Set<String> superTypes, AttributeDefinition... attributes) {
- return createTraitTypeDef(name, description, typeVersion, superTypes, Arrays.asList(attributes));
- }
-
- public static TraitTypeDefinition createTraitTypeDef(String name, String description, Set<String> superTypes, List<AttributeDefinition> attributes) {
- TraitTypeDefinition ret = new TraitTypeDefinition(name, description, "1.0", attributes, superTypes);
-
- return ret;
- }
-
- public static TraitTypeDefinition createTraitTypeDef(String name, String description, String typeVersion, Set<String> superTypes, List<AttributeDefinition> attributes) {
- TraitTypeDefinition ret = new TraitTypeDefinition(name, description, typeVersion, attributes, superTypes);
-
- return ret;
- }
-
- public static AttributeDefinition createUniqueRequiredAttrDef(String name, String dataTypeName) {
- AttributeDefinition ret = new AttributeDefinition(name, dataTypeName, Multiplicity.REQUIRED, false, true, true, null);
-
- return ret;
- }
-
- public static AttributeDefinition createRequiredAttrDef(String name, String dataTypeName) {
- AttributeDefinition ret = new AttributeDefinition(name, dataTypeName, Multiplicity.REQUIRED, false, false, true, null);
-
- return ret;
- }
-
- public static AttributeDefinition createOptionalAttrDef(String name, String dataTypeName) {
- AttributeDefinition ret = new AttributeDefinition(name, dataTypeName, Multiplicity.OPTIONAL, false, false, true, null);
-
- return ret;
- }
-
- public static class Pair<L, R> {
- public L left;
- public R right;
-
- public Pair(L left, R right) {
- this.left = left;
- this.right = right;
- }
-
- public static <L, R> Pair<L, R> of(L left, R right) {
- return new Pair<>(left, right);
- }
-
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
-
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- Pair p = (Pair)o;
-
- return Objects.equals(left, p.left) && Objects.equals(right, p.right);
- }
-
- public int hashCode() { return Objects.hash(left, right); }
- }
-}
[2/5] atlas git commit: ATLAS-2251: relocated legacy classes in intg
module
Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java
index ad6c255..f1d9031 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v1/AtlasStructDefStoreV1.java
@@ -23,7 +23,7 @@ import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.typedef.AtlasStructDef;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasConstraintDef;
-import org.apache.atlas.model.v1.typedef.AttributeDefinition;
+import org.apache.atlas.v1.model.typedef.AttributeDefinition;
import org.apache.atlas.repository.Constants;
import org.apache.atlas.repository.graph.GraphHelper;
import org.apache.atlas.repository.graphdb.AtlasVertex;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/util/AttributeValueMap.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/util/AttributeValueMap.java b/repository/src/main/java/org/apache/atlas/util/AttributeValueMap.java
index 2f34506..080eefb 100644
--- a/repository/src/main/java/org/apache/atlas/util/AttributeValueMap.java
+++ b/repository/src/main/java/org/apache/atlas/util/AttributeValueMap.java
@@ -23,7 +23,7 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.repository.graph.GraphHelper;
/**
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/repository/src/main/java/org/apache/atlas/util/IndexedInstance.java
----------------------------------------------------------------------
diff --git a/repository/src/main/java/org/apache/atlas/util/IndexedInstance.java b/repository/src/main/java/org/apache/atlas/util/IndexedInstance.java
index 1987a13..17ff511 100644
--- a/repository/src/main/java/org/apache/atlas/util/IndexedInstance.java
+++ b/repository/src/main/java/org/apache/atlas/util/IndexedInstance.java
@@ -17,7 +17,7 @@
*/
package org.apache.atlas.util;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.repository.graph.GraphHelper;
/**
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/server-api/src/main/java/org/apache/atlas/listener/EntityChangeListener.java
----------------------------------------------------------------------
diff --git a/server-api/src/main/java/org/apache/atlas/listener/EntityChangeListener.java b/server-api/src/main/java/org/apache/atlas/listener/EntityChangeListener.java
index 629b7ee..19fae4f 100644
--- a/server-api/src/main/java/org/apache/atlas/listener/EntityChangeListener.java
+++ b/server-api/src/main/java/org/apache/atlas/listener/EntityChangeListener.java
@@ -19,8 +19,8 @@
package org.apache.atlas.listener;
import org.apache.atlas.AtlasException;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import java.util.Collection;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java b/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
index cfc2350..5362084 100755
--- a/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
+++ b/webapp/src/main/java/org/apache/atlas/examples/QuickStart.java
@@ -28,11 +28,11 @@ import org.apache.atlas.AtlasErrorCode;
import org.apache.atlas.AtlasException;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.typedef.*;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.typedef.*;
import org.apache.atlas.type.AtlasType;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.commons.configuration.Configuration;
import org.codehaus.jettison.json.JSONArray;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java b/webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java
index 308f18d..8f374b9 100644
--- a/webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java
+++ b/webapp/src/main/java/org/apache/atlas/notification/NotificationEntityChangeListener.java
@@ -21,8 +21,8 @@ import com.google.common.annotations.VisibleForTesting;
import org.apache.atlas.ApplicationProperties;
import org.apache.atlas.AtlasException;
import org.apache.atlas.listener.EntityChangeListener;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.notification.entity.EntityNotification;
import org.apache.atlas.notification.entity.EntityNotificationImpl;
import org.apache.atlas.repository.graph.GraphHelper;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java b/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java
index d5b73e0..463a587 100644
--- a/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java
+++ b/webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java
@@ -30,7 +30,7 @@ import org.apache.atlas.ha.HAConfiguration;
import org.apache.atlas.kafka.AtlasKafkaMessage;
import org.apache.atlas.listener.ActiveStateChangeHandler;
import org.apache.atlas.model.instance.AtlasEntity;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification.EntityCreateRequest;
import org.apache.atlas.notification.hook.HookNotification.EntityDeleteRequest;
import org.apache.atlas.notification.hook.HookNotification.EntityPartialUpdateRequest;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
index 1cbfc14..42d5631 100755
--- a/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
@@ -32,9 +32,9 @@ import org.apache.atlas.model.instance.*;
import org.apache.atlas.model.instance.AtlasEntity.AtlasEntitiesWithExtInfo;
import org.apache.atlas.model.instance.AtlasEntity.AtlasEntityWithExtInfo;
import org.apache.atlas.model.legacy.EntityResult;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import org.apache.atlas.repository.store.graph.AtlasEntityStore;
import org.apache.atlas.repository.store.graph.v1.AtlasEntityStream;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java
index 8225936..9b2d7b2 100755
--- a/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java
+++ b/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java
@@ -23,7 +23,7 @@ import com.sun.jersey.api.core.ResourceContext;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.typedef.AtlasTypesDef;
-import org.apache.atlas.model.v1.typedef.TypesDef;
+import org.apache.atlas.v1.model.typedef.TypesDef;
import org.apache.atlas.store.AtlasTypeDefStore;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.type.AtlasTypeRegistry;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/main/java/org/apache/atlas/web/util/LineageUtils.java
----------------------------------------------------------------------
diff --git a/webapp/src/main/java/org/apache/atlas/web/util/LineageUtils.java b/webapp/src/main/java/org/apache/atlas/web/util/LineageUtils.java
index e653328..3145305 100644
--- a/webapp/src/main/java/org/apache/atlas/web/util/LineageUtils.java
+++ b/webapp/src/main/java/org/apache/atlas/web/util/LineageUtils.java
@@ -23,7 +23,7 @@ import org.apache.atlas.model.instance.AtlasEntity;
import org.apache.atlas.model.instance.AtlasEntityHeader;
import org.apache.atlas.model.lineage.AtlasLineageInfo;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.repository.Constants;
import org.apache.atlas.type.AtlasEntityType;
import org.apache.atlas.type.AtlasType;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/examples/QuickStartIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/examples/QuickStartIT.java b/webapp/src/test/java/org/apache/atlas/examples/QuickStartIT.java
index 8461ba3..1b5e811 100644
--- a/webapp/src/test/java/org/apache/atlas/examples/QuickStartIT.java
+++ b/webapp/src/test/java/org/apache/atlas/examples/QuickStartIT.java
@@ -20,8 +20,8 @@ package org.apache.atlas.examples;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.AtlasServiceException;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.web.integration.BaseResourceIT;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONException;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java b/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
index 295d9ea..9f25b15 100644
--- a/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
+++ b/webapp/src/test/java/org/apache/atlas/notification/EntityNotificationIT.java
@@ -21,13 +21,13 @@ package org.apache.atlas.notification;
import com.google.common.collect.ImmutableSet;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.kafka.NotificationProvider;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
-import org.apache.atlas.model.v1.typedef.TraitTypeDefinition;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.v1.model.typedef.TraitTypeDefinition;
import org.apache.atlas.notification.entity.EntityNotification;
import org.apache.atlas.type.AtlasType;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.atlas.web.integration.BaseResourceIT;
import org.testng.annotations.BeforeClass;
import java.util.Collections;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/notification/NotificationEntityChangeListenerTest.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/notification/NotificationEntityChangeListenerTest.java b/webapp/src/test/java/org/apache/atlas/notification/NotificationEntityChangeListenerTest.java
index 45356d5..084ebb1 100644
--- a/webapp/src/test/java/org/apache/atlas/notification/NotificationEntityChangeListenerTest.java
+++ b/webapp/src/test/java/org/apache/atlas/notification/NotificationEntityChangeListenerTest.java
@@ -18,8 +18,8 @@
package org.apache.atlas.notification;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.type.AtlasTypeRegistry;
import org.testng.annotations.Test;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerIT.java b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerIT.java
index cee7bf6..d77014a 100644
--- a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerIT.java
+++ b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerIT.java
@@ -20,8 +20,8 @@ package org.apache.atlas.notification;
import org.apache.atlas.EntityAuditEvent;
import org.apache.atlas.kafka.NotificationProvider;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification;
import org.apache.atlas.notification.hook.HookNotification.HookNotificationMessage;
import org.apache.atlas.notification.hook.HookNotification.EntityDeleteRequest;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
index c384cc3..25161f5 100644
--- a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
+++ b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerKafkaTest.java
@@ -26,7 +26,7 @@ import org.apache.atlas.kafka.AtlasKafkaMessage;
import org.apache.atlas.kafka.KafkaNotification;
import org.apache.atlas.kafka.NotificationProvider;
import org.apache.atlas.model.instance.AtlasEntity;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification;
import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import org.apache.atlas.repository.store.graph.AtlasEntityStore;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerTest.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerTest.java b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerTest.java
index 526a8e7..6b13915 100644
--- a/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerTest.java
+++ b/webapp/src/test/java/org/apache/atlas/notification/NotificationHookConsumerTest.java
@@ -24,7 +24,7 @@ import org.apache.atlas.ha.HAConfiguration;
import org.apache.atlas.kafka.AtlasKafkaMessage;
import org.apache.atlas.model.instance.AtlasEntity;
import org.apache.atlas.model.instance.EntityMutationResponse;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.apache.atlas.notification.hook.HookNotification;
import org.apache.atlas.repository.converters.AtlasInstanceConverter;
import org.apache.atlas.repository.store.graph.AtlasEntityStore;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/BaseResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/BaseResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/BaseResourceIT.java
index b017c4e..4360a69 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/BaseResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/BaseResourceIT.java
@@ -36,17 +36,17 @@ import org.apache.atlas.model.typedef.*;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasAttributeDef.Cardinality;
import org.apache.atlas.model.typedef.AtlasStructDef.AtlasConstraintDef;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
-import org.apache.atlas.model.v1.typedef.*;
-import org.apache.atlas.model.v1.typedef.EnumTypeDefinition.EnumValue;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.v1.model.typedef.*;
+import org.apache.atlas.v1.model.typedef.EnumTypeDefinition.EnumValue;
import org.apache.atlas.notification.NotificationConsumer;
import org.apache.atlas.kafka.*;
import org.apache.atlas.notification.entity.EntityNotification;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.type.AtlasTypeUtil;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.atlas.utils.ParamChecker;
import org.apache.commons.configuration.Configuration;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/DataSetLineageJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/DataSetLineageJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/DataSetLineageJerseyResourceIT.java
index a60ab95..6fdbcfa 100644
--- a/webapp/src/test/java/org/apache/atlas/web/integration/DataSetLineageJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/DataSetLineageJerseyResourceIT.java
@@ -22,12 +22,12 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.AtlasServiceException;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
-import org.apache.atlas.model.v1.typedef.TraitTypeDefinition;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.v1.model.typedef.TraitTypeDefinition;
import org.apache.atlas.type.AtlasType;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import org.testng.Assert;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/EntityDiscoveryJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/EntityDiscoveryJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/EntityDiscoveryJerseyResourceIT.java
index 9b30767..6c5e086 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/EntityDiscoveryJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/EntityDiscoveryJerseyResourceIT.java
@@ -28,8 +28,8 @@ import org.apache.atlas.model.discovery.AtlasSearchResult.AtlasQueryType;
import org.apache.atlas.model.instance.AtlasEntity.Status;
import org.apache.atlas.model.instance.AtlasEntityHeader;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.typedef.*;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.model.typedef.*;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
index a21152e..147f6ee 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
@@ -28,13 +28,13 @@ import org.apache.atlas.EntityAuditEvent;
import org.apache.atlas.kafka.NotificationProvider;
import org.apache.atlas.model.legacy.EntityResult;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
-import org.apache.atlas.model.v1.typedef.*;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.v1.model.typedef.*;
import org.apache.atlas.notification.NotificationInterface;
import org.apache.atlas.type.AtlasType;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.commons.lang.RandomStringUtils;
import org.codehaus.jettison.json.JSONArray;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/EntityLineageJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/EntityLineageJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/EntityLineageJerseyResourceIT.java
index ed29e08..afd6da2 100644
--- a/webapp/src/test/java/org/apache/atlas/web/integration/EntityLineageJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/EntityLineageJerseyResourceIT.java
@@ -25,8 +25,8 @@ import org.apache.atlas.AtlasBaseClient;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.model.instance.AtlasEntityHeader;
import org.apache.atlas.model.lineage.AtlasLineageInfo;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
import org.codehaus.jettison.json.JSONObject;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/EntityV2JerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/EntityV2JerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/EntityV2JerseyResourceIT.java
index aceed9c..4da8bb0 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/EntityV2JerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/EntityV2JerseyResourceIT.java
@@ -37,7 +37,7 @@ import org.apache.atlas.model.typedef.AtlasClassificationDef;
import org.apache.atlas.model.typedef.AtlasEntityDef;
import org.apache.atlas.model.typedef.AtlasTypesDef;
import org.apache.atlas.type.AtlasTypeUtil;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.commons.lang.RandomStringUtils;
import org.codehaus.jettison.json.JSONArray;
import org.joda.time.DateTime;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/MetadataDiscoveryJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/MetadataDiscoveryJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/MetadataDiscoveryJerseyResourceIT.java
index f0c4487..acdef52 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/MetadataDiscoveryJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/MetadataDiscoveryJerseyResourceIT.java
@@ -25,11 +25,11 @@ import com.sun.jersey.core.util.MultivaluedMapImpl;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.AtlasServiceException;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.instance.Id;
-import org.apache.atlas.model.v1.instance.Referenceable;
-import org.apache.atlas.model.v1.instance.Struct;
-import org.apache.atlas.model.v1.typedef.*;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.model.instance.Id;
+import org.apache.atlas.v1.model.instance.Referenceable;
+import org.apache.atlas.v1.model.instance.Struct;
+import org.apache.atlas.v1.model.typedef.*;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import org.testng.Assert;
http://git-wip-us.apache.org/repos/asf/atlas/blob/eacf8513/webapp/src/test/java/org/apache/atlas/web/integration/TypesJerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/TypesJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/TypesJerseyResourceIT.java
index ab39955..9e2237e 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/TypesJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/TypesJerseyResourceIT.java
@@ -24,10 +24,10 @@ import com.sun.jersey.core.util.MultivaluedMapImpl;
import org.apache.atlas.AtlasClient;
import org.apache.atlas.AtlasServiceException;
import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
-import org.apache.atlas.model.v1.typedef.*;
+import org.apache.atlas.v1.model.typedef.*;
import org.apache.atlas.type.AtlasType;
import org.apache.atlas.typesystem.types.DataTypes;
-import org.apache.atlas.typesystem.types.utils.TypesUtil;
+import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import org.testng.Assert;
@@ -41,7 +41,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
-import static org.apache.atlas.typesystem.types.utils.TypesUtil.createOptionalAttrDef;
+import static org.apache.atlas.v1.typesystem.types.utils.TypesUtil.createOptionalAttrDef;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.fail;
[5/5] atlas git commit: Merge branch 'ATLAS-2251' of
https://git-wip-us.apache.org/repos/asf/atlas into ATLAS-2251
Posted by ma...@apache.org.
Merge branch 'ATLAS-2251' of https://git-wip-us.apache.org/repos/asf/atlas into ATLAS-2251
Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/3f44770d
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/3f44770d
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/3f44770d
Branch: refs/heads/ATLAS-2251
Commit: 3f44770da188f270330230594344e9a263b5a5d4
Parents: eacf851 10c19ea
Author: Madhan Neethiraj <ma...@apache.org>
Authored: Sun Nov 5 12:41:54 2017 -0800
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Sun Nov 5 12:41:54 2017 -0800
----------------------------------------------------------------------
----------------------------------------------------------------------