Class ValidValueMapper
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.RelationshipMapper<ValidValue>
-
- org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.ValidValueMapper
-
- All Implemented Interfaces:
IRelationshipMapper<ValidValue>,Mapper<Relationship,ValidValue>
public class ValidValueMapper extends RelationshipMapper<ValidValue>
Mapping methods to map between the validValue and the equivalent omrs Relationship.
-
-
Field Summary
Fields Modifier and Type Field Description static StringVALID_VALUE-
Fields inherited from class org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.RelationshipMapper
genericHandler, repositoryHelper
-
-
Constructor Summary
Constructors Constructor Description ValidValueMapper(OpenMetadataAPIGenericHandler genericHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ValidValuegetRelationshipInstance()StringgetTypeName()get type nameprotected booleanmapEnumToRelationship(ValidValue validValue, String propertyName, EnumPropertyValue enumPropertyValue)Map an omrs enum property to a Subject Area relationship property.protected booleanmapPrimitiveToRelationship(ValidValue validValue, String propertyName, Object value)Map a primitive omrs property to the validValue object.protected voidmapRelationshipToInstanceProperties(ValidValue validValue, InstanceProperties instanceProperties)Map the supplied relationship to omrs InstanceProperties.-
Methods inherited from class org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.RelationshipMapper
getTypeDefGuid, map, map, mapInstancePropertiesToRelationship, mapMapToRelationship
-
-
-
-
Field Detail
-
VALID_VALUE
public static final String VALID_VALUE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ValidValueMapper
public ValidValueMapper(OpenMetadataAPIGenericHandler genericHandler)
-
-
Method Detail
-
mapRelationshipToInstanceProperties
protected void mapRelationshipToInstanceProperties(ValidValue validValue, InstanceProperties instanceProperties)
Map the supplied relationship to omrs InstanceProperties.- Overrides:
mapRelationshipToInstancePropertiesin classRelationshipMapper<ValidValue>- Parameters:
validValue- supplied relationshipinstanceProperties- equivalent instance properties to the relationship
-
mapPrimitiveToRelationship
protected boolean mapPrimitiveToRelationship(ValidValue validValue, String propertyName, Object value)
Map a primitive omrs property to the validValue object.- Overrides:
mapPrimitiveToRelationshipin classRelationshipMapper<ValidValue>- Parameters:
validValue- the omas relationship to be updatedpropertyName- the omrs property namevalue- the omrs primitive property value- Returns:
- true if the propertyName was recognised and mapped to the relationship, otherwise false
-
mapEnumToRelationship
protected boolean mapEnumToRelationship(ValidValue validValue, String propertyName, EnumPropertyValue enumPropertyValue)
Description copied from class:RelationshipMapperMap an omrs enum property to a Subject Area relationship property. The child class is expected to override this method if the type has enum properties- Overrides:
mapEnumToRelationshipin classRelationshipMapper<ValidValue>- Parameters:
validValue- the relationship to be updatedpropertyName- the omrs property nameenumPropertyValue- the omrs enum property value- Returns:
- true if it was a property we were expecting , otherwise false;
-
getTypeName
public String getTypeName()
Description copied from class:RelationshipMapperget type name- Specified by:
getTypeNamein interfaceMapper<Relationship,ValidValue>- Specified by:
getTypeNamein classRelationshipMapper<ValidValue>- Returns:
- the omrs type name.
-
getRelationshipInstance
protected ValidValue getRelationshipInstance()
-
-