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 2018/05/25 20:08:40 UTC
[47/51] [partial] atlas git commit: ATLAS-2722: moved unused code
from branch-1.0
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java
deleted file mode 100644
index 90b7e23..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java
+++ /dev/null
@@ -1,215 +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
- * <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.ocf.properties;
-
-/**
- * ExternalIdentifier stores information about an identifier for the asset that is used in an external system.
- * This is used for correlating information about the asset across different systems.
- */
-public class ExternalIdentifier extends Referenceable
-{
- /*
- * Attributes of an external identifier
- */
- private String identifier = null;
- private String description = null;
- private String usage = null;
- private String source = null;
- private KeyPattern keyPattern = null;
- private Referenceable scope = null;
- private String scopeDescription = null;
-
-
- /**
- * Typical Constructor
- *
- * @param parentAsset - descriptor for parent asset
- * @param type - details of the metadata type for this properties object
- * @param guid - String - unique id
- * @param url - String - URL
- * @param classifications - enumeration of classifications
- * @param qualifiedName - unique name
- * @param additionalProperties - additional properties for the referenceable object.
- * @param meanings - list of glossary terms (summary)
- * @param identifier - the external identifier for the asset.
- * @param description - the description of the external identifier.
- * @param usage - usage guidance for this external identifier.
- * @param source - source description for this external identifier.
- * @param keyPattern enum - name of the key pattern used for this external identifier.
- * @param scope - Referenceable scope of this external identifier. This depends on the key pattern.
- * It may be a server definition, a reference data set or glossary term.
- * @param scopeDescription - description of the scope for this external identifier.
- */
- public ExternalIdentifier(AssetDescriptor parentAsset,
- ElementType type,
- String guid,
- String url,
- Classifications classifications,
- String qualifiedName,
- AdditionalProperties additionalProperties,
- Meanings meanings,
- String identifier,
- String description,
- String usage,
- String source,
- KeyPattern keyPattern,
- Referenceable scope,
- String scopeDescription)
- {
- super(parentAsset, type, guid, url, classifications, qualifiedName, additionalProperties, meanings);
-
- this.identifier = identifier;
- this.description = description;
- this.usage = usage;
- this.source = source;
- this.keyPattern = keyPattern;
- this.scope = scope;
- this.scopeDescription = scopeDescription;
- }
-
- /**
- * Copy/clone constructor.
- *
- * @param parentAsset - descriptor for parent asset
- * @param templateExternalIdentifier - element to copy
- */
- public ExternalIdentifier(AssetDescriptor parentAsset, ExternalIdentifier templateExternalIdentifier)
- {
- /*
- * Initialize the super class.
- */
- super(parentAsset, templateExternalIdentifier);
-
- if (templateExternalIdentifier != null)
- {
- /*
- * Copy the values from the supplied template.
- */
- identifier = templateExternalIdentifier.getIdentifier();
- description = templateExternalIdentifier.getDescription();
- usage = templateExternalIdentifier.getUsage();
- source = templateExternalIdentifier.getSource();
- keyPattern = templateExternalIdentifier.getKeyPattern();
-
- Referenceable templateScope = templateExternalIdentifier.getScope();
- if (templateScope != null)
- {
- /*
- * Ensure comment replies has this object's parent asset, not the template's.
- */
- scope = new Referenceable(parentAsset, templateScope);
- }
-
- scopeDescription = templateExternalIdentifier.getScopeDescription();
- }
- }
-
-
- /**
- * Return the external identifier for this asset.
- *
- * @return String identifier
- */
- public String getIdentifier() { return identifier; }
-
-
- /**
- * Return the description of the external identifier.
- *
- * @return String description
- */
- public String getDescription() { return description; }
-
-
- /**
- * Return details of how, where and when this external identifier is used.
- *
- * @return String usage
- */
- public String getUsage() { return usage; }
-
-
- /**
- * Return details of the source system where this external identifier comes from.
- *
- * @return String server
- */
- public String getSource() { return source; }
-
-
- /**
- * Return the key pattern that is used with this external identifier.
- *
- * @return KeyPattern enum
- */
- public KeyPattern getKeyPattern() { return keyPattern; }
-
-
- /**
- * Return the scope of this external identifier. This depends on the key pattern. It may be a server definition,
- * a reference data set or glossary term.
- *
- * @return Referenceable scope
- */
- public Referenceable getScope()
- {
- if (scope == null)
- {
- return scope;
- }
- else
- {
- return new Referenceable(super.getParentAsset(), scope);
- }
- }
-
-
- /**
- * Return the text description of the scope for this external identifier.
- *
- * @return String scope description
- */
- public String getScopeDescription() { return scopeDescription; }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "ExternalIdentifier{" +
- "identifier='" + identifier + '\'' +
- ", description='" + description + '\'' +
- ", usage='" + usage + '\'' +
- ", source='" + source + '\'' +
- ", keyPattern=" + keyPattern +
- ", scope=" + scope +
- ", scopeDescription='" + scopeDescription + '\'' +
- ", qualifiedName='" + qualifiedName + '\'' +
- ", additionalProperties=" + additionalProperties +
- ", meanings=" + meanings +
- ", type=" + type +
- ", guid='" + guid + '\'' +
- ", url='" + url + '\'' +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifiers.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifiers.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifiers.java
deleted file mode 100644
index cac397c..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifiers.java
+++ /dev/null
@@ -1,127 +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
- * <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.ocf.properties;
-
-import java.util.Iterator;
-
-/**
- * ExternalIdentifiers supports an iterator over a list of external identifiers. Callers can use it to step through
- * the list just once. If they want to parse the list again, they could use the copy/clone constructor to create
- * a new iterator.
- */
-public abstract class ExternalIdentifiers extends AssetPropertyIteratorBase implements Iterator<ExternalIdentifier>
-{
- /**
- * Typical Constructor creates an iterator with the supplied list of elements.
- *
- * @param parentAsset - descriptor of parent asset
- * @param totalElementCount - the total number of elements to process. A negative value is converted to 0.
- * @param maxCacheSize - maximum number of elements that should be retrieved from the property server and
- * cached in the element list at any one time. If a number less than one is supplied, 1 is used.
- */
- public ExternalIdentifiers(AssetDescriptor parentAsset,
- int totalElementCount,
- int maxCacheSize)
- {
- super(parentAsset, totalElementCount, maxCacheSize);
- }
-
-
- /**
- * Copy/clone constructor. Used to reset iterator element pointer to 0;
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - type-specific iterator to copy; null to create an empty iterator
- */
- public ExternalIdentifiers(AssetDescriptor parentAsset, ExternalIdentifiers template)
- {
- super(parentAsset, template);
- }
-
-
- /**
- * Provides a concrete implementation of cloneElement for the specific iterator type.
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - object to clone
- * @return new cloned object.
- */
- protected AssetPropertyBase cloneElement(AssetDescriptor parentAsset, AssetPropertyBase template)
- {
- return new ExternalIdentifier(parentAsset, (ExternalIdentifier)template);
- }
-
-
- /**
- * Clones this iterator.
- *
- * @param parentAsset - descriptor of parent asset
- * @return new cloned object.
- */
- protected abstract ExternalIdentifiers cloneIterator(AssetDescriptor parentAsset);
-
-
- /**
- * The iterator can only be used once to step through the elements. This method returns
- * a boolean to indicate if it has got to the end of the list yet.
- *
- * @return boolean indicating whether there are more elements.
- */
- @Override
- public boolean hasNext()
- {
- return super.pagingIterator.hasNext();
- }
-
-
- /**
- * Return the next element in the iteration.
- *
- * @return ExternalIdentifier - next element object that has been cloned.
- */
- @Override
- public ExternalIdentifier next()
- {
- return (ExternalIdentifier)super.pagingIterator.next();
- }
-
-
- /**
- * Remove the current element in the iterator. (Null implementation since this iterator works off of cached
- * elements from the property (metadata) server.)
- */
- @Override
- public void remove()
- {
- super.pagingIterator.remove();
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "ExternalIdentifiers{" +
- "pagingIterator=" + pagingIterator +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReference.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReference.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReference.java
deleted file mode 100644
index 93706ad..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReference.java
+++ /dev/null
@@ -1,193 +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
- * <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.ocf.properties;
-
-/**
- * ExternalReference stores information about an link to an external resource that is relevant to this asset.
- */
-public class ExternalReference extends Referenceable
-{
- /*
- * Attributes of an external reference
- */
- private String referenceId = null;
- private String linkDescription = null;
- private String displayName = null;
- private String uri = null;
- private String resourceDescription = null;
- private String version = null;
- private String organization = null;
-
-
- /**
- * Typical Constructor
- *
- * @param parentAsset - descriptor for parent asset
- * @param type - details of the metadata type for this properties object
- * @param guid - String - unique id
- * @param url - String - URL
- * @param classifications - enumeration of classifications
- * @param qualifiedName - unique name
- * @param additionalProperties - additional properties for the referenceable object.
- * @param meanings - list of glossary terms (summary)
- * @param referenceId the reference identifier for this asset's reference.
- * @param linkDescription - description of the reference (with respect to this asset).
- * @param displayName - display name for this external reference.
- * @param uri - the URI used to retrieve the resource that this external reference represents.
- * @param resourceDescription - the description of the resource that this external reference represents.
- * @param version - the version of the resource that this external reference represents.
- * @param organization - the name of the organization that owns the resource that this external reference represents.
- */
- public ExternalReference(AssetDescriptor parentAsset,
- ElementType type,
- String guid,
- String url,
- Classifications classifications,
- String qualifiedName,
- AdditionalProperties additionalProperties,
- Meanings meanings,
- String referenceId,
- String linkDescription,
- String displayName,
- String uri,
- String resourceDescription,
- String version,
- String organization)
- {
- super(parentAsset, type, guid, url, classifications, qualifiedName, additionalProperties, meanings);
- this.referenceId = referenceId;
- this.linkDescription = linkDescription;
- this.displayName = displayName;
- this.uri = uri;
- this.resourceDescription = resourceDescription;
- this.version = version;
- this.organization = organization;
- }
-
-
- /**
- * Copy/clone constructor.
- *
- * @param parentAsset - descriptor for parent asset
- * @param templateExternalReference - element to copy
- */
- public ExternalReference(AssetDescriptor parentAsset, ExternalReference templateExternalReference)
- {
- /*
- * Initialize the super class.
- */
- super(parentAsset, templateExternalReference);
-
- if (templateExternalReference != null)
- {
- /*
- * Copy the values from the supplied template.
- */
- referenceId = templateExternalReference.getReferenceId();
- linkDescription = templateExternalReference.getLinkDescription();
- displayName = templateExternalReference.getDisplayName();
- uri = templateExternalReference.getURI();
- resourceDescription = templateExternalReference.getResourceDescription();
- version = templateExternalReference.getVersion();
- organization = templateExternalReference.getOrganization();
- }
- }
-
-
- /**
- * Return the identifier given to this reference (with respect to this asset).
- *
- * @return String referenceId
- */
- public String getReferenceId() { return referenceId; }
-
-
- /**
- * Return the description of the reference (with respect to this asset).
- *
- * @return String link description.
- */
- public String getLinkDescription() { return linkDescription; }
-
-
- /**
- * Return the display name of this external reference.
- *
- * @return String display name.
- */
- public String getDisplayName() { return displayName; }
-
-
- /**
- * Return the URI used to retrieve the resource that this external reference represents.
- *
- * @return String URI
- */
- public String getURI() { return uri; }
-
-
- /**
- * Return the description of the resource that this external reference represents.
- *
- * @return String resource description
- */
- public String getResourceDescription() { return resourceDescription; }
-
-
- /**
- * Return the version of the resource that this external reference represents.
- *
- * @return String version
- */
- public String getVersion() { return version; }
-
-
- /**
- * Return the name of the organization that owns the resource that this external reference represents.
- *
- * @return String organization name
- */
- public String getOrganization() { return organization; }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "ExternalReference{" +
- "referenceId='" + referenceId + '\'' +
- ", linkDescription='" + linkDescription + '\'' +
- ", displayName='" + displayName + '\'' +
- ", uri='" + uri + '\'' +
- ", resourceDescription='" + resourceDescription + '\'' +
- ", version='" + version + '\'' +
- ", organization='" + organization + '\'' +
- ", qualifiedName='" + qualifiedName + '\'' +
- ", additionalProperties=" + additionalProperties +
- ", meanings=" + meanings +
- ", type=" + type +
- ", guid='" + guid + '\'' +
- ", url='" + url + '\'' +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReferences.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReferences.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReferences.java
deleted file mode 100644
index 457c447..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReferences.java
+++ /dev/null
@@ -1,127 +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
- * <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.ocf.properties;
-
-import java.util.Iterator;
-
-/**
- * ExternalReferences supports an iterator over a list of external references. Callers can use it to step through the list
- * just once. If they want to parse the list again, they could use the copy/clone constructor to create
- * a new iterator.
- */
-public abstract class ExternalReferences extends AssetPropertyIteratorBase implements Iterator<ExternalReference>
-{
- /**
- * Typical Constructor creates an iterator with the supplied list of elements.
- *
- * @param parentAsset - descriptor of parent asset
- * @param totalElementCount - the total number of elements to process. A negative value is converted to 0.
- * @param maxCacheSize - maximum number of elements that should be retrieved from the property server and
- * cached in the element list at any one time. If a number less than one is supplied, 1 is used.
- */
- public ExternalReferences(AssetDescriptor parentAsset,
- int totalElementCount,
- int maxCacheSize)
- {
- super(parentAsset, totalElementCount, maxCacheSize);
- }
-
-
- /**
- * Copy/clone constructor. Used to reset iterator element pointer to 0;
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - type-specific iterator to copy; null to create an empty iterator
- */
- public ExternalReferences(AssetDescriptor parentAsset, ExternalReferences template)
- {
- super(parentAsset, template);
- }
-
-
- /**
- * Provides a concrete implementation of cloneElement for the specific iterator type.
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - object to clone
- * @return new cloned object.
- */
- protected AssetPropertyBase cloneElement(AssetDescriptor parentAsset, AssetPropertyBase template)
- {
- return new ExternalReference(parentAsset, (ExternalReference)template);
- }
-
-
- /**
- * Clones this iterator.
- *
- * @param parentAsset - descriptor of parent asset
- * @return new cloned object.
- */
- protected abstract ExternalReferences cloneIterator(AssetDescriptor parentAsset);
-
-
- /**
- * The iterator can only be used once to step through the elements. This method returns
- * a boolean to indicate if it has got to the end of the list yet.
- *
- * @return boolean indicating whether there are more elements.
- */
- @Override
- public boolean hasNext()
- {
- return super.pagingIterator.hasNext();
- }
-
-
- /**
- * Return the next element in the iteration.
- *
- * @return ExternalReference - next element object that has been cloned.
- */
- @Override
- public ExternalReference next()
- {
- return (ExternalReference)super.pagingIterator.next();
- }
-
-
- /**
- * Remove the current element in the iterator. (Null implementation since this iterator works off of cached
- * elements from the property (metadata) server.)
- */
- @Override
- public void remove()
- {
- super.pagingIterator.remove();
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "ExternalReferences{" +
- "pagingIterator=" + pagingIterator +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Feedback.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Feedback.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Feedback.java
deleted file mode 100644
index a5eb26c..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Feedback.java
+++ /dev/null
@@ -1,192 +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.ocf.properties;
-
-
-/**
- * Feedback contains the comments, tags, ratings and likes that consumers of the asset have created.
- */
-public class Feedback extends AssetPropertyBase
-{
- /*
- * Lists of objects that make up the feedback on the asset.
- */
- private InformalTags informalTags = null;
- private Likes likes = null;
- private Ratings ratings = null;
- private Comments comments = null;
-
-
- /**
- * Typical Constructor
- *
- * @param parentAsset - description of the asset that this feedback is attached to.
- * @param informalTags - list of tags for the asset.
- * @param likes - list of likes (one object per person liking the asset) for the asset.
- * @param ratings - list of ratings that people have given the asset - one Rating object for each person's rating.
- * @param comments - list of comments for the asset.
- */
- public Feedback(AssetDescriptor parentAsset, InformalTags informalTags, Likes likes, Ratings ratings, Comments comments)
- {
- super(parentAsset);
- this.informalTags = informalTags;
- this.likes = likes;
- this.ratings = ratings;
- this.comments = comments;
- }
-
-
- /**
- * Copy/clone constructor - the parentAsset is passed separately to the template because it is also
- * likely to be being cloned in the same operation and we want the feedback clone to point to the
- * asset clone and not the original asset.
- *
- * @param parentAsset - description of the asset that this feedback is attached to.
- * @param templateFeedback - template object to copy.
- */
- public Feedback(AssetDescriptor parentAsset, Feedback templateFeedback)
- {
- super(parentAsset, templateFeedback);
-
- /*
- * Only create a child object if the template is not null.
- */
- if (templateFeedback != null)
- {
- InformalTags templateInformalTags = templateFeedback.getInformalTags();
- Likes templateLikes = templateFeedback.getLikes();
- Ratings templateRatings = templateFeedback.getRatings();
- Comments templateComments = templateFeedback.getComments();
-
- if (templateInformalTags != null)
- {
- this.informalTags = templateInformalTags.cloneIterator(parentAsset);
- }
-
- if (templateLikes != null)
- {
- this.likes = templateLikes.cloneIterator(parentAsset);
- }
-
- if (templateRatings != null)
- {
- this.ratings = templateRatings.cloneIterator(parentAsset);
- }
-
- if (templateComments != null)
- {
- this.comments = templateComments.cloneIterator(parentAsset);
- }
- }
-
- }
-
-
- /**
- * Returns a copy of the information tags for the asset in an iterator. This iterator can be used to step
- * through the tags once. Therefore call getInformalTags() for each scan of the asset's tags.
- *
- * @return InformalTags - tag list
- */
- public InformalTags getInformalTags()
- {
- if (informalTags == null)
- {
- return informalTags;
- }
- else
- {
- return informalTags.cloneIterator(super.getParentAsset());
- }
- }
-
-
- /**
- * Returns a copy of the likes for the asset in an iterator. This iterator can be used to step
- * through the list of like once. Therefore call getLikes() for each scan of the asset's like objects.
- *
- * @return Likes - like object list
- */
- public Likes getLikes()
- {
- if (likes == null)
- {
- return likes;
- }
- else
- {
- return likes.cloneIterator(super.getParentAsset());
- }
- }
-
-
- /**
- * Returns a copy of the ratings for the asset in an iterator. This iterator can be used to step
- * through the ratings once. Therefore call getRatings() for each scan of the asset's ratings.
- *
- * @return Ratings - rating list
- */
- public Ratings getRatings()
- {
- if (ratings == null)
- {
- return ratings;
- }
- else
- {
- return ratings.cloneIterator(super.getParentAsset());
- }
- }
-
-
- /**
- * Returns a copy of the comments for the asset in an iterator. This iterator can be used to step
- * through the comments once. Therefore call getComments() for each scan of the asset's comments.
- *
- * @return Comments - comment list
- */
- public Comments getComments()
- {
- if (comments == null)
- {
- return comments;
- }
- else
- {
- return comments.cloneIterator(super.getParentAsset());
- }
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "Feedback{" +
- "informalTags=" + informalTags +
- ", likes=" + likes +
- ", ratings=" + ratings +
- ", comments=" + comments +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTag.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTag.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTag.java
deleted file mode 100644
index 7a517967..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTag.java
+++ /dev/null
@@ -1,196 +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
- * <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.ocf.properties;
-
-import org.apache.atlas.ocf.ffdc.OCFErrorCode;
-import org.apache.atlas.ocf.ffdc.OCFRuntimeException;
-
-/**
- * InformalTag stores information about a tag connected to an asset.
- * InformalTags provide informal classifications to assets
- * and can be added at any time.
- *
- * InformalTags have the userId of the person who added the tag, the name of the tag and its description.
- *
- * The content of the tag is a personal judgement (which is why the user's id is in the tag)
- * and there is no formal review of the tags. However, they can be used as a basis for crowd-sourcing
- * Glossary terms.
- *
- * Private InformalTags are only returned to the user that created them.
- */
-public class InformalTag extends ElementHeader
-{
- /*
- * Attributes of a InformalTag
- */
- private boolean isPrivateTag = false;
- private String name = null;
- private String description = null;
- private String user = null;
-
-
- /**
- * Typical Constructor
- *
- * @param parentAsset - descriptor for parent asset
- * @param type - details of the metadata type for this properties object
- * @param guid - String - unique id
- * @param url - String - URL
- * @param classifications - enumeration of classifications
- * @param isPrivateTag - boolean flag to say whether the tag is private or not.
- * A private tag is only seen by the person who set it up.
- * Public tags are visible to everyone how can sse the asset description.
- * @param name - name of the tag. It is not valid to have a tag with no name.
- * @param description - tag description
- * @param user - the user id of the person who created the tag. Null means the user id is not known.
- */
- public InformalTag(AssetDescriptor parentAsset,
- ElementType type,
- String guid,
- String url,
- Classifications classifications,
- boolean isPrivateTag,
- String name,
- String description,
- String user)
- {
- super(parentAsset, type, guid, url, classifications);
-
- if (name == null || name.equals(""))
- {
- /*
- * Build and throw exception. This should not happen - likely to be a problem in the
- * repository connector.
- */
- OCFErrorCode errorCode = OCFErrorCode.NULL_TAG_NAME;
- String errorMessage = errorCode.getErrorMessageId()
- + errorCode.getFormattedErrorMessage(super.getParentAssetName(),
- super.getParentAssetTypeName());
-
- throw new OCFRuntimeException(errorCode.getHTTPErrorCode(),
- this.getClass().getName(),
- "setName",
- errorMessage,
- errorCode.getSystemAction(),
- errorCode.getUserAction());
- }
-
- this.isPrivateTag = isPrivateTag;
- this.name = name;
- this.description = description;
- this.user = user;
- }
-
- /**
- * Copy/clone constructor.
- *
- * @param parentAsset - descriptor for parent asset
- * @param templateInformalTag - element to copy
- */
- public InformalTag(AssetDescriptor parentAsset, InformalTag templateInformalTag)
- {
- /*
- * Save the parent asset description.
- */
- super(parentAsset, templateInformalTag);
-
- if (templateInformalTag != null)
- {
- /*
- * Copy the values from the supplied tag.
- */
- isPrivateTag = templateInformalTag.isPrivateTag();
- user = templateInformalTag.getUser();
- name = templateInformalTag.getName();
- description = templateInformalTag.getDescription();
- }
- }
-
-
- /**
- * Return boolean flag to say whether the tag is private or not. A private tag is only seen by the
- * person who set it up. Public tags are visible to everyone who can see the asset description.
- *
- * @return boolean - is private flag
- */
- public boolean isPrivateTag() {
- return isPrivateTag;
- }
-
-
- /**
- * Return the user id of the person who created the tag. Null means the user id is not known.
- *
- * @return String - tagging user
- */
- public String getUser() {
- return user;
- }
-
-
- /**
- * Return the name of the tag. It is not valid to have a tag with no name. However, there is a point where
- * the tag object is created and the tag name not set, so null is a possible response.
- *
- * @return String - tag name
- */
- public String getName() {
- return name;
- }
-
-
- /**
- * Return the tag description - null means no description is available.
- *
- * @return String - tag description
- */
- public String getDescription()
- {
- return description;
- }
-
-
- /**
- * Set up the tag description - null means no description is available.
- *
- * @param tagDescription - tag description
- */
- public void setDescription(String tagDescription) {
- this.description = tagDescription;
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "InformalTag{" +
- "isPrivateTag=" + isPrivateTag +
- ", name='" + name + '\'' +
- ", description='" + description + '\'' +
- ", user='" + user + '\'' +
- ", type=" + type +
- ", guid='" + guid + '\'' +
- ", url='" + url + '\'' +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTags.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTags.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTags.java
deleted file mode 100644
index fc20ad8..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/InformalTags.java
+++ /dev/null
@@ -1,127 +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
- * <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.ocf.properties;
-
-import java.util.Iterator;
-
-/**
- * InformalTags supports an iterator over a list of informal tags. Callers can use it to step through the list
- * just once. If they want to parse the list again, they could use the copy/clone constructor to create
- * a new iterator.
- */
-public abstract class InformalTags extends AssetPropertyIteratorBase implements Iterator<InformalTag>
-{
- /**
- * Typical Constructor creates an iterator with the supplied list of elements.
- *
- * @param parentAsset - descriptor of parent asset
- * @param totalElementCount - the total number of elements to process. A negative value is converted to 0.
- * @param maxCacheSize - maximum number of elements that should be retrieved from the property server and
- * cached in the element list at any one time. If a number less than one is supplied, 1 is used.
- */
- public InformalTags(AssetDescriptor parentAsset,
- int totalElementCount,
- int maxCacheSize)
- {
- super(parentAsset, totalElementCount, maxCacheSize);
- }
-
-
- /**
- * Copy/clone constructor. Used to reset iterator element pointer to 0;
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - type-specific iterator to copy; null to create an empty iterator
- */
- public InformalTags(AssetDescriptor parentAsset, InformalTags template)
- {
- super(parentAsset, template);
- }
-
-
- /**
- * Provides a concrete implementation of cloneElement for the specific iterator type.
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - object to clone
- * @return new cloned object.
- */
- protected AssetPropertyBase cloneElement(AssetDescriptor parentAsset, AssetPropertyBase template)
- {
- return new InformalTag(parentAsset, (InformalTag)template);
- }
-
-
- /**
- * Clones this iterator.
- *
- * @param parentAsset - descriptor of parent asset
- * @return new cloned object.
- */
- protected abstract InformalTags cloneIterator(AssetDescriptor parentAsset);
-
-
- /**
- * The iterator can only be used once to step through the elements. This method returns
- * a boolean to indicate if it has got to the end of the list yet.
- *
- * @return boolean indicating whether there are more elements.
- */
- @Override
- public boolean hasNext()
- {
- return super.pagingIterator.hasNext();
- }
-
-
- /**
- * Return the next element in the iteration.
- *
- * @return InformalTag - next element object that has been cloned.
- */
- @Override
- public InformalTag next()
- {
- return (InformalTag)super.pagingIterator.next();
- }
-
-
- /**
- * Remove the current element in the iterator. (Null implementation since this iterator works off of cached
- * elements from the property (metadata) server.)
- */
- @Override
- public void remove()
- {
- super.pagingIterator.remove();
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "InformalTags{" +
- "pagingIterator=" + pagingIterator +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/KeyPattern.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/KeyPattern.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/KeyPattern.java
deleted file mode 100644
index 3d035d5..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/KeyPattern.java
+++ /dev/null
@@ -1,114 +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
- * <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.ocf.properties;
-
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonInclude;
-
-import java.io.Serializable;
-
-import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
-import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-
-/**
- * A KeyPattern defines the type of External Identifier in use for an asset, or the type of Primary Key used within an
- * asset.
- */
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
-public enum KeyPattern implements Serializable
-{
- LOCAL_KEY (0, "Local Key", "Unique key allocated and used within the scope of a single system."),
- RECYCLED_KEY (1, "Recycled Key", "Key allocated and used within the scope of a single system that is periodically reused for different records."),
- NATURAL_KEY (2, "Natural Key", "Key derived from an attribute of the entity, such as email address, passport number."),
- MIRROR_KEY (3, "Mirror Key", "Key value copied from another system."),
- AGGREGATE_KEY (4, "Aggregate Key", "Key formed by combining keys from multiple systems."),
- CALLERS_KEY (5, "Caller's Key", "Key from another system can bey used if system name provided."),
- STABLE_KEY (6, "Stable Key", "Key value will remain active even if records are merged."),
- OTHER (99, "Other", "Another key pattern.");
-
- private static final long serialVersionUID = 1L;
-
- private int keyPatternCode;
- private String keyPatternName;
- private String keyPatternDescription;
-
- /**
- * Typical Constructor
- */
- KeyPattern(int keyPatternCode, String keyPatternName, String keyPatternDescription)
- {
- /*
- * Save the values supplied
- */
- this.keyPatternCode = keyPatternCode;
- this.keyPatternName = keyPatternName;
- this.keyPatternDescription = keyPatternDescription;
- }
-
-
- /**
- * Return the code for this enum instance
- *
- * @return int - key pattern code
- */
- public int getKeyPatternCode()
- {
- return keyPatternCode;
- }
-
-
- /**
- * Return the default name for this enum instance.
- *
- * @return String - default name
- */
- public String getKeyPatternName()
- {
- return keyPatternName;
- }
-
-
- /**
- * Return the default description for the key pattern for this enum instance.
- *
- * @return String - default description
- */
- public String getKeyPatternDescription()
- {
- return keyPatternDescription;
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "KeyPattern{" +
- "keyPatternCode=" + keyPatternCode +
- ", keyPatternName='" + keyPatternName + '\'' +
- ", keyPatternDescription='" + keyPatternDescription + '\'' +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/License.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/License.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/License.java
deleted file mode 100644
index ceec3a2..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/License.java
+++ /dev/null
@@ -1,299 +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
- * <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.ocf.properties;
-
-import java.util.Date;
-
-/**
- * <p>
- * The data economy brings licensing to data and metadata. Even open data typically has a license.
- * License stores the license permission associated with the asset.
- * </p>
- * <p>
- * The license will define the permitted uses and other requirements for using the asset.
- * </p>
- *
- */
-public class License extends Referenceable
-{
- /*
- * properties of a license
- */
- private String licenseTypeGUID = null;
- private String licenseTypeName = null;
- private String licensee = null;
- private String summary = null;
- private ExternalReference link = null;
- private Date startDate = null;
- private Date endDate = null;
- private String licenseConditions = null;
- private String createdBy = null;
- private String custodian = null;
- private String notes = null;
-
-
- /**
- * Typical constructor.
- *
- * @param parentAsset - descriptor for parent asset
- * @param type - details of the metadata type for this properties object
- * @param guid - String - unique id
- * @param url - String - URL
- * @param classifications - enumeration of classifications
- * @param qualifiedName - unique name
- * @param additionalProperties - additional properties for the referenceable object.
- * @param meanings - list of glossary terms (summary)
- * @param licenseTypeGUID - license type GUID
- * @param licenseTypeName - the name of the type of the license.
- * @param licensee - name of the organization or person that issued the license
- * @param summary - a brief summary of the license.
- * @param link - ExternalReference for full text of the license
- * @param startDate - start date for the license.
- * @param endDate - the end date for the license - null if license does not expire.
- * @param licenseConditions - any special conditions that apply to the license - such as endorsements.
- * @param createdBy - String name of the person or organization that set up the license agreement for this asset.
- * @param custodian - the name of the person or organization that is responsible for the correct management
- * of the asset according to the license.
- * @param notes - the notes from the custodian.
- */
- public License(AssetDescriptor parentAsset,
- ElementType type,
- String guid,
- String url,
- Classifications classifications,
- String qualifiedName,
- AdditionalProperties additionalProperties,
- Meanings meanings,
- String licenseTypeGUID,
- String licenseTypeName,
- String licensee,
- String summary,
- ExternalReference link,
- Date startDate,
- Date endDate,
- String licenseConditions,
- String createdBy,
- String custodian,
- String notes)
- {
- super(parentAsset, type, guid, url, classifications, qualifiedName, additionalProperties, meanings);
-
- this.licenseTypeGUID = licenseTypeGUID;
- this.licenseTypeName = licenseTypeName;
- this.licensee = licensee;
- this.summary = summary;
- this.link = link;
- this.startDate = startDate;
- this.endDate = endDate;
- this.licenseConditions = licenseConditions;
- this.createdBy = createdBy;
- this.custodian = custodian;
- this.notes = notes;
- }
-
- /**
- * Copy/clone constructor.
- *
- * @param parentAsset - descriptor for parent asset
- * @param templateLicense - element to copy
- */
- public License(AssetDescriptor parentAsset, License templateLicense)
- {
- super(parentAsset, templateLicense);
-
- if (templateLicense != null)
- {
- licenseTypeGUID = templateLicense.getLicenseTypeGUID();
- licenseTypeName = templateLicense.getLicenseName();
- licensee = templateLicense.getLicensee();
- summary = templateLicense.getSummary();
-
- ExternalReference templateLink = templateLicense.getLink();
- if (templateLink != null)
- {
- link = new ExternalReference(parentAsset, templateLink);
- }
-
- Date templateStartDate = templateLicense.getStartDate();
- if (templateStartDate != null)
- {
- startDate = new Date(templateStartDate.getTime());
- }
-
- Date templateEndDate = templateLicense.getEndDate();
- if (templateEndDate != null)
- {
- endDate = new Date(templateStartDate.getTime());
- }
-
- licenseConditions = templateLicense.getLicenseConditions();
- createdBy = templateLicense.getCreatedBy();
- custodian = templateLicense.getCustodian();
- notes = templateLicense.getNotes();
- }
- }
-
-
- /**
- * Return the unique id for the type of license.
- *
- * @return String license type GUID
- */
- public String getLicenseTypeGUID() { return licenseTypeGUID; }
-
-
- /**
- * Return the type of the license.
- *
- * @return String license type
- */
- public String getLicenseName() { return licenseTypeName; }
-
-
- /**
- * Get the name of the organization or person that issued the license.
- *
- * @return String name
- */
- public String getLicensee() { return licensee; }
-
-
- /**
- * Return a brief summary of the license.
- *
- * @return String summary
- */
- public String getSummary() { return summary; }
-
-
- /**
- * Return the link to the full text of the license.
- *
- * @return ExternalReference for full text
- */
- public ExternalReference getLink()
- {
- if (link == null)
- {
- return link;
- }
- else
- {
- return new ExternalReference(super.getParentAsset(), link);
- }
- }
-
-
- /**
- * Return the start date for the license.
- *
- * @return Date
- */
- public Date getStartDate()
- {
- if (startDate == null)
- {
- return startDate;
- }
- else
- {
- return new Date(startDate.getTime());
- }
- }
-
-
- /**
- * Return the end date for the license.
- *
- * @return Date
- */
- public Date getEndDate()
- {
- if (endDate == null)
- {
- return endDate;
- }
- else
- {
- return new Date(endDate.getTime());
- }
- }
-
-
- /**
- * Return any special conditions that apply to the license - such as endorsements.
- *
- * @return String license conditions
- */
- public String getLicenseConditions() { return licenseConditions; }
-
-
- /**
- * Return the name of the person or organization that set up the license agreement for this asset.
- *
- * @return String name
- */
- public String getCreatedBy() { return createdBy; }
-
-
- /**
- * Return the name of the person or organization that is responsible for the correct management of the asset
- * according to the license.
- *
- * @return String name
- */
- public String getCustodian() { return custodian; }
-
-
- /**
- * Return the notes for the custodian.
- *
- * @return String notes
- */
- public String getNotes() { return notes; }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "License{" +
- "licenseTypeGUID='" + licenseTypeGUID + '\'' +
- ", licenseTypeName='" + licenseTypeName + '\'' +
- ", licensee='" + licensee + '\'' +
- ", summary='" + summary + '\'' +
- ", link=" + link +
- ", startDate=" + startDate +
- ", endDate=" + endDate +
- ", licenseConditions='" + licenseConditions + '\'' +
- ", createdBy='" + createdBy + '\'' +
- ", custodian='" + custodian + '\'' +
- ", notes='" + notes + '\'' +
- ", qualifiedName='" + qualifiedName + '\'' +
- ", additionalProperties=" + additionalProperties +
- ", meanings=" + meanings +
- ", type=" + type +
- ", guid='" + guid + '\'' +
- ", url='" + url + '\'' +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Licenses.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Licenses.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Licenses.java
deleted file mode 100644
index 287c16d..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Licenses.java
+++ /dev/null
@@ -1,127 +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
- * <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.ocf.properties;
-
-import java.util.Iterator;
-
-/**
- * Licenses supports an iterator over a list of licenses for the asset. Callers can use it to step through the list
- * just once. If they want to parse the list again, they could use the copy/clone constructor to create
- * a new iterator.
- */
-public abstract class Licenses extends AssetPropertyIteratorBase implements Iterator<License>
-{
- /**
- * Typical Constructor creates an iterator with the supplied list of elements.
- *
- * @param parentAsset - descriptor of parent asset
- * @param totalElementCount - the total number of elements to process. A negative value is converted to 0.
- * @param maxCacheSize - maximum number of elements that should be retrieved from the property server and
- * cached in the element list at any one time. If a number less than one is supplied, 1 is used.
- */
- public Licenses(AssetDescriptor parentAsset,
- int totalElementCount,
- int maxCacheSize)
- {
- super(parentAsset, totalElementCount, maxCacheSize);
- }
-
-
- /**
- * Copy/clone constructor. Used to reset iterator element pointer to 0;
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - type-specific iterator to copy; null to create an empty iterator
- */
- public Licenses(AssetDescriptor parentAsset, Licenses template)
- {
- super(parentAsset, template);
- }
-
-
- /**
- * Provides a concrete implementation of cloneElement for the specific iterator type.
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - object to clone
- * @return new cloned object.
- */
- protected AssetPropertyBase cloneElement(AssetDescriptor parentAsset, AssetPropertyBase template)
- {
- return new License(parentAsset, (License)template);
- }
-
-
- /**
- * Clones this iterator.
- *
- * @param parentAsset - descriptor of parent asset
- * @return new cloned object.
- */
- protected abstract Licenses cloneIterator(AssetDescriptor parentAsset);
-
-
- /**
- * The iterator can only be used once to step through the elements. This method returns
- * a boolean to indicate if it has got to the end of the list yet.
- *
- * @return boolean indicating whether there are more elements.
- */
- @Override
- public boolean hasNext()
- {
- return super.pagingIterator.hasNext();
- }
-
-
- /**
- * Return the next element in the iteration.
- *
- * @return License - next element object that has been cloned.
- */
- @Override
- public License next()
- {
- return (License)super.pagingIterator.next();
- }
-
-
- /**
- * Remove the current element in the iterator. (Null implementation since this iterator works off of cached
- * elements from the property (metadata) server.)
- */
- @Override
- public void remove()
- {
- super.pagingIterator.remove();
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "Licenses{" +
- "pagingIterator=" + pagingIterator +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Like.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Like.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Like.java
deleted file mode 100644
index 956c820..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Like.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * <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.ocf.properties;
-
-/**
- * The Like properties object records a single user's "like" of an asset.
- */
-public class Like extends ElementHeader
-{
- /*
- * Attributes of a Like
- */
- private String user = null;
-
-
- /**
- * Typical Constructor
- *
- * @param parentAsset - descriptor for parent asset
- * @param type - details of the metadata type for this properties object
- * @param guid - String - unique id
- * @param url - String - URL
- * @param classifications - enumeration of classifications
- * @param user - the user id of the person who created the like.
- */
- public Like(AssetDescriptor parentAsset,
- ElementType type,
- String guid,
- String url,
- Classifications classifications,
- String user)
- {
- super(parentAsset, type, guid, url, classifications);
-
- this.user = user;
- }
-
-
- /**
- * Copy/clone constructor.
- *
- * @param parentAsset - descriptor for parent asset
- * @param templateLike - element to copy
- */
- public Like(AssetDescriptor parentAsset, Like templateLike)
- {
- /*
- * Save the parent asset description.
- */
- super(parentAsset, templateLike);
-
- if (templateLike != null)
- {
- /*
- * Copy the user name from the supplied like.
- */
- user = templateLike.getUser();
- }
- }
-
-
- /**
- * Return the user id of the person who created the like. Null means the user id is not known.
- *
- * @return String - liking user
- */
- public String getUser() {
- return user;
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "Like{" +
- "user='" + user + '\'' +
- ", type=" + type +
- ", guid='" + guid + '\'' +
- ", url='" + url + '\'' +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Likes.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Likes.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Likes.java
deleted file mode 100644
index 24ee38e..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Likes.java
+++ /dev/null
@@ -1,127 +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
- * <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.ocf.properties;
-
-import java.util.Iterator;
-
-/**
- * Likes supports an iterator over a list of like objects. Callers can use it to step through the list
- * just once. If they want to parse the list again, they could use the copy/clone constructor to create
- * a new iterator.
- */
-public abstract class Likes extends AssetPropertyIteratorBase implements Iterator<Like>
-{
- /**
- * Typical Constructor creates an iterator with the supplied list of elements.
- *
- * @param parentAsset - descriptor of parent asset
- * @param totalElementCount - the total number of elements to process. A negative value is converted to 0.
- * @param maxCacheSize - maximum number of elements that should be retrieved from the property server and
- * cached in the element list at any one time. If a number less than one is supplied, 1 is used.
- */
- public Likes(AssetDescriptor parentAsset,
- int totalElementCount,
- int maxCacheSize)
- {
- super(parentAsset, totalElementCount, maxCacheSize);
- }
-
-
- /**
- * Copy/clone constructor. Used to reset iterator element pointer to 0;
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - type-specific iterator to copy; null to create an empty iterator
- */
- public Likes(AssetDescriptor parentAsset, Likes template)
- {
- super(parentAsset, template);
- }
-
-
- /**
- * Provides a concrete implementation of cloneElement for the specific iterator type.
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - object to clone
- * @return new cloned object.
- */
- protected AssetPropertyBase cloneElement(AssetDescriptor parentAsset, AssetPropertyBase template)
- {
- return new Like(parentAsset, (Like)template);
- }
-
-
- /**
- * Clones this iterator.
- *
- * @param parentAsset - descriptor of parent asset
- * @return new cloned object.
- */
- protected abstract Likes cloneIterator(AssetDescriptor parentAsset);
-
-
- /**
- * The iterator can only be used once to step through the elements. This method returns
- * a boolean to indicate if it has got to the end of the list yet.
- *
- * @return boolean indicating whether there are more elements.
- */
- @Override
- public boolean hasNext()
- {
- return super.pagingIterator.hasNext();
- }
-
-
- /**
- * Return the next element in the iteration.
- *
- * @return Like - next element object that has been cloned.
- */
- @Override
- public Like next()
- {
- return (Like)super.pagingIterator.next();
- }
-
-
- /**
- * Remove the current element in the iterator. (Null implementation since this iterator works off of cached
- * elements from the property (metadata) server.)
- */
- @Override
- public void remove()
- {
- super.pagingIterator.remove();
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "Likes{" +
- "pagingIterator=" + pagingIterator +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Lineage.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Lineage.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Lineage.java
deleted file mode 100644
index 3cefa49..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Lineage.java
+++ /dev/null
@@ -1,77 +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.ocf.properties;
-
-
-/**
- * Lineage shows the origin of the connected asset. It covers:
- * <ul>
- * <li>Design lineage - the known data movement and data stores that can supply data to this asset.</li>
- * <li>Operational lineage - showing the jobs that ran to create this asset</li>
- * </ul>
- *
- * Currently lineage is not implemented in the ConnectedAssetProperties interface because more design work is needed.
- * This class is therefore a placeholder for lineage information.
- */
-public class Lineage extends AssetPropertyBase
-{
- /**
- * Typical constructor.
- *
- * @param parentAsset - description of the asset that this lineage is attached to.
- */
- public Lineage(AssetDescriptor parentAsset)
- {
- /*
- * Save descriptor of the asset that this lineage is attached to
- */
- super(parentAsset);
- }
-
-
- /**
- * Copy/clone constructor - - the parentAsset is passed separately to the template because it is also
- * likely to be being cloned in the same operation and we want the lineage clone to point to the
- * asset clone and not the original asset.
- *
- * @param parentAsset - description of the asset that this lineage is attached to.
- * @param templateLineage - lineage object to copy.
- */
- public Lineage(AssetDescriptor parentAsset, Lineage templateLineage)
- {
- super(parentAsset, templateLineage);
-
- /*
- * The open lineage design is still in progress so for the time being, this object does not do anything
- * useful
- */
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "Lineage{}";
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Location.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Location.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Location.java
deleted file mode 100644
index 813f157..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Location.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * <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.ocf.properties;
-
-/**
- * Location describes where the asset is located. The model allows a very flexible definition of location
- * that can be set up at different levels of granularity.
- */
-public class Location extends Referenceable
-{
- /*
- * Properties that make up the location of the asset.
- */
- private String displayName = null;
- private String description = null;
-
-
- /**
- * Typical constructor
- *
- * @param parentAsset - descriptor for parent asset
- * @param type - details of the metadata type for this properties object
- * @param guid - String - unique id
- * @param url - String - URL
- * @param classifications - enumeration of classifications
- * @param qualifiedName - unique name
- * @param additionalProperties - additional properties for the referenceable object.
- * @param meanings - list of glossary terms (summary)
- * @param displayName - consumable name
- * @param description - description property stored for the location.
- */
- public Location(AssetDescriptor parentAsset,
- ElementType type,
- String guid,
- String url,
- Classifications classifications,
- String qualifiedName,
- AdditionalProperties additionalProperties,
- Meanings meanings,
- String displayName,
- String description)
- {
- super(parentAsset, type, guid, url, classifications, qualifiedName, additionalProperties, meanings);
-
- this.displayName = displayName;
- this.description = description;
- }
-
- /**
- * Copy/clone constructor
- *
- * @param parentAsset - description of the asset that this location is attached to.
- * @param templateLocation - template object to copy.
- */
- public Location(AssetDescriptor parentAsset, Location templateLocation)
- {
- super(parentAsset, templateLocation);
- if (templateLocation != null)
- {
- displayName = templateLocation.getDisplayName();
- description = templateLocation.getDescription();
- }
- }
-
-
- /**
- * Returns the stored display name property for the location.
- * If no display name is available then null is returned.
- *
- * @return displayName
- */
- public String getDisplayName()
- {
- return displayName;
- }
-
-
- /**
- * Returns the stored description property for the location.
- * If no description is provided then null is returned.
- *
- * @return description
- */
- public String getDescription()
- {
- return description;
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "Location{" +
- "displayName='" + displayName + '\'' +
- ", description='" + description + '\'' +
- ", qualifiedName='" + qualifiedName + '\'' +
- ", additionalProperties=" + additionalProperties +
- ", meanings=" + meanings +
- ", type=" + type +
- ", guid='" + guid + '\'' +
- ", url='" + url + '\'' +
- '}';
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/b0ecc36a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Locations.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Locations.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Locations.java
deleted file mode 100644
index b8b3fc5..0000000
--- a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Locations.java
+++ /dev/null
@@ -1,127 +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
- * <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.ocf.properties;
-
-import java.util.Iterator;
-
-/**
- * Locations supports an iterator over a list of locations. Callers can use it to step through the list
- * just once. If they want to parse the list again, they could use the copy/clone constructor to create
- * a new iterator.
- */
-public abstract class Locations extends AssetPropertyIteratorBase implements Iterator<Location>
-{
- /**
- * Typical Constructor creates an iterator with the supplied list of elements.
- *
- * @param parentAsset - descriptor of parent asset
- * @param totalElementCount - the total number of elements to process. A negative value is converted to 0.
- * @param maxCacheSize - maximum number of elements that should be retrieved from the property server and
- * cached in the element list at any one time. If a number less than one is supplied, 1 is used.
- */
- public Locations(AssetDescriptor parentAsset,
- int totalElementCount,
- int maxCacheSize)
- {
- super(parentAsset, totalElementCount, maxCacheSize);
- }
-
-
- /**
- * Copy/clone constructor. Used to reset iterator element pointer to 0;
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - type-specific iterator to copy; null to create an empty iterator
- */
- public Locations(AssetDescriptor parentAsset, Locations template)
- {
- super(parentAsset, template);
- }
-
-
- /**
- * Provides a concrete implementation of cloneElement for the specific iterator type.
- *
- * @param parentAsset - descriptor of parent asset
- * @param template - object to clone
- * @return new cloned object.
- */
- protected AssetPropertyBase cloneElement(AssetDescriptor parentAsset, AssetPropertyBase template)
- {
- return new Location(parentAsset, (Location)template);
- }
-
-
- /**
- * Clones this iterator.
- *
- * @param parentAsset - descriptor of parent asset
- * @return new cloned object.
- */
- protected abstract Locations cloneIterator(AssetDescriptor parentAsset);
-
-
- /**
- * The iterator can only be used once to step through the elements. This method returns
- * a boolean to indicate if it has got to the end of the list yet.
- *
- * @return boolean indicating whether there are more elements.
- */
- @Override
- public boolean hasNext()
- {
- return super.pagingIterator.hasNext();
- }
-
-
- /**
- * Return the next element in the iteration.
- *
- * @return Location - next element object that has been cloned.
- */
- @Override
- public Location next()
- {
- return (Location)super.pagingIterator.next();
- }
-
-
- /**
- * Remove the current element in the iterator. (Null implementation since this iterator works off of cached
- * elements from the property (metadata) server.)
- */
- @Override
- public void remove()
- {
- super.pagingIterator.remove();
- }
-
-
- /**
- * Standard toString method.
- *
- * @return print out of variables in a JSON-style
- */
- @Override
- public String toString()
- {
- return "Locations{" +
- "pagingIterator=" + pagingIterator +
- '}';
- }
-}
\ No newline at end of file