KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > service > cmr > dictionary > AssociationDefinition


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.service.cmr.dictionary;
18
19 import org.alfresco.service.namespace.QName;
20
21
22 /**
23  * Read-only definition of an Association.
24  *
25  * @author David Caruana
26  *
27  */

28 public interface AssociationDefinition
29 {
30     
31     /**
32      * @return defining model
33      */

34     public ModelDefinition getModel();
35     
36     /**
37      * @return the qualified name
38      */

39     public QName getName();
40
41     /**
42      * @return the human-readable title
43      */

44     public String JavaDoc getTitle();
45     
46     /**
47      * @return the human-readable description
48      */

49     public String JavaDoc getDescription();
50     
51     /**
52      * Is this a child association?
53      *
54      * @return true => child, false => general relationship
55      */

56     public boolean isChild();
57     
58     /**
59      * Is this association maintained by the Repository?
60      *
61      * @return true => system maintained, false => client may maintain
62      */

63     public boolean isProtected();
64
65     /**
66      * @return the source class
67      */

68     public ClassDefinition getSourceClass();
69
70     /**
71      * @return the role of the source class in this association?
72      */

73     public QName getSourceRoleName();
74     
75     /**
76      * Is the source class optional in this association?
77      *
78      * @return true => cardinality > 0
79      */

80     public boolean isSourceMandatory();
81
82     /**
83      * Can there be many source class instances in this association?
84      *
85      * @return true => cardinality > 1, false => cardinality of 0 or 1
86      */

87     public boolean isSourceMany();
88
89     /**
90      * @return the target class
91      */

92     public ClassDefinition getTargetClass();
93     
94     /**
95      * @return the role of the target class in this association?
96      */

97     public QName getTargetRoleName();
98     
99     /**
100      * Is the target class optional in this association?
101      *
102      * @return true => cardinality > 0
103      */

104     public boolean isTargetMandatory();
105
106     /**
107      * Can there be many target class instances in this association?
108      *
109      * @return true => cardinality > 1, false => cardinality of 0 or 1
110      */

111     public boolean isTargetMany();
112
113 }
114
Popular Tags