Source Code Cross Referenced for GM_Complex.java in  » GIS » GeOxygene-1.3 » fr » ign » cogit » geoxygene » spatial » geomcomp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeOxygene 1.3 » fr.ign.cogit.geoxygene.spatial.geomcomp 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This file is part of the GeOxygene project source files. 
003:         * 
004:         * GeOxygene aims at providing an open framework which implements OGC/ISO specifications for 
005:         * the development and deployment of geographic (GIS) applications. It is a open source 
006:         * contribution of the COGIT laboratory at the Institut Géographique National (the French 
007:         * National Mapping Agency).
008:         * 
009:         * See: http://oxygene-project.sourceforge.net 
010:         *  
011:         * Copyright (C) 2005 Institut Géographique National
012:         *
013:         * This library is free software; you can redistribute it and/or modify it under the terms
014:         * of the GNU Lesser General Public License as published by the Free Software Foundation; 
015:         * either version 2.1 of the License, or any later version.
016:         *
017:         * This library is distributed in the hope that it will be useful, but WITHOUT ANY 
018:         * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
019:         * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
020:         *
021:         * You should have received a copy of the GNU Lesser General Public License along with 
022:         * this library (see file LICENSE if present); if not, write to the Free Software 
023:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
024:         *  
025:         */
026:
027:        package fr.ign.cogit.geoxygene.spatial.geomcomp;
028:
029:        import java.util.HashSet;
030:        import java.util.Set;
031:
032:        import fr.ign.cogit.geoxygene.spatial.coordgeom.DirectPositionList;
033:        import fr.ign.cogit.geoxygene.spatial.geomprim.GM_Primitive;
034:        import fr.ign.cogit.geoxygene.spatial.geomroot.GM_Object;
035:
036:        /** NON TESTE.
037:         * Un complexe est un set de primitives géométriques dont les intérieurs sont disjoints. 
038:         * De plus, si une primitive est dans un complexe, alors il existe un set de primitives dans le complexe dont l'union en forme la frontière. 
039:         * <P> ATTENTION : pour le moment, la contrainte qui impose que si un élément est dans un complexe, sa frontière est dans
040:         * un complexe, n'est pas implémentée.
041:         * <P> A FAIRE AUSSI : mettre des itérateurs sur les listes
042:         * 
043:         * @author Thierry Badard & Arnaud Braun
044:         * @version 1.0
045:         *
046:         */
047:
048:        public class GM_Complex extends GM_Object {
049:
050:            /** Set de primitives constituant self. */
051:            protected Set element = new HashSet();
052:
053:            /** Renvoie le set des primitives */
054:            public Set getElement() {
055:                return element;
056:            }
057:
058:            /** Ajoute une primitive (ajoute aussi un complexe à la primitive)  */
059:            public void addElement(GM_Primitive value) {
060:                this .element.add(value);
061:                value.complex.add(this );
062:            }
063:
064:            /** Efface la primitive passée en paramètre (efface aussi le complexe de la primitive)  */
065:            public void removeElement(GM_Primitive value) {
066:                this .element.remove(value);
067:                value.complex.remove(this );
068:            }
069:
070:            /** Nombre de primitives constituant self. */
071:            public int sizeElement() {
072:                return this .element.size();
073:            }
074:
075:            ////////////////////////////////////////////////////////////////////////
076:            ////////////////////////////////////////////////////////////////////////
077:            // Attribut "subComplex" et méthodes pour le traiter ///////////////////
078:            ////////////////////////////////////////////////////////////////////////
079:            ////////////////////////////////////////////////////////////////////////
080:            // Met a jour automatiquement : le super-complexe, et la liste des elements.
081:
082:            /** Les sous-complexes constituant self. */
083:            protected Set subComplex = new HashSet();
084:
085:            /** Renvoie la liste des sous-complexes */
086:            public Set getSubComplex() {
087:                return subComplex;
088:            }
089:
090:            /** Ajoute un sous-complexe en fin de liste.  */
091:            public void addSubComplex(GM_Complex value) {
092:                this .subComplex.add(value);
093:                value.super Complex.add(this );
094:                this .element.add(value);
095:                value.element.add(this );
096:            }
097:
098:            /** Efface le (ou les) sous-complexes passé en paramètre. */
099:            public void removeSubComplex(GM_Complex value) {
100:                this .subComplex.remove(value);
101:                value.super Complex.remove(this );
102:                this .element.remove(value);
103:                value.element.remove(this );
104:
105:            }
106:
107:            /** Nombre de sous-complexes constituant self. */
108:            public int sizeSubComplex() {
109:                return this .subComplex.size();
110:            }
111:
112:            ////////////////////////////////////////////////////////////////////////
113:            ////////////////////////////////////////////////////////////////////////
114:            // Attribut "superComplex" et méthodes pour le traiter /////////////////
115:            ////////////////////////////////////////////////////////////////////////
116:            ////////////////////////////////////////////////////////////////////////
117:            /** Les super-complexes constituant self. */
118:            protected Set super Complex = new HashSet();
119:
120:            /** Renvoie la liste des super-complexes */
121:            public Set getSuperComplex() {
122:                return super Complex;
123:            }
124:
125:            /** Ajoute un super-complexe en fin de liste.  */
126:            public void addSuperComplex(GM_Complex value) {
127:                this .super Complex.add(value);
128:            }
129:
130:            /** Efface le (ou les) super-complexes passé en paramètre. */
131:            public void removeSuperComplex(GM_Complex value) {
132:                this .super Complex.remove(value);
133:            }
134:
135:            /** Nombre de super-complexes constituant self. */
136:            public int sizeSuperComplex() {
137:                return this .super Complex.size();
138:            }
139:
140:            ////////////////////////////////////////////////////////////////////////
141:            ////////////////////////////////////////////////////////////////////////
142:            // Méthodes ////////////////////////////////////////////////////////////
143:            ////////////////////////////////////////////////////////////////////////
144:            ////////////////////////////////////////////////////////////////////////    
145:
146:            /** Un complexe est maximal s'il n'est le subcomplexe de personne. */
147:            public boolean isMaximal() {
148:                if (this .sizeSuperComplex() == 0)
149:                    return true;
150:                else
151:                    return false;
152:            }
153:
154:            /** NON IMPLEMENTE POUR UN COMPLEXE QUELCONQUE.
155:             * Collection de GM_Object représentant la frontière de self.
156:             * Cette collection d'objets a une structure de GM_ComplexBoundary, 
157:             * qui est un GM_Complex de dimension inférieure à 1 à celle de l'objet initial.
158:             */
159:            //   public GM_ComplexBoundary boundary() {
160:            //       return null;
161:            //   }
162:
163:            /** Marche pas. Renvoie null.  */
164:            public DirectPositionList coord() {
165:                System.out
166:                        .println("coord() : marche pas pour un complexe. Renvoie null");
167:                return null;
168:            }
169:
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.