Skip to content

Commit

Permalink
Merge pull request #2673 from mandy-chessell/foundation-and-empire
Browse files Browse the repository at this point in the history
Completing Discovery Services for 1.5
  • Loading branch information
mandy-chessell authored Feb 27, 2020
2 parents 0376f6c + 6fee9bb commit 90daee0
Show file tree
Hide file tree
Showing 42 changed files with 921 additions and 286 deletions.
6 changes: 5 additions & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ type system, frameworks, connectors, APIs, event payloads and interchange protoc
engines and platforms to exchange metadata in order to get the best
value from data and tools for a wide range of use cases.

## Eager to Get Started Now

If you are interested in getting started with Egeria, try our [tutorials](open-metadata-resources/open-metadata-tutorials).
They show people with different roles in a fictitious organization called
[Coco Pharmaceuticals](https://opengovernance.odpi.org/coco-pharmaceuticals/) making use of different capabilities
Expand Down Expand Up @@ -86,6 +88,8 @@ If you would like to browse to see what is available then these pages may be of
the scope and usage of metadata supported by Egeria "out of the box".
* [Egeria Glossary](open-metadata-publication/website/open-metadata-glossary.md) - provides definitions to terms
used in the Egeria project.
* [Egeria Status and Road Map](open-metadata-publication/website/roadmap) - describes the various
components of Egeria, how they fit together and their current status.
* [Egeria Module Organization](Content-Organization.md) - defines the hierarchical structure of the modules in the
Egeria project.

Expand All @@ -94,7 +98,7 @@ Egeria project.
The following articles may answer additional questions that you have.

* [Where is the code?](https://github.com/odpi/egeria) - link to GitHub.
* [Who is contributing?](https://lfanalytics.io/projects/5b554807-b041-4f98-a6ba-3306f688e05e/dashboard) - see the project activity.
* [Who is contributing?](https://lfanalytics.io/projects/5b554807-b041-4f98-a6ba-3306f688e05e/dashboard) - see the project activity by logging n with your GitHub Account.
* [How do I join the mailing list?](https://lists.odpi.org/g/odpi-project-egeria) - go to the sign up page.
* [What is the ODPi?](https://www.odpi.org/) - visit their website.
* [Why is the project called Egeria?](open-metadata-publication/website/why-egeria) - understand the background of the project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ private PrimitivePropertyValue getPrimitivePropertyValue(String propertyN
propertyValue.setPrimitiveValue((byte)(1 + instanceCount)); // always distinct
break;
case OM_PRIMITIVE_TYPE_CHAR:
propertyValue.setPrimitiveValue((char)('o')); // never distinct
propertyValue.setPrimitiveValue('o'); // never distinct
break;
case OM_PRIMITIVE_TYPE_LONG:
if (distinct)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ private void extendGraph(String userId, String entityGUID, int currentDepth) thr
*/
EntityDetail connectToEntity = metadataCollection.getEntityDetail(workPad.getLocalServerUserId(), entityGUID);
String connectToEntityTypeName = connectToEntity.getType().getTypeDefName();
List<List<String>> possibleRelTypeNames = ((RepositoryConformanceWorkPad) workPad).getEntityRelationshipTypes(connectToEntityTypeName);
List<List<String>> possibleRelTypeNames = workPad.getEntityRelationshipTypes(connectToEntityTypeName);

int fanout = 0;
int endChoice = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@
</fileSet>

<fileSet>
<directory>../../open-metadata-implementation/governance-servers/admin-services/admin-services-client/target</directory>
<directory>../../open-metadata-implementation/admin-services/admin-services-client/target</directory>
<outputDirectory>./clients</outputDirectory>
<includes>
<include>*.jar</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public Connection getConsoleAuditLogConnection(List<String> supportedSeverities)
public Connection getFileBasedAuditLogConnection(String localServerName,
List<String> supportedSeverities)
{
String endpointAddress = localServerName + ".auditlog";
String endpointAddress = "omag.server." + localServerName + ".auditlog";

Endpoint endpoint = new Endpoint();

Expand Down Expand Up @@ -711,7 +711,7 @@ private ConnectorType getDynamicConnectorType(String connectorProviderClassName)

if (connectorProviderClassName != null)
{
Class connectorProviderClass = Class.forName(connectorProviderClassName);
Class<?> connectorProviderClass = Class.forName(connectorProviderClassName);
Object potentialConnectorProvider = connectorProviderClass.newInstance();

ConnectorProvider connectorProvider = (ConnectorProvider)potentialConnectorProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ configuration document and a message similar to this is returned:
"exceptionClassName": "org.odpi.openmetadata.adminservices.ffdc.exception.OMAGInvalidParameterException",
"exceptionErrorMessage": "OMAG-ADMIN-400-022 The configuration document for OMAG server cocoMDS1 is at version V1.0 which is not compatible with this OMAG Server Platform which supports versions [V2.0]",
"exceptionSystemAction": "The system is unable to configure the local server because it can not read the configuration document.",
"exceptionUserAction": "Migrate the configuration document to a compatible version (or delete and recreate it). See https://egeria.odpi.org/open-metadata-implementation/governance-servers/admin-services/docs/user/migrating-configuration-documents.html"
"exceptionUserAction": "Migrate the configuration document to a compatible version (or delete and recreate it). See https://egeria.odpi.org/open-metadata-implementation/admin-services/docs/user/migrating-configuration-documents.html"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

import org.odpi.openmetadata.commonservices.odf.metadatamanagement.mappers.AnnotationMapper;
import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.discovery.properties.AnnotationStatus;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;

import java.util.Date;
import java.util.Map;

/**
Expand All @@ -24,13 +22,7 @@ public class AnnotationBuilder
protected String explanation;
protected String analysisStep;
protected String jsonProperties;
protected int numAttachedAnnotations;
protected AnnotationStatus annotationStatus;
protected Date reviewDate;
protected String steward;
protected String reviewComment;
protected Map<String, String> additionalProperties;
protected Map<String, Object> extendedProperties;
protected OMRSRepositoryHelper repositoryHelper;
protected String serviceName;
protected String serverName;
Expand All @@ -46,12 +38,7 @@ public class AnnotationBuilder
* @param explanation explanation of the results
* @param analysisStep analysis step in the discovery service that produced this annotation
* @param jsonProperties JSON properties passed to discovery service
* @param annotationStatus status of annotation
* @param reviewDate date annotation reviewed
* @param steward name of steward
* @param reviewComment comments from the steward
* @param additionalProperties additional properties
* @param extendedProperties properties from the subtype.
* @param repositoryHelper helper methods
* @param serviceName name of this OMAS
* @param serverName name of local server
Expand All @@ -63,12 +50,7 @@ public AnnotationBuilder(String annotationType,
String explanation,
String analysisStep,
String jsonProperties,
AnnotationStatus annotationStatus,
Date reviewDate,
String steward,
String reviewComment,
Map<String, String> additionalProperties,
Map<String, Object> extendedProperties,
OMRSRepositoryHelper repositoryHelper,
String serviceName,
String serverName)
Expand All @@ -80,12 +62,7 @@ public AnnotationBuilder(String annotationType,
this.explanation = explanation;
this.analysisStep = analysisStep;
this.jsonProperties = jsonProperties;
this.annotationStatus = annotationStatus;
this.reviewDate = reviewDate;
this.steward = steward;
this.reviewComment = reviewComment;
this.additionalProperties = additionalProperties;
this.extendedProperties = extendedProperties;
this.repositoryHelper = repositoryHelper;
this.serviceName = serviceName;
this.serverName = serverName;
Expand Down Expand Up @@ -172,160 +149,6 @@ public InstanceProperties getAnnotationInstanceProperties(String methodName) th
methodName);
}

if (extendedProperties != null)
{
// todo what happens here?
}

return properties;
}


/**
* Return the supplied bean properties that represent a name in an InstanceProperties object.
*
* @param methodName name of the calling method
* @return InstanceProperties object
*/
public InstanceProperties getReviewLinkInstanceProperties(String methodName)
{
InstanceProperties properties = new InstanceProperties();

if (annotationStatus != null)
{
properties = this.addAnnotationStatusToProperties(properties, methodName);
}

return properties;
}


/**
* Return the supplied bean properties that represent a name in an InstanceProperties object.
*
* @param methodName name of the calling method
* @return InstanceProperties object
*/
public InstanceProperties getAnnotationReviewInstanceProperties(String methodName)
{
InstanceProperties properties = new InstanceProperties();

if (reviewDate != null)
{
properties = repositoryHelper.addDatePropertyToInstance(serviceName,
properties,
AnnotationMapper.REVIEW_DATE_PROPERTY_NAME,
reviewDate,
methodName);
}

if (steward != null)
{
properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
AnnotationMapper.STEWARD_PROPERTY_NAME,
steward,
methodName);
}

if (reviewComment != null)
{
properties = repositoryHelper.addStringPropertyToInstance(serviceName,
properties,
AnnotationMapper.COMMENT_PROPERTY_NAME,
reviewComment,
methodName);
}

return properties;
}


/**
* Add the AnnotationStatus enum to the properties.
*
* @param properties current properties
* @param methodName calling method
* @return updated properties
*/
protected InstanceProperties addAnnotationStatusToProperties(InstanceProperties properties,
String methodName)
{
InstanceProperties resultingProperties = properties;

switch (annotationStatus)
{
case NEW_ANNOTATION:
resultingProperties = repositoryHelper.addEnumPropertyToInstance(serviceName,
resultingProperties,
AnnotationMapper.ANNOTATION_STATUS_PROPERTY_NAME,
0,
"New",
"The annotation is new.",
methodName);
break;

case REVIEWED_ANNOTATION:
resultingProperties = repositoryHelper.addEnumPropertyToInstance(serviceName,
resultingProperties,
AnnotationMapper.ANNOTATION_STATUS_PROPERTY_NAME,
1,
"Reviewed",
"The annotation has been reviewed by a steward.",
methodName);
break;

case APPROVED_ANNOTATION:
resultingProperties = repositoryHelper.addEnumPropertyToInstance(serviceName,
resultingProperties,
AnnotationMapper.ANNOTATION_STATUS_PROPERTY_NAME,
2,
"Approved",
"The annotation has been approved.",
methodName);
break;

case ACTIONED_ANNOTATION:
resultingProperties = repositoryHelper.addEnumPropertyToInstance(serviceName,
resultingProperties,
AnnotationMapper.ANNOTATION_STATUS_PROPERTY_NAME,
3,
"Actioned",
"The request has been actioned.",
methodName);
break;

case INVALID_ANNOTATION:
resultingProperties = repositoryHelper.addEnumPropertyToInstance(serviceName,
resultingProperties,
AnnotationMapper.ANNOTATION_STATUS_PROPERTY_NAME,
4,
"Invalid",
"The annotation is invalid or incorrect.",
methodName);
break;

case IGNORE_ANNOTATION:
resultingProperties = repositoryHelper.addEnumPropertyToInstance(serviceName,
resultingProperties,
AnnotationMapper.ANNOTATION_STATUS_PROPERTY_NAME,
5,
"Ignore",
"The annotation should be ignored.",
methodName);
break;

case OTHER_STATUS:
resultingProperties = repositoryHelper.addEnumPropertyToInstance(serviceName,
resultingProperties,
AnnotationMapper.ANNOTATION_STATUS_PROPERTY_NAME,
99,
"Other",
"Another status.",
methodName);
break;
}

return resultingProperties;
}
}
Loading

0 comments on commit 90daee0

Please sign in to comment.