public class TermMapper extends EntityDetailMapper<Term>
| Modifier and Type | Field and Description |
|---|---|
static String |
GLOSSARY_TERM |
omrsapiHelper, repositoryHelper| Constructor and Description |
|---|
TermMapper(OMRSAPIHelper omrsapiHelper) |
| Modifier and Type | Method and 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)
|
String |
getTypeName()
Get the type name
|
Term |
map(EntityDetail entityDetail)
Map (convert) EntityDetail to Term or a sub type of Term
|
EntityDetail |
map(Term node)
Map from a Subject Area OMAS Node to an OMRS EntityDetail
|
protected void |
mapNodeToInstanceProperties(Term term,
InstanceProperties instanceProperties)
Map the supplied Node to omrs InstanceProperties.
|
protected boolean |
mapPrimitiveToNode(Term term,
String propertyName,
Object value)
Map a primitive omrs property to the term object.
|
protected boolean |
updateNodeWithClassification(Term term,
Classification omasClassification)
Update Node with classification
This method should be overridden by types of node if they want to use the Classification as an in lined property
|
getTypeDefGuid, mapEntityDetailToNode, mapEnumToNode, populateAdditionalProperties, toEntityDetailpublic static final String GLOSSARY_TERM
public TermMapper(OMRSAPIHelper omrsapiHelper)
public Term map(EntityDetail entityDetail)
entityDetail - the supplied EntityDetailpublic EntityDetail map(Term node)
INodeMappernode - a Subject Area OMAS Nodeprotected boolean mapPrimitiveToNode(Term term, String propertyName, Object value)
mapPrimitiveToNode in class EntityDetailMapper<Term>term - the term to be updatedpropertyName - the omrs property namevalue - the omrs primitive property valueprotected void mapNodeToInstanceProperties(Term term, InstanceProperties instanceProperties)
mapNodeToInstanceProperties in class EntityDetailMapper<Term>term - supplied nodeinstanceProperties - equivalent instance properties to the Nodeprotected boolean updateNodeWithClassification(Term term, Classification omasClassification)
EntityDetailMapperterm - node to updateomasClassification - classificationprotected List<Classification> getInlinedClassifications(Term term)
term - supplied termpublic String getTypeName()
MappergetTypeName in interface Mapper<EntityDetail,Term>getTypeName in class EntityDetailMapper<Term>Copyright © 2018–2021 LF AI & Data Foundation. All rights reserved.