Create ToscaConceptIdentifier from ToscaEntityKey
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / authorative / concepts / ToscaEntityKey.java
index adde63b..caf02fc 100644 (file)
@@ -1,6 +1,6 @@
 /*-
  * ============LICENSE_START=======================================================
- *  Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2021 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,4 +35,8 @@ import lombok.NoArgsConstructor;
 public class ToscaEntityKey {
     private String name;
     private String version;
+
+    public ToscaConceptIdentifier asIdentifier() {
+        return new ToscaConceptIdentifier(name, version);
+    }
 }