Class OMFConverter<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter<B>
org.odpi.openmetadata.commonservices.generichandlers.OMFConverter<B>
- Direct Known Subclasses:
ActorProfileConverter
,APIConverter
,APIOperationConverter
,APIOperationConverter
,APIParameterConverter
,APIParameterListConverter
,AssetConverter
,AssetConverter
,AssetManagerOMASConverter
,CatalogTargetConverter
,CatalogTargetConverter
,CertificationConverter
,CertificationTypeConverter
,CollectionConverter
,CollectionMembershipConverter
,CommentConverter
,CommentConverter
,CommunityConverter
,CommunityProfileOMASConverter
,ConnectionConverter
,ConnectorTypeConverter
,ConnectorTypeConverter
,ContactMethodConverter
,ContributionRecordConverter
,ControlFlowConverter
,DatabaseColumnConverter
,DatabaseConverter
,DatabaseManagerConverter
,DatabaseSchemaConverter
,DatabaseTableConverter
,DatabaseViewConverter
,DataContainerConverter
,DataFieldConverter
,DataFileConverter
,DataFlowConverter
,ElementHeaderConverter
,ElementStubConverter
,EndpointConverter
,EndpointConverter
,EventTypeConverter
,ExternalIdentifierConverter
,ExternalReferenceConverter
,ExternalReferenceConverter
,FileSystemConverter
,FormConverter
,GovernanceDefinitionConverter
,GovernanceDefinitionGraphConverter
,GovernanceDomainConverter
,GovernanceDomainSetConverter
,GovernanceEngineConverter
,GovernanceMetricConverter
,GovernanceMetricImplementationConverter
,GovernanceRoleConverter
,GovernanceServiceConverter
,GovernanceZoneConverter
,InformalTagConverter
,InformalTagConverter
,IntegrationConnectorConverter
,IntegrationGroupConverter
,IntegrationReportConverter
,ITProfileConverter
,LicenseConverter
,LicenseTypeConverter
,LikeConverter
,LikeConverter
,LineageMappingConverter
,LocationConverter
,LocationConverter
,MeaningConverter
,MeaningConverter
,MetadataElementConverter
,MetadataRelationshipConverter
,MetadataSourceConverter
,NoteConverter
,NoteLogConverter
,OCFConnectionConverter
,OpenMetadataStoreConverter
,PersonRoleConverter
,PortConverter
,ProcessCallConverter
,ProcessConverter
,ProfileConverter
,ProjectConverter
,QueryConverter
,RatingConverter
,RatingConverter
,ReferenceableConverter
,ReferenceableConverter
,ReferenceValueAssignmentItemConverter
,RelatedAssetConverter
,RelatedAssetConverter
,RelatedElementConverter
,RelatedMediaConverter
,ReportConverter
,SAFConverter
,SchemaAttributeConverter
,SchemaAttributeConverter
,SchemaTypeConverter
,SchemaTypeConverter
,SearchKeywordConverter
,SecurityGroupConverter
,SecurityManagerConverter
,SoftwareCapabilityConverter
,SubjectAreaConverter
,TabularColumnConverter
,TopicConverter
,UserIdentityConverter
,ValidValueAssignmentConsumerConverter
,ValidValueConverter
,ValidValueSetConverter
OMFConverter provides the generic methods for the OCF beans converters. Generic classes
have limited knowledge of the classes these are working on and this means creating a new instance of a
class from within a generic is a little involved. This class provides the generic method for creating
and initializing a Data Manager bean.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter
repositoryHelper, serverName, serviceName
-
Constructor Summary
ModifierConstructorDescriptionprotected
OMFConverter
(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) ConstructorOMFConverter
(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName, int karmaPointPlateau) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected ElementClassification
getClassification
(String classificationName, List<ElementClassification> beanClassifications) Retrieve a specific named classification.protected ContactMethodType
getContactMethodTypeFromProperties
(InstanceProperties properties) Retrieve the ContactMethodType enum property from the instance properties of an entityprotected Connection
getEmbeddedConnection
(Class<B> beanClass, EntityDetail primaryEntity, List<EntityDetail> supplementaryEntities, List<Relationship> relationships, String methodName) Using the supplied instances, return a new instance of the Connection bean.getRelatedElement
(Class<B> beanClass, EntityDetail entity, Relationship relationship, String methodName) Using the supplied instances, return a new instance of a relatedElement bean.getRelatedElement
(Class<B> beanClass, Relationship relationship, EntityProxy entityProxy, String methodName) Using the supplied instances, return a new instance of a relatedElement bean.protected List<ElementClassification>
removeClassification
(String classificationName, List<ElementClassification> beanClassifications) Remove the requested classification from the bean classifications and return the resulting list.protected PermittedSynchronization
removePermittedSynchronization
(InstanceProperties instanceProperties) Extract and delete the permittedSynchronization property from the supplied instance properties.protected PortType
removePortType
(InstanceProperties instanceProperties) Extract and delete the portType property from the supplied instance properties.protected void
setUpElementHeader
(ElementHeader elementHeader, EntityDetail entity, String expectedTypeName, String methodName) Extract the properties from the entity.protected void
setUpElementHeader
(ElementHeader elementHeader, InstanceHeader instanceHeader, List<Classification> classifications, String methodName) Extract the properties from the entity.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter
addSchemaTypeToAttribute, getAbbreviation, getAdditionalValues, getArguments, getAssetSummary, getAssociationDescription, getAttributeName, getCertificationGUID, getCertifiedBy, getClassificationProperties, getClassificationProperties, getConditions, getConfidence, getCustodian, getDataStoreEncodingDescription, getDataStoreEncodingLanguage, getDataStoreEncodingType, getDescription, getDisplayName, getElementClassifications, getElementOriginCategory, getElementStatus, getElementStub, getElementStub, getElementStub, getElementType, getElementVersions, getEncodingProperties, getEncryption, getEnd, getFormat, getFormula, getFormulaType, getGuard, getImplementationValue, getIsPublic, getLabel, getLicensedBy, getLicensee, getMetadataElementHeader, getMetadataElementHeader, getNewBean, getNewBean, getNewComplexBean, getNewComplexBean, getNewRelationshipBean, getNewSchemaAttributeBean, getNewSchemaTypeBean, getNewSchemaTypeBean, getNotes, getPosition, getQualifiedName, getQuery, getQueryId, getRecipient, getReferenceId, getRemainingExtendedProperties, getStart, getSteward, getStewardPropertyName, getStewardTypeName, getStrictRequirement, getSummary, getSymbolicName, getUsage, handleBadEntity, handleBadRelationship, handleInvalidBeanClass, handleMissingMetadataInstance, handleUnexpectedBeanClass, removeAbbreviation, removeActionProperties, removeActionRequested, removeActionTargetName, removeAdditionalProperties, removeAliases, removeAllowsDuplicateValues, removeAnalysisParameters, removeAnalysisStep, removeAnnotationType, removeAssociationType, removeAuthor, removeAverageValue, removeCandidateClassifications, removeCandidateDataClassGUIDs, removeCandidateGlossaryCategoryGUIDs, removeCandidateGlossaryTermGUIDs, removeCapabilityType, removeCapabilityVersion, removeCategory, removeClearPassword, removeCollectionType, removeComment, removeCommentText, removeCompletionDate, removeCompletionGuards, removeCompletionMessage, removeConfidence, removeConfidenceLevel, removeConfigurationProperties, removeConnectorFrameworkName, removeConnectorInterfaceLanguage, removeConnectorInterfaces, removeConnectorProviderClassName, removeContactMethodService, removeContactMethodValue, removeContactType, removeCreatedTime, removeCriteria, removeDatabaseImportedFrom, removeDatabaseInstance, removeDatabaseVersion, removeDataFieldDescription, removeDataType, removeDefaultValue, removeDefaultValueOverride, removeDeployedImplementationType, removeDescription, removeDetails, removeDisplayName, removeDistinguishedName, removeDomainIdentifier, removeEncoding, removeEncodingStandard, removeEncryptedPassword, removeEncryptionMethod, removeExamples, removeExecutionDate, removeExecutorEngineGUID, removeExecutorEngineName, removeExpectedDataFormat, removeExplanation, removeExpression, removeExternalInstanceCreatedBy, removeExternalInstanceCreationTime, removeExternalInstanceLastUpdatedBy, removeExternalInstanceLastUpdateTime, removeExternalInstanceVersion, removeFileExtension, removeFileName, removeFileType, removeFixedValue, removeFormula, removeFormulaType, removeGovernanceActionTypeGUID, removeGovernanceActionTypeName, removeGuard, removeHeadCount, removeId, removeIdentifier, removeIgnoreMultipleTriggers, removeImplementationLanguage, removeInferredDataType, removeInferredFormat, removeInferredLength, removeInferredPrecision, removeInferredScale, removeInformalTerm, removeInformalTopic, removeIntPriority, removeIsCaseSensitive, removeIsDefaultValue, removeIsDeprecated, removeIsNullable, removeIsPublic, removeJsonProperties, removeKarmaPoints, removeKeyPattern, removeKeyword, removeLanguage, removeLastModifiedTime, removeLastModifier, removeLastSynchronized, removeLength, removeMandatoryGuard, removeMandatoryGuards, removeMappingProperties, removeMaxCardinality, removeMeasurement, removeMinCardinality, removeMinimumLength, removeMission, removeName, removeNamespace, removeNativeClass, removeNetworkAddress, removeOrderedValues, removeOriginGovernanceEngine, removeOriginGovernanceService, removeOutcomes, removeOwner, removeOwningOrganization, removeParameterType, removePatchLevel, removePathName, removePlannedEndDate, removePosition, removePrecision, removePreferredValue, removePriority, removeProcessEndTime, removeProcessingEngineUserId, removeProcessName, removeProcessStartTime, removeProcessStepGUID, removeProcessStepName, removeProducedGuards, removeProfileCounts, removeProfileDates, removeProfileDoubles, removeProfileEndDate, removeProfileFlags, removeProfileProperties, removeProfilePropertyNames, removeProfileStartDate, removeProjectHealth, removeProjectPhase, removeProjectStatus, removeProtocol, removePublishVersionIdentifier, removeQualifiedName, removeQualityDimension, removeQualityScore, removeReceivedGuards, removeRecognizedAdditionalProperties, removeRecognizedConfigurationProperties, removeRecognizedSecuredProperties, removeReferenceId, removeReferenceVersion, removeRelatedEntityGUID, removeRelationshipProperties, removeRelationshipTypeName, removeRequestedStartDate, removeRequesterUserId, removeRequestParameters, removeRequestSourceName, removeRequestType, removeRequired, removeResourceCreateTime, removeResourceLastAccessedTime, removeResourceName, removeResourceProperties, removeResourceUpdateTime, removeResults, removeReview, removeReviewDate, removeSchemaName, removeSchemaType, removeScope, removeSecuredProperties, removeSignificantDigits, removeSize, removeSortOrder, removeSource, removeStartDate, removeSteward, removeStoreCreateTime, removeStoreUpdateTime, removeSubjectAreaName, removeSummary, removeSupportedAssetTypeName, removeSupportedDeployedImplementationType, removeSurveyActivity, removeTagDescription, removeTagName, removeTarget, removeTargetTechnologyInterfaces, removeTargetTechnologyName, removeTargetTechnologySource, removeTargetTechnologyVersions, removeText, removeTitle, removeTopicName, removeTopicType, removeURL, removeUsage, removeUserId, removeUsesBlockingCalls, removeValueCount, removeValueList, removeValueRangeFrom, removeValueRangeTo, removeVersionIdentifier, removeVersionNumber, removeWaitTime, removeZoneName, setUpSchemaAttribute, validateInstanceType
-
Field Details
-
karmaPointPlateau
protected long karmaPointPlateau
-
-
Constructor Details
-
OMFConverter
protected OMFConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor- Parameters:
repositoryHelper
- helper object to parse entityserviceName
- name of this componentserverName
- name of this server
-
OMFConverter
public OMFConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName, int karmaPointPlateau) Constructor- Parameters:
repositoryHelper
- helper object to parse entityserviceName
- name of this componentserverName
- local server namekarmaPointPlateau
- how many karma points to a plateau
-
-
Method Details
-
setUpElementHeader
protected void setUpElementHeader(ElementHeader elementHeader, EntityDetail entity, String expectedTypeName, String methodName) throws PropertyServerException Extract the properties from the entity.- Parameters:
elementHeader
- the header for the beanentity
- entity containing the propertiesexpectedTypeName
- type that the entity must match (or it may be a subtype)methodName
- calling method- Throws:
PropertyServerException
- the supplied entity is not of the expected type
-
setUpElementHeader
protected void setUpElementHeader(ElementHeader elementHeader, InstanceHeader instanceHeader, List<Classification> classifications, String methodName) throws PropertyServerException Extract the properties from the entity.- Parameters:
elementHeader
- the header for the beaninstanceHeader
- header of entityclassifications
- classifications from the entitymethodName
- calling method- Throws:
PropertyServerException
- the supplied entity is not of the expected type
-
getClassification
protected ElementClassification getClassification(String classificationName, List<ElementClassification> beanClassifications) Retrieve a specific named classification.- Parameters:
classificationName
- name of classificationbeanClassifications
- list of classifications retrieved from the repositories- Returns:
- null or the requested classification
-
removeClassification
protected List<ElementClassification> removeClassification(String classificationName, List<ElementClassification> beanClassifications) Remove the requested classification from the bean classifications and return the resulting list.- Parameters:
classificationName
- name of the classificationbeanClassifications
- list of classifications retrieved from the repositories- Returns:
- null or a list of classifications
-
getRelatedElement
public RelatedElement getRelatedElement(Class<B> beanClass, EntityDetail entity, Relationship relationship, String methodName) throws PropertyServerException Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that contain a combination of the properties from an entity and that of a connected relationship.- Overrides:
getRelatedElement
in classOpenMetadataAPIGenericConverter<B>
- Parameters:
beanClass
- name of the class to createentity
- entity containing the propertiesrelationship
- relationship containing the propertiesmethodName
- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException
- there is a problem instantiating the bean
-
getRelatedElement
public RelatedElement getRelatedElement(Class<B> beanClass, Relationship relationship, EntityProxy entityProxy, String methodName) throws PropertyServerException Using the supplied instances, return a new instance of a relatedElement bean. This is used for beans that contain a combination of the properties from an entityProxy and that of a connected relationship.- Parameters:
beanClass
- name of the class to createentityProxy
- entityProxy containing the propertiesrelationship
- relationship containing the propertiesmethodName
- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException
- there is a problem instantiating the bean
-
getEmbeddedConnection
protected Connection getEmbeddedConnection(Class<B> beanClass, EntityDetail primaryEntity, List<EntityDetail> supplementaryEntities, List<Relationship> relationships, String methodName) throws PropertyServerException Using the supplied instances, return a new instance of the Connection bean. It may be a Connection or a VirtualConnection.- Parameters:
beanClass
- class name for the beanprimaryEntity
- entity that is the root of the collection of entities that make up the content of the beansupplementaryEntities
- entities connected to the primary entity by the relationshipsrelationships
- relationships linking the entitiesmethodName
- calling method- Returns:
- bean populated with properties from the instances supplied in the constructor
- Throws:
PropertyServerException
- there is a problem instantiating the bean
-
removePermittedSynchronization
protected PermittedSynchronization removePermittedSynchronization(InstanceProperties instanceProperties) Extract and delete the permittedSynchronization property from the supplied instance properties.- Parameters:
instanceProperties
- properties from entity- Returns:
- PermittedSynchronization enum
-
removePortType
Extract and delete the portType property from the supplied instance properties.- Parameters:
instanceProperties
- properties from entity- Returns:
- PortType enum
-
getContactMethodTypeFromProperties
Retrieve the ContactMethodType enum property from the instance properties of an entity- Parameters:
properties
- entity properties- Returns:
- ContactMethodType enum value
-