Class RepositoryConformanceWorkPad

java.lang.Object
org.odpi.openmetadata.conformance.beans.OpenMetadataConformanceWorkbenchWorkPad
org.odpi.openmetadata.conformance.workbenches.repository.RepositoryConformanceWorkPad

public class RepositoryConformanceWorkPad extends OpenMetadataConformanceWorkbenchWorkPad
RepositoryConformanceWorkPad provides the thread safe place to assemble results from the repository workbench.
  • Constructor Details

    • RepositoryConformanceWorkPad

      public RepositoryConformanceWorkPad(String localServerUserId, String localServerPassword, int maxPageSize, OMRSAuditLog auditLog, RepositoryConformanceWorkbenchConfig configuration)
      Constructor receives key information from the configuration services.
      Parameters:
      localServerUserId - userId that this server should use on requests
      localServerPassword - password that this server should use on requests
      maxPageSize - maximum number of elements that can be returned on a single call
      auditLog - audit log for administrator messages
      configuration - configuration for this work pad/workbench
  • Method Details

    • getAuditLog

      public OMRSAuditLog getAuditLog()
      Return the audit log for this server.
      Returns:
      audit log object.
    • getTutServerName

      public String getTutServerName()
      Return the name of the server being tested.
      Returns:
      server name
    • getMaxSearchResults

      public int getMaxSearchResults()
      Return the maximum number of search results that be processed for tests of the repository under test.
      Returns:
      maximum number of search results to process
    • getTutServerType

      public String getTutServerType()
      Return the server type of the technology under test. This is extracted from the registration events.
      Returns:
      string type name
    • setTutServerType

      public void setTutServerType(String tutServerType)
      Set up the server type of the technology under test. This is extracted from the registration events.
      Parameters:
      tutServerType - string type name
    • getTutOrganization

      public String getTutOrganization()
      Return the owning organization of the technology under test. This is extracted from the registration event.
      Returns:
      string organization name
    • setTutOrganization

      public void setTutOrganization(String tutOrganization)
      Set up the owning organization of the technology under test. This is extracted from the registration event.
      Parameters:
      tutOrganization - string organization name
    • getTutMetadataCollectionId

      public String getTutMetadataCollectionId()
      Return the metadata collection id of the technology under test (or null if it is not known). This value is populated from the registration events.
      Returns:
      string id
    • setTutMetadataCollectionId

      public void setTutMetadataCollectionId(String tutMetadataCollectionId)
      Set up the metadata collection id of the technology under test. This value is populated from the registration events.
      Parameters:
      tutMetadataCollectionId - string id
    • setSupportedAttributeTypeDefsFromRESTAPI

      public void setSupportedAttributeTypeDefsFromRESTAPI(List<AttributeTypeDef> supportedAttributeTypeDefs)
      Set up the supported attributeTypeDefs for validation. This list comes from the REST API.
      Parameters:
      supportedAttributeTypeDefs - list of attributeTypeDefs
    • addSupportedAttributeTypeDefFromEvent

      public void addSupportedAttributeTypeDefFromEvent(AttributeTypeDef attributeTypeDef)
      Add a TypeDef to the list of supported type definitions. This value comes from the events.
      Parameters:
      attributeTypeDef - type definition object
    • getAttributeTypeDefByName

      public AttributeTypeDef getAttributeTypeDefByName(String name)
      Return a type definition object by name (or null if not known)
      Parameters:
      name - name of type definition object
      Returns:
      attributeTypeDef object
    • getAttributeTypeDefFromRESTAPI

      public AttributeTypeDef getAttributeTypeDefFromRESTAPI(String guid)
      Return a specific type definition received from the REST API.
      Parameters:
      guid - unique identifier of the required type definition
      Returns:
      type definition object or null if not known
    • getAttributeTypeDefFromEvents

      public AttributeTypeDef getAttributeTypeDefFromEvents(String guid)
      Return a specific type definition received in an OMRS event.
      Parameters:
      guid - unique identifier of the required type definition
      Returns:
      type definition object or null if not known
    • setSupportedTypeDefsFromRESTAPI

      public void setSupportedTypeDefsFromRESTAPI(List<TypeDef> supportedTypeDefs)
      Set up the supported typeDefs for validation. This list comes from the REST API.
      Parameters:
      supportedTypeDefs - list of typeDefs
    • addSupportedTypeDefFromEvent

      public void addSupportedTypeDefFromEvent(TypeDef typeDef)
      Add a TypeDef to the list of supported type definitions. This value comes from the events.
      Parameters:
      typeDef - type definition object
    • getTypeDefByName

      public TypeDef getTypeDefByName(String name)
      Return a type definition object by name (or null if not known)
      Parameters:
      name - name of type definition object
      Returns:
      typeDef object
    • getTypeDefFromRESTAPI

      public TypeDef getTypeDefFromRESTAPI(String guid)
      Return a specific type definition received from the REST API.
      Parameters:
      guid - unique identifier of the required type definition
      Returns:
      type definition object or null if not known
    • getTypeDefFromEvents

      public TypeDef getTypeDefFromEvents(String guid)
      Return a specific type definition received in an OMRS event.
      Parameters:
      guid - unique identifier of the required type definition
      Returns:
      type definition object or null if not known
    • getTutRepositoryConnector

      public OMRSRepositoryConnector getTutRepositoryConnector()
      Return the repository connector for the technology under test.
      Returns:
      OMRSRepositoryConnector
    • setTutRepositoryConnector

      public void setTutRepositoryConnector(OMRSRepositoryConnector tutRepositoryConnector)
      Set up the repository connector for the technology under test.
      Parameters:
      tutRepositoryConnector - OMRSRepositoryConnector
    • getLocalMetadataCollectionId

      public String getLocalMetadataCollectionId()
      Return the metadata collection id for the local repository.
      Returns:
      string id
    • setLocalMetadataCollectionId

      public void setLocalMetadataCollectionId(String localMetadataCollectionId)
      Set up the metadata collection id for the local repository.
      Parameters:
      localMetadataCollectionId - string id
    • getLocalRepositoryConnector

      public OMRSRepositoryConnector getLocalRepositoryConnector()
      Return the connector to the local repository.
      Returns:
      OMRSRepositoryConnector
    • setLocalRepositoryConnector

      public void setLocalRepositoryConnector(OMRSRepositoryConnector localRepositoryConnector)
      Set up the connector to the local repository.
      Parameters:
      localRepositoryConnector - access to the local repository (updated to generate events for the technology under test to respond to)
    • getProfileNames

      public List<String> getProfileNames()
      Accumulate the set of profile names registered with this work pad.
      Specified by:
      getProfileNames in class OpenMetadataConformanceWorkbenchWorkPad
      Returns:
      the profile names
    • getProfileResults

      public OpenMetadataConformanceProfileResults getProfileResults(String profileName)
      Accumulate the evidences for a given profile.
      Specified by:
      getProfileResults in class OpenMetadataConformanceWorkbenchWorkPad
      Parameters:
      profileName - for which to obtain the detailed results
      Returns:
      the test evidence organized by profile and requirement within profile
    • getProfileResults

      public List<OpenMetadataConformanceProfileResults> getProfileResults()
      Accumulate the evidences for each profile
      Specified by:
      getProfileResults in class OpenMetadataConformanceWorkbenchWorkPad
      Returns:
      the test evidence organized by profile and requirement withing profile
    • getProfileSummaries

      public List<OpenMetadataConformanceProfileSummary> getProfileSummaries()
      Accumulate the summarized evidences for each profile
      Specified by:
      getProfileSummaries in class OpenMetadataConformanceWorkbenchWorkPad
      Returns:
      the summarized test evidence organized by profile and requirement withing profile
    • getEntitySubTypes

      public List<String> getEntitySubTypes(String entityTypeName)
      Return the list of subtypes of the named entity type
      Parameters:
      entityTypeName - - the name of the entity type
      Returns:
      - the list of subtypes of the entity type
    • getRelationshipSubTypes

      public List<String> getRelationshipSubTypes(String relationshipTypeName)
      Return the list of subtypes of the named relationship type
      Parameters:
      relationshipTypeName - - the name of the relationship type
      Returns:
      - the list of subtypes of the relationship type
    • getEntityRelationshipTypes

      public List<List<String>> getEntityRelationshipTypes(String entityTypeName)
      Return the list of end types for the named relationship type.
      Parameters:
      entityTypeName - requested type
      Returns:
      list of relationship types for the entity type
    • getEntityTypeNames

      public Set<String> getEntityTypeNames()
      Return the set of supported entity type names
      Returns:
      list of type names
    • getRelationshipEndTypes

      public List<String> getRelationshipEndTypes(String relationshipTypeName)
      Return the list of end types for the named relationship type
      Parameters:
      relationshipTypeName - relationship type
      Returns:
      list of end types
    • getRelationshipTypeNames

      public Set<String> getRelationshipTypeNames()
      Return the set of supported relationship type names
      Returns:
      list of relationship types
    • addEntityInstanceSets

      public void addEntityInstanceSets(String entityTypeName, List<EntityDetail> set_0, List<EntityDetail> set_1, List<EntityDetail> set_2)
      Remember the sets of instances for a given entity type. This is to support
      Parameters:
      entityTypeName - - name of entity type
      set_0 - - a list of entities
      set_1 - - a list of entities
      set_2 - - a list of entities
    • getEntityInstanceSet

      public List<EntityDetail> getEntityInstanceSet(String entityTypeName, int setId)
      Retrieve entity instances for the given type for the given instance set
      Parameters:
      entityTypeName - entity type name
      setId - which set
      Returns:
      list of entities
    • removeEntityInstanceSets

      public void removeEntityInstanceSets(String entityTypeName)
      Clean up entity instances for the given type.
      Parameters:
      entityTypeName - name of entity type
    • addRelationshipInstanceSets

      public void addRelationshipInstanceSets(String relationshipTypeName, List<Relationship> set_0, List<Relationship> set_1, List<Relationship> set_2)
      Remember the sets of instances for a given relationship type. This is to support
      Parameters:
      relationshipTypeName - - type name for relationship
      set_0 - - a list of relationships
      set_1 - - a list of relationships
      set_2 - - a list of relationships
    • getRelationshipInstanceSet

      public List<Relationship> getRelationshipInstanceSet(String relationshipTypeName, int setId)
      Retrieve relationship instances for the given type for the given instance set
      Parameters:
      relationshipTypeName - relationship type name
      setId - which set?
      Returns:
      list of relationships
    • removeRelationshipInstanceSets

      public void removeRelationshipInstanceSets(String relationshipTypeName)
      Clean up relationship instances for the given type.
      Parameters:
      relationshipTypeName - relationship type name
    • toString

      public String toString()
      toString() JSON-style
      Overrides:
      toString in class OpenMetadataConformanceWorkbenchWorkPad
      Returns:
      string description