lsa: simplified key getter

refs: #4354

Change-Id: Id886d41ff98530e1953066593640232d31b93b26
diff --git a/src/lsa.cpp b/src/lsa.cpp
index afb76a1..00aa797 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -48,11 +48,9 @@
 }
 
 const ndn::Name
-NameLsa::getKey() const
+Lsa::getKey() const
 {
-  ndn::Name key = m_origRouter;
-  key.append(std::to_string(Lsa::Type::NAME));
-  return key;
+  return ndn::Name(m_origRouter).append(std::to_string(getType()));
 }
 
 NameLsa::NameLsa(const ndn::Name& origR, uint32_t lsn,
@@ -146,14 +144,6 @@
   m_angles = theta;
 }
 
-const ndn::Name
-CoordinateLsa::getKey() const
-{
-  ndn::Name key = m_origRouter;
-  key.append(std::to_string(Lsa::Type::COORDINATE));
-  return key;
-}
-
 bool
 CoordinateLsa::isEqualContent(const CoordinateLsa& clsa)
 {
@@ -247,14 +237,6 @@
   }
 }
 
-const ndn::Name
-AdjLsa::getKey() const
-{
-  ndn::Name key = m_origRouter;
-  key.append(std::to_string(Lsa::Type::ADJACENCY));
-  return key;
-}
-
 bool
 AdjLsa::isEqualContent(AdjLsa& alsa)
 {