Class SemanticAssignmentMapper
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.RelationshipMapper<SemanticAssignment>
-
- org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.SemanticAssignmentMapper
-
- All Implemented Interfaces:
IRelationshipMapper<SemanticAssignment>,Mapper<Relationship,SemanticAssignment>
public class SemanticAssignmentMapper extends RelationshipMapper<SemanticAssignment>
Mapping methods to map between the semanticAssignment and the equivalent omrs Relationship.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSEMANTIC_ASSIGNMENT-
Fields inherited from class org.odpi.openmetadata.accessservices.subjectarea.server.mappers.relationships.RelationshipMapper
genericHandler, repositoryHelper
-
-
Constructor Summary
Constructors Constructor Description SemanticAssignmentMapper(OpenMetadataAPIGenericHandler genericHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SemanticAssignmentgetRelationshipInstance()StringgetTypeName()get type nameprotected booleanmapEnumToRelationship(SemanticAssignment semanticAssignment, String propertyName, EnumPropertyValue enumPropertyValue)Map an omrs enum property to a Subject Area relationship property.protected booleanmapPrimitiveToRelationship(SemanticAssignment semanticAssignment, String propertyName, Object value)Map a primitive omrs property to the semanticAssignment object.protected voidmapRelationshipToInstanceProperties(SemanticAssignment semanticAssignment, InstanceProperties properties)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
-
SEMANTIC_ASSIGNMENT
public static final String SEMANTIC_ASSIGNMENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SemanticAssignmentMapper
public SemanticAssignmentMapper(OpenMetadataAPIGenericHandler genericHandler)
-
-
Method Detail
-
mapRelationshipToInstanceProperties
protected void mapRelationshipToInstanceProperties(SemanticAssignment semanticAssignment, InstanceProperties properties)
Map the supplied relationship to omrs InstanceProperties.- Overrides:
mapRelationshipToInstancePropertiesin classRelationshipMapper<SemanticAssignment>- Parameters:
semanticAssignment- supplied relationshipproperties- equivalent instance properties to the relationship
-
mapPrimitiveToRelationship
protected boolean mapPrimitiveToRelationship(SemanticAssignment semanticAssignment, String propertyName, Object value)
Map a primitive omrs property to the semanticAssignment object.- Overrides:
mapPrimitiveToRelationshipin classRelationshipMapper<SemanticAssignment>- Parameters:
semanticAssignment- 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(SemanticAssignment semanticAssignment, 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<SemanticAssignment>- Parameters:
semanticAssignment- 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,SemanticAssignment>- Specified by:
getTypeNamein classRelationshipMapper<SemanticAssignment>- Returns:
- the omrs type name.
-
getRelationshipInstance
protected SemanticAssignment getRelationshipInstance()
-
-