1 package org.andromda.cartridges.xmlschema.metafacades;
2
3
4
5
6
7
8 public class XSDAssociationEndLogicImpl
9 extends XSDAssociationEndLogic
10 {
11 private static final long serialVersionUID = 34L;
12
13
14
15
16
17
18 public XSDAssociationEndLogicImpl(Object metaObject, String context)
19 {
20 super(metaObject, context);
21 }
22
23
24
25
26
27 protected String handleGetMaxOccurs()
28 {
29 String maxOccurs = null;
30 boolean isMany = this.isMany();
31 if (isMany)
32 {
33 maxOccurs = "unbounded";
34 }
35 else
36 {
37 maxOccurs = "1";
38 }
39 return maxOccurs;
40 }
41
42
43
44
45
46 protected String handleGetMinOccurs()
47 {
48 String minOccurs = null;
49 boolean isRequired = this.isRequired();
50 if (isRequired)
51 {
52 minOccurs = "1";
53 }
54 else
55 {
56 minOccurs = "0";
57 }
58 return minOccurs;
59 }
60
61
62
63
64
65 protected boolean handleIsOwnerSchemaType()
66 {
67 final Object owner = this.getType();
68 return owner instanceof XSDComplexType || owner instanceof XSDEnumerationType;
69 }
70
71 }