Class SubjectAreaUtils
java.lang.Object
org.odpi.openmetadata.accessservices.subjectarea.utilities.SubjectAreaUtils
Subject Area OMAS utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckStatusNotDeleted(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.StatusconvertInstanceStatusToStatus(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatus instanceStatus) static org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceStatusconvertStatusToInstanceStatus(org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status status) static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributescreateSystemAttributes(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceHeader instanceHeader) create SystemAttributes instance from an insance header objectstatic org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceTypecreateTemplateFromTypeDef(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDef typeDef) static org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.CategorySummaryextractCategorySummaryFromCategory(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 CategorySummarystatic org.odpi.openmetadata.accessservices.subjectarea.properties.objects.nodesummary.GlossarySummaryextractGlossarySummaryFromGlossary(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary glossary, org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship) Extract Glossary Summarystatic StringgetGlossaryGuidFromAnchor(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.graph.Relationship relationship) Get glossary guid from anchorsorg.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.static voidpopulateSystemAttributesForInstanceAuditHeader(org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes systemAttributes, org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceAuditHeader instanceAuditHeader) static voidsetDatePropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, Date date, String propertyName) set the Date value into the InstancePropertiesstatic voidsetIntegerPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, Integer integerValue, String propertyName) Set the Integer value into the InstanceProperties.static voidsetStatusPropertyInInstanceProperties(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 voidsetStringPropertyInInstanceProperties(org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties instanceProperties, String stringValue, String propertyName) Set the String value into the InstanceProperties.
-
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 convertrelationship-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 summarisedrelationship- 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- -TermAnchororCategoryAnchor- 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 instancepropertiesstringValue- string valuepropertyName- 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 instancepropertiesintegerValue- integer valuepropertyName- 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 instancepropertiesdate- Datew valuepropertyName- 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 mediaguid- 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 instancepropertiesstatus- Status valuepropertyName- property name
-