2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.be.model;
23 import java.util.List;
25 import org.openecomp.sdc.be.datatypes.elements.DataTypeDataDefinition;
27 public class DataTypeDefinition extends DataTypeDataDefinition {
29 private DataTypeDefinition derivedFrom;
31 private List<PropertyConstraint> constraints;
33 private List<PropertyDefinition> properties;
35 public DataTypeDefinition() {
39 public DataTypeDefinition(DataTypeDataDefinition p) {
43 public DataTypeDefinition(DataTypeDefinition pd) {
44 this.setName(pd.getName());
45 this.setDerivedFrom(pd.getDerivedFrom());
46 this.setDerivedFromName(pd.getDerivedFromName());
47 this.setUniqueId(pd.getUniqueId());
48 this.setConstraints(pd.getConstraints());
49 this.setDescription(pd.getDescription());
52 public List<PropertyConstraint> getConstraints() {
56 public void setConstraints(List<PropertyConstraint> constraints) {
57 this.constraints = constraints;
60 public DataTypeDefinition getDerivedFrom() {
64 public void setDerivedFrom(DataTypeDefinition derivedFrom) {
65 this.derivedFrom = derivedFrom;
68 public List<PropertyDefinition> getProperties() {
72 public void setProperties(List<PropertyDefinition> properties) {
73 this.properties = properties;
77 public String toString() {
78 return super.toString() + " DataTypeDefinition [derivedFrom=" + derivedFrom + ", constraints=" + constraints
79 + ", properties=" + properties + "]";