This project has retired. For details please refer to its Attic page.
AbstractPropertyDefinition xref

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   * http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.chemistry.opencmis.commons.impl.dataobjects;
20  
21  import java.util.List;
22  
23  import org.apache.chemistry.opencmis.commons.definitions.Choice;
24  import org.apache.chemistry.opencmis.commons.definitions.PropertyDefinition;
25  import org.apache.chemistry.opencmis.commons.enums.Cardinality;
26  import org.apache.chemistry.opencmis.commons.enums.PropertyType;
27  import org.apache.chemistry.opencmis.commons.enums.Updatability;
28  
29  /**
30   * Abstract property definition data implementation.
31   */
32  public abstract class AbstractPropertyDefinition<T> extends AbstractExtensionData implements PropertyDefinition<T> {
33  
34      private static final long serialVersionUID = 1L;
35  
36      private String id;
37      private String localName;
38      private String localNamespace;
39      private String queryName;
40      private String displayName;
41      private String description;
42      private PropertyType propertyType;
43      private Cardinality cardinality;
44      private List<Choice<T>> choiceList;
45      private List<T> defaultValue;
46      private Updatability updatability;
47      private Boolean isInherited;
48      private Boolean isQueryable;
49      private Boolean isOrderable;
50      private Boolean isRequired;
51      private Boolean isOpenChoice;
52  
53      public String getId() {
54          return id;
55      }
56  
57      public void setId(String id) {
58          this.id = id;
59      }
60  
61      public String getLocalName() {
62          return localName;
63      }
64  
65      public void setLocalName(String localName) {
66          this.localName = localName;
67      }
68  
69      public String getLocalNamespace() {
70          return localNamespace;
71      }
72  
73      public void setLocalNamespace(String localNamespace) {
74          this.localNamespace = localNamespace;
75      }
76  
77      public String getQueryName() {
78          return queryName;
79      }
80  
81      public void setQueryName(String queryName) {
82          this.queryName = queryName;
83      }
84  
85      public String getDisplayName() {
86          return displayName;
87      }
88  
89      public void setDisplayName(String displayName) {
90          this.displayName = displayName;
91      }
92  
93      public String getDescription() {
94          return description;
95      }
96  
97      public void setDescription(String description) {
98          this.description = description;
99      }
100 
101     public PropertyType getPropertyType() {
102         return propertyType;
103     }
104 
105     public void setPropertyType(PropertyType propertyType) {
106         this.propertyType = propertyType;
107     }
108 
109     public Cardinality getCardinality() {
110         return cardinality;
111     }
112 
113     public void setCardinality(Cardinality cardinality) {
114         this.cardinality = cardinality;
115     }
116 
117     public List<Choice<T>> getChoices() {
118         return choiceList;
119     }
120 
121     public void setChoices(List<Choice<T>> choiceList) {
122         this.choiceList = choiceList;
123     }
124 
125     public List<T> getDefaultValue() {
126         return defaultValue;
127     }
128 
129     public void setDefaultValue(List<T> defaultValue) {
130         this.defaultValue = defaultValue;
131     }
132 
133     public Updatability getUpdatability() {
134         return updatability;
135     }
136 
137     public void setUpdatability(Updatability updatability) {
138         this.updatability = updatability;
139     }
140 
141     public Boolean isInherited() {
142         return isInherited;
143     }
144 
145     public void setIsInherited(Boolean isInherited) {
146         this.isInherited = isInherited;
147     }
148 
149     public Boolean isQueryable() {
150         return isQueryable;
151     }
152 
153     public void setIsQueryable(Boolean isQueryable) {
154         this.isQueryable = isQueryable;
155     }
156 
157     public Boolean isOrderable() {
158         return isOrderable;
159     }
160 
161     public void setIsOrderable(Boolean isOrderable) {
162         this.isOrderable = isOrderable;
163     }
164 
165     public Boolean isRequired() {
166         return isRequired;
167     }
168 
169     public void setIsRequired(Boolean isRequired) {
170         this.isRequired = isRequired;
171     }
172 
173     public Boolean isOpenChoice() {
174         return isOpenChoice;
175     }
176 
177     public void setIsOpenChoice(Boolean isOpenChoice) {
178         this.isOpenChoice = isOpenChoice;
179     }
180 
181     @Override
182     public String toString() {
183         return "Property Definition [id=" + id + ", display name=" + displayName + ", description=" + description
184                 + ", local name=" + localName + ", local namespace=" + localNamespace + ", query name=" + queryName
185                 + ", property type=" + propertyType + ", cardinality=" + cardinality + ", choice list=" + choiceList
186                 + ", default value=" + defaultValue + ", is inherited=" + isInherited + ", is open choice="
187                 + isOpenChoice + ", is queryable=" + isQueryable + ", is required=" + isRequired + ", updatability="
188                 + updatability + "]" + super.toString();
189     }
190 }