Class TermMapper
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.EntityDetailMapper<Term>
-
- org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.TermMapper
-
- All Implemented Interfaces:
INodeMapper<Term>,Mapper<EntityDetail,Term>
public class TermMapper extends EntityDetailMapper<Term>
Static mapping methods to map between the Term and the generated OMRSBean for GlossaryTerm.
-
-
Field Summary
Fields Modifier and Type Field Description static StringGLOSSARY_TERM-
Fields inherited from class org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.EntityDetailMapper
genericHandler, repositoryHelper
-
-
Constructor Summary
Constructors Constructor Description TermMapper(OpenMetadataAPIGenericHandler genericHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Classification>getInlinedClassifications(Term term)A Classification either exists in the classifications associated with a node or as an inlined attribute (these are properties / attributes of a node that correspond to OMRS Classifications)StringgetTypeName()Get the type nameEntityDetailmap(Term node)Map from a Subject Area OMAS Node to an OMRS EntityDetailTermmap(EntityDetail entityDetail)Map (convert) EntityDetail to Term or a sub type of Termprotected voidmapNodeToInstanceProperties(Term term, InstanceProperties instanceProperties)Map the supplied Node to omrs InstanceProperties.protected booleanmapPrimitiveToNode(Term term, String propertyName, Object value)Map a primitive omrs property to the term object.protected booleanupdateNodeWithClassification(Term term, Classification omasClassification)-
Methods inherited from class org.odpi.openmetadata.accessservices.subjectarea.server.mappers.entities.EntityDetailMapper
getTypeDefGuid, mapEntityDetailToNode, mapEnumToNode, mapMapToNode, populateAdditionalProperties, removePropertyByNameFromInstanceProperties, toEntityDetail
-
-
-
-
Field Detail
-
GLOSSARY_TERM
public static final String GLOSSARY_TERM
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TermMapper
public TermMapper(OpenMetadataAPIGenericHandler genericHandler)
-
-
Method Detail
-
map
public Term map(EntityDetail entityDetail)
Map (convert) EntityDetail to Term or a sub type of Term- Parameters:
entityDetail- the supplied EntityDetail- Returns:
- Term the equivalent Term to the supplied entityDetail.
-
map
public EntityDetail map(Term node) throws InvalidParameterException
Description copied from interface:INodeMapperMap from a Subject Area OMAS Node to an OMRS EntityDetail- Parameters:
node- a Subject Area OMAS Node- Returns:
- an OMRS EntityDetail
- Throws:
InvalidParameterException
-
mapPrimitiveToNode
protected boolean mapPrimitiveToNode(Term term, String propertyName, Object value)
Map a primitive omrs property to the term object.- Overrides:
mapPrimitiveToNodein classEntityDetailMapper<Term>- Parameters:
term- the term to be updatedpropertyName- the omrs property namevalue- the omrs primitive property value- Returns:
- true if the propertyName was recognised and mapped to the Node, otherwise false
-
mapNodeToInstanceProperties
protected void mapNodeToInstanceProperties(Term term, InstanceProperties instanceProperties)
Map the supplied Node to omrs InstanceProperties.- Overrides:
mapNodeToInstancePropertiesin classEntityDetailMapper<Term>- Parameters:
term- supplied nodeinstanceProperties- equivalent instance properties to the Node
-
updateNodeWithClassification
protected boolean updateNodeWithClassification(Term term, Classification omasClassification)
-
getInlinedClassifications
protected List<Classification> getInlinedClassifications(Term term)
A Classification either exists in the classifications associated with a node or as an inlined attribute (these are properties / attributes of a node that correspond to OMRS Classifications)- Parameters:
term- supplied term- Returns:
- inlined classifications.
-
getTypeName
public String getTypeName()
Description copied from interface:MapperGet the type name- Specified by:
getTypeNamein interfaceMapper<EntityDetail,Term>- Specified by:
getTypeNamein classEntityDetailMapper<Term>- Returns:
- type name
-
-