java.lang.Object
org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils

public class SubjectAreaUtils extends Object
Subject Area OMAS utilities.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    checkStatusNotDeleted(org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status status, org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode errorCode)
     
    static org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status
    convertInstanceStatusToStatus(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus instanceStatus)
     
    static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus
    convertStatusToInstanceStatus(org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status status)
     
    static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes
    createSystemAttributes(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader instanceHeader)
    create SystemAttributes instance from an insance header object
    static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType
    createTemplateFromTypeDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
     
    static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary
    extractCategorySummaryFromCategory(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category category, org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship)
    Convert a Category to a CategorySummary
    static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary
    extractGlossarySummaryFromGlossary(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary glossary, org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship)
    Extract Glossary Summary
    static String
    getGlossaryGuidFromAnchor(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship)
    Get glossary guid from anchors
    org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse<org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.IconSummary>
    Set icon summaries from related media relationships by issuing a call to omrs using the related media guid - which is at one end of the relationship.
    static void
    populateSystemAttributesForInstanceAuditHeader(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes systemAttributes, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader instanceAuditHeader)
     
    static void
    setDatePropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, Date date, String propertyName)
    set the Date value into the InstanceProperties
    static void
    setIntegerPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, Integer integerValue, String propertyName)
    Set the Integer value into the InstanceProperties.
    static void
    setStatusPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus status, String propertyName)
    Set status values into instance properties.
    static void
    setStringPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, String stringValue, String propertyName)
    Set the String value into the InstanceProperties.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SubjectAreaUtils

      public SubjectAreaUtils()
  • Method Details

    • createTemplateFromTypeDef

      public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType createTemplateFromTypeDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef)
    • extractCategorySummaryFromCategory

      public static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummary extractCategorySummaryFromCategory(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category category, org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship)
      Convert a Category to a CategorySummary
      Parameters:
      category - to convert
      relationship - Relationship
      Returns:
      CategorySummary
    • extractGlossarySummaryFromGlossary

      public static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummary extractGlossarySummaryFromGlossary(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary glossary, org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship)
      Extract Glossary Summary
      Parameters:
      glossary - the glossary that is to be summarised
      relationship - the relationship to the glossary, which feeds part of the node summary
      Returns:
      Glossary Summary or null
    • getGlossaryGuidFromAnchor

      public static String getGlossaryGuidFromAnchor(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship)
      Get glossary guid from anchors
      Parameters:
      relationship - - TermAnchor or CategoryAnchor
      Returns:
      glossaryGuid
    • checkStatusNotDeleted

      public static void checkStatusNotDeleted(org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status status, org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode errorCode) throws org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException
      Throws:
      org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException
    • convertInstanceStatusToStatus

      public static org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status convertInstanceStatusToStatus(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus instanceStatus)
    • convertStatusToInstanceStatus

      public static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus convertStatusToInstanceStatus(org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status status)
    • createSystemAttributes

      public static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes createSystemAttributes(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader instanceHeader)
      create SystemAttributes instance from an insance header object
      Parameters:
      instanceHeader - omrs instance header
      Returns:
      SystemAttributes
    • populateSystemAttributesForInstanceAuditHeader

      public static void populateSystemAttributesForInstanceAuditHeader(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes systemAttributes, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader instanceAuditHeader)
    • setStringPropertyInInstanceProperties

      public static void setStringPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, String stringValue, String propertyName)
      Set the String value into the InstanceProperties.
      Parameters:
      instanceProperties - supplied instanceproperties
      stringValue - string value
      propertyName - property name.
    • setIntegerPropertyInInstanceProperties

      public static void setIntegerPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, Integer integerValue, String propertyName)
      Set the Integer value into the InstanceProperties.
      Parameters:
      instanceProperties - supplied instanceproperties
      integerValue - integer value
      propertyName - property name.
    • setDatePropertyInInstanceProperties

      public static void setDatePropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, Date date, String propertyName)
      set the Date value into the InstanceProperties
      Parameters:
      instanceProperties - supplied instanceproperties
      date - Datew value
      propertyName - property name
    • getIconSummarySet

      public org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse<org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.IconSummary> getIconSummarySet(String userId, String guid)
      Set icon summaries from related media relationships by issuing a call to omrs using the related media guid - which is at one end of the relationship. Note that we should only return the icons that are effective - by checking the effective From and To dates against the current time
      Parameters:
      userId - userid under which to issue to the get of the related media
      guid - to get associated icons from
      Returns:
      response with Set of IconSummary objects or an Exception response.
    • setStatusPropertyInInstanceProperties

      public static void setStatusPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus status, String propertyName)
      Set status values into instance properties.
      Parameters:
      instanceProperties - supplied instanceproperties
      status - Status value
      propertyName - property name