Class SchemaTypeConverter<B>
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter<B>
-
- org.odpi.openmetadata.accessservices.assetowner.converters.SchemaTypeConverter<B>
-
public class SchemaTypeConverter<B> extends OpenMetadataAPIGenericConverter<B>
SchemaTypeConverter provides common methods for transferring relevant properties from an Open Metadata Repository Services (OMRS) EntityDetail object into a SchemaTypeElement bean.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter
repositoryHelper, serverName, serviceName
-
-
Constructor Summary
Constructors Constructor Description SchemaTypeConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementStubgetElementStub(Class<B> beanClass, EntityProxy entityProxy, String methodName)Extract the properties from the entity.ElementHeadergetMetadataElementHeader(Class<B> beanClass, InstanceHeader header, String methodName)Extract the properties from the entity or relationship.BgetNewSchemaTypeBean(Class<B> beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, InstanceProperties instanceProperties, List<Classification> schemaRootClassifications, int attributeCount, String validValueSetGUID, String externalSchemaTypeGUID, B externalSchemaType, String mapFromSchemaTypeGUID, B mapFromSchemaType, String mapToSchemaTypeGUID, B mapToSchemaType, List<String> schemaTypeOptionGUIDs, List<B> schemaTypeOptions, List<Relationship> queryTargets, String methodName)Return the converted bean.-
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericConverter
getAbbreviation, getAdditionalValues, getAnchorGUID, getArguments, getAssetSummary, getAssociationDescription, getCertificationGUID, getCertifiedBy, getClassificationProperties, getClassificationProperties, getConditions, getConfidence, getCustodian, getDataStoreEncodingDescription, getDataStoreEncodingLanguage, getDataStoreEncodingType, getDescription, getDisplayName, getEncodingProperties, getEncryption, getEnd, getFormat, getFormula, getGuard, getImplementationLanguage, getImplementationValue, getIsPublic, getLicensedBy, getLicensee, getLicenseGUID, getNewBean, getNewBean, getNewComplexBean, getNewComplexBean, getNewRelationshipBean, getNewSchemaAttributeBean, getNewSchemaTypeBean, getNotes, getOriginBusinessCapabilityGUID, getOriginOrganizationGUID, getOtherOriginValues, getOwner, getOwnerPropertyName, getOwnerTypeName, getOwnerTypeOrdinal, getPointType, getPosition, getQualifiedName, getQuery, getQueryId, getRationale, getRecipient, getReferenceId, getRemainingExtendedProperties, getSecurityLabels, getSecurityProperties, getStart, getSteward, getStrictRequirement, getSummary, getSymbolicName, getUsage, getZoneMembership, handleBadEntity, handleBadEntityProxy, handleBadRelationship, handleInvalidBeanClass, handleMissingMetadataInstance, handleUnexpectedBeanClass, removeAbbreviation, removeActionProperties, removeActionRequested, removeActionTargetName, removeAdditionalProperties, removeAliases, removeAllowsDuplicateValues, removeAnalysisParameters, removeAnalysisStep, removeAnchorGUID, removeAnnotationType, removeAttachmentGUID, removeAuthor, removeAverageValue, removeBusinessImperatives, removeCandidateClassifications, removeCandidateDataClassGUIDs, removeCandidateGlossaryCategoryGUIDs, removeCandidateGlossaryTermGUIDs, removeCapabilityVersion, removeClassificationName, removeClassificationPropertyName, removeClearPassword, removeComment, removeCommentText, removeCompletionDate, removeCompletionGuards, removeCompletionTime, removeConfidenceLevel, removeConfigurationProperties, removeConnectorProviderClassName, removeContactMethodService, removeContactMethodValue, removeCoordinates, removeCreatedTime, removeCreationTime, removeCriteria, removeDatabaseImportedFrom, removeDatabaseInstance, removeDatabaseType, removeDatabaseVersion, removeDataFieldAliases, removeDataFieldDescription, removeDataFieldName, removeDataFieldType, removeDataSourceProperties, removeDataType, removeDefaultValue, removeDefaultValueOverride, removeDeployedImplementationType, removeDescription, removeDetails, removeDiscoveryActivity, removeDisplayName, removeDivergentClassificationName, removeDivergentClassificationPropertyNames, removeDivergentPropertyNames, removeDivergentRelationshipGUID, removeDivergentRelationshipPropertyNames, removeDomainIdentifier, removeDueTime, removeDuplicateAnchorGUID, removeDuplicateAnchorGUIDs, removeDuplicateAttachmentGUID, removeEncoding, removeEncodingStandard, removeEncryptedPassword, removeEncryptionMethod, removeExecutionDate, removeExplanation, removeExpression, removeFileType, removeFixedValue, removeFormula, removeFullName, removeHeadCount, removeId, removeIdentifier, removeImplementationDescription, removeImplementationLanguage, removeImplications, removeInferredDataType, removeInferredFormat, removeInferredLength, removeInferredPrecision, removeInferredScale, removeInformalTerm, removeInformalTopic, removeIntPriority, removeIsDeprecated, removeIsNullable, removeIsPublic, removeJobTitle, removeJsonProperties, removeJurisdiction, removeKarmaPoints, removeLanguage, removeLastModifiedTime, removeLastModifier, removeLastSynchronized, removeLength, removeLevel, removeLevelIdentifier, removeMandatoryGuards, removeMappingProperties, removeMapProjection, removeMatchingAttachmentGUIDs, removeMatchingClassificationNames, removeMatchingPropertyNames, removeMatchingRelationshipGUIDs, removeMaxCardinality, removeMembershipRationale, removeMinCardinality, removeMinimumLength, removeMission, removeName, removeNamespace, removeNativeClass, removeNetworkAddress, removeOrderedValues, removeOrderPropertyName, removeOrganization, removeOriginGovernanceEngine, removeOriginGovernanceService, removeOutcomes, removeOwner, removeOwnerPropertyName, removeOwnerTypeName, removeOwnerTypeOrdinal, removeParameterType, removePatchLevel, removePathName, removePlannedEndDate, removePosition, removePostalAddress, removePrecision, removePreferredValue, removePriority, removeProcessingEngineUserId, removeProducedGuards, removeProfileCounts, removeProfileFlags, removeProfileProperties, removeProtocol, removeQualifiedName, removeQualityDimension, removeQualityScore, removeReceivedGuards, removeRecognizedAdditionalProperties, removeRecognizedConfigurationProperties, removeRecognizedSecuredProperties, removeReferenceVersion, removeRelatedEntityGUID, removeRelationshipProperties, removeRelationshipTypeName, removeRequestParameters, removeRequestSourceName, removeRequestType, removeRequired, removeResults, removeReview, removeReviewDate, removeSchemaName, removeSchemaType, removeScope, removeSecuredProperties, removeSize, removeSource, removeSourceCreateTime, removeSourceUpdateTime, removeStartDate, removeStatus, removeSteward, removeStoreCreateTime, removeStoreUpdateTime, removeSummary, removeTagDescription, removeTagName, removeText, removeTimeZone, removeTitle, removeURL, removeUsage, removeUserId, removeValueCount, removeValueList, removeValueRangeFrom, removeValueRangeTo, removeVersionNumber, removeZoneMembership, validateInstanceType
-
-
-
-
Constructor Detail
-
SchemaTypeConverter
public SchemaTypeConverter(OMRSRepositoryHelper repositoryHelper, String serviceName, String serverName)
Constructor- Parameters:
repositoryHelper- helper object to parse entityserviceName- name of this componentserverName- local server name
-
-
Method Detail
-
getNewSchemaTypeBean
public B getNewSchemaTypeBean(Class<B> beanClass, InstanceHeader schemaRootHeader, String schemaTypeTypeName, InstanceProperties instanceProperties, List<Classification> schemaRootClassifications, int attributeCount, String validValueSetGUID, String externalSchemaTypeGUID, B externalSchemaType, String mapFromSchemaTypeGUID, B mapFromSchemaType, String mapToSchemaTypeGUID, B mapToSchemaType, List<String> schemaTypeOptionGUIDs, List<B> schemaTypeOptions, List<Relationship> queryTargets, String methodName) throws PropertyServerException
Return the converted bean. This is a special method used for schema types since they are stored as a collection of instances. For external schema types and map elements, both the GUID and the bean are returned to allow the consuming OMAS to choose whether it is returning GUIDs of the linked to schema or the schema type bean itself.- Overrides:
getNewSchemaTypeBeanin classOpenMetadataAPIGenericConverter<B>- Parameters:
beanClass- name of the class to createschemaRootHeader- header of the schema element that holds the root informationschemaTypeTypeName- name of type of the schema type to createinstanceProperties- properties describing the schema typeschemaRootClassifications- classifications from the schema root entityattributeCount- number of attributes (for a complex schema type)validValueSetGUID- unique identifier of the set of valid values (for an enum schema type)externalSchemaTypeGUID- unique identifier of the external schema typeexternalSchemaType- unique identifier for the properties of the schema type that is shared by multiple attributes/assetsmapFromSchemaTypeGUID- unique identifier of the mapFrom schema typemapFromSchemaType- bean containing the properties of the schema type that is part of a map definitionmapToSchemaTypeGUID- unique identifier of the mapTo schema typemapToSchemaType- bean containing the properties of the schema type that is part of a map definitionschemaTypeOptionGUIDs- list of unique identifiers for schema types that could be the type for this attributeschemaTypeOptions- list of schema types that could be the type for this attributequeryTargets- list of relationships to schema types that contain data values used to derive the schema type value(s)methodName- calling method- Returns:
- bean populated with properties from the instances supplied
- Throws:
PropertyServerException- there is a problem instantiating the bean
-
getMetadataElementHeader
public ElementHeader getMetadataElementHeader(Class<B> beanClass, InstanceHeader header, String methodName) throws PropertyServerException
Extract the properties from the entity or relationship.- Parameters:
beanClass- name of the class to createheader- header from the entity containing the propertiesmethodName- calling method- Returns:
- filled out element header
- Throws:
PropertyServerException- there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
-
getElementStub
public ElementStub getElementStub(Class<B> beanClass, EntityProxy entityProxy, String methodName) throws PropertyServerException
Extract the properties from the entity.- Parameters:
beanClass- name of the class to createentityProxy- entityProxy from the relationship containing the propertiesmethodName- calling method- Returns:
- filled out element header
- Throws:
PropertyServerException- there is a problem in the use of the generic handlers because the converter has been configured with a type of bean that is incompatible with the handler
-
-