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 Details

  • Constructor Details

  • Method Details

    • 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: INodeMapper
      Map 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:
      mapPrimitiveToNode in class EntityDetailMapper<Term>
      Parameters:
      term - the term to be updated
      propertyName - the omrs property name
      value - 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:
      mapNodeToInstanceProperties in class EntityDetailMapper<Term>
      Parameters:
      term - supplied node
      instanceProperties - 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: Mapper
      Get the type name
      Specified by:
      getTypeName in interface Mapper<EntityDetail,Term>
      Specified by:
      getTypeName in class EntityDetailMapper<Term>
      Returns:
      type name