01: /*
02: * This file is part of the GeOxygene project source files.
03: *
04: * GeOxygene aims at providing an open framework which implements OGC/ISO specifications for
05: * the development and deployment of geographic (GIS) applications. It is a open source
06: * contribution of the COGIT laboratory at the Institut Géographique National (the French
07: * National Mapping Agency).
08: *
09: * See: http://oxygene-project.sourceforge.net
10: *
11: * Copyright (C) 2005 Institut Géographique National
12: *
13: * This library is free software; you can redistribute it and/or modify it under the terms
14: * of the GNU Lesser General Public License as published by the Free Software Foundation;
15: * either version 2.1 of the License, or any later version.
16: *
17: * This library is distributed in the hope that it will be useful, but WITHOUT ANY
18: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
19: * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
20: *
21: * You should have received a copy of the GNU Lesser General Public License along with
22: * this library (see file LICENSE if present); if not, write to the Free Software
23: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24: *
25: */
26:
27: package fr.ign.cogit.geoxygene.dico;
28:
29: /**
30: * Métaclasse pour les classes de rôles composant des GF_AssociationType.
31: * Les rôles sont des propriétés sur les Feature Types.
32: *
33: * @author Thierry Badard & Arnaud Braun
34: * @version 1.0
35: *
36: */
37:
38: public class GF_AssociationRole extends GF_PropertyType {
39:
40: /** Type de l'attribut.*/
41: protected String valueType;
42:
43: /** Renvoie le type de l'attribut. */
44: public String getValueType() {
45: return this .valueType;
46: }
47:
48: /** Affecte un type à l'attribut. */
49: public void setValueType(String ValueType) {
50: this .valueType = ValueType;
51: }
52:
53: /** Nombre de valeurs minimal de l'attribut */
54: protected int cardMin;
55:
56: /** Renvoie le nombre de valeurs minimal de l'attribut. */
57: public int getCardMin() {
58: return this .cardMin;
59: }
60:
61: /** Affecte un nombre de valeurs minimal à l'attribut. */
62: public void setCardMin(int CardMin) {
63: this .cardMin = CardMin;
64: }
65:
66: /** Nombre de valeurs maximal de l'attribut */
67: protected int cardMax;
68:
69: /** Renvoie le nombre de valeurs maximal de l'attribut. */
70: public int getCardMax() {
71: return this .cardMax;
72: }
73:
74: /** Affecte un nombre de valeurs maximal à l'attribut. */
75: public void setCardMax(int CardMax) {
76: this .cardMax = CardMax;
77: }
78:
79: /** Association type auquel est rattaché la propriété. */
80: protected GF_AssociationType associationType;
81:
82: /** Renvoie le feature type auquel est rattaché la propriété. */
83: public GF_AssociationType getAssociationType() {
84: return this .associationType;
85: }
86:
87: /** Affecte un feature type à la propriété. */
88: public void setAssociationType(GF_AssociationType AssociationType) {
89: this .associationType = AssociationType;
90: if (!AssociationType.getRoles().contains(this ))
91: AssociationType.addRole(this ); // gestion de la bi-direction
92: }
93:
94: }
|