924efd48f7bfe6d52dec74fc1ab36cd2d0152115
[vfc/nfvo/wfengine.git] /
1 /*******************************************************************************
2  * Copyright (c) 2012-2013 University of Stuttgart.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * and the Apache License 2.0 which both accompany this distribution,
6  * and are available at http://www.eclipse.org/legal/epl-v10.html
7  * and http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Contributors:
10  *     Oliver Kopp - initial API and implementation
11  *******************************************************************************/
12 package org.eclipse.winery.repository.resources.entitytypes.capabilitytypes;
13
14 import org.eclipse.winery.model.tosca.TCapabilityType;
15 import org.eclipse.winery.model.tosca.TExtensibleElements;
16 import org.eclipse.winery.common.ids.definitions.CapabilityTypeId;
17 import org.eclipse.winery.repository.resources.EntityTypeResource;
18 import org.slf4j.Logger;
19 import org.slf4j.LoggerFactory;
20
21 public final class CapabilityTypeResource extends EntityTypeResource {
22         
23         private static final Logger logger = LoggerFactory.getLogger(CapabilityTypeResource.class);
24         
25         
26         /**
27          * Constructor has to be public because of test cases
28          */
29         public CapabilityTypeResource(CapabilityTypeId id) {
30                 super(id);
31         }
32         
33         /**
34          * Convenience method to avoid casting at the caller's side.
35          * 
36          * @return the CapabilityType object this resource is representing
37          */
38         public TCapabilityType getCapabilityType() {
39                 return (TCapabilityType) this.getElement();
40         }
41         
42         @Override
43         protected TExtensibleElements createNewElement() {
44                 return new TCapabilityType();
45         }
46         
47 }