You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by da...@apache.org on 2018/01/27 00:41:39 UTC
[4/7] atlas git commit: ATLAS-1095:final code drop for OCF
http://git-wip-us.apache.org/repos/asf/atlas/blob/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connections.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connections.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connections.java
new file mode 100644
index 0000000..8cdb2e1
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Connections.java
@@ -0,0 +1,127 @@
+/*
+ * 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;
+
+/**
+ * Connections supports an iterator over a list of connections. 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 Connections extends AssetPropertyIteratorBase implements Iterator<Connection>
+{
+ /**
+ * 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 Connections(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 Connections(AssetDescriptor parentAsset, Connections 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 Connection(parentAsset, (Connection)template);
+ }
+
+
+ /**
+ * Clones this iterator.
+ *
+ * @param parentAsset - descriptor of parent asset
+ * @return new cloned object.
+ */
+ protected abstract Connections 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 Connection - next element object that has been cloned.
+ */
+ @Override
+ public Connection next()
+ {
+ return (Connection)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 "Connections{" +
+ "pagingIterator=" + pagingIterator +
+ '}';
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectorType.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectorType.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectorType.java
new file mode 100644
index 0000000..83ac515
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ConnectorType.java
@@ -0,0 +1,221 @@
+/*
+ * 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 ConnectorType describe the implementation details of a particular type of OCF connector.
+ * The properties for a connector type are defined in model 0201.
+ * They include:
+ *
+ * <ul>
+ * <li>
+ * guid - Globally unique identifier for the connector type.
+ * </li>
+ * <li>
+ * url - External link address for the connector type properties in the metadata repository. This URL can be
+ * stored as a property in another entity to create an explicit link to this connector type.
+ * </li>
+ * <li>
+ * qualifiedName - The official (unique) name for the connector type. This is often defined by the IT
+ * systems management organization and should be used (when available) on audit logs and error messages.
+ * </li>
+ * <li>
+ * displayName - A consumable name for the connector type. Often a shortened form of the qualifiedName for use
+ * on user interfaces and messages. The displayName should be only be used for audit logs and error messages
+ * if the qualifiedName is not set.
+ * </li>
+ * <li>
+ * description - A full description of the connector type covering details of the assets it connects to
+ * along with usage and versioning information.
+ * </li>
+ * <li>
+ * connectorProviderClassName - The connector provider is the factory for a particular type of connector.
+ * This property defines the class name for the connector provider that the Connector Broker should use to request
+ * new connector instances.
+ * </li>
+ * <li>
+ * additionalProperties - Any additional properties that the connector provider needs to know in order to
+ * create connector instances.
+ * </li>
+ * </ul>
+ *
+ * The connectorTypeProperties class is simply used to cache the properties for an connector type.
+ * It is used by other classes to exchange this information between a metadata repository and a consumer.
+ */
+public class ConnectorType extends Referenceable
+{
+ /*
+ * Attributes of a connector type
+ */
+ private String displayName = null;
+ private String description = null;
+ private String connectorProviderClassName = null;
+
+ /**
+ * Typical Constructor - used when Connector Type is used inside a connection object which is itself
+ * not yet connected to an asset. In this case the ParentAsset is null.
+ *
+ * @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 property stored for the connector type.
+ * @param description - description property stored for the connector type.
+ * @param connectorProviderClassName - class name (including package name)
+ */
+ public ConnectorType(ElementType type,
+ String guid,
+ String url,
+ Classifications classifications,
+ String qualifiedName,
+ AdditionalProperties additionalProperties,
+ Meanings meanings,
+ String displayName,
+ String description,
+ String connectorProviderClassName)
+ {
+ super(null, type, guid, url, classifications, qualifiedName, additionalProperties, meanings);
+
+ this.displayName = displayName;
+ this.description = description;
+ this.connectorProviderClassName = connectorProviderClassName;
+ }
+
+
+ /**
+ * Typical constructor for creating a connectorType linked to an asset.
+ *
+ * @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 property stored for the connector type.
+ * @param description - description property stored for the connector type.
+ * @param connectorProviderClassName - class name (including package name)
+ */
+ public ConnectorType(AssetDescriptor parentAsset, ElementType type, String guid, String url, Classifications classifications, String qualifiedName, AdditionalProperties additionalProperties, Meanings meanings, String displayName, String description, String connectorProviderClassName)
+ {
+ super(parentAsset, type, guid, url, classifications, qualifiedName, additionalProperties, meanings);
+
+ this.displayName = displayName;
+ this.description = description;
+ this.connectorProviderClassName = connectorProviderClassName;
+ }
+
+ /**
+ * Copy/clone constructor for a connectorType that is not connected to an asset (either directly or indirectly).
+ *
+ * @param templateConnectorType - template object to copy.
+ */
+ public ConnectorType(ConnectorType templateConnectorType)
+ {
+ this(null, templateConnectorType);
+ }
+
+
+ /**
+ * Copy/clone constructor for a connectorType that is connected to an asset (either directly or indirectly).
+ *
+ * @param parentAsset - description of the asset that this connector type is attached to.
+ * @param templateConnectorType - template object to copy.
+ */
+ public ConnectorType(AssetDescriptor parentAsset, ConnectorType templateConnectorType)
+ {
+ /*
+ * Save parentAsset.
+ */
+ super(parentAsset, templateConnectorType);
+
+ /*
+ * All properties are initialised as null so only change their default setting if the template is
+ * not null
+ */
+ if (templateConnectorType != null)
+ {
+ displayName = templateConnectorType.getDisplayName();
+ description = templateConnectorType.getDescription();
+ connectorProviderClassName = templateConnectorType.getConnectorProviderClassName();
+ }
+ }
+
+
+ /**
+ * Returns the stored display name property for the connector type.
+ * If no display name is available then null is returned.
+ *
+ * @return displayName
+ */
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+
+ /**
+ * Returns the stored description property for the connector type.
+ * If no description is available then null is returned.
+ *
+ * @return description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+
+ /**
+ * Returns the stored connectorProviderClassName property for the connector type.
+ * If no connectorProviderClassName is available then null is returned.
+ *
+ * @return connectorProviderClassName - class name (including package name)
+ */
+ public String getConnectorProviderClassName()
+ {
+ return connectorProviderClassName;
+ }
+
+
+ /**
+ * Standard toString method.
+ *
+ * @return print out of variables in a JSON-style
+ */
+ @Override
+ public String toString()
+ {
+ return "ConnectorType{" +
+ "displayName='" + displayName + '\'' +
+ ", description='" + description + '\'' +
+ ", connectorProviderClassName='" + connectorProviderClassName + '\'' +
+ ", 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/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/DerivedSchemaElement.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/DerivedSchemaElement.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/DerivedSchemaElement.java
new file mode 100644
index 0000000..29c8972
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/DerivedSchemaElement.java
@@ -0,0 +1,169 @@
+/*
+ * 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;
+
+
+/**
+ * Derived schema elements are used in views to define elements that are calculated using data from other sources.
+ * It contains a list of queries and a formula to combine the resulting values.
+ */
+public class DerivedSchemaElement extends PrimitiveSchemaElement
+{
+ private String formula = null;
+ private SchemaImplementationQueries queries = 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 versionNumber - the version number of the schema element - null means no version number.
+ * @param author - the name of the author of the schema element. Null means the author is unknown.
+ * @param usage - the usage guidance for this schema element. Null means no guidance available.
+ * @param encodingStandard - encoding standard used for this schema. It may be XML, JSON, SQL DDL or something else.
+ * Null means the encoding standard is unknown or there are many choices.
+ * @param dataType - the name of the data type for this element. Null means unknown data type.
+ * @param defaultValue - String containing default value for the element
+ * @param formula - the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the
+ * formula has placeholders in it to show how the query results are combined.
+ * @param queries - list of queries that are used to create the derived schema element.
+ */
+ public DerivedSchemaElement(AssetDescriptor parentAsset,
+ ElementType type,
+ String guid,
+ String url,
+ Classifications classifications,
+ String qualifiedName,
+ AdditionalProperties additionalProperties,
+ Meanings meanings,
+ String versionNumber,
+ String author,
+ String usage,
+ String encodingStandard,
+ String dataType,
+ String defaultValue,
+ String formula,
+ SchemaImplementationQueries queries)
+ {
+ super(parentAsset,
+ type,
+ guid,
+ url,
+ classifications,
+ qualifiedName,
+ additionalProperties,
+ meanings,
+ versionNumber,
+ author,
+ usage,
+ encodingStandard,
+ dataType,
+ defaultValue);
+
+ this.formula = formula;
+ this.queries = queries;
+ }
+
+ /**
+ * 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 definitions clone to point to the
+ * asset clone and not the original asset.
+ *
+ * @param parentAsset - description of the asset that this schema element is attached to.
+ * @param templateSchemaElement - template object to copy.
+ */
+ public DerivedSchemaElement(AssetDescriptor parentAsset, DerivedSchemaElement templateSchemaElement)
+ {
+ super(parentAsset, templateSchemaElement);
+
+ if (templateSchemaElement != null)
+ {
+ SchemaImplementationQueries templateQueries = templateSchemaElement.getQueries();
+
+ formula = templateSchemaElement.getFormula();
+ queries = templateQueries.cloneIterator(super.getParentAsset());
+ }
+ }
+
+
+ /**
+ * Return the formula used to combine the values of the queries. Each query is numbers 0, 1, ... and the
+ * formula has placeholders in it to show how the query results are combined.
+ *
+ * @return String formula
+ */
+ public String getFormula() { return formula; }
+
+
+ /**
+ * Return the list of queries that are used to create the derived schema element.
+ *
+ * @return SchemaImplementationQueries - list of queries
+ */
+ public SchemaImplementationQueries getQueries()
+ {
+ if (queries == null)
+ {
+ return queries;
+ }
+ else
+ {
+ return queries.cloneIterator(super.getParentAsset());
+ }
+ }
+
+
+ /**
+ * Returns a clone of this object as the abstract SchemaElement class.
+ *
+ * @param parentAsset - description of the asset that this schema element is attached to.
+ * @return PrimitiveSchemaElement object
+ */
+ @Override
+ public SchemaElement cloneSchemaElement(AssetDescriptor parentAsset)
+ {
+ return new DerivedSchemaElement(parentAsset, this);
+ }
+
+
+ /**
+ * Standard toString method.
+ *
+ * @return print out of variables in a JSON-style
+ */
+ @Override
+ public String toString()
+ {
+ return "DerivedSchemaElement{" +
+ "formula='" + formula + '\'' +
+ ", queries=" + queries +
+ ", 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/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementHeader.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementHeader.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementHeader.java
new file mode 100644
index 0000000..ff41881
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementHeader.java
@@ -0,0 +1,161 @@
+/*
+ * 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;
+
+/**
+ * ElementHeader provides the common identifier and type information for all properties objects
+ * that link off of the asset and have a guid associated with them. This typically means it is
+ * represented by an entity in the metadata repository.
+ */
+public abstract class ElementHeader extends AssetPropertyBase
+{
+ /*
+ * Common header for first class elements from a metadata repository
+ */
+ protected ElementType type = null;
+ protected String guid = null;
+ protected String url = null;
+
+ /*
+ * Attached classifications
+ */
+ private Classifications classifications = 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
+ */
+ public ElementHeader(AssetDescriptor parentAsset,
+ ElementType type,
+ String guid,
+ String url,
+ Classifications classifications)
+ {
+ super(parentAsset);
+
+ this.type = type;
+ this.guid = guid;
+ this.url = url;
+ this.classifications = classifications;
+ }
+
+
+ /**
+ * Copy/clone constructor.
+ *
+ * @param parentAsset - descriptor for parent asset
+ * @param templateHeader - element to copy
+ */
+ public ElementHeader(AssetDescriptor parentAsset, ElementHeader templateHeader)
+ {
+ /*
+ * Save the parent asset description.
+ */
+ super(parentAsset, templateHeader);
+
+ if (templateHeader != null)
+ {
+ /*
+ * Copy the values from the supplied parameters.
+ */
+ type = templateHeader.getType();
+ guid = templateHeader.getGUID();
+ url = templateHeader.getURL();
+
+ Classifications templateClassifications = templateHeader.getClassifications();
+ if (templateClassifications != null)
+ {
+ classifications = templateClassifications.cloneIterator(parentAsset);
+ }
+ }
+ }
+
+
+ /**
+ * Return the element type properties for this properties object. These values are set up by the metadata repository
+ * and define details to the metadata entity used to represent this element.
+ *
+ * @return ElementType - type information.
+ */
+ public ElementType getType() {
+ return type;
+ }
+
+
+ /**
+ * Return the unique id for the properties object. Null means no guid is assigned.
+ *
+ * @return String - unique id
+ */
+ public String getGUID() {
+ return guid;
+ }
+
+
+ /**
+ * Returns the URL to access the properties object in the metadata repository.
+ * If no url is available then null is returned.
+ *
+ * @return String - URL
+ */
+ public String getURL() {
+ return url;
+ }
+
+
+ /**
+ * Return the list of classifications associated with the asset. This is an enumeration and the
+ * pointers are set to the start of the list of classifications
+ *
+ * @return Classifications - enumeration of classifications
+ */
+ public Classifications getClassifications()
+ {
+ if (classifications == null)
+ {
+ return classifications;
+ }
+ else
+ {
+ return classifications.cloneIterator(super.getParentAsset());
+ }
+ }
+
+
+ /**
+ * Standard toString method.
+ *
+ * @return print out of variables in a JSON-style
+ */
+ @Override
+ public String toString()
+ {
+ return "ElementHeader{" +
+ "type=" + type +
+ ", guid='" + guid + '\'' +
+ ", url='" + url + '\'' +
+ ", classifications=" + classifications +
+ '}';
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementOrigin.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementOrigin.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementOrigin.java
new file mode 100644
index 0000000..caf482c
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementOrigin.java
@@ -0,0 +1,134 @@
+/*
+ * 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.io.Serializable;
+
+/**
+ * ElementOrigin defines where the metadata comes from and, hence if it can be updated.
+ * <ul>
+ * <li>
+ * LOCAL_COHORT - the element is being maintained within the local cohort.
+ * The metadata collection id is for one of the repositories in the cohort.
+ * This metadata collection id identifies the home repository for this element.
+ * </li>
+ * <li>
+ * EXPORT_ARCHIVE - the element was created from an export archive.
+ * The metadata collection id for the element is the metadata collection id of the originating server.
+ * If the originating server later joins the cohort with the same metadata collection id then these
+ * elements will be refreshed from the originating server’s current repository.
+ * </li>
+ * <li>
+ * CONTENT_PACK - the element comes from an open metadata content pack.
+ * The metadata collection id of the elements is set to the GUID of the pack.
+ * </li>
+ * <li>
+ * DEREGISTERED_REPOSITORY - the element comes from a metadata repository that used to be a part
+ * of the repository cohort but has been deregistered. The metadata collection id remains the same.
+ * If the repository rejoins the cohort then these elements can be refreshed from the rejoining repository.
+ * </li>
+ * </ul>
+*/
+public enum ElementOrigin implements Serializable
+{
+ LOCAL_COHORT(0, "Local to cohort", "The element is being maintained within one of the local cohort members. " +
+ "The metadata collection id is for one of the repositories in the cohort. " +
+ "This metadata collection id identifies the home repository for this element. "),
+ EXPORT_ARCHIVE(1, "Export Archive", "The element was created from an export archive. " +
+ "The metadata collection id for the element is the metadata collection id of the originating server. " +
+ "If the originating server later joins the cohort with the same metadata collection Id " +
+ "then these elements will be refreshed from the originating server’s current repository."),
+ CONTENT_PACK(2, "Content Pack", "The element comes from an open metadata content pack. " +
+ "The metadata collection id of the elements is set to the GUID of the pack."),
+ DEREGISTERED_REPOSITORY(3, "Deregistered Repository", "The element comes from a metadata repository that " +
+ "used to be a member of the one of the local repository's cohorts but it has been deregistered. " +
+ "The metadata collection id remains the same. If the repository rejoins the cohort " +
+ "then these elements can be refreshed from the rejoining repository."),
+ CONFIGURATION(4, "Configuration",
+ "The element is part of a service's configuration. The metadata collection id is null.");
+
+ private static final long serialVersionUID = 1L;
+
+ private int originCode;
+ private String originName;
+ private String originDescription;
+
+
+ /**
+ * Constructor for the enum.
+ *
+ * @param originCode - code number for origin
+ * @param originName - name for origin
+ * @param originDescription - description for origin
+ */
+ ElementOrigin(int originCode, String originName, String originDescription)
+ {
+ this.originCode = originCode;
+ this.originName = originName;
+ this.originDescription = originDescription;
+ }
+
+
+ /**
+ * Return the code for metadata element.
+ *
+ * @return int code for the origin
+ */
+ public int getOriginCode()
+ {
+ return originCode;
+ }
+
+
+ /**
+ * Return the name of the metadata element origin.
+ *
+ * @return String name
+ */
+ public String getOriginName()
+ {
+ return originName;
+ }
+
+
+ /**
+ * Return the description of the metadata element origin.
+ *
+ * @return String description
+ */
+ public String getOriginDescription()
+ {
+ return originDescription;
+ }
+
+
+ /**
+ * Standard toString method.
+ *
+ * @return print out of variables in a JSON-style
+ */
+ @Override
+ public String toString()
+ {
+ return "ElementOrigin{" +
+ "originCode=" + originCode +
+ ", originName='" + originName + '\'' +
+ ", originDescription='" + originDescription + '\'' +
+ '}';
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementType.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementType.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementType.java
new file mode 100644
index 0000000..af81ed0
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ElementType.java
@@ -0,0 +1,182 @@
+/*
+ * 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 ElementType provide details of the type information associated with the element. Most consumers
+ * of the properties do not need this information. It is provided to asset consumers primarily as diagnostic
+ * information.
+ */
+public class ElementType extends PropertyBase
+{
+ private String elementTypeId = null;
+ private String elementTypeName = null;
+ private String elementTypeVersion = null;
+ private String elementTypeDescription = null;
+ private String elementAccessServiceURL = null;
+ private ElementOrigin elementOrigin = null;
+ private String elementHomeMetadataCollectionId = null;
+
+
+ /**
+ * Typical Constructor
+ *
+ * @param elementTypeId - identifier for the element's type
+ * @param elementTypeName - element type name
+ * @param elementTypeVersion - version number for the element type
+ * @param elementTypeDescription - description of element type
+ * @param elementAccessServiceURL - url of the OMAS server
+ * @param elementOrigin - enum describing type of origin
+ * @param elementHomeMetadataCollectionId - metadata collection id
+ */
+ public ElementType(String elementTypeId,
+ String elementTypeName,
+ String elementTypeVersion,
+ String elementTypeDescription,
+ String elementAccessServiceURL,
+ ElementOrigin elementOrigin,
+ String elementHomeMetadataCollectionId)
+ {
+ super();
+
+ this.elementTypeId = elementTypeId;
+ this.elementTypeName = elementTypeName;
+ this.elementTypeVersion = elementTypeVersion;
+ this.elementTypeDescription = elementTypeDescription;
+ this.elementAccessServiceURL = elementAccessServiceURL;
+ this.elementOrigin = elementOrigin;
+ this.elementHomeMetadataCollectionId = elementHomeMetadataCollectionId;
+ }
+
+ /**
+ * Copy/clone constructor
+ *
+ * @param templateType - type to clone
+ */
+ public ElementType(ElementType templateType)
+ {
+ super(templateType);
+
+ /*
+ * Copy the properties from the supplied template
+ */
+ this.elementTypeId = templateType.getElementTypeId();
+ this.elementTypeName = templateType.getElementTypeName();
+ this.elementTypeVersion = templateType.getElementTypeVersion();
+ this.elementTypeDescription = templateType.getElementTypeDescription();
+ this.elementAccessServiceURL = templateType.getElementAccessServiceURL();
+ this.elementOrigin = templateType.getElementOrigin();
+ this.elementHomeMetadataCollectionId = templateType.getElementHomeMetadataCollectionId();
+ }
+
+ /**
+ * Return unique identifier for the element's type.
+ *
+ * @return element type id
+ */
+ public String getElementTypeId()
+ {
+ return elementTypeId;
+ }
+
+
+ /**
+ * Return name of element's type.
+ *
+ * @return - elementTypeName
+ */
+ public String getElementTypeName()
+ {
+ return elementTypeName;
+ }
+
+
+ /**
+ * Return the version number for the element type.
+ *
+ * @return elementTypeVersion - version number for the element type.
+ */
+ public String getElementTypeVersion()
+ {
+ return elementTypeVersion;
+ }
+
+
+ /**
+ * Return the description for the element type.
+ *
+ * @return elementTypeDescription - description for the element type
+ */
+ public String getElementTypeDescription()
+ {
+ return elementTypeDescription;
+ }
+
+
+ /**
+ * Return the URL of the server where the element was retrieved from. Typically this is
+ * a server where the OMAS interfaces are activated. If no URL is known for the server then null is returned.
+ *
+ * @return elementSourceServerURL - the url of the server where the element came from
+ */
+ public String getElementAccessServiceURL()
+ {
+ return elementAccessServiceURL;
+ }
+
+
+ /**
+ * Return the origin of the metadata element.
+ *
+ * @return ElementOrigin enum
+ */
+ public ElementOrigin getElementOrigin() { return elementOrigin; }
+
+
+ /**
+ * Returns the OMRS identifier for the metadata collection that is managed by the repository
+ * where the element originates (its home repository).
+ *
+ * @return String metadata collection id
+ */
+ public String getElementHomeMetadataCollectionId()
+ {
+ return elementHomeMetadataCollectionId;
+ }
+
+
+ /**
+ * Standard toString method.
+ *
+ * @return print out of variables in a JSON-style
+ */
+ @Override
+ public String toString()
+ {
+ return "ElementType{" +
+ "elementTypeId='" + elementTypeId + '\'' +
+ ", elementTypeName='" + elementTypeName + '\'' +
+ ", elementTypeVersion='" + elementTypeVersion + '\'' +
+ ", elementTypeDescription='" + elementTypeDescription + '\'' +
+ ", elementAccessServiceURL='" + elementAccessServiceURL + '\'' +
+ ", elementOrigin=" + elementOrigin +
+ ", elementHomeMetadataCollectionId='" + elementHomeMetadataCollectionId + '\'' +
+ '}';
+ }
+}
http://git-wip-us.apache.org/repos/asf/atlas/blob/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnection.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnection.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnection.java
new file mode 100644
index 0000000..5278f95
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnection.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ * <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 EmbeddedConnection is used within a VirtualConnection. It contains a connection and additional properties
+ * the VirtualConnection uses when working with the EmbeddedConnection.
+ */
+public class EmbeddedConnection extends AssetPropertyBase
+{
+ /*
+ * Attributes of an embedded connection
+ */
+ private AdditionalProperties embeddedConnectionProperties = null;
+ private Connection embeddedConnection = null;
+
+
+ /**
+ * Typical Constructor
+ *
+ * @param parentAsset - descriptor for parent asset
+ * @param embeddedConnectionProperties - Additional properties
+ * @param embeddedConnection - Connection
+ */
+ public EmbeddedConnection(AssetDescriptor parentAsset,
+ AdditionalProperties embeddedConnectionProperties,
+ Connection embeddedConnection)
+ {
+ super(parentAsset);
+
+ this.embeddedConnectionProperties = embeddedConnectionProperties;
+ this.embeddedConnection = embeddedConnection;
+ }
+
+ /**
+ * Copy/clone constructor.
+ *
+ * @param parentAsset - descriptor for parent asset
+ * @param templateEmbeddedConnection - element to copy
+ */
+ public EmbeddedConnection(AssetDescriptor parentAsset, EmbeddedConnection templateEmbeddedConnection)
+ {
+ /*
+ * Save the parent asset description.
+ */
+ super(parentAsset, templateEmbeddedConnection);
+
+ if (templateEmbeddedConnection != null)
+ {
+ AdditionalProperties templateConnectionProperties = templateEmbeddedConnection.getEmbeddedConnectionProperties();
+ Connection templateConnection = templateEmbeddedConnection.getEmbeddedConnection();
+
+ if (templateConnectionProperties != null)
+ {
+ embeddedConnectionProperties = new AdditionalProperties(parentAsset, templateConnectionProperties);
+ }
+ if (templateConnection != null)
+ {
+ embeddedConnection = new Connection(parentAsset, templateConnection);
+ }
+ }
+ }
+
+
+ /**
+ * Return the properties for the embedded connection.
+ *
+ * @return AdditionalProperties
+ */
+ public AdditionalProperties getEmbeddedConnectionProperties()
+ {
+ if (embeddedConnectionProperties == null)
+ {
+ return embeddedConnectionProperties;
+ }
+ else
+ {
+ return new AdditionalProperties(this.getParentAsset(), embeddedConnectionProperties);
+ }
+ }
+
+
+ /**
+ * Return the embedded connection.
+ *
+ * @return Connection object.
+ */
+ public Connection getEmbeddedConnection()
+ {
+ if (embeddedConnection == null)
+ {
+ return embeddedConnection;
+ }
+ else
+ {
+ return new Connection(this.getParentAsset(), embeddedConnection);
+ }
+ }
+
+
+ /**
+ * Standard toString method.
+ *
+ * @return print out of variables in a JSON-style
+ */
+ @Override
+ public String toString()
+ {
+ return "EmbeddedConnection{" +
+ "embeddedConnectionProperties=" + embeddedConnectionProperties +
+ ", embeddedConnection=" + embeddedConnection +
+ '}';
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnections.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnections.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnections.java
new file mode 100644
index 0000000..c2e22c1
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/EmbeddedConnections.java
@@ -0,0 +1,127 @@
+/*
+ * 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;
+
+/**
+ * EmbeddedConnections supports an iterator over a list of connections that are embedded in a virtual connection.
+ * 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 EmbeddedConnections extends AssetPropertyIteratorBase implements Iterator<EmbeddedConnection>
+{
+ /**
+ * 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 EmbeddedConnections(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 EmbeddedConnections(AssetDescriptor parentAsset, EmbeddedConnections 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 EmbeddedConnection(parentAsset, (EmbeddedConnection)template);
+ }
+
+
+ /**
+ * Clones this iterator.
+ *
+ * @param parentAsset - descriptor of parent asset
+ * @return new cloned object.
+ */
+ protected abstract EmbeddedConnections 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 EmbeddedConnection - next element object that has been cloned.
+ */
+ @Override
+ public EmbeddedConnection next()
+ {
+ return (EmbeddedConnection)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 "EmbeddedConnections{" +
+ "pagingIterator=" + pagingIterator +
+ '}';
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/atlas/blob/cbfdd7fc/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Endpoint.java
----------------------------------------------------------------------
diff --git a/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Endpoint.java b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Endpoint.java
new file mode 100644
index 0000000..57c04c6
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/Endpoint.java
@@ -0,0 +1,294 @@
+/*
+ * 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 Endpoint describes the network information necessary for a connector to connect to the server
+ * where the Asset is accessible from. The properties for an endpoint are defined in model 0040.
+ * They include:
+ * <ul>
+ * <li>
+ * type - definition of the specific metadata type for the endpoint.
+ * </li>
+ * <li>
+ * guid - Globally unique identifier for the endpoint.
+ * </li>
+ * <li>
+ * url - External link address for the endpoint properties in the metadata repository.
+ * This URL can be stored as a property in another entity to create an explicit link to this endpoint.
+ * </li>
+ * <li>
+ * qualifiedName - The official (unique) name for the endpoint. This is often defined by the IT systems management
+ * organization and should be used (when available) on audit logs and error messages.
+ * </li>
+ * <li>
+ * displayName - A consumable name for the endpoint. Often a shortened form of the qualifiedName for use
+ * on user interfaces and messages. The displayName should be only be used for audit logs and error messages
+ * if the qualifiedName is not set.
+ * </li>
+ * <li>
+ * description - A description for the endpoint.
+ * </li>
+ * <li>
+ * address - The location of the asset. For network connected resources, this is typically the
+ * URL and port number (if needed) for the server where the asset is located
+ * (or at least accessible by the connector). For file-based resources, this is typically the name of the file.
+ * </li>
+ * <li>
+ * protocol - The communication protocol that the connection should use to connect to the server.
+ * </li>
+ * <li>
+ * encryptionMethod - Describes the encryption method to use (if any). This is an open value allowing
+ * information needed by the connector user to retrieve all of the information they need to work with
+ * the endpoint.
+ * </li>
+ * <li>
+ * additionalProperties - Any additional properties that the connector need to know in order to
+ * access the Asset.
+ * </li>
+ * </ul>
+ *
+ * The Endpoint class is simply used to cache the properties for an endpoint.
+ * It is used by other classes to exchange this information between a metadata repository and a consumer.
+ */
+public class Endpoint extends Referenceable
+{
+ /*
+ * Properties of an Endpoint
+ */
+ private String displayName = null;
+ private String description = null;
+ private String address = null;
+ private String protocol = null;
+ private String encryptionMethod = null;
+
+ /**
+ * Admin Constructor - used when Endpoint is inside a Connection that is not part of the connected asset
+ * properties. In this case there is no 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 - simple name for the endpoint
+ * @param description - String description for the endpoint
+ * @param address - network url for the server/resource
+ * @param protocol - endpoint protocol
+ * @param encryptionMethod - encryption mechanism in use by the endpoint
+ */
+ public Endpoint(ElementType type,
+ String guid,
+ String url,
+ Classifications classifications,
+ String qualifiedName,
+ AdditionalProperties additionalProperties,
+ Meanings meanings,
+ String displayName,
+ String description,
+ String address,
+ String protocol,
+ String encryptionMethod)
+ {
+ this(null,
+ type,
+ guid,
+ url,
+ classifications,
+ qualifiedName,
+ additionalProperties,
+ meanings,
+ displayName,
+ description,
+ address,
+ protocol,
+ encryptionMethod);
+ }
+
+
+ /**
+ * Typical Constructor for a new endpoint that is connected to an asset (either directly or indirectly.)
+ *
+ * @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 - simple name for the endpoint
+ * @param description - String description for the endpoint
+ * @param address - network url for the server/resource
+ * @param protocol - endpoint protocol
+ * @param encryptionMethod - encryption mechanism in use by the endpoint
+ */
+ public Endpoint(AssetDescriptor parentAsset,
+ ElementType type,
+ String guid,
+ String url,
+ Classifications classifications,
+ String qualifiedName,
+ AdditionalProperties additionalProperties,
+ Meanings meanings,
+ String displayName,
+ String description,
+ String address,
+ String protocol,
+ String encryptionMethod)
+ {
+ super(parentAsset, type, guid, url, classifications, qualifiedName, additionalProperties, meanings);
+
+ this.displayName = displayName;
+ this.description = description;
+ this.address = address;
+ this.protocol = protocol;
+ this.encryptionMethod = encryptionMethod;
+ }
+
+ /**
+ * Copy/clone constructor for an Endpoint not connected to an asset.
+ *
+ * @param templateEndpoint - template object to copy.
+ */
+ public Endpoint(Endpoint templateEndpoint)
+ {
+ this(null, templateEndpoint);
+ }
+
+ /**
+ * Copy/clone constructor for an Endpoint that is connected to an Asset (either directly or indirectly).
+ *
+ * @param parentAsset - description of the asset that this endpoint is attached to.
+ * @param templateEndpoint - template object to copy.
+ */
+ public Endpoint(AssetDescriptor parentAsset, Endpoint templateEndpoint)
+ {
+ /*
+ * Save the parent asset description.
+ */
+ super(parentAsset, templateEndpoint);
+
+ /*
+ * All properties are initialised as null so only change their default setting if the template is
+ * not null
+ */
+ if (templateEndpoint != null)
+ {
+ displayName = templateEndpoint.getDisplayName();
+ address = templateEndpoint.getAddress();
+ protocol = templateEndpoint.getProtocol();
+ encryptionMethod = templateEndpoint.getEncryptionMethod();
+
+ AdditionalProperties templateAdditionalProperties = templateEndpoint.getAdditionalProperties();
+
+ if (templateAdditionalProperties != null)
+ {
+ additionalProperties = new AdditionalProperties(parentAsset, templateAdditionalProperties);
+ }
+ }
+ }
+
+
+ /**
+ * Returns the stored display name property for the endpoint.
+ * If no display name is available then null is returned.
+ *
+ * @return displayName
+ */
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+
+ /**
+ * Return the description for the endpoint.
+ *
+ * @return String description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+
+ /**
+ * Returns the stored address property for the endpoint.
+ * If no network address is available then null is returned.
+ *
+ * @return address
+ */
+ public String getAddress()
+ {
+ return address;
+ }
+
+
+ /**
+ * Returns the stored protocol property for the endpoint.
+ * If no protocol is available then null is returned.
+ *
+ * @return protocol
+ */
+ public String getProtocol()
+ {
+ return protocol;
+ }
+
+
+ /**
+ * Returns the stored encryptionMethod property for the endpoint. This is an open type allowing the information
+ * needed to work with a specific encryption mechanism used by the endpoint to be defined.
+ * If no encryptionMethod property is available (typically because this is an unencrypted endpoint)
+ * then null is returned.
+ *
+ * @return encryption method information
+ */
+ public String getEncryptionMethod()
+ {
+ return encryptionMethod;
+ }
+
+
+ /**
+ * Standard toString method.
+ *
+ * @return print out of variables in a JSON-style
+ */
+ @Override
+ public String toString()
+ {
+ return "Endpoint{" +
+ "displayName='" + displayName + '\'' +
+ ", description='" + description + '\'' +
+ ", address='" + address + '\'' +
+ ", protocol='" + protocol + '\'' +
+ ", encryptionMethod='" + encryptionMethod + '\'' +
+ ", 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/cbfdd7fc/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
new file mode 100644
index 0000000..90b7e23
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifier.java
@@ -0,0 +1,215 @@
+/*
+ * 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/cbfdd7fc/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
new file mode 100644
index 0000000..cac397c
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalIdentifiers.java
@@ -0,0 +1,127 @@
+/*
+ * 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/cbfdd7fc/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
new file mode 100644
index 0000000..93706ad
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReference.java
@@ -0,0 +1,193 @@
+/*
+ * 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/cbfdd7fc/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
new file mode 100644
index 0000000..457c447
--- /dev/null
+++ b/om-fwk-ocf/src/main/java/org/apache/atlas/ocf/properties/ExternalReferences.java
@@ -0,0 +1,127 @@
+/*
+ * 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