Class OCFConverter<B>
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter<B>
org.odpi.openmetadata.commonservices.generichandlers.OCFConverter<B>
- Direct Known Subclasses:
APIOperationConverter
,AssetConverter
,CatalogTargetConverter
,CatalogTargetConverter
,CertificationConverter
,CommentConverter
,ConnectionConverter
,ConnectorTypeConverter
,EndpointConverter
,ExternalIdentifierConverter
,ExternalReferenceConverter
,InformalTagConverter
,IntegrationReportConverter
,LicenseConverter
,LikeConverter
,LocationConverter
,MeaningConverter
,NoteConverter
,NoteLogConverter
,ODFConverter
,OpenMetadataStoreConverter
,RatingConverter
,ReferenceableConverter
,RelatedAssetConverter
,RelatedMediaConverter
,SchemaAttributeConverter
,SchemaTypeConverter
,SearchKeywordConverter
OCFConverter 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
ConstructorsModifierConstructorDescriptionprotected
OCFConverter
(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected ElementClassification
getClassification
(String classificationName, List<ElementClassification> beanClassifications) Retrieve a specific named classification.protected 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.protected OwnerType
getOwnerTypeFromProperties
(InstanceProperties properties) Retrieve the OwnerType enum property from the instance properties of a classificationprotected List<ElementClassification>
removeClassification
(String classificationName, List<ElementClassification> beanClassifications) Remove the requested classification from the bean classifications and return the resulting list.protected OwnerType
removeOwnerTypeFromProperties
(InstanceProperties properties) Retrieve and delete the OwnerType enum property from the instance properties of an entityprotected DataItemSortOrder
removeSortOrder
(InstanceProperties instanceProperties) Extract and delete the sortOrder property from the supplied instance properties.protected void
setUpElementHeader
(ElementBase elementBase, EntityDetail entity, String expectedTypeName, String methodName) Extract the properties from the entity.protected void
setUpElementHeader
(ElementBase elementBase, InstanceHeader instanceHeader, List<Classification> classifications, String methodName) Extract the properties from the entity.Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter
getAbbreviation, getAdditionalValues, getAnchorGUID, 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, getGroups, getGuard, getImplementationLanguage, getImplementationValue, getIsPublic, getLicensedBy, getLicensee, getLicenseGUID, getMetadataElementHeader, getMetadataElementHeader, getNewBean, getNewBean, getNewComplexBean, getNewComplexBean, getNewRelationshipBean, getNewSchemaAttributeBean, getNewSchemaTypeBean, getNewSchemaTypeBean, getNotes, getOriginBusinessCapabilityGUID, getOriginOrganizationGUID, getOtherOriginValues, getOwner, getOwnerPropertyName, getOwnerTypeName, getOwnerTypeOrdinal, getPointType, getPosition, getQualifiedName, getQuery, getQueryId, getRationale, getRecipient, getReferenceId, getRemainingExtendedProperties, getSecurityLabels, getSecurityProperties, getStart, getSteward, getStewardPropertyName, getStewardTypeName, getStrictRequirement, getSummary, getSymbolicName, getUsage, getZoneMembership, handleBadEntity, handleBadEntityProxy, handleBadRelationship, handleInvalidBeanClass, handleMissingMetadataInstance, handleUnexpectedBeanClass, removeAbbreviation, removeActionProperties, removeActionRequested, removeActionTargetName, removeAdditionalProperties, removeAliases, removeAllowsDuplicateValues, removeAnalysisParameters, removeAnalysisStep, removeAnchorGUID, removeAnnotationType, removeAssociationType, removeAttachmentGUID, removeAuthor, removeAverageValue, removeBusinessImperatives, removeCandidateClassifications, removeCandidateDataClassGUIDs, removeCandidateGlossaryCategoryGUIDs, removeCandidateGlossaryTermGUIDs, removeCapabilityType, removeCapabilityVersion, removeClassificationName, removeClassificationPropertyName, removeClearPassword, removeCollectionType, removeComment, removeCommentText, removeCompletionDate, removeCompletionGuards, removeCompletionMessage, removeCompletionTime, removeConfidence, removeConfidenceLevel, removeConfigurationProperties, removeConnectorFrameworkName, removeConnectorInterfaceLanguage, removeConnectorInterfaces, removeConnectorProviderClassName, removeContactMethodService, removeContactMethodValue, removeContactType, removeCoordinates, removeCreatedTime, removeCreationTime, removeCriteria, removeDatabaseImportedFrom, removeDatabaseInstance, removeDatabaseType, removeDatabaseVersion, removeDataFieldAliases, removeDataFieldDescription, removeDataFieldName, removeDataFieldNamespace, removeDataFieldType, removeDataSourceProperties, removeDataType, removeDefaultValue, removeDefaultValueOverride, removeDeployedImplementationType, removeDescription, removeDetails, removeDiscoveryActivity, removeDisplayName, removeDistinguishedName, removeDivergentClassificationName, removeDivergentClassificationPropertyNames, removeDivergentPropertyNames, removeDivergentRelationshipGUID, removeDivergentRelationshipPropertyNames, removeDomainIdentifier, removeDueTime, removeDuplicateAnchorGUID, removeDuplicateAnchorGUIDs, removeDuplicateAttachmentGUID, removeEmployeeNumber, removeEmployeeType, removeEncoding, removeEncodingStandard, removeEncryptedPassword, removeEncryptionMethod, removeExamples, removeExecutionDate, removeExecutorEngineGUID, removeExecutorEngineName, removeExpectedDataFormat, removeExplanation, removeExpression, removeExternalInstanceCreatedBy, removeExternalInstanceCreationTime, removeExternalInstanceLastUpdatedBy, removeExternalInstanceLastUpdateTime, removeExternalInstanceVersion, removeFileType, removeFixedValue, removeFormula, removeFormulaType, removeFullName, removeGivenNames, removeGovernanceActionTypeName, removeGuard, removeHeadCount, removeId, removeIdentifier, removeIgnoreMultipleTriggers, removeImplementationDescription, removeImplementationLanguage, removeImplications, removeInferredDataType, removeInferredFormat, removeInferredLength, removeInferredPrecision, removeInferredScale, removeInformalTerm, removeInformalTopic, removeInitials, removeIntPriority, removeIsDefaultValue, removeIsDeprecated, removeIsNullable, removeIsPublic, removeJobTitle, removeJsonProperties, removeJurisdiction, removeKarmaPoints, removeKeyword, removeLanguage, removeLastModifiedTime, removeLastModifier, removeLastSynchronized, removeLength, removeLevel, removeLevelIdentifier, removeMandatoryGuard, removeMandatoryGuards, removeMappingProperties, removeMapProjection, removeMatchingAttachmentGUIDs, removeMatchingClassificationNames, removeMatchingPropertyNames, removeMatchingRelationshipGUIDs, removeMaxCardinality, removeMaximumInstances, removeMeasurement, removeMembershipRationale, removeMinCardinality, removeMinimumInstances, removeMinimumLength, removeMission, removeName, removeNamespace, removeNativeClass, removeNetworkAddress, removeOperatingSystem, removeOperatingSystemPatchLevel, removeOrderedValues, removeOrderPropertyName, removeOrganization, removeOriginGovernanceEngine, removeOriginGovernanceService, removeOutcomes, removeOwner, removeOwnerPropertyName, removeOwnerTypeName, removeOwnerTypeOrdinal, removeParameterType, removePatchLevel, removePathName, removePlannedEndDate, removePosition, removePostalAddress, removePrecision, removePreferredLanguage, removePreferredValue, removePriority, removeProcessingEngineUserId, removeProcessName, removeProcessStepGUID, removeProcessStepName, removeProducedGuards, removeProfileCounts, removeProfileFlags, removeProfileProperties, removePronouns, removeProtocol, removePublishVersionIdentifier, removeQualifiedName, removeQualityDimension, removeQualityScore, removeReceivedGuards, removeRecognizedAdditionalProperties, removeRecognizedConfigurationProperties, removeRecognizedSecuredProperties, removeReferenceId, removeReferenceVersion, removeRelatedEntityGUID, removeRelationshipEnd, removeRelationshipProperties, removeRelationshipTypeName, removeRequestParameters, removeRequestSourceName, removeRequestType, removeRequired, removeResults, removeReview, removeReviewDate, removeRoleTypeName, removeSchemaName, removeSchemaType, removeScope, removeSecuredProperties, removeServiceRequestType, removeSignificantDigits, removeSize, removeSource, removeSourceCreateTime, removeSourceUpdateTime, removeStartDate, removeStatus, removeSteward, removeStoreCreateTime, removeStoreUpdateTime, removeSubjectAreaName, removeSummary, removeSupportedAssetTypeName, removeSurname, removeTagDescription, removeTagName, removeTarget, removeTargetTechnologyInterfaces, removeTargetTechnologyName, removeTargetTechnologySource, removeTargetTechnologyVersions, removeText, removeTimeZone, removeTitle, removeTopicType, removeURL, removeUsage, removeUserId, removeUsesBlockingCalls, removeValueCount, removeValueList, removeValueRangeFrom, removeValueRangeTo, removeVersion, removeVersionIdentifier, removeVersionNumber, removeWaitTime, removeZoneMembership, removeZoneName, validateInstanceType
-
Constructor Details
-
OCFConverter
protected OCFConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName) Constructor- Parameters:
repositoryHelper
- helper object to parse entityserviceName
- name of this componentserverName
- name of this server
-
-
Method Details
-
setUpElementHeader
protected void setUpElementHeader(ElementBase elementBase, EntityDetail entity, String expectedTypeName, String methodName) throws PropertyServerException Extract the properties from the entity.- Parameters:
elementBase
- 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(ElementBase elementBase, InstanceHeader instanceHeader, List<Classification> classifications, String methodName) throws PropertyServerException Extract the properties from the entity.- Parameters:
elementBase
- 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
-
removeSortOrder
Extract and delete the sortOrder property from the supplied instance properties.- Parameters:
instanceProperties
- properties from entity- Returns:
- DataItemSortOrder enum
-
removeOwnerTypeFromProperties
Retrieve and delete the OwnerType enum property from the instance properties of an entity- Parameters:
properties
- entity properties- Returns:
- OwnerType enum value
-
getOwnerTypeFromProperties
Retrieve the OwnerType enum property from the instance properties of a classification- Parameters:
properties
- entity properties- Returns:
- OwnerType enum value
-
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
-