fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6890] Maven version of code


From: Petur Thorsteinsson
Subject: [Fmsystem-commits] [6890] Maven version of code
Date: Mon, 31 Jan 2011 20:43:42 +0000

Revision: 6890
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6890
Author:   peturbjorn
Date:     2011-01-31 20:43:42 +0000 (Mon, 31 Jan 2011)
Log Message:
-----------
Maven version of code

Added Paths:
-----------
    thirdparty/BIM_converter/trunk/.classpath
    thirdparty/BIM_converter/trunk/.project
    thirdparty/BIM_converter/trunk/.settings/
    thirdparty/BIM_converter/trunk/.settings/org.eclipse.jdt.core.prefs
    thirdparty/BIM_converter/trunk/.settings/org.maven.ide.eclipse.prefs
    thirdparty/BIM_converter/trunk/pom.xml
    thirdparty/BIM_converter/trunk/src/
    thirdparty/BIM_converter/trunk/src/main/
    thirdparty/BIM_converter/trunk/src/main/java/
    thirdparty/BIM_converter/trunk/src/main/java/no/
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcModel.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiException.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentation.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/InvalidIfcFileException.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/Repositories.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoriesImpl.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryException.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryExceptionUc.java
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Attributes.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BaseQuantities.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BoundaryItem.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ClassificationItem.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Decomposition.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ElementList.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialItem.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialLayer.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/NameValuePair.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/PropertyList.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpaceSpatialContainer.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpatialContainerItem.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Units.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ZoneAssignment.java
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/ActorRole.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Address.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Application.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Organization.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/OwnerHistory.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Person.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/PersonAndOrganization.java
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/Item.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/RepositoryStatus.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/SimpleList.java
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingLoader.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingStoreyLoader.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CommonLoader.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CoveringLoader.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/SiteLoader.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/WindowLoader.java
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelImpl.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelReport.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/ModelInformation.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/WholeModelOutput.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Building.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/BuildingStorey.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObject.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectDefinition.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectImpl.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Project.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Site.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Space.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/SpatialStructure.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/TypeObject.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Zone.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/CommonElement.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/Covering.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/Door.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/Furnishing.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/Window.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/type/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/type/CoveringType.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/type/DoorStyle.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/type/FurnishingType.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/element/type/WindowStyle.java
    thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/rest/
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/rest/TestingService.java
    
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/rest/UploadIfc.java
    thirdparty/BIM_converter/trunk/src/main/resources/
    thirdparty/BIM_converter/trunk/src/main/resources/repository.properties
    thirdparty/BIM_converter/trunk/src/main/webapp/
    thirdparty/BIM_converter/trunk/src/main/webapp/WEB-INF/
    thirdparty/BIM_converter/trunk/src/main/webapp/WEB-INF/lib/
    thirdparty/BIM_converter/trunk/src/main/webapp/WEB-INF/lib/IFC_2x3.jar
    thirdparty/BIM_converter/trunk/src/main/webapp/WEB-INF/lib/jsdai_runtime.jar
    thirdparty/BIM_converter/trunk/src/main/webapp/WEB-INF/web.xml
    thirdparty/BIM_converter/trunk/src/main/webapp/index.jsp
    thirdparty/BIM_converter/trunk/src/test/
    thirdparty/BIM_converter/trunk/src/test/java/
    thirdparty/BIM_converter/trunk/src/test/java/no/
    thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/
    thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/IfcSdaiRepresentationImplTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/RepositoriesImplTest.java
    thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/jaxb/
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/jaxb/BaseQuantitiesTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/jaxb/ElementListTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/jaxb/NameValuePairTest.java
    thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelReportTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/IfcModelTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/ModelInformationTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/WholeModelOutputTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingStoreyTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/BuildingTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ProjectTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SiteTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/SpaceTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/ZoneTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/CoveringTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/DoorTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/FurnishingTest.java
    
thirdparty/BIM_converter/trunk/src/test/java/no/bimconverter/ifc/v2x3/object/element/WindowTest.java
    thirdparty/BIM_converter/trunk/src/test/resources/
    
thirdparty/BIM_converter/trunk/src/test/resources/20091007_Test_BasicFM-HandOver_01_valid.ifc
    thirdparty/BIM_converter/trunk/src/test/resources/fake1mixedcase.ifc
    thirdparty/BIM_converter/trunk/src/test/resources/fake2uppercase.ifc
    thirdparty/BIM_converter/trunk/src/test/resources/repository.properties
    thirdparty/BIM_converter/trunk/src/test/resources/sample.ifc

Added: thirdparty/BIM_converter/trunk/.classpath
===================================================================
--- thirdparty/BIM_converter/trunk/.classpath                           (rev 0)
+++ thirdparty/BIM_converter/trunk/.classpath   2011-01-31 20:43:42 UTC (rev 
6890)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src/test/java"/>
+       <classpathentry kind="src" path="src/main/java"/>
+       <classpathentry kind="con" 
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+       <classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk"/>
+       <classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: thirdparty/BIM_converter/trunk/.project
===================================================================
--- thirdparty/BIM_converter/trunk/.project                             (rev 0)
+++ thirdparty/BIM_converter/trunk/.project     2011-01-31 20:43:42 UTC (rev 
6890)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>ifc_converter</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.maven.ide.eclipse.maven2Builder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.maven.ide.eclipse.maven2Nature</nature>
+       </natures>
+</projectDescription>

Added: thirdparty/BIM_converter/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- thirdparty/BIM_converter/trunk/.settings/org.eclipse.jdt.core.prefs         
                (rev 0)
+++ thirdparty/BIM_converter/trunk/.settings/org.eclipse.jdt.core.prefs 
2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,13 @@
+#Tue Jan 25 15:58:38 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

Added: thirdparty/BIM_converter/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- thirdparty/BIM_converter/trunk/.settings/org.maven.ide.eclipse.prefs        
                        (rev 0)
+++ thirdparty/BIM_converter/trunk/.settings/org.maven.ide.eclipse.prefs        
2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,8 @@
+#Tue Jan 25 12:44:34 CET 2011
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: thirdparty/BIM_converter/trunk/pom.xml
===================================================================
--- thirdparty/BIM_converter/trunk/pom.xml                              (rev 0)
+++ thirdparty/BIM_converter/trunk/pom.xml      2011-01-31 20:43:42 UTC (rev 
6890)
@@ -0,0 +1,101 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>no.bimconverter</groupId>
+  <artifactId>bimconverter</artifactId>
+  <packaging>war</packaging>
+  <version>0.5.0-SNAPSHOT</version>
+  <name>bimconverter Maven Webapp</name>
+  <url>http://maven.apache.org</url>
+  <repositories>
+       <repository>
+    <id>maven2-repository.dev.java.net</id>
+    <name>Java.net Repository for Maven</name>
+    <url>http://download.java.net/maven/2/</url>
+    <layout>default</layout>
+       </repository> 
+       <repository>
+           <id>maven-repository.dev.java.net</id>
+           <name>Java.net Maven 1 Repository (legacy)</name>
+           <url>http://download.java.net/maven/1</url>
+           <layout>legacy</layout>
+       </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+       <groupId>junit</groupId>
+       <artifactId>junit</artifactId>
+       <version>4.8.2</version>
+       <type>jar</type>
+       <scope>test</scope>
+    </dependency>
+    <dependency>
+       <groupId>ch.qos.logback</groupId>
+       <artifactId>logback-core</artifactId>
+       <version>0.9.27</version>
+       <type>jar</type>
+       <scope>compile</scope>
+    </dependency>
+    <dependency>
+       <groupId>ch.qos.logback</groupId>
+       <artifactId>logback-classic</artifactId>
+       <version>0.9.27</version>
+       <type>jar</type>
+       <scope>compile</scope>
+    </dependency>
+    <dependency>
+       <groupId>org.slf4j</groupId>
+       <artifactId>slf4j-api</artifactId>
+       <version>1.6.1</version>
+       <type>jar</type>
+       <scope>compile</scope>
+    </dependency>
+    <dependency>
+       <groupId>jsdai</groupId>
+       <artifactId>jdsai</artifactId>
+       <version>4.3.0</version>
+       <type>jar</type>
+       <scope>system</scope>
+       
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/jsdai_runtime.jar</systemPath>
+    </dependency>
+    <dependency>
+       <groupId>jsdai.2x3</groupId>
+       <artifactId>jdsai-ifc2x3</artifactId>
+       <version>2.3</version>
+       <type>jar</type>
+       <scope>system</scope>
+       
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/IFC_2x3.jar</systemPath>
+    </dependency>
+    <dependency>
+       <groupId>javax.ws.rs</groupId>
+       <artifactId>jsr311-api</artifactId>
+       <version>1.1.1</version>
+       <type>jar</type>
+       <scope>compile</scope>
+    </dependency>
+    <dependency>
+           <groupId>com.sun.jersey</groupId>
+           <artifactId>jersey-server</artifactId>
+           <version>1.5</version>
+       </dependency>
+       <dependency>
+           <groupId>com.sun.jersey.contribs</groupId>
+           <artifactId>jersey-multipart</artifactId>
+           <version>1.5</version>
+       </dependency>
+  </dependencies>
+  <build>
+    <finalName>bimconverter</finalName>
+    <plugins>
+       <plugin>
+               <groupId>org.apache.maven.plugins</groupId>
+               <artifactId>maven-compiler-plugin</artifactId>
+               <version>2.3.2</version>
+                <configuration>
+                       <source>1.6</source>
+                       <target>1.6</target>
+                     </configuration>
+       </plugin>
+    </plugins>
+  </build>
+</project>

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcModel.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcModel.java  
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcModel.java  
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,7 @@
+package no.bimconverter.ifc;
+
+public interface IfcModel extends Repositories {
+       public int size();
+       public void setIfcRepositoryName(String ifcRepositoryName);
+       public String getIfcRepositoryName();
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiException.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiException.java
                              (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiException.java
      2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,14 @@
+package no.bimconverter.ifc;
+
+public class IfcSdaiException extends RuntimeException {
+       
+       private static final long serialVersionUID = -4560953593088726863L;
+
+       public IfcSdaiException(String message){
+               super(message);
+       }
+       public IfcSdaiException(String message, Throwable t){
+               super(message, t);
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentation.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentation.java
                         (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentation.java
 2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,5 @@
+package no.bimconverter.ifc;
+
+public interface IfcSdaiRepresentation {
+       String propertiesFileName = "repository.properties";
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/IfcSdaiRepresentationImpl.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,76 @@
+package no.bimconverter.ifc;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiSession;
+import jsdai.lang.SdaiTransaction;
+
+public class IfcSdaiRepresentationImpl implements IfcSdaiRepresentation{
+       private Logger logger = 
LoggerFactory.getLogger("no.bimconverter.ifc.IfcSdaiRepresentationImpl");
+       protected SdaiSession session = null;
+       protected SdaiTransaction transaction =null;
+       protected Properties properties = new java.util.Properties();
+       
+       public IfcSdaiRepresentationImpl() {
+               this(propertiesFileName);
+       }
+       public IfcSdaiRepresentationImpl(String propertiesFileNameArg) {
+               InputStream inStream;
+               try {
+                       //logger.debug("Opening following properties file:{}", 
Thread.currentThread().getContextClassLoader().getResource(propertiesFileNameArg).toString());
+                       //inStream =  
Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesFileNameArg);
+                       inStream = getClass().getResourceAsStream( "/" 
+propertiesFileNameArg );
+                       //getClass().get
+                       if(inStream == null) {
+                               logger.error("Properties file not found!!");
+                               throw new FileNotFoundException();
+                       }
+                       properties.load(inStream);
+                       SdaiSession.setSessionProperties(properties);
+               } catch (FileNotFoundException e1) {
+                       logger.error("Properties file not found!!");
+                       e1.printStackTrace();
+                       throw new IfcSdaiException("File not found!", e1);
+               } catch (IOException e) {
+                       logger.error("IO Exception!!");
+                       e.printStackTrace();
+                       throw new IfcSdaiException("IO error!", e);
+               } catch (SdaiException e) {
+                       logger.error("Sdai Exception!!");
+                       e.printStackTrace();
+                       throw new IfcSdaiException("Sdai error!", e);
+               }
+       }
+       
+       protected void openSdaiSession() {
+               try {
+                       //session=SdaiSession.getSession();
+                       //session.closeSession();
+                       session=SdaiSession.openSession();
+                       //session = SdaiSession.getSession();
+                       transaction = session.startTransactionReadWriteAccess();
+                       
+                       
+               } catch (SdaiException e) {
+                       
+                       e.printStackTrace();
+               }
+       }
+       protected void closeSdaiSession() {
+               try {
+                       if(session != null)
+                               session.closeSession();
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+       }
+       
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/InvalidIfcFileException.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/InvalidIfcFileException.java
                               (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/InvalidIfcFileException.java
       2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,22 @@
+package no.bimconverter.ifc;
+/*
+ * Uc = Unchecked... should probably change this
+ */
+public class InvalidIfcFileException extends RuntimeException {
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = -7670769841469006165L;
+       
+       public InvalidIfcFileException() {
+               super();
+       }
+       public InvalidIfcFileException(String exception) {
+               super(exception);
+       }
+       public InvalidIfcFileException(String exception, Throwable t) {
+               super(exception, t);
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/Repositories.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/Repositories.java
                          (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/Repositories.java
  2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,34 @@
+package no.bimconverter.ifc;
+
+import java.util.List;
+
+import no.bimconverter.ifc.jaxb.rest.RepositoryStatus;
+
+
+
+public interface Repositories {
+       /*
+        * Information on all existing repositories
+        * @return string containing information existing repositories
+        */
+       public RepositoryStatus getRepositoryStatus();
+       
+       /*
+        * If it returns 1, then only the default (and usually empty) system 
repository exists
+        */
+       public int getNumberOfRepositories();
+       /*
+        * @return empty list if there are no names
+        */
+       public List<String> getRepositoryNames();
+       
+       public boolean deleteRepository(String repository);
+       
+       public boolean checkIfRepositoryExists(String repoName);
+       /*
+        * @throws RepositoryExceptionUc if it already exists
+        */
+       public boolean addRepository(String repoName, String fileName);
+       
+       public boolean deleteAllRepositories();
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoriesImpl.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoriesImpl.java
                              (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoriesImpl.java
      2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,345 @@
+package no.bimconverter.ifc;
+
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import no.bimconverter.ifc.jaxb.rest.RepositoryStatus;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+import jsdai.lang.AEntity;
+import jsdai.lang.ASdaiRepository;
+import jsdai.lang.A_string;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+import jsdai.lang.SdaiModel;
+import jsdai.lang.SdaiRepository;
+
+public class RepositoriesImpl extends IfcSdaiRepresentationImpl implements 
Repositories  {
+       private Logger logger = 
LoggerFactory.getLogger("no.bimconverter.ifc.RepositoriesImpl");
+       private List<String> repositoryNames= new ArrayList<String>();
+       private List<String> repositoryInfo= new ArrayList<String>();
+       private RepositoryStatus repositoryStatus = new RepositoryStatus();
+       java.util.Properties prop = new java.util.Properties();
+       protected ASdaiRepository repositoryAggregation;
+       protected SdaiIterator repositoryIterator;
+       
+       public RepositoriesImpl() {
+               super();
+               try {
+                       this.initRepositoryData();
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       throw new RepositoryExceptionUc("Could not initialize 
repositories", e);
+               }
+       }
+       
+       
+       private void initRepositoryData() throws SdaiException {
+               super.openSdaiSession();
+               extractRepositories();
+               
+               while(repositoryIterator.next()) {
+                       SdaiRepository repo = 
repositoryAggregation.getCurrentMember(repositoryIterator);
+                       if(!repo.isActive()) {
+                               repo.openRepository();
+                       }
+                       transaction.commit();
+                       this.repositoryNames.add(repo.getName());
+                       this.repositoryInfo.add(getRepositoryInfo(repo));
+               }
+               super.closeSdaiSession();
+       }
+
+       protected void extractRepositories() throws SdaiException {
+               
+               repositoryAggregation = session.getKnownServers();
+               //logger.debug("Known servers count is: 
{}",repositoryAggregation.getMemberCount());
+               repositoryIterator = repositoryAggregation.createIterator();
+       }
+       
+       
+       public RepositoryStatus getRepositoryStatus() {
+               
this.repositoryStatus.setRepositoryCount(String.valueOf(this.repositoryNames.size()));
+               for(String repositoryName : this.repositoryNames) {
+                       this.repositoryStatus.addRepositoryName(repositoryName);
+               }
+               for(String repositoryInformation : this.repositoryInfo) {
+                       
this.repositoryStatus.addRepositoryInfo(repositoryInformation);
+               }
+               return repositoryStatus;
+               /*
+               repoStatus.append("Number of 
repositories:"+this.repositoryNames.size()+"\n");
+               repoStatus.append("Names of repositories:\n");
+               for(String s : this.repositoryNames) {
+                       repoStatus.append(s + "\n");
+               }
+               repoStatus.append("Info on repositores:\n");
+               for(String s : this.repositoryInfo) {
+                       repoStatus.append("--\n");
+                       repoStatus.append(s + "\n");
+               }
+               return repoStatus.toString();
+               */
+       }
+       
+       public boolean checkIfRepositoryExists(String repositoryName){
+               super.openSdaiSession();
+               try {
+                       this.extractRepositories();
+                       this.repositoryNames = new ArrayList<String>();
+                       while (repositoryIterator.next()) {
+                               String currentRepositoryName = 
repositoryAggregation.getCurrentMember(repositoryIterator).getName();
+                               if ( 
currentRepositoryName.equals(repositoryName)) {
+                                       return true;
+                               }
+                       }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       throw new RepositoryExceptionUc("Could not check if 
Repository exists");
+               } finally {
+                       super.closeSdaiSession();
+               }
+               return false;
+       }
+       /*
+        * @param SdaiRepository
+        * @return Returns a string of most of the data from the IFC file header
+        */
+       private String getRepositoryInfo(SdaiRepository repository) throws 
SdaiException {
+               StringBuilder info = new StringBuilder();
+               if(repository.isActive()) {
+                       
+                       
+                       A_string ss = repository.getOrganization();
+                       for(int i = 1; i <= ss.getMemberCount(); i++) {
+                               info.append("Organization:"+ss.getByIndex(i)+ 
"\n");
+                       }
+                       ss = repository.getAuthor();
+                       for(int i = 1; i <= ss.getMemberCount(); i++) {
+                               info.append("Author:"+ss.getByIndex(i)+ "\n");
+                       }
+                       ss =repository.getContextIdentifiers();
+                       for(int i = 1; i <= ss.getMemberCount(); i++) {
+                               info.append("Context 
Identifier:"+ss.getByIndex(i)+ "\n");
+                       }
+                       ss =repository.getDescription();
+                       for(int i = 1; i <= ss.getMemberCount(); i++) {
+                               info.append("Description:"+ss.getByIndex(i)+ 
"\n");
+                       }
+                       
+                       info.append("Real name:"+repository.getRealName()+ 
"\n");
+                       info.append("Name:"+repository.getName()+ "\n");
+                       info.append("Location:"+repository.getLocation()+ "\n");
+                       info.append("Preprocessor:"+ 
repository.getPreprocessorVersion()+ "\n");
+                       info.append("Originating system:"+ 
repository.getOriginatingSystem()+ "\n");
+                       
info.append("Authorization:"+repository.getAuthorization()+ "\n");
+               } 
+               return info.toString();
+       }
+       
+       public boolean addRepository(String repoName, String fileName) {
+               return importRepository(repoName, fileName);
+               /*try {
+                       return importRepository(repoName, fileName);
+               } catch (RepositoryExceptionUc e) {
+                       throw e;
+               }*/
+       }
+       public boolean importRepository(String repoName, InputStream stream) {
+               try {
+                       if(checkIfRepositoryExists(repoName)) {
+                               throw new RepositoryExceptionUc("Repository 
already exists!");
+                       }
+                       super.openSdaiSession();
+                       SdaiRepository temporaryRepository = 
session.createRepository(repoName, null);
+                       temporaryRepository.openRepository();
+                       session.importClearTextEncoding(stream, 
temporaryRepository);
+                       transaction.commit();
+                       super.closeSdaiSession();
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       super.closeSdaiSession();
+                       logger.error("Exception thrown while adding 
repository");
+                       //e.printStackTrace();
+                       logger.debug("MSG:"+e.getMessage());
+                       if(e.getMessage().contains("Exchange structure parsing 
error") || e.getMessage().contains("Exchange structure scanning error")) {
+                               logger.error("Throwing 
invalidifcfileexception");
+                               logger.error(e.getMessage());
+                               throw new InvalidIfcFileException("Invalid 
file", e);
+                       } else {
+                               logger.error("Throwing repository exception");
+                               throw new RepositoryExceptionUc("Error adding 
repository", e);
+                       }
+               }
+               return true;
+       }
+       private boolean importRepository(String repoName, String fileName) {
+               try {
+                       if(checkIfRepositoryExists(repoName)) {
+                               throw new RepositoryExceptionUc("Repository 
already exists!");
+                       } else {
+                               super.openSdaiSession();
+                               StringBuilder sb = new StringBuilder();
+                               sb.append("About to import following:\n");
+                               sb.append("Repository name:\t"+repoName+"\n");
+                               sb.append("filename:\t "+fileName);
+                               logger.debug(sb.toString());
+                               SdaiRepository repo = 
session.importClearTextEncoding(repoName,fileName, null);
+                               /*
+                               if(!repo.isActive()) {
+                                       repo.openRepository();
+                               }
+                               */
+                               
+                               transaction.commit();
+                               /*
+                               ASdaiModel models = repo.getModels();
+                               SdaiIterator modelIterator = 
models.createIterator();
+                               while(modelIterator.next()) {
+                                       SdaiModel model = 
models.getCurrentMember(modelIterator);
+                                       //System.out.println("model");
+                               }
+                               
+                               System.out.println("Model count 
is:"+models.getMemberCount());
+                               System.out.println("Instance count 
is:"+models.getInstanceCount());
+                               */
+                               super.closeSdaiSession();
+                               return true;
+                       }
+               } catch (SdaiException e) {
+                       super.closeSdaiSession();
+                       logger.error("Exception thrown while adding 
repository");
+                       //e.printStackTrace();
+                       logger.debug("MSG:"+e.getMessage());
+                       if(e.getMessage().contains("Exchange structure parsing 
error") || e.getMessage().contains("Exchange structure scanning error")) {
+                               logger.error("Throwing 
invalidifcfileexception");
+                               logger.error(e.getMessage());
+                               throw new InvalidIfcFileException("Invalid 
file", e);
+                       } else {
+                               logger.error("Throwing repository exception");
+                               throw new RepositoryExceptionUc("Error adding 
repository", e);
+                       }
+                       
+               } finally {
+                       //super.closeSdaiSession();
+               }
+       }
+       /*
+       public List<EEntity> getModel(String repoName) throws 
RepositoryException{
+               try {
+                       if(checkIfRepositoryExists(repoName)) {
+                               sdaiSession =SdaiSession.openSession();
+                               SdaiTransaction transaction = 
sdaiSession.startTransactionReadWriteAccess();
+                               ASdaiRepository repositoryAgg = 
sdaiSession.getKnownServers();
+                               SdaiIterator arIter = 
repositoryAgg.createIterator();
+                               SdaiRepository myRepository = null;
+                               while (arIter.next()) {
+                                       SdaiRepository repository = 
repositoryAgg.getCurrentMember(arIter);
+                                       if ( 
repository.getName().equals(repoName)) {
+                                               myRepository = repository;
+                                               break;
+                                       }
+                               }
+                               if (!myRepository.isActive()) {
+                                       myRepository.openRepository();
+                               }
+                               transaction.commit();
+                               ASdaiModel models = myRepository.getModels();
+                               //System.out.println("Model 
count:"+models.getMemberCount());
+                               //System.out.println("Instance 
count:"+models.getInstanceCount());
+                               SdaiModel model = models.getByIndex(1);
+                               if(model.getMode() == SdaiModel.NO_ACCESS) {
+                                       model.startReadOnlyAccess();
+                               }
+                               List<EEntity> modelEntities = 
getModelEntitiesAsList(model);
+                               
+                               return modelEntities;
+                               
+                       } else {
+                               throw new RepositoryException("Repo does not 
exist!");
+                               }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       throw new RepositoryException("Error getting model", e);
+               } finally {
+                       closeSdaiSession();
+               }
+       }
+       */
+       
+       private List<EEntity> getModelEntitiesAsList(SdaiModel model) throws 
SdaiException {
+               List<EEntity> modelEntities = new ArrayList<EEntity>();
+               AEntity entitiesAggregation = model.getInstances();
+               SdaiIterator entitiesIterator = 
entitiesAggregation.createIterator();
+               while(entitiesIterator.next()) {
+                       EEntity entity = 
entitiesAggregation.getCurrentMemberEntity(entitiesIterator);
+                       modelEntities.add(entity);
+               }
+               return modelEntities;
+       }
+       
+       
+       public boolean deleteAllRepositories() {
+               logger.info("Deleting all repositories");
+               super.openSdaiSession();
+               try {
+                       this.extractRepositories();
+                       while (repositoryIterator.next()) {
+                               SdaiRepository repository = 
repositoryAggregation.getCurrentMember(repositoryIterator);
+                               repository.deleteRepository();
+                       }
+                       logger.info("All found repositories have been deleted");
+                       super.closeSdaiSession();
+                       return true;
+               } catch (SdaiException e) {
+                       super.closeSdaiSession();
+                       logger.error("Sdai exception while trying to delete all 
repositories!");
+                       e.printStackTrace();
+                       throw new RepositoryExceptionUc("Error deleting all 
repositories", e);
+               }
+       }
+       
+       
+       public boolean deleteRepository(String repositoryName){
+               try {
+                       return findRepositoryAndDelete(repositoryName);
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       throw new RepositoryExceptionUc("Error deleting 
repository", e);
+               } 
+       }
+
+
+       private boolean findRepositoryAndDelete(String repositoryName) throws 
SdaiException {
+               super.openSdaiSession();
+               this.extractRepositories();
+               while (repositoryIterator.next()) {
+                       SdaiRepository repository = 
repositoryAggregation.getCurrentMember(repositoryIterator);
+                       if ( repository.getName().equals(repositoryName)) {
+                               repository.deleteRepository();
+                               super.closeSdaiSession();
+                               return true;
+                       }
+               }
+               super.closeSdaiSession();
+               throw new RepositoryExceptionUc("Repository Not found");
+       }
+       
+       
+       public int getNumberOfRepositories() {
+               return this.repositoryNames.size();
+       }
+       
+       
+       public List<String> getRepositoryNames() {
+               return new ArrayList<String>(repositoryNames);
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryException.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryException.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryException.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,20 @@
+package no.bimconverter.ifc;
+
+public class RepositoryException extends Exception {
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = -7670769841469006165L;
+       
+       public RepositoryException() {
+               super();
+       }
+       public RepositoryException(String exception) {
+               super(exception);
+       }
+       public RepositoryException(String exception, Throwable t) {
+               super(exception, t);
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryExceptionUc.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryExceptionUc.java
                         (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/RepositoryExceptionUc.java
 2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,22 @@
+package no.bimconverter.ifc;
+/*
+ * Uc = Unchecked... should probably change this
+ */
+public class RepositoryExceptionUc extends RuntimeException {
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = -7670769841469006165L;
+       
+       public RepositoryExceptionUc() {
+               super();
+       }
+       public RepositoryExceptionUc(String exception) {
+               super(exception);
+       }
+       public RepositoryExceptionUc(String exception, Throwable t) {
+               super(exception, t);
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Attributes.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Attributes.java
                               (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Attributes.java
       2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,279 @@
+package no.bimconverter.ifc.jaxb;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class Attributes {
+       private String guid;
+       private String name;
+       private String longName;
+       private String description;
+       private String phase; // for projects
+       private String longtitude; // site
+       private String latitude; // site
+       private String elevation; // site, buildingstorey
+       private String internalExternal; // space
+       private String predefinedCoveringType; // covering
+       private String constructionType; // windowStyle, doorstyle
+       private String operationType; //windowStyle, doorstyle
+       private String panelOperationType; // windowstyle
+       
+
+       public Attributes() {
+       }
+       
+       
+       /*
+        * @Override
+       public boolean equals(Object o) {
+               if ((o instanceof Attributes) 
+                               && (((Attributes)o).getGuid() == this.guid)
+                               && (((Attributes)o).getName() == this.name)
+                               && (((Attributes)o).getLongName() == 
this.longName)
+                               && (((Attributes)o).getDescription() == 
this.description)
+                               && (((Attributes)o).getPhase() == this.phase)
+                               && (((Attributes)o).getLongtitude() == 
this.longtitude)
+                               && (((Attributes)o).getLatitude() == 
this.latitude)
+                               && (((Attributes)o).getElevation() == 
this.elevation)
+                               && (((Attributes)o).getInternalExternal() == 
this.internalExternal)
+                               && (((Attributes)o).getPredefinedCoveringType() 
== this.predefinedCoveringType)) {
+                               return true;
+                               } else {
+                               return false;
+                               }
+       }
+        */
+
+       @Override
+       public String toString() {
+               return "Attributes [guid=" + guid + ", name=" + name + ", 
longName="
+                               + longName + ", description=" + description + 
", phase="
+                               + phase + ", longtitude=" + longtitude + ", 
latitude="
+                               + latitude + ", elevation=" + elevation + ", 
internalExternal="
+                               + internalExternal + ", predefinedCoveringType="
+                               + predefinedCoveringType + ", constructionType="
+                               + constructionType + ", operationType=" + 
operationType
+                               + ", panelOperationType=" + panelOperationType 
+ "]";
+       }
+
+
+       @Override
+       public int hashCode() {
+               final int prime = 31;
+               int result = 1;
+               result = prime
+                               * result
+                               + ((constructionType == null) ? 0 : 
constructionType.hashCode());
+               result = prime * result
+                               + ((description == null) ? 0 : 
description.hashCode());
+               result = prime * result
+                               + ((elevation == null) ? 0 : 
elevation.hashCode());
+               result = prime * result + ((guid == null) ? 0 : 
guid.hashCode());
+               result = prime
+                               * result
+                               + ((internalExternal == null) ? 0 : 
internalExternal.hashCode());
+               result = prime * result
+                               + ((latitude == null) ? 0 : 
latitude.hashCode());
+               result = prime * result
+                               + ((longName == null) ? 0 : 
longName.hashCode());
+               result = prime * result
+                               + ((longtitude == null) ? 0 : 
longtitude.hashCode());
+               result = prime * result + ((name == null) ? 0 : 
name.hashCode());
+               result = prime * result
+                               + ((operationType == null) ? 0 : 
operationType.hashCode());
+               result = prime
+                               * result
+                               + ((panelOperationType == null) ? 0 : 
panelOperationType
+                                               .hashCode());
+               result = prime * result + ((phase == null) ? 0 : 
phase.hashCode());
+               result = prime
+                               * result
+                               + ((predefinedCoveringType == null) ? 0
+                                               : 
predefinedCoveringType.hashCode());
+               return result;
+       }
+
+
+       @Override
+       public boolean equals(Object obj) {
+               if (this == obj)
+                       return true;
+               if (obj == null)
+                       return false;
+               if (getClass() != obj.getClass())
+                       return false;
+               Attributes other = (Attributes) obj;
+               if (constructionType == null) {
+                       if (other.constructionType != null)
+                               return false;
+               } else if (!constructionType.equals(other.constructionType))
+                       return false;
+               if (description == null) {
+                       if (other.description != null)
+                               return false;
+               } else if (!description.equals(other.description))
+                       return false;
+               if (elevation == null) {
+                       if (other.elevation != null)
+                               return false;
+               } else if (!elevation.equals(other.elevation))
+                       return false;
+               if (guid == null) {
+                       if (other.guid != null)
+                               return false;
+               } else if (!guid.equals(other.guid))
+                       return false;
+               if (internalExternal == null) {
+                       if (other.internalExternal != null)
+                               return false;
+               } else if (!internalExternal.equals(other.internalExternal))
+                       return false;
+               if (latitude == null) {
+                       if (other.latitude != null)
+                               return false;
+               } else if (!latitude.equals(other.latitude))
+                       return false;
+               if (longName == null) {
+                       if (other.longName != null)
+                               return false;
+               } else if (!longName.equals(other.longName))
+                       return false;
+               if (longtitude == null) {
+                       if (other.longtitude != null)
+                               return false;
+               } else if (!longtitude.equals(other.longtitude))
+                       return false;
+               if (name == null) {
+                       if (other.name != null)
+                               return false;
+               } else if (!name.equals(other.name))
+                       return false;
+               if (operationType == null) {
+                       if (other.operationType != null)
+                               return false;
+               } else if (!operationType.equals(other.operationType))
+                       return false;
+               if (panelOperationType == null) {
+                       if (other.panelOperationType != null)
+                               return false;
+               } else if (!panelOperationType.equals(other.panelOperationType))
+                       return false;
+               if (phase == null) {
+                       if (other.phase != null)
+                               return false;
+               } else if (!phase.equals(other.phase))
+                       return false;
+               if (predefinedCoveringType == null) {
+                       if (other.predefinedCoveringType != null)
+                               return false;
+               } else if 
(!predefinedCoveringType.equals(other.predefinedCoveringType))
+                       return false;
+               return true;
+       }
+
+
+       public String getGuid() {
+               return guid;
+       }
+
+       public void setGuid(String guid) {
+               this.guid = guid;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public String getLongName() {
+               return longName;
+       }
+
+       public void setLongName(String longName) {
+               this.longName = longName;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getPhase() {
+               return phase;
+       }
+
+       public void setPhase(String phase) {
+               this.phase = phase;
+       }
+
+       public String getLongtitude() {
+               return longtitude;
+       }
+
+       public void setLongtitude(String longtitude) {
+               this.longtitude = longtitude;
+       }
+
+       public String getLatitude() {
+               return latitude;
+       }
+
+       public void setLatitude(String latitude) {
+               this.latitude = latitude;
+       }
+
+       public String getElevation() {
+               return elevation;
+       }
+
+       public void setElevation(String elevation) {
+               this.elevation = elevation;
+       }
+
+       public String getInternalExternal() {
+               return internalExternal;
+       }
+
+       public void setInternalExternal(String internalExternal) {
+               this.internalExternal = internalExternal;
+       }
+
+       public String getPredefinedCoveringType() {
+               return predefinedCoveringType;
+       }
+
+       public void setPredefinedCoveringType(String predefinedCoveringType) {
+               this.predefinedCoveringType = predefinedCoveringType;
+       }
+
+       public String getConstructionType() {
+               return constructionType;
+       }
+
+       public void setConstructionType(String constructionType) {
+               this.constructionType = constructionType;
+       }
+
+       public String getOperationType() {
+               return operationType;
+       }
+
+       public void setOperationType(String operationType) {
+               this.operationType = operationType;
+       }
+
+       public String getPanelOperationType() {
+               return panelOperationType;
+       }
+
+       public void setPanelOperationType(String panelOperationType) {
+               this.panelOperationType = panelOperationType;
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BaseQuantities.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BaseQuantities.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BaseQuantities.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,24 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class BaseQuantities extends ElementList {
+       public BaseQuantities() {
+       }
+       
+       @XmlAnyElement
+       public List<JAXBElement<String>> getBaseQuantities() {
+           return elementList;
+       }
+       
+       
+       public void setBaseQuantities(List<JAXBElement<String>> units) {
+               this.elementList = units;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BoundaryItem.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BoundaryItem.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/BoundaryItem.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,41 @@
+package no.bimconverter.ifc.jaxb;
+
+public class BoundaryItem {
+       public String guid;
+       public String type;
+       public String physicalOrVirtualBoundary;
+       public String internalOrExternalBoundary;
+       public BoundaryItem() {
+       }
+       public BoundaryItem(String guid, String type,
+                       String physicalOrVirtualBoundary, String 
internalOrExternalBoundary) {
+               super();
+               this.guid = guid;
+               this.type = type;
+               this.physicalOrVirtualBoundary = physicalOrVirtualBoundary;
+               this.internalOrExternalBoundary = internalOrExternalBoundary;
+       }
+       
+       @Override
+       public boolean equals(Object o) {
+               if ((o instanceof BoundaryItem) 
+                               && (((BoundaryItem)o).guid == this.guid)
+                               && (((BoundaryItem)o).type == this.type)
+                               && (((BoundaryItem)o).physicalOrVirtualBoundary 
== this.physicalOrVirtualBoundary)
+                               && 
(((BoundaryItem)o).internalOrExternalBoundary == 
this.internalOrExternalBoundary)) {
+                               return true;
+                               } else {
+                               return false;
+                               }
+       }
+       @Override
+       public String toString() {
+               StringBuilder current = new StringBuilder();
+               current.append("Guid:\t"+guid+"\n");
+               current.append("Type:\t"+type+"\n");
+               current.append("Physical or 
virtual:\t"+physicalOrVirtualBoundary+"\n");
+               current.append("Internal or 
external:\t"+internalOrExternalBoundary+"\n");
+               return current.toString();
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ClassificationItem.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ClassificationItem.java
                               (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ClassificationItem.java
       2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,23 @@
+package no.bimconverter.ifc.jaxb;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class ClassificationItem {
+       
+       public String itemKey;
+       public String itemName;
+       public String systemName;
+       public String systemEdition;
+       public ClassificationItem() {
+       }
+       public ClassificationItem(String itemKey, String itemName, String 
systemName, String systemEdition) {
+               this.itemKey = itemKey;
+               this.itemName = itemName;
+               this.systemName = systemName;
+               this.systemEdition = systemEdition;
+       }
+       
+       
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Decomposition.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Decomposition.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Decomposition.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,92 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class Decomposition {
+       private String site;
+       private String project;
+       private List<String> buildings;
+       private List<String> buildingStoreys;
+       private List<String> spaces;
+       public Decomposition() {
+       }
+       
+       public void addBuildingId(String buildingId) {
+               this.buildings = 
this.checkAndInitializeArrayList(this.buildings);
+               this.buildings.add(buildingId);
+       }
+       public void addBuildingStoreyId(String buildingStoreyId) {
+               this.buildingStoreys = 
this.checkAndInitializeArrayList(this.buildingStoreys);
+               this.buildingStoreys.add(buildingStoreyId);
+       }
+       public void addSpaceId(String spaceId) {
+               this.spaces = this.checkAndInitializeArrayList(this.spaces);
+               this.spaces.add(spaceId);
+       }
+       @XmlElementWrapper(name="buildingStoreys")
+       @XmlElement(name="guid")
+       public List<String> getBuildingStoreys() {
+               return buildingStoreys;
+       }
+
+       public void setBuildingStoreys(List<String> buildingStoreys) {
+               this.buildingStoreys = buildingStoreys;
+       }
+
+       private List<String> checkAndInitializeArrayList(List<String> list) {
+               if(list == null) {
+                       return new ArrayList<String>();
+               } else {
+                       return list;
+               }
+       }
+       public String getSite() {
+               return site;
+       }
+       public void setSite(String site) {
+               this.site = site;
+       }
+       @XmlElementWrapper(name="buildings")
+       @XmlElement(name="guid")
+       public List<String> getBuildings() {
+               return buildings;
+       }
+       public void setBuildings(List<String> buildings) {
+               this.buildings = buildings;
+       }
+       
+       @Override
+       public String toString() {
+               StringBuilder sb = new StringBuilder();
+               sb.append("site:\t"+String.valueOf(this.site)+"\n");
+               sb.append("Buildings:\n");
+               for(String buildingId : this.buildings) {
+                       sb.append("\t"+buildingId+"\n");
+               }
+               return sb.toString();
+       }
+
+       public String getProject() {
+               return project;
+       }
+
+       public void setProject(String project) {
+               this.project = project;
+       }
+       @XmlElementWrapper(name="spaces")
+       @XmlElement(name="guid")
+       public List<String> getSpaces() {
+               return spaces;
+       }
+
+       public void setSpaces(List<String> spaces) {
+               this.spaces = spaces;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ElementList.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ElementList.java
                              (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ElementList.java
      2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,48 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.namespace.QName;
+
+public class ElementList {
+       protected List<JAXBElement<String>> elementList = new 
ArrayList<JAXBElement<String>>();
+       
+       public ElementList() {
+       }
+       
+       public void addElement(String name, String value) {
+               elementList.add(new JAXBElement<String>(new QName(name), 
String.class, value));
+       }
+       /*
+        * @return true if element was updated
+        */
+       public boolean changeElementValue(String name, String value) {
+               for(int i = 0; i < elementList.size(); i++) {
+                       String elementName = 
elementList.get(i).getName().toString();
+                       if( elementName.equals(name)) {
+                               elementList.set(i, new JAXBElement<String>(new 
QName(name), String.class, value));
+                               return true;
+                       }
+               }
+               return false;
+       }
+       
+       @XmlTransient
+       public Map<String, String> getElementMap() {
+               if(this.elementList.size() == 0) {
+                       return null;
+               }
+               Map<String, String> outputMap = new HashMap<String, String>();
+               for(JAXBElement<String> jaxbUnit : this.elementList) {
+                       outputMap.put(jaxbUnit.getName().toString(), 
jaxbUnit.getValue());
+               }
+               return outputMap;
+       }
+
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialItem.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialItem.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialItem.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,98 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import no.bimconverter.ifc.IfcSdaiException;
+
+
+
address@hidden
+public class MaterialItem {
+       
+       
+       private String type = null;
+       private List<MaterialLayer> materialName = null;
+       private List<MaterialLayer> materialLayer = null;
+       private String layerSetName = null;
+       
+       public MaterialItem() {
+       }
+       public MaterialItem(Type type, List<MaterialLayer> names) {
+               if(type ==Type.SINGLE) {
+                       setType(Type.SINGLE);
+                       if(names.size()!= 1) {
+                               throw new IfcSdaiException("Error creating 
material item!");
+                       }
+                       this.materialName = new ArrayList<MaterialLayer>(names);
+               } else if (type == Type.LIST) {
+                       setType(Type.LIST);
+                       if(names.size()== 0) {
+                               throw new IfcSdaiException("Error creating 
material item list!");
+                       }
+                       this.materialName = new ArrayList<MaterialLayer>(names);
+               } else {
+                       throw new IfcSdaiException("Wrong usage of MaterialItem 
class!(should not be layerset)");
+               }
+       }
+       public MaterialItem(Type type, String materialLayerName, 
List<MaterialLayer> names) {
+               if(type ==Type.LAYERSET) {
+                       setType(Type.LAYERSET);
+                       this.layerSetName = materialLayerName;
+                       this.materialLayer = new 
ArrayList<MaterialLayer>(names);
+               }else {
+                       throw new IfcSdaiException("Wrong usage of MaterialItem 
class! (should be layerset)");
+               }
+       }
+       
+       public void setType(Type type) {
+               this.type = type.key;
+       }
+       @XmlAttribute
+       public String getType() {
+               return type;
+       }
+
+       public void setMaterialName(List<MaterialLayer> material) {
+               this.materialName = material;
+       }
+       
+       @XmlElement(name="name") 
+       public List<MaterialLayer> getMaterialName() {
+               return materialName;
+       }
+       @XmlElement(name="name")
+       public String getLayerSetName() {
+               return layerSetName;
+       }
+       public void setLayerSetName(String layerSetName) {
+               this.layerSetName = layerSetName;
+       }
+       
+       @XmlElementWrapper(name="layerset")
+       @XmlElement(name="layer")
+       public List<MaterialLayer> getMaterialLayer() {
+               return materialLayer;
+       }
+       public void setMaterialLayer(List<MaterialLayer> materialLayer) {
+               this.materialLayer = materialLayer;
+       }
+
+       public enum Type {
+               SINGLE("single"),
+               LIST("list"),
+               LAYERSET("layerSet");
+               private final String key;
+               Type(String key) {
+               this.key = key;
+           }
+               public String getKey() {
+                       return key;
+               }
+       }
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialLayer.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialLayer.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/MaterialLayer.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,23 @@
+package no.bimconverter.ifc.jaxb;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class MaterialLayer {
+       public String name;
+       public String thickness;
+       public String ventilated;
+       public MaterialLayer() {
+               super();
+       }public MaterialLayer(String name) {
+               super();
+               this.name = name;
+       }
+       public MaterialLayer(String name, String thickness, String ventilated) {
+               super();
+               this.name = name;
+               this.thickness = thickness;
+               this.ventilated = ventilated;
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/NameValuePair.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/NameValuePair.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/NameValuePair.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,23 @@
+package no.bimconverter.ifc.jaxb;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class NameValuePair {
+       public String name;
+       public String value;
+       public NameValuePair() {
+       }
+       public NameValuePair(String name, String value) {
+               this.name = name;
+               this.value = value;
+       }
+       
+       @Override
+       public String toString() {
+               StringBuilder output = new StringBuilder();
+               output.append("Name:\t"+name+"\n");
+               output.append("Value:\t"+value+"\n");
+               return output.toString();
+       }
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/PropertyList.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/PropertyList.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/PropertyList.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,57 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.List;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlRootElement;
address@hidden
+public class PropertyList extends ElementList{
+       
+       private String name;
+       private String type;
+       
+       //private List<NameValuePair> properties = new 
ArrayList<NameValuePair>();
+       
+       public PropertyList() {
+       }
+       /*
+       public void setProperties(List<NameValuePair> baseQuantities) {
+               this.properties = baseQuantities;
+       }
+       
+       
+       @XmlElement(name="property") 
+       public List<NameValuePair> getProperties() {
+               return properties;
+       }
+       */
+       @XmlAnyElement
+       public List<JAXBElement<String>> getProperties() {
+           return elementList;
+       }
+       
+       
+       public void setProperties(List<JAXBElement<String>> units) {
+               this.elementList = units;
+       }
+
+       public void setName(String propertySetName) {
+               this.name = propertySetName;
+       }
+       @XmlAttribute
+       public String getName() {
+               return name;
+       }
+
+       public void setType(String type) {
+               this.type = type;
+       }
+       @XmlAttribute
+       public String getType() {
+               return type;
+       }
+       
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpaceSpatialContainer.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpaceSpatialContainer.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpaceSpatialContainer.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,65 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
address@hidden
+public class SpaceSpatialContainer {
+       public SpaceSpatialContainer() {
+       }
+       private List<SpatialContainerItem> elements;
+       private List<SpatialContainerItem> coverings;
+       private List<SpatialContainerItem> doorsWindows;
+       
+       private List<SpatialContainerItem> 
checkAndInitializeArrayList(List<SpatialContainerItem> list) {
+               if(list == null) {
+                       return new ArrayList<SpatialContainerItem>();
+               } else {
+                       return list;
+               }
+       }
+       
+       public void addCovering(SpatialContainerItem item) {
+               this.coverings = checkAndInitializeArrayList(this.coverings);
+               this.coverings.add(item);
+       }
+       public void addElement(SpatialContainerItem item) {
+               this.elements = checkAndInitializeArrayList(this.elements);
+               this.elements.add(item);
+       }
+       public void addDoorWindow(SpatialContainerItem item) {
+               this.doorsWindows = 
checkAndInitializeArrayList(this.doorsWindows);
+               this.doorsWindows.add(item);
+       }
+       @XmlElementWrapper(name="element")
+       @XmlElement(name="item") 
+       public List<SpatialContainerItem> getElements() {
+               return elements;
+       }
+
+       public void setElements(List<SpatialContainerItem> elements) {
+               this.elements = elements;
+       }
+       @XmlElementWrapper(name="covering")
+       @XmlElement(name="item")
+       public List<SpatialContainerItem> getCoverings() {
+               return coverings;
+       }
+
+       public void setCoverings(List<SpatialContainerItem> coverings) {
+               this.coverings = coverings;
+       }
+       @XmlElementWrapper(name="doorsWindows")
+       @XmlElement(name="item")
+       public List<SpatialContainerItem> getDoorsWindows() {
+               return doorsWindows;
+       }
+
+       public void setDoorsWindows(List<SpatialContainerItem> doorsWindows) {
+               this.doorsWindows = doorsWindows;
+       }
+}
+

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpatialContainerItem.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpatialContainerItem.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/SpatialContainerItem.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,19 @@
+package no.bimconverter.ifc.jaxb;
+
+public class SpatialContainerItem {
+       public String guid;
+       
+       public String type;
+       public String name;
+       public String description;
+       public SpatialContainerItem() {
+       }
+       public SpatialContainerItem(String guid, String type, String name, 
String description) {
+               super();
+               this.guid = guid;
+               this.type = type;
+               this.name = name;
+               this.description = description;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Units.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Units.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/Units.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,26 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.List;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class Units extends ElementList{
+       //private List<JAXBElement<String>> units = new 
ArrayList<JAXBElement<String>>();
+       
+       public Units() {
+       }
+       
+       
+       @XmlAnyElement
+       public List<JAXBElement<String>> getUnits() {
+           return elementList;
+       }
+       
+       
+       public void setUnits(List<JAXBElement<String>> units) {
+               this.elementList = units;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ZoneAssignment.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ZoneAssignment.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/ZoneAssignment.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,54 @@
+package no.bimconverter.ifc.jaxb;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class ZoneAssignment {
+       private List<String> spaces;
+       private List<String> subZones;
+       public ZoneAssignment() {
+       }
+       
+       public void addSpaceId(String spaceId) {
+               this.spaces = this.checkAndInitializeArrayList(this.spaces);
+               this.spaces.add(spaceId);
+       }
+       
+       public void addZoneId(String id) {
+               this.subZones = this.checkAndInitializeArrayList(this.subZones);
+               this.subZones.add(id);
+       }
+       
+       private List<String> checkAndInitializeArrayList(List<String> list) {
+               if(list == null) {
+                       return new ArrayList<String>();
+               } else {
+                       return list;
+               }
+       }
+       
+       @XmlElementWrapper(name="spaces")
+       @XmlElement(name="guid")
+       public List<String> getSpaces() {
+               return spaces;
+       }
+
+       public void setSpaces(List<String> spaces) {
+               this.spaces = spaces;
+       }
+       @XmlElementWrapper(name="subZones")
+       @XmlElement(name="guid")
+       public List<String> getSubZones() {
+               return subZones;
+       }
+
+       public void setSubZones(List<String> subZones) {
+               this.subZones = subZones;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/ActorRole.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/ActorRole.java
                          (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/ActorRole.java
  2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,57 @@
+package no.bimconverter.ifc.jaxb.owner;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import jsdai.SIfc2x3.EIfcactorrole;
+import jsdai.SIfc2x3.EIfcroleenum;
+import jsdai.lang.SdaiException;
address@hidden
+public class ActorRole {
+       private String role;
+       private String userDefinedRole;
+       private String description;
+       public ActorRole() {
+       }
+       
+       public ActorRole load(EIfcactorrole actorRole) {
+               try {
+                       int roleId = actorRole.getRole(null);
+                       this.role = EIfcroleenum.toString(roleId);
+                       if(actorRole.testUserdefinedrole(null)) {
+                               this.userDefinedRole = 
actorRole.getUserdefinedrole(null);
+                       }
+                       if(actorRole.testDescription(null)) {
+                               this.description = 
actorRole.getDescription(null);
+                       }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               return this;
+               
+       }
+
+       public String getRole() {
+               return role;
+       }
+
+       public String getUserDefinedRole() {
+               return userDefinedRole;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setRole(String role) {
+               this.role = role;
+       }
+
+       public void setUserDefinedRole(String userDefinedRole) {
+               this.userDefinedRole = userDefinedRole;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Address.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Address.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Address.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,270 @@
+package no.bimconverter.ifc.jaxb.owner;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import no.bimconverter.ifc.jaxb.NameValuePair;
+import no.bimconverter.ifc.v2x3.object.CommonObjectDefinition;
+
+
+import jsdai.SIfc2x3.EIfcaddress;
+import jsdai.SIfc2x3.EIfcaddresstypeenum;
+import jsdai.SIfc2x3.EIfcpostaladdress;
+import jsdai.SIfc2x3.EIfctelecomaddress;
+import jsdai.lang.SdaiException;
+
+/*
+ * IfcAddress container class
+ * using IFC 2x3
+ */
address@hidden
+public class Address extends CommonObjectDefinition{
+       
+       private String purpose;
+       private String description;
+       private String userDefinedPurpose;
+       private List<NameValuePair> addressInformation;
+       private String ifcAddressType;
+       //Ifcpostaladdress variables
+       private String internalLocation;
+       private String addressLines;
+       private String postalBox;
+       private String town;
+       private String region;
+       private String postalCode;
+       private String country;
+       //Ifctelecomaddress variables
+       
+       private String telephoneNumbers;//       :      OPTIONAL LIST [1:?] OF 
IfcLabel;
+       private String facsimileNumbers;//       :      OPTIONAL LIST [1:?] OF 
IfcLabel;
+       private String pagerNumber;//    :      OPTIONAL IfcLabel;
+       private String electronicMailAddresses;//        :      OPTIONAL LIST 
[1:?] OF IfcLabel;
+       private String wwwHomePageURL;//         :      OPTIONAL IfcLabel;
+       
+       public Address() {
+       }
+       
+       public Address load(EIfcaddress address) {
+               try {
+                       if(address.testPurpose(null)) {
+                               this.purpose = 
EIfcaddresstypeenum.toString(address.getPurpose(null));
+                       }
+                       if(address.testDescription(null)) {
+                               this.description = address.getDescription(null);
+                       }
+                       if(address.testUserdefinedpurpose(null)) {
+                               this.userDefinedPurpose = 
address.getUserdefinedpurpose(null);
+                       }
+                       if(address.isKindOf(EIfcpostaladdress.class)) {
+                               EIfcpostaladdress postalAddress = 
(EIfcpostaladdress)address;
+                               extractPostalAddressValues(postalAddress);
+                               /*
+                               this.addressInformation = new 
ArrayList<NameValuePair>();
+                               this.addressInformation.add(new 
NameValuePair("addressType", address.getInstanceType().getName(null)));
+                               
this.addressInformation.addAll(extractSingleValueAttributes(postalAddress));
+                               */
+                               
+                       } else if ( address.isKindOf(EIfctelecomaddress.class)) 
{
+                               EIfctelecomaddress telecomAddress = 
(EIfctelecomaddress)address;
+                               this.ifcAddressType = 
telecomAddress.getInstanceType().getName(null);
+                               if(telecomAddress.testTelephonenumbers(null)) {
+                                       this.telephoneNumbers = 
super.getStringListAsString(telecomAddress.getTelephonenumbers(null));
+                               }
+                               if(telecomAddress.testFacsimilenumbers(null)) {
+                                       this.facsimileNumbers = 
super.getStringListAsString(telecomAddress.getFacsimilenumbers(null));
+                               }
+                               if(telecomAddress.testPagernumber(null)) {
+                                       this.pagerNumber = 
telecomAddress.getPagernumber(null);
+                               }
+                               if( 
telecomAddress.testElectronicmailaddresses(null)) {
+                                       this.electronicMailAddresses = 
super.getStringListAsString(telecomAddress.getElectronicmailaddresses(null));
+                               }
+                               if( telecomAddress.testWwwhomepageurl(null)) {
+                                       this.wwwHomePageURL = 
telecomAddress.getWwwhomepageurl(null);
+                               }
+                               /*
+                               this.addressInformation = new 
ArrayList<NameValuePair>();
+                               this.addressInformation.add(new 
NameValuePair("addressType", address.getInstanceType().getName(null)));
+                               
this.addressInformation.addAll(extractSingleValueAttributes(telecomAddress));
+                               */
+                       }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               return this;
+       }
+
+       private void extractPostalAddressValues(EIfcpostaladdress postalAddress)
+                       throws SdaiException {
+               this.ifcAddressType = 
postalAddress.getInstanceType().getName(null);
+               if(postalAddress.testInternallocation(null)) {
+                       this.internalLocation = 
postalAddress.getInternallocation(null);
+               }
+               if(postalAddress.testAddresslines(null)) {
+                       this.addressLines = 
super.getStringListAsString(postalAddress.getAddresslines(null));
+               }
+               if(postalAddress.testPostalbox(null)) {
+                       this.postalBox = postalAddress.getPostalbox(null);
+               }
+               if(postalAddress.testTown(null)) {
+                       this.town = postalAddress.getTown(null);
+               }
+               if(postalAddress.testRegion(null)) {
+                       this.region = postalAddress.getRegion(null);
+               }
+               if(postalAddress.testPostalcode(null)) {
+                       this.postalCode = postalAddress.getPostalcode(null);
+               }
+               if(postalAddress.testCountry(null)) {
+                       this.country = postalAddress.getCountry(null);
+               }
+       }
+
+       public String getPurpose() {
+               return purpose;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public String getUserDefinedPurpose() {
+               return userDefinedPurpose;
+       }
+       @XmlElementWrapper(name="addressInformation")
+       @XmlElement(name="item") 
+       public List<NameValuePair> getAddressInformation() {
+               return addressInformation;
+       }
+
+       public String getInternalLocation() {
+               return internalLocation;
+       }
+
+       public void setInternalLocation(String internalLocation) {
+               this.internalLocation = internalLocation;
+       }
+
+       public String getAddressLines() {
+               return addressLines;
+       }
+
+       public void setAddressLines(String addressLines) {
+               this.addressLines = addressLines;
+       }
+
+       public String getPostalBox() {
+               return postalBox;
+       }
+
+       public void setPostalBox(String postalBox) {
+               this.postalBox = postalBox;
+       }
+
+       public String getTown() {
+               return town;
+       }
+
+       public void setTown(String town) {
+               this.town = town;
+       }
+
+       public String getRegion() {
+               return region;
+       }
+
+       public void setRegion(String region) {
+               this.region = region;
+       }
+
+       public String getPostalCode() {
+               return postalCode;
+       }
+
+       public void setPostalCode(String postalCode) {
+               this.postalCode = postalCode;
+       }
+
+       public String getCountry() {
+               return country;
+       }
+
+       public void setCountry(String country) {
+               this.country = country;
+       }
+
+       public String getTelephoneNumbers() {
+               return telephoneNumbers;
+       }
+
+       public void setTelephoneNumbers(String telephoneNumbers) {
+               this.telephoneNumbers = telephoneNumbers;
+       }
+
+       public String getFacsimileNumbers() {
+               return facsimileNumbers;
+       }
+
+       public void setFacsimileNumbers(String facsimileNumbers) {
+               this.facsimileNumbers = facsimileNumbers;
+       }
+
+       public String getPagerNumber() {
+               return pagerNumber;
+       }
+
+       public void setPagerNumber(String pagerNumber) {
+               this.pagerNumber = pagerNumber;
+       }
+
+       public String getElectronicMailAddresses() {
+               return electronicMailAddresses;
+       }
+
+       public void setElectronicMailAddresses(String electronicMailAddresses) {
+               this.electronicMailAddresses = electronicMailAddresses;
+       }
+
+       public String getWWWHomePageURL() {
+               return wwwHomePageURL;
+       }
+
+       public void setWWWHomePageURL(String wWWHomePageURL) {
+               wwwHomePageURL = wWWHomePageURL;
+       }
+       
+       public void setPurpose(String purpose) {
+               this.purpose = purpose;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public void setUserDefinedPurpose(String userDefinedPurpose) {
+               this.userDefinedPurpose = userDefinedPurpose;
+       }
+
+       public void setAddressInformation(List<NameValuePair> 
addressInformation) {
+               this.addressInformation = addressInformation;
+       }
+       @XmlAttribute
+       public String getIfcAddressType() {
+               return ifcAddressType;
+       }
+
+       public void setIfcAddressType(String ifcAddressType) {
+               this.ifcAddressType = ifcAddressType;
+       }
+
+       @Override
+       public String toString() {
+               return "Address [purpose=" + purpose + ", description=" + 
description
+                               + ", userDefinedPurpose=" + userDefinedPurpose
+                               + ", addressInformation=" + addressInformation 
+ "]";
+       }
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Application.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Application.java
                                (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Application.java
        2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,70 @@
+package no.bimconverter.ifc.jaxb.owner;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import jsdai.SIfc2x3.EIfcapplication;
+import jsdai.lang.SdaiException;
address@hidden
+public class Application {
+       
+       private Organization applicationDeveloper;
+       private String version;
+       private String applicationFullName;
+       private String applicationIdentifier;
+       
+       public Application() {
+       }
+       
+       public Application load(EIfcapplication application) {
+               try {
+                       if(application.testApplicationdeveloper(null)) {
+                               this.applicationDeveloper = new 
Organization().load(application.getApplicationdeveloper(null));
+                       }
+                       if(application.testVersion(null)) {
+                               this.version = application.getVersion(null);
+                       }
+                       if(application.testApplicationfullname(null)) {
+                               this.applicationFullName = 
application.getApplicationfullname(null);
+                       }
+                       if(application.testApplicationidentifier(null)) {
+                               this.applicationIdentifier = 
application.getApplicationidentifier(null);
+                       }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               return this;
+       }
+
+       public Organization getApplicationDeveloper() {
+               return applicationDeveloper;
+       }
+
+       public String getVersion() {
+               return version;
+       }
+
+       public String getApplicationFullName() {
+               return applicationFullName;
+       }
+
+       public String getApplicationIdentifier() {
+               return applicationIdentifier;
+       }
+
+       public void setApplicationDeveloper(Organization applicationDeveloper) {
+               this.applicationDeveloper = applicationDeveloper;
+       }
+
+       public void setVersion(String version) {
+               this.version = version;
+       }
+
+       public void setApplicationFullName(String applicationFullName) {
+               this.applicationFullName = applicationFullName;
+       }
+
+       public void setApplicationIdentifier(String applicationIdentifier) {
+               this.applicationIdentifier = applicationIdentifier;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Organization.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Organization.java
                               (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Organization.java
       2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,82 @@
+package no.bimconverter.ifc.jaxb.owner;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import jsdai.SIfc2x3.EIfcorganization;
+import jsdai.lang.SdaiException;
+
+/*
+ * IfcOrganization, ifc version 2x3
+ */
address@hidden
+public class Organization  extends PersonAndOrganization{
+       private String id;
+       private String name;
+       private String description;
+       private  ActorRole[] roles;
+       private  Address[] addresses;
+       
+       public Organization() {
+       }
+       
+       public Organization load(EIfcorganization organization) {
+               try {
+                       if(organization.testId(null)) {
+                               this.id = organization.getId(null);
+                       }
+                       if(organization.testName(null)) {
+                               this.name = organization.getName(null);
+                       }
+                       if(organization.testDescription(null)) {
+                               this.description = 
organization.getDescription(null);
+                       }
+                       if(organization.testRoles(null)) {
+                               this.roles = 
getRoleArray(organization.getRoles(null));
+                       }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               return this;
+       }
+
+       public String getId() {
+               return id;
+       }
+
+       public String getName() {
+               return name;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public ActorRole[] getRoles() {
+               return roles;
+       }
+
+       public Address[] getAddresses() {
+               return addresses;
+       }
+
+       public void setId(String id) {
+               this.id = id;
+       }
+
+       public void setName(String name) {
+               this.name = name;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public void setRoles(ActorRole[] roles) {
+               this.roles = roles;
+       }
+
+       public void setAddresses(Address[] addresses) {
+               this.addresses = addresses;
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/OwnerHistory.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/OwnerHistory.java
                               (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/OwnerHistory.java
       2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,102 @@
+package no.bimconverter.ifc.jaxb.owner;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import jsdai.SIfc2x3.EIfcchangeactionenum;
+import jsdai.SIfc2x3.EIfcownerhistory;
+import jsdai.SIfc2x3.EIfcstateenum;
+import jsdai.lang.SdaiException;
address@hidden
+public class OwnerHistory {
+       
+       private PersonAndOrganization owningUser;
+       private Application owningApplication;
+       private String state;
+       private String changeAction;
+       private String lastModifiedDate;
+       private PersonAndOrganization lastModifyingUser;
+       private Application lastModifyingApplication;
+       private String CreationDate;
+       
+       public OwnerHistory() {
+       }
+       public OwnerHistory loadOwnerHistory(EIfcownerhistory ownerHistory) {
+               try {
+                       this.owningUser = new 
PersonAndOrganization().load(ownerHistory.getOwninguser(null));
+                       this.owningApplication = new 
Application().load(ownerHistory.getOwningapplication(null));
+                       if(ownerHistory.testState(null)) {
+                               this.state = 
EIfcstateenum.toString(ownerHistory.getState(null));
+                       }
+                       if(ownerHistory.testChangeaction(null)) {
+                               this.changeAction = 
EIfcchangeactionenum.toString(ownerHistory.getChangeaction(null));
+                       }
+                       if(ownerHistory.testLastmodifieddate(null)) {
+                               this.lastModifiedDate = 
String.valueOf(ownerHistory.getLastmodifieddate(null));
+                       }
+                       if(ownerHistory.testLastmodifyinguser(null)) {
+                               this.lastModifyingUser = new 
PersonAndOrganization().load(ownerHistory.getLastmodifyinguser(null));
+                       }
+                       if(ownerHistory.testLastmodifyingapplication(null)) {
+                               this.lastModifyingApplication = new 
Application().load(ownerHistory.getLastmodifyingapplication(null));
+                       }
+                       if(ownerHistory.testCreationdate(null)) {
+                               this.CreationDate = 
String.valueOf(ownerHistory.getCreationdate(null));
+                       }
+                       
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               return this;
+       }
+       public PersonAndOrganization getOwningUser() {
+               return owningUser;
+       }
+       public void setOwningUser(PersonAndOrganization owningUser) {
+               this.owningUser = owningUser;
+       }
+       public Application getOwningApplication() {
+               return owningApplication;
+       }
+       public void setOwningApplication(Application owningApplication) {
+               this.owningApplication = owningApplication;
+       }
+       public String getState() {
+               return state;
+       }
+       public void setState(String state) {
+               this.state = state;
+       }
+       public String getChangeAction() {
+               return changeAction;
+       }
+       public void setChangeAction(String changeAction) {
+               this.changeAction = changeAction;
+       }
+       public String getLastModifiedDate() {
+               return lastModifiedDate;
+       }
+       public void setLastModifiedDate(String lastModifiedDate) {
+               this.lastModifiedDate = lastModifiedDate;
+       }
+       public PersonAndOrganization getLastModifyingUser() {
+               return lastModifyingUser;
+       }
+       public void setLastModifyingUser(PersonAndOrganization 
lastModifyingUser) {
+               this.lastModifyingUser = lastModifyingUser;
+       }
+       public Application getLastModifyingApplication() {
+               return lastModifyingApplication;
+       }
+       public void setLastModifyingApplication(Application 
lastModifyingApplication) {
+               this.lastModifyingApplication = lastModifyingApplication;
+       }
+       public String getCreationDate() {
+               return CreationDate;
+       }
+       public void setCreationDate(String creationDate) {
+               CreationDate = creationDate;
+       }
+       
+       
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Person.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Person.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/Person.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,144 @@
+package no.bimconverter.ifc.jaxb.owner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import jsdai.SIfc2x3.EIfcperson;
+import jsdai.lang.A_string;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+/*
+ * Utility class to take in information from IFcPerson and use to output via 
JAXB
+ * Could actually just annotate the EIfcPerson class instead of using this, but
+ * would be more of a hastle to maintain.
+ * 
+ * Reference is: IFC 2x3
+ */
address@hidden
+public class Person extends PersonAndOrganization{
+       
+       private String id;
+       private String familyName;
+       private String givenName;
+       private String[] middleNames;
+       private  String[] prefixTitles;
+       private  String[] suffixTitles;
+       private  ActorRole[] roles;
+       private  Address[] addresses;
+       
+       public Person() {
+       }
+       
+       public Person load(EIfcperson person) {
+               try {
+                       if(person.testId(null)) {
+                               this.id = person.getId(null);
+                       }
+                       if(person.testFamilyname(null)) {
+                               this.familyName = person.getFamilyname(null);
+                       }
+                       if(person.testGivenname(null)) {
+                               this.givenName = person.getGivenname(null);
+                       }
+                       if(person.testMiddlenames(null)) {
+                               A_string middleNames = 
person.getMiddlenames(null);
+                               this.middleNames = 
convertAggregateToArray(middleNames);
+                       }
+                       if(person.testPrefixtitles(null)) {
+                               this.prefixTitles = 
convertAggregateToArray(person.getPrefixtitles(null));
+                       }
+                       if(person.testSuffixtitles(null)) {
+                               this.suffixTitles = 
convertAggregateToArray(person.getSuffixtitles(null));
+                       }
+                       if(person.testRoles(null)) {
+                               this.roles = 
getRoleArray(person.getRoles(null));
+                       }
+                       if(person.testAddresses(null)) {
+                               this.addresses = 
getAddressArray(person.getAddresses(null));
+                       }
+                       
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               return this;
+               
+       }
+
+       
+
+       private String[] convertAggregateToArray(A_string middleNames2) throws 
SdaiException {
+               SdaiIterator stringAggregateIterator = 
middleNames2.createIterator();
+               List<String> output = new ArrayList<String>();
+               while(stringAggregateIterator.next()) {
+                       
output.add(middleNames2.getCurrentMember(stringAggregateIterator));
+               }
+               return output.toArray(new String[output.size()]);
+       }
+
+       public String getId() {
+               return id;
+       }
+
+       public void setId(String id) {
+               this.id = id;
+       }
+
+       public String getFamilyName() {
+               return familyName;
+       }
+
+       public void setFamilyName(String familyName) {
+               this.familyName = familyName;
+       }
+
+       public String getGivenName() {
+               return givenName;
+       }
+
+       public void setGivenName(String givenName) {
+               this.givenName = givenName;
+       }
+
+       public String[] getMiddleNames() {
+               return middleNames;
+       }
+
+       public void setMiddleNames(String[] middleNames) {
+               this.middleNames = middleNames;
+       }
+
+       public String[] getPrefixTitles() {
+               return prefixTitles;
+       }
+
+       public void setPrefixTitles(String[] prefixTitles) {
+               this.prefixTitles = prefixTitles;
+       }
+
+       public String[] getSuffixTitles() {
+               return suffixTitles;
+       }
+
+       public void setSuffixTitles(String[] suffixTitles) {
+               this.suffixTitles = suffixTitles;
+       }
+
+       public ActorRole[] getRoles() {
+               return roles;
+       }
+
+       public void setRoles(ActorRole[] roles) {
+               this.roles = roles;
+       }
+
+       public Address[] getAddresses() {
+               return addresses;
+       }
+
+       public void setAddresses(Address[] addresses) {
+               this.addresses = addresses;
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/PersonAndOrganization.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/PersonAndOrganization.java
                              (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/owner/PersonAndOrganization.java
      2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,80 @@
+package no.bimconverter.ifc.jaxb.owner;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import jsdai.SIfc2x3.AIfcactorrole;
+import jsdai.SIfc2x3.AIfcaddress;
+import jsdai.SIfc2x3.EIfcpersonandorganization;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+
address@hidden
+public class PersonAndOrganization {
+       private Person person;
+       private Organization organization;
+       private  ActorRole[] roles;
+       
+       public PersonAndOrganization() {
+       }
+       
+       public PersonAndOrganization load(EIfcpersonandorganization 
personAndOrganization) {
+               try {
+                       this.person = new 
Person().load(personAndOrganization.getTheperson(null));
+                       this.organization = new 
Organization().load(personAndOrganization.getTheorganization(null));
+                       if(personAndOrganization.testRoles(null)) {
+                               this.roles = 
getRoleArray(personAndOrganization.getRoles(null));
+                       }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               return this;
+       }
+
+       protected ActorRole[] getRoleArray(AIfcactorrole actorRoles) throws 
SdaiException {
+               SdaiIterator actorRolesIterator = actorRoles.createIterator();
+               List<ActorRole> actorRoleList = new ArrayList<ActorRole>();
+               while(actorRolesIterator.next()) {
+                       actorRoleList.add(new 
ActorRole().load(actorRoles.getCurrentMember(actorRolesIterator)));
+               }
+               return actorRoleList.toArray(new 
ActorRole[actorRoleList.size()]);
+       }
+
+       protected Address[] getAddressArray(AIfcaddress actorAddresses) throws 
SdaiException {
+               SdaiIterator actorAddressesIterator = 
actorAddresses.createIterator();
+               List<Address> addressList = new ArrayList<Address>();
+               while(actorAddressesIterator.next()) {
+                       addressList.add(new 
Address().load(actorAddresses.getCurrentMember(actorAddressesIterator)));
+               }
+               return addressList.toArray(new Address[addressList.size()]);
+       }
+
+       public Person getPerson() {
+               return person;
+       }
+
+       public void setPerson(Person person) {
+               this.person = person;
+       }
+
+       public Organization getOrganization() {
+               return organization;
+       }
+
+       public void setOrganization(Organization organization) {
+               this.organization = organization;
+       }
+
+       public ActorRole[] getRoles() {
+               return roles;
+       }
+
+       public void setRoles(ActorRole[] roles) {
+               this.roles = roles;
+       }
+
+       
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/Item.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/Item.java
                                (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/Item.java
        2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,25 @@
+package no.bimconverter.ifc.jaxb.rest;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlValue;
+
+
address@hidden
+public class Item {
+       private String item;
+       public Item() {
+       }
+       public Item(String item) {
+               super();
+               this.item = item;
+       }
+       @XmlValue
+       public String getItem() {
+               return item;
+       }
+       public void setItem(String item) {
+               this.item = item;
+       }
+       
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/RepositoryStatus.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/RepositoryStatus.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/RepositoryStatus.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,56 @@
+package no.bimconverter.ifc.jaxb.rest;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
address@hidden
+public class RepositoryStatus {
+       private String repositoryCount;
+       private List<String> RepositoryNames;
+       private List<String> RepositoryInfo;
+       
+       public RepositoryStatus() {
+               this.RepositoryNames = new ArrayList<String>();
+               this.RepositoryInfo = new ArrayList<String>();
+       }
+       
+       public void addRepositoryName(String name) {
+               this.RepositoryNames.add(name);
+       }
+       
+       public void addRepositoryInfo(String info) {
+               this.RepositoryInfo.add(info);
+       }
+
+       public String getRepositoryCount() {
+               return repositoryCount;
+       }
+
+       public void setRepositoryCount(String repositoryCount) {
+               this.repositoryCount = repositoryCount;
+       }
+       @XmlElementWrapper(name="names")
+       @XmlElement(name="repository")
+       public List<String> getRepositoryNames() {
+               return RepositoryNames;
+       }
+
+       public void setRepositoryNames(List<String> repositoryNames) {
+               RepositoryNames = repositoryNames;
+       }
+       @XmlElementWrapper(name="information")
+       @XmlElement(name="repository")
+       public List<String> getRepositoryInfo() {
+               return RepositoryInfo;
+       }
+
+       public void setRepositoryInfo(List<String> repositoryInfo) {
+               RepositoryInfo = repositoryInfo;
+       }
+       
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/SimpleList.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/SimpleList.java
                          (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/jaxb/rest/SimpleList.java
  2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,24 @@
+package no.bimconverter.ifc.jaxb.rest;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+
+
address@hidden
+public class SimpleList {
+       List<String> list = new ArrayList<String>();
+       public SimpleList() {
+       }
+       @XmlElement()
+       public List<String> getList() {
+               return list;
+       }
+       public void setList(List<String> list) {
+               this.list = list;
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingLoader.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingLoader.java
                         (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingLoader.java
 2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,40 @@
+package no.bimconverter.ifc.loader;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.v2x3.object.Building;
+
+
+import jsdai.SIfc2x3.EIfcbuilding;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiModel;
+
+/*
+ * Loads objects of type building
+ * According to the MV, there may be 1 or more buildings
+ */
+public class BuildingLoader extends CommonLoader {
+       
+       
+       public BuildingLoader() {
+       }
+       
+       public List<Building> loadBuildings(SdaiModel model) {
+               List<Building> buildings = new ArrayList<Building>();
+               List<EEntity> buildingsList = super.getEntitiesOfType(model, 
EIfcbuilding.class);
+               if(buildingsList.size() == 0) {
+                       throw new IfcSdaiException("Error: No buildings 
found!");
+               } else {
+                       for(EEntity buildingEntity: buildingsList) {
+                               Building currentBuilding = new Building();
+                               
currentBuilding.load((EIfcbuilding)buildingEntity);
+                               buildings.add(currentBuilding);
+                       }
+               }
+               return buildings;
+       }
+
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingStoreyLoader.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingStoreyLoader.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/BuildingStoreyLoader.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,32 @@
+package no.bimconverter.ifc.loader;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.v2x3.object.BuildingStorey;
+
+import jsdai.SIfc2x3.EIfcbuildingstorey;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiModel;
+
+
+public class BuildingStoreyLoader  extends CommonLoader {
+       public BuildingStoreyLoader() {
+       }
+               
+       public List<BuildingStorey> loadBuildingStoreys(SdaiModel model) {
+               List<BuildingStorey> buildingStoreys = new 
ArrayList<BuildingStorey>();
+               List<EEntity> buildingStoreyList = 
super.getEntitiesOfType(model, EIfcbuildingstorey.class);
+               if(buildingStoreyList.size() == 0) {
+                       throw new IfcSdaiException("Error: No buildings storeys 
found!");
+               } else {
+                       for(EEntity buildingStoreyEntity: buildingStoreyList) {
+                               BuildingStorey currentBuildingStorey = new 
BuildingStorey();
+                               
currentBuildingStorey.load((EIfcbuildingstorey)buildingStoreyEntity);
+                               buildingStoreys.add(currentBuildingStorey);
+                       }
+               }
+               return buildingStoreys;
+       }
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CommonLoader.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CommonLoader.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CommonLoader.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,82 @@
+package no.bimconverter.ifc.loader;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.v2x3.object.CommonObject;
+
+import jsdai.SIfc2x3.EIfcobject;
+import jsdai.lang.AEntity;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+import jsdai.lang.SdaiModel;
+
+/*
+ * Class that helps in loading IFC objects. It takes the IFC model,
+ * searches for specific objects and applies the java class to process them
+ */
+public class CommonLoader {
+       public CommonLoader() {
+               
+       }
+       
+       public List<EEntity> getEntitiesOfType(SdaiModel model, Class<? extends 
EEntity> IfcObjectType) {
+               List<EEntity> objectList = new ArrayList<EEntity>();
+               try {
+                       AEntity entities = model.getInstances();
+                       SdaiIterator entitiesIter = entities.createIterator();
+                       EEntity entity = null;
+                       while ( entitiesIter.next()) {
+                               entity = 
entities.getCurrentMemberEntity(entitiesIter);
+                               if(entity.isKindOf(IfcObjectType)){
+                                       objectList.add(entity);
+                               }
+                       }
+                       return objectList;
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       throw new IfcSdaiException("Sdai 
exception!"+e.getMessage(), e);
+               }
+               
+       }
+       public List<? extends CommonObject> load(SdaiModel model, Class<? 
extends EEntity> IfcObjectType, Class<? extends CommonObject> objectClass) {
+               List<EEntity> entityList = getEntitiesOfType(model, 
IfcObjectType);
+               if(entityList.size() == 0) {
+                       throw new IfcSdaiException("Error: No elements found!");
+               } else {
+                       List<CommonObject> spaces = new 
ArrayList<CommonObject>();
+                       for(EEntity currentEntity: entityList) {
+                               spaces.add(loadObject(currentEntity, 
objectClass));
+                       }
+                       return spaces;
+               }
+       }
+       private CommonObject loadObject(EEntity entity, Class<? extends 
CommonObject> myObject) {
+               CommonObject window;
+               try {
+                       window = myObject.newInstance();
+                       window.load((EIfcobject)entity);
+                       return window;
+               } catch (InstantiationException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+                       
+               } catch (IllegalAccessException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               }
+               return null;
+       }
+       
+       
+       /*public List<? extends CommonIfcObject> load(SdaiModel model) {
+               List<EEntity> entityList = super.load(model, windowClass);
+               List<CommonIfcObject> spaces = new ArrayList<CommonIfcObject>();
+                       for(EEntity currentEntity: entityList) {
+                               spaces.add(loadObject(currentEntity));
+                       }
+               return spaces;
+       }*/
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CoveringLoader.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CoveringLoader.java
                         (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/CoveringLoader.java
 2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,32 @@
+package no.bimconverter.ifc.loader;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.v2x3.object.element.Covering;
+
+import jsdai.SIfc2x3.EIfccovering;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiModel;
+
+
+public class CoveringLoader  extends CommonLoader {
+       public CoveringLoader() {
+       }
+               
+       public List<Covering> loadCoverings(SdaiModel model) {
+               List<Covering> coverings = new ArrayList<Covering>();
+               List<EEntity> coveringList = super.getEntitiesOfType(model, 
EIfccovering.class);
+               if(coveringList.size() == 0) {
+                       throw new IfcSdaiException("Error: No buildings storeys 
found!");
+               } else {
+                       for(EEntity coveringEntity: coveringList) {
+                               Covering currentCovering = new Covering();
+                               
currentCovering.load((EIfccovering)coveringEntity);
+                               coverings.add(currentCovering);
+                       }
+               }
+               return coverings;
+       }
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/SiteLoader.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/SiteLoader.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/SiteLoader.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,29 @@
+package no.bimconverter.ifc.loader;
+
+import java.util.List;
+
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.v2x3.object.Site;
+
+import jsdai.SIfc2x3.EIfcsite;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiModel;
+
+
+public class SiteLoader extends CommonLoader{
+       public SiteLoader() {
+       }
+       
+       public Site loadModel(SdaiModel model) {
+               List<EEntity> siteList = super.getEntitiesOfType(model, 
EIfcsite.class);
+               Site site = new Site();
+               int siteListSize = siteList.size();
+               if(siteListSize > 1) {
+                       throw new IfcSdaiException("Too many projects found!");
+               } else if (siteListSize == 1) {
+                       EIfcsite siteEntity = (EIfcsite) siteList.get(0);
+                       site.load(siteEntity);
+               }
+               return site;
+       }
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/WindowLoader.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/WindowLoader.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/loader/WindowLoader.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,19 @@
+package no.bimconverter.ifc.loader;
+
+import java.util.List;
+
+import no.bimconverter.ifc.v2x3.object.element.Window;
+
+import jsdai.SIfc2x3.EIfcwindow;
+import jsdai.lang.SdaiModel;
+
+
+public class WindowLoader  extends CommonLoader {
+       Class<EIfcwindow> windowClass = EIfcwindow.class;
+       public WindowLoader() {
+       }
+       
+       public List<Window> load(SdaiModel model) {
+               return (List<Window>) super.load(model, EIfcwindow.class, 
Window.class);
+       }
+}
\ No newline at end of file

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelImpl.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelImpl.java
                             (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelImpl.java
     2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,447 @@
+package no.bimconverter.ifc.v2x3;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import jsdai.SIfc2x3.EIfcdoor;
+import jsdai.SIfc2x3.EIfcfurnishingelement;
+import jsdai.SIfc2x3.EIfcobjectdefinition;
+import jsdai.SIfc2x3.EIfcownerhistory;
+import jsdai.SIfc2x3.EIfcproject;
+import jsdai.SIfc2x3.EIfcrelaggregates;
+import jsdai.SIfc2x3.EIfcsite;
+import jsdai.SIfc2x3.EIfcspace;
+import jsdai.SIfc2x3.EIfczone;
+import jsdai.lang.AEntity;
+import jsdai.lang.ASdaiRepository;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+import jsdai.lang.SdaiModel;
+import jsdai.lang.SdaiRepository;
+import jsdai.util.LangUtils;
+
+import no.bimconverter.ifc.IfcModel;
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.RepositoriesImpl;
+import no.bimconverter.ifc.loader.BuildingLoader;
+import no.bimconverter.ifc.loader.BuildingStoreyLoader;
+import no.bimconverter.ifc.loader.CommonLoader;
+import no.bimconverter.ifc.loader.CoveringLoader;
+import no.bimconverter.ifc.loader.SiteLoader;
+import no.bimconverter.ifc.loader.WindowLoader;
+import no.bimconverter.ifc.v2x3.object.Building;
+import no.bimconverter.ifc.v2x3.object.BuildingStorey;
+import no.bimconverter.ifc.v2x3.object.Project;
+import no.bimconverter.ifc.v2x3.object.Site;
+import no.bimconverter.ifc.v2x3.object.Space;
+import no.bimconverter.ifc.v2x3.object.Zone;
+import no.bimconverter.ifc.v2x3.object.element.Covering;
+import no.bimconverter.ifc.v2x3.object.element.Door;
+import no.bimconverter.ifc.v2x3.object.element.Furnishing;
+import no.bimconverter.ifc.v2x3.object.element.Window;
+
+
+
+
+public class IfcModelImpl extends RepositoriesImpl implements IfcModel{
+       private Logger logger = 
LoggerFactory.getLogger("no.bimconverter.ifc.v2x3.IfcModelImpl");
+       private String ifcRepositoryName;
+       private int size = 0;
+       protected List<EEntity> objectList = new ArrayList<EEntity>();
+       protected SdaiModel model;
+       private SdaiRepository repository;
+       private Project project = new Project();
+       private Site site = new Site();
+       private List<Building> buildings = null;
+       private List<BuildingStorey> buildingStoreys = null;
+       private List<Space> spaces = null;
+       private List<Covering> covering = null;
+       private List<Window> windows = null;
+       private List<Door> doors = null;
+       private List<Furnishing> furnishingElements = null;
+       private List<Zone> zones = null;
+       public IfcModelImpl() {
+               super();
+       }
+       
+       public IfcModelImpl(String ifcRepositoryName) {
+               this();
+               this.setIfcRepositoryName(ifcRepositoryName);
+       }
+       
+       public void setIfcRepositoryName(String ifcRepositoryName) {
+               this.ifcRepositoryName = ifcRepositoryName;
+       }
+       public String getIfcRepositoryName() {
+               return ifcRepositoryName;
+       }
+
+       public int size() {
+               super.openSdaiSession();
+               try {
+                       super.extractRepositories();
+                       SdaiRepository repository = 
getCurrentRepository(repositoryAggregation, repositoryIterator);
+                       model = repository.getModels().getByIndex(1); // making 
an assumption of a single model
+                       makeModelReadable();
+                       size = model.getInstanceCount();
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       throw new IfcSdaiException("Error getting size", e);
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return size;
+       }
+       private SdaiRepository getCurrentRepository(ASdaiRepository 
repositoryAggr, SdaiIterator repositoryIterator) {
+               try {
+                       while(repositoryIterator.next()) {
+                               SdaiRepository repository = 
repositoryAggregation.getCurrentMember(repositoryIterator);
+                               
if(repository.getName().equals(this.ifcRepositoryName)) {
+                                       
+                                       checkAndOpenRepository(repository);
+                                       return repository;
+                               }
+                       }
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+                       throw new IfcSdaiException("Error getting current 
repository", e);
+               }
+               throw new IfcSdaiException("Could not find the repository");
+       }
+
+       protected void makeModelReadable() throws SdaiException {
+               if(model.getMode() == SdaiModel.NO_ACCESS) {
+                       model.startReadOnlyAccess();
+               }
+       }
+
+       protected void checkAndOpenRepository(SdaiRepository repo) throws 
SdaiException {
+               if(!repo.isActive()) {
+                       repo.openRepository();
+               }
+       }
+
+       public List<EEntity> getObjectsDefinitions() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       this.objectList = 
getInstancesOfType(EIfcobjectdefinition.class);
+                       return objectList;
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       // Unit test for this method is in SiteTest
+       public void createNewMiniModel() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       
+                       SdaiRepository repo2 = session.createRepository("asdf", 
null);
+                       repo2.openRepository();
+                       
+                       
+                       SdaiModel modelNew = repo2.createSdaiModel("Model1", 
jsdai.SIfc2x3.SIfc2x3.class);
+                       modelNew.setOptimized(true);
+                       modelNew.startReadWriteAccess();
+                       
+                       
+                       
+                       Project.getIfcRepresentation(model, modelNew);
+                       
+                       
+                       ByteArrayOutputStream os = new ByteArrayOutputStream();
+                       repo2.exportClearTextEncoding(os);
+                       try {
+                               String out = new String(os.toByteArray(), 
"UTF-8");
+                               os.close();
+                               System.out.println(out);
+                       } catch (UnsupportedEncodingException e) {
+                               // TODO Auto-generated catch block
+                               e.printStackTrace();
+                       } catch (IOException e) {
+                               // TODO Auto-generated catch block
+                               e.printStackTrace();
+                       }
+                       
+                       
+                       
+                       
+                       
+                       transaction.endTransactionAccessAbort();
+                       
+                       repo2.closeRepository();
+                       repo2.deleteRepository();
+
+                       
+                       
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               
+       }
+
+       protected List<EEntity> getInstancesOfType(Class classType) throws 
SdaiException {
+               objectList.clear();
+               AEntity entities = model.getInstances();
+               SdaiIterator entitiesIter = entities.createIterator();
+               while(entitiesIter.next()) {
+                       EEntity entity =  
entities.getCurrentMemberEntity(entitiesIter);
+                       if(entity.isKindOf(classType)) {
+                               objectList.add(entity);
+                       }
+               }
+               return objectList;
+       }
+
+       protected void makeModelAvailable() throws SdaiException {
+               super.extractRepositories();
+               repository = getCurrentRepository(repositoryAggregation, 
repositoryIterator);
+               model = repository.getModels().getByIndex(1);
+               makeModelReadable();
+       }
+
+       public Project getProject() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       //this.project.loadModel(model);
+                       List<Project> pl = (List<Project>) (new 
CommonLoader()).load(model, EIfcproject.class, Project.class);
+                       
+                       this.project = pl.get(0);
+                       return this.project;
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public ModelInformation getExchangeFileProperties() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       
+                       return (new ModelInformation().load(model));
+                       
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               return null;
+               
+       }
+
+       public Site getSite() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       SiteLoader siteLoader = new SiteLoader();
+                       this.site = siteLoader.loadModel(model);
+                       return this.site;
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public List<Building> getBuildings() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       BuildingLoader buildingLoader = new BuildingLoader();
+                       this.buildings = buildingLoader.loadBuildings(model);
+                       return this.buildings;
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       
+       public List<BuildingStorey> getBuildingStoreys() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       BuildingStoreyLoader buildingStoreyLoader = new 
BuildingStoreyLoader();
+                       
+                       try {
+                               this.buildingStoreys = 
buildingStoreyLoader.loadBuildingStoreys(model);
+                               //this.buildingStoreys = 
(List<BuildingStorey>)(new CommonLoader())
+                               return this.buildingStoreys;
+                       } catch ( IfcSdaiException e) {
+                               return null;
+                       }
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public List<Space> getSpaces() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       try {
+                               this.spaces = (List<Space>) (new 
CommonLoader()).load(model, EIfcspace.class, Space.class);
+                               return this.spaces;
+                       } catch ( IfcSdaiException e) {
+                               return null;
+                       }
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public List<Covering> getCoverings() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       CoveringLoader coveringLoader = new CoveringLoader();
+                       try {
+                               this.covering = 
coveringLoader.loadCoverings(model);
+                               return this.covering;
+                       } catch (IfcSdaiException e) {
+                               
+                               return null;
+                       }
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public List<Window> getWindows() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       WindowLoader coveringLoader = new WindowLoader();
+                       try {
+                               this.windows = (List<Window>) 
coveringLoader.load(model);
+                               return this.windows;
+                       } catch (IfcSdaiException e) {
+                               logger.info("No windows found");
+                               return null;
+                       }
+                       
+                       
+                       
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public List<Door> getDoors() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       
+                       try {
+                               this.doors = (List<Door>) (new 
CommonLoader()).load(model, EIfcdoor.class, Door.class);
+                               return this.doors;
+                       } catch (IfcSdaiException e) {
+                               logger.info("No doors found");
+                               return null;
+                       }
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public List<Zone> getZones() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       
+                       try {
+                               this.zones = (List<Zone>) (new 
CommonLoader()).load(model, EIfczone.class, Zone.class);
+                               return this.zones;
+                       } catch (IfcSdaiException e) {
+                               logger.info("No zones found");
+                               return null;
+                       }
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               
+               return null;
+       }
+       public SdaiModel getModel() {
+               return model;
+       }
+
+       public void setModel(SdaiModel model) {
+               this.model = model;
+       }
+
+       public List<Furnishing> getFurnishing() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       try {
+                               this.furnishingElements = (List<Furnishing>) 
(new CommonLoader()).load(model, EIfcfurnishingelement.class, Furnishing.class);
+                               return this.furnishingElements;
+                       } catch (IfcSdaiException e) {
+                               logger.info("No furnishing found");
+                               return null;
+                       }
+                       
+               } catch (SdaiException e) {
+                       // TODO Auto-generated catch block
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+               return null;
+       }
+
+}
+

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelReport.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelReport.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/IfcModelReport.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,84 @@
+package no.bimconverter.ifc.v2x3;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import jsdai.SIfc2x3.EIfcpropertydefinition;
+import jsdai.SIfc2x3.EIfcrelationship;
+import jsdai.SIfc2x3.EIfcroot;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+
+public class IfcModelReport extends IfcModelImpl{
+       private Map<String, String> report = new HashMap<String, String>(); 
+       public IfcModelReport() {
+               super();
+       }
+       public IfcModelReport(String ifcRepositoryName) {
+               this();
+               setIfcRepositoryName(ifcRepositoryName);
+               this.initializeReport();
+       }
+       private void initializeReport() {
+               this.openSessionAndGetModelInformation();
+               this.addSizeToReport();
+               this.addObjectCountToReport();
+               this.addRelationsCountToReport();
+               this.addResourceSchemaCountToReport();
+               this.addPropertyDefinitionCountToReport();
+       }
+       public Map<String, String> getIfcModelReport() {
+               return report;
+       }
+       
+       private void addSizeToReport() {
+               report.put("Model size", String.valueOf(this.size()));
+       }
+       private void addObjectCountToReport() {
+               List<EEntity> objectList = this.getObjectsDefinitions();
+               report.put("Object count", String.valueOf(objectList.size()));
+       }
+       private void addRelationsCountToReport() {
+               
this.openSessionAndGetAllInstancesOfType(EIfcrelationship.class);
+               report.put("Relation count", String.valueOf(objectList.size()));
+       }
+       private void addResourceSchemaCountToReport() {
+               this.openSessionAndGetAllInstancesOfType(EIfcroot.class);
+               int objectCount = Integer.parseInt(this.report.get("Model 
size")) - objectList.size();
+               report.put("Resource schema count", 
String.valueOf(objectCount));
+       }
+       private void addPropertyDefinitionCountToReport() {
+               
this.openSessionAndGetAllInstancesOfType(EIfcpropertydefinition.class);
+               report.put("Property set count", 
String.valueOf(objectList.size()));
+       }
+       
+       private void openSessionAndGetAllInstancesOfType(Class<? extends 
EEntity> ifcClass) {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       this.objectList = getInstancesOfType(ifcClass);
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+       }
+       
+       private void openSessionAndGetModelInformation() {
+               super.openSdaiSession();
+               try {
+                       makeModelAvailable();
+                       report.put("Model name", model.getName());
+                       report.put("Model id", model.getId());
+                       report.put("Model change date", model.getChangeDate());
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               } finally {
+                       super.closeSdaiSession();
+               }
+       }
+       
+       
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/ModelInformation.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/ModelInformation.java
                         (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/ModelInformation.java
 2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,132 @@
+package no.bimconverter.ifc.v2x3;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import jsdai.lang.A_string;
+import jsdai.lang.SchemaInstance;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+import jsdai.lang.SdaiModel;
address@hidden
+public class ModelInformation {
+       private String authorization;
+       private String author;
+       private String changeDate;
+       private String description;
+       private String organization;
+       private String originatingSystem;
+       private String preProcessor;
+       private String valDate;
+       private String nativeSchema;
+       
+
+       public ModelInformation() {
+       }
+       
+       public ModelInformation load(SdaiModel model) {
+               try {
+                       
+                       SchemaInstance currentSchema = 
model.getAssociatedWith().getByIndex(1);
+                       setNativeSchema(currentSchema.getNativeSchemaString());
+                       authorization = currentSchema.getAuthorization();
+                       author = 
getStringListAsString(currentSchema.getAuthor());
+                       changeDate = currentSchema.getChangeDate();
+                       description = 
getStringListAsString(currentSchema.getDescription());
+                       organization = 
this.getStringListAsString(currentSchema.getOrganization());
+                       originatingSystem = 
currentSchema.getOriginatingSystem();
+                       preProcessor = currentSchema.getPreprocessorVersion();
+               } catch (SdaiException e) {
+                       
+               }
+               return this;
+       }
+       
+       
+
+       public String getOrganization() {
+               return organization;
+       }
+
+       public void setOrganization(String organization) {
+               this.organization = organization;
+       }
+
+       public String getOriginatingSystem() {
+               return originatingSystem;
+       }
+
+       public void setOriginatingSystem(String originatingSystem) {
+               this.originatingSystem = originatingSystem;
+       }
+
+       public String getPreProcessor() {
+               return preProcessor;
+       }
+
+       public void setPreProcessor(String preProcessor) {
+               this.preProcessor = preProcessor;
+       }
+
+       protected String getStringListAsString(A_string stringAggregation) 
throws SdaiException {
+               StringBuilder resultingString = new StringBuilder();
+               if(stringAggregation.getMemberCount() > 0) {
+                       SdaiIterator integerIterator = 
stringAggregation.createIterator();
+                       while(integerIterator.next()) {
+                               
resultingString.append(stringAggregation.getCurrentMember(integerIterator)+";");
+                       }
+                       
resultingString.deleteCharAt(resultingString.length()-1);
+               }
+               return resultingString.toString();
+       }
+
+       public String getAuthorization() {
+               return authorization;
+       }
+
+       public void setAuthorization(String authorization) {
+               this.authorization = authorization;
+       }
+
+       public String getAuthor() {
+               return author;
+       }
+
+       public void setAuthor(String author) {
+               this.author = author;
+       }
+
+       public String getChangeDate() {
+               return changeDate;
+       }
+
+       public void setChangeDate(String changeDate) {
+               this.changeDate = changeDate;
+       }
+
+       public String getDescription() {
+               return description;
+       }
+
+       public void setDescription(String description) {
+               this.description = description;
+       }
+
+       public String getValDate() {
+               return valDate;
+       }
+
+       public void setValDate(String valDate) {
+               this.valDate = valDate;
+       }
+
+       public void setNativeSchema(String nativeSchema) {
+               this.nativeSchema = nativeSchema;
+       }
+
+       public String getNativeSchema() {
+               return nativeSchema;
+       }
+
+       
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/WholeModelOutput.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/WholeModelOutput.java
                         (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/WholeModelOutput.java
 2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,136 @@
+package no.bimconverter.ifc.v2x3;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+
+import no.bimconverter.ifc.v2x3.object.Building;
+import no.bimconverter.ifc.v2x3.object.BuildingStorey;
+import no.bimconverter.ifc.v2x3.object.Project;
+import no.bimconverter.ifc.v2x3.object.Site;
+import no.bimconverter.ifc.v2x3.object.Space;
+import no.bimconverter.ifc.v2x3.object.Zone;
+import no.bimconverter.ifc.v2x3.object.element.Covering;
+import no.bimconverter.ifc.v2x3.object.element.Door;
+import no.bimconverter.ifc.v2x3.object.element.Furnishing;
+import no.bimconverter.ifc.v2x3.object.element.Window;
+
+
+
address@hidden
+public class WholeModelOutput {
+       private ModelInformation modelInformation = new ModelInformation();
+       private Project project = new Project();
+       private Site site = new Site();
+       private List<Building> buildings = null;
+       private List<BuildingStorey> buildingStoreys = null;
+       private List<Space> spaces = null;
+       private List<Covering> covering = null;
+       private List<Window> windows = null;
+       private List<Door> doors = null;
+       private List<Furnishing> furnishingElements = null;
+       private List<Zone> zones = null;
+       
+       public WholeModelOutput() {
+       }
+       public void load(IfcModelImpl model) {
+               this.modelInformation = model.getExchangeFileProperties();
+               this.project = model.getProject();
+               this.site = model.getSite();
+               this.buildings = model.getBuildings();
+               this.buildingStoreys = model.getBuildingStoreys();
+               this.spaces = model.getSpaces();
+               this.covering = model.getCoverings();
+               this.windows = model.getWindows();
+               this.doors = model.getDoors();
+               this.furnishingElements = model.getFurnishing();
+               this.zones = model.getZones();
+               
+       }
+       public ModelInformation getModelInformation() {
+               return modelInformation;
+       }
+       public void setModelInformation(ModelInformation modelInformation) {
+               this.modelInformation = modelInformation;
+       }
+       public Project getProject() {
+               return project;
+       }
+       public void setProject(Project project) {
+               this.project = project;
+       }
+       public Site getSite() {
+               return site;
+       }
+       public void setSite(Site site) {
+               this.site = site;
+       }
+       @XmlElementWrapper(name="buildings")
+       @XmlElement(name="building") 
+       public List<Building> getBuildings() {
+               return buildings;
+       }
+       public void setBuildings(List<Building> buildings) {
+               this.buildings = buildings;
+       }
+       @XmlElementWrapper(name="buildingStoreys")
+       @XmlElement(name="buildingStorey") 
+       public List<BuildingStorey> getBuildingStoreys() {
+               return buildingStoreys;
+       }
+       public void setBuildingStoreys(List<BuildingStorey> buildingStoreys) {
+               this.buildingStoreys = buildingStoreys;
+       }
+       @XmlElementWrapper(name="spaces")
+       @XmlElement(name="space") 
+       public List<Space> getSpaces() {
+               return spaces;
+       }
+       public void setSpaces(List<Space> spaces) {
+               this.spaces = spaces;
+       }
+       @XmlElementWrapper(name="coverings")
+       @XmlElement(name="covering") 
+       public List<Covering> getCovering() {
+               return covering;
+       }
+       public void setCovering(List<Covering> covering) {
+               this.covering = covering;
+       }
+       @XmlElementWrapper(name="windows")
+       @XmlElement(name="window") 
+       public List<Window> getWindows() {
+               return windows;
+       }
+       
+       public void setWindows(List<Window> windows) {
+               this.windows = windows;
+       }
+       @XmlElementWrapper(name="doors")
+       @XmlElement(name="door") 
+       public List<Door> getDoors() {
+               return doors;
+       }
+       public void setDoors(List<Door> doors) {
+               this.doors = doors;
+       }
+       @XmlElementWrapper(name="furnishingElements")
+       @XmlElement(name="furnishingElement") 
+       public List<Furnishing> getFurnishingElements() {
+               return furnishingElements;
+       }
+       public void setFurnishingElements(List<Furnishing> furnishingElements) {
+               this.furnishingElements = furnishingElements;
+       }
+       @XmlElementWrapper(name="zones")
+       @XmlElement(name="zone") 
+       public List<Zone> getZones() {
+               return zones;
+       }
+       public void setZones(List<Zone> zones) {
+               this.zones = zones;
+       }
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Building.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Building.java
                          (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Building.java
  2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,109 @@
+package no.bimconverter.ifc.v2x3.object;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.jaxb.owner.Address;
+
+
+import jsdai.SIfc2x3.EIfcbuilding;
+import jsdai.SIfc2x3.EIfcobjectdefinition;
+import jsdai.SIfc2x3.EIfcpostaladdress;
+import jsdai.SIfc2x3.EIfcroot;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+
address@hidden
+public class Building extends SpatialStructure {
+       final private static String commonPropertyName = "Pset_BuildingCommon";
+       private Address address;
+       
+       public Building() {
+               super();
+               
+       }
+       
+       public void load(EIfcbuilding buildingEntity) {
+               super.load(buildingEntity);
+               try {
+                       this.loadAttributes(buildingEntity);
+                       this.loadAddress(buildingEntity);
+                       this.loadClassification(buildingEntity);
+                       this.loadBaseQuantities(buildingEntity);
+                       this.loadBuildingProperties(buildingEntity);
+                       this.loadSpatialDecomposition(buildingEntity);
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+       }
+       
+       private void loadSpatialDecomposition(EIfcbuilding building) throws 
SdaiException {
+               
+               
+               List<EIfcobjectdefinition> siteIsDecomposedBy = 
this.getIsDecomposedBy(building);
+               super.insertDecomposingIds(siteIsDecomposedBy, 
Building.SpatialDecomposition.STOREY.key);
+               
+               this.insertParentIds(building);
+               
+       }
+       
+       
+       private void insertParentIds(EIfcbuilding building) throws 
SdaiException {
+               List<EEntity> parents = this.getParentEntities(building);
+               if( parents.size() == 2 || parents.size() == 1) {
+                       if(parents.size() == 2) {
+                               
//this.spatialDecomposition.put(SpatialDecomposition.SITE.key, new 
String[]{((EIfcroot) parents.get(0)).getGlobalid(null)});
+                               
//this.spatialDecomposition.put(SpatialDecomposition.PROJECT.key, new 
String[]{((EIfcroot) parents.get(1)).getGlobalid(null)});
+                               this.spatialDecomposition.setSite(((EIfcroot) 
parents.get(0)).getGlobalid(null));
+                               
this.spatialDecomposition.setProject(((EIfcroot) 
parents.get(1)).getGlobalid(null));
+                               
+                       } else {
+                               
//this.spatialDecomposition.put(SpatialDecomposition.SITE.key, null);
+                               
//this.spatialDecomposition.put(SpatialDecomposition.PROJECT.key, new 
String[]{((EIfcroot) parents.get(0)).getGlobalid(null)});
+                               
this.spatialDecomposition.setProject(((EIfcroot) 
parents.get(0)).getGlobalid(null));
+                       }
+               } else {
+                       throw new IfcSdaiException("Error with parent element 
structure");
+               }
+       }
+       
+
+       
+       private void loadBuildingProperties(EIfcbuilding building) throws 
SdaiException {
+               if(this.propertiesList == null) {
+                       this.relateObjectPropertiesAndQuantities(building);
+               }
+               super.loadProperties(building);
+               super.setCommonProperty(Building.commonPropertyName);
+       }
+       
+       private void loadBaseQuantities(EIfcbuilding buildingEntity) {
+               // TODO: Finish this method!
+               
+       }
+
+       private void loadAddress(EIfcbuilding building) throws SdaiException {
+               if(building.testBuildingaddress(null)) {
+                       //this.address = super.initializeAddress();
+                       EIfcpostaladdress postalAddress = 
building.getBuildingaddress(null);
+                       //this.address = super.loadAddress(postalAddress);
+                       this.address = new Address().load(postalAddress);
+               }
+       }
+       
+       
+       public void setAddress(Address address) {
+               this.address = address;
+       }
+
+       public Address getAddress() {
+               return this.address;
+               
+       }
+       
+       
+}
\ No newline at end of file

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/BuildingStorey.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/BuildingStorey.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/BuildingStorey.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,94 @@
+package no.bimconverter.ifc.v2x3.object;
+
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+import no.bimconverter.ifc.IfcSdaiException;
+
+
+import jsdai.SIfc2x3.EIfcbuildingstorey;
+import jsdai.SIfc2x3.EIfcobjectdefinition;
+import jsdai.SIfc2x3.EIfcroot;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+
address@hidden
+public class BuildingStorey  extends SpatialStructure {
+       final private static String commonPropertyName = 
"Pset_BuildingStoreyCommon";
+       public BuildingStorey() {
+               super();
+               
+       }
+       
+       public void load(EIfcbuildingstorey buildingStoreyEntity) {
+               super.load(buildingStoreyEntity);
+               try {
+                       this.loadAttributes(buildingStoreyEntity);
+                       this.loadBaseQuantities(buildingStoreyEntity);
+                       this.loadClassification(buildingStoreyEntity);
+                       this.loadBuildingStoreyProperties(buildingStoreyEntity);
+                       this.loadSpatialDecomposition(buildingStoreyEntity);
+                       //TODO: spatial container
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+               
+       }
+       
+       private void loadAttributes(EIfcbuildingstorey entity) throws 
SdaiException {
+               
+               if(entity.testElevation(null)) {
+                       this.attributes.setElevation( 
String.valueOf(entity.getElevation(null)));//put(Attribute.ELEVATION.key, 
String.valueOf(entity.getElevation(null)));
+               }
+       }
+       
+       private void loadBuildingStoreyProperties(EIfcbuildingstorey 
buildingStorey) throws SdaiException {
+               if(this.propertiesList == null) {
+                       
this.relateObjectPropertiesAndQuantities(buildingStorey);
+               }
+               super.loadProperties(buildingStorey);
+               super.setCommonProperty(BuildingStorey.commonPropertyName);
+       }
+       private void loadSpatialDecomposition(EIfcbuildingstorey 
buildingStorey) throws SdaiException {
+               List<EIfcobjectdefinition> siteIsDecomposedBy = 
this.getIsDecomposedBy(buildingStorey);
+               super.insertDecomposingIds(siteIsDecomposedBy, 
BuildingStorey.SpatialDecomposition.SPACE.key);
+               insertParentIds(buildingStorey);
+               
+       }
+       
+       public void insertParentIds(EIfcbuildingstorey buildingStorey) throws 
SdaiException {
+               List<EEntity> parents = this.getParentEntities(buildingStorey);
+               if( parents.size() == 3 || parents.size() == 2) {
+                       this.spatialDecomposition.addBuildingId(((EIfcroot) 
parents.get(0)).getGlobalid(null)); //put(SpatialDecomposition.BUILDING.key, 
new String[]{((EIfcroot) parents.get(0)).getGlobalid(null)});
+                       if(parents.size() == 2) {
+                               
this.spatialDecomposition.setProject(((EIfcroot) 
parents.get(1)).getGlobalid(null));//put(SpatialDecomposition.PROJECT.key, new 
String[]{((EIfcroot) parents.get(1)).getGlobalid(null)});
+                       } else {
+                               this.spatialDecomposition.setSite(((EIfcroot) 
parents.get(1)).getGlobalid(null));//put(SpatialDecomposition.SITE.key, new 
String[]{((EIfcroot) parents.get(1)).getGlobalid(null)});
+                               
this.spatialDecomposition.setProject(((EIfcroot) 
parents.get(2)).getGlobalid(null));//put(SpatialDecomposition.PROJECT.key, new 
String[]{((EIfcroot) parents.get(2)).getGlobalid(null)});
+                       }
+               } else {
+                       throw new IfcSdaiException("Error with parent element 
structure");
+               }
+       }
+       
+       
+       
+
+       
+       
+       public enum Attribute {
+               ELEVATION("elevation");
+               private final String key;
+               Attribute(String key) {
+               this.key = key;
+           }
+               public String getKey() {
+                       return key;
+               }
+       }
+       
+       
+
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObject.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObject.java
                              (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObject.java
      2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,50 @@
+package no.bimconverter.ifc.v2x3.object;
+
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+
+import no.bimconverter.ifc.jaxb.BaseQuantities;
+import no.bimconverter.ifc.jaxb.BoundaryItem;
+import no.bimconverter.ifc.jaxb.ClassificationItem;
+import no.bimconverter.ifc.jaxb.PropertyList;
+
+
+
+import jsdai.SIfc2x3.EIfcobjectdefinition;
+/*
+ * Variables and methods common to all of the objects
+ */
+public interface CommonObject {
+       public void load(EIfcobjectdefinition object);
+       
+       
+       
+               
+       @XmlElementWrapper(name="properties")
+       @XmlElement(name="propertySet") 
+       public List<PropertyList> getProperties();
+
+       public void setProperties(List<PropertyList> properties);
+       
+       public void setBaseQuantities(BaseQuantities baseQuantities);
+       
+       
+       public BaseQuantities getBaseQuantities();
+       
+       @XmlElementWrapper(name="classification")
+       @XmlElement(name="item") 
+       public List<ClassificationItem> getClassificationList();
+
+       public void setClassificationList(List<ClassificationItem> 
classificationList);
+       
+       @XmlElementWrapper(name="spaceBoundary")
+       @XmlElement(name="boundary") 
+       public List<BoundaryItem> getSpaceBoundary();
+
+       public void setSpaceBoundary(List<BoundaryItem> spaceBoundary);
+
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectDefinition.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectDefinition.java
                            (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectDefinition.java
    2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,388 @@
+package no.bimconverter.ifc.v2x3.object;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import no.bimconverter.ifc.jaxb.Attributes;
+import no.bimconverter.ifc.jaxb.NameValuePair;
+
+import jsdai.SIfc2x3.AIfcobjectdefinition;
+import jsdai.SIfc2x3.AIfcphysicalquantity;
+import jsdai.SIfc2x3.AIfcproperty;
+import jsdai.SIfc2x3.AIfcreldecomposes;
+import jsdai.SIfc2x3.AIfcreldefines;
+import jsdai.SIfc2x3.EIfccomplexproperty;
+import jsdai.SIfc2x3.EIfcelementquantity;
+import jsdai.SIfc2x3.EIfcobject;
+import jsdai.SIfc2x3.EIfcobjectdefinition;
+import jsdai.SIfc2x3.EIfcphysicalquantity;
+import jsdai.SIfc2x3.EIfcproperty;
+import jsdai.SIfc2x3.EIfcpropertyset;
+import jsdai.SIfc2x3.EIfcpropertysetdefinition;
+import jsdai.SIfc2x3.EIfcpropertysinglevalue;
+import jsdai.SIfc2x3.EIfcquantityarea;
+import jsdai.SIfc2x3.EIfcquantitycount;
+import jsdai.SIfc2x3.EIfcquantitylength;
+import jsdai.SIfc2x3.EIfcquantitytime;
+import jsdai.SIfc2x3.EIfcquantityvolume;
+import jsdai.SIfc2x3.EIfcquantityweight;
+import jsdai.SIfc2x3.EIfcreldecomposes;
+import jsdai.SIfc2x3.EIfcreldefines;
+import jsdai.SIfc2x3.EIfcreldefinesbyproperties;
+import jsdai.SIfc2x3.EIfcroot;
+import jsdai.SIfc2x3.EIfcsimpleproperty;
+import jsdai.dictionary.EAttribute;
+import jsdai.lang.AEntity;
+import jsdai.lang.A_integer;
+import jsdai.lang.A_string;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+import jsdai.lang.SdaiModel;
+import jsdai.lang.Value;
+
+
+public class CommonObjectDefinition {
+       final public static String ATTRIBUTE_KEY_GUID = "guid";
+       final public static String ATTRIBUTE_KEY_NAME = "Name";
+       
+       final public static String ATTRIBUTE_KEY_DESCRIPTION = "Description";
+       //protected Map<String, String> attributes = new HashMap<String, 
String>();
+       protected Attributes attributes;// = new Attributes();
+       
+       private String ifcObjectType;
+       private AIfcreldecomposes decomposesAggregation;
+       protected Map<String, Map<String, String>> propertiesList;
+       protected Map<String, Map<String, String>> quantitiesList;
+       SdaiIterator integerIterator;
+       
+       public CommonObjectDefinition() {
+       }
+       
+       protected void loadAttributes(EIfcroot entity) throws SdaiException {
+               //first two are required
+               this.initializeAttributes();
+               //this.attributes.put(ATTRIBUTE_KEY_GUID, 
entity.getGlobalid(null));
+               //this.attributes.put(ATTRIBUTE_KEY_NAME, entity.getName(null));
+               this.attributes.setGuid(entity.getGlobalid(null));
+               if(entity.testName(null)){
+                       this.attributes.setName(entity.getName(null));
+               }
+               
+               if(entity.testDescription(null)){
+                       //this.attributes.put(ATTRIBUTE_KEY_DESCRIPTION, 
entity.getDescription(null));
+                       
this.attributes.setDescription(entity.getDescription(null));
+               }
+               this.ifcObjectType = entity.getInstanceType().getName(null);
+       }
+       protected void initializeAttributes() {
+               if(this.attributes == null) {
+                       this.attributes = new Attributes();
+               }
+       }
+       /*
+        * takes care of EIfcreldefinesbyproperties
+        * Missing: take care of EIfcreldefinesbytype
+        */
+       protected void relateObjectPropertiesAndQuantities(EIfcobject site) 
throws SdaiException {
+               AIfcreldefines propertyRelations = site.getIsdefinedby(null, 
null);
+               SdaiIterator propertyRelationsIterator = 
propertyRelations.createIterator();
+               while(propertyRelationsIterator.next()) {
+                       EIfcreldefines propertyRelation = 
propertyRelations.getCurrentMember(propertyRelationsIterator);
+                       
if(propertyRelation.isKindOf(EIfcreldefinesbyproperties.class)) {
+                               assignRelatedDefinitions(propertyRelation);
+                       }
+               }
+       }
+       private void assignRelatedDefinitions(EIfcreldefines propertyRelation)
+                       throws SdaiException {
+               EIfcreldefinesbyproperties relDefinesByProperties = 
(EIfcreldefinesbyproperties) propertyRelation;
+               EIfcpropertysetdefinition propertydefinition =  
relDefinesByProperties.getRelatingpropertydefinition(null);
+               if(propertydefinition != null && 
propertydefinition.isKindOf(EIfcpropertyset.class)) {
+                       addPropertiesToPropertyList(propertydefinition);
+               } else if(propertydefinition != null && 
propertydefinition.isKindOf(EIfcelementquantity.class)) {
+                       addQuantitiesToQuantityList(propertydefinition);
+               }
+       }
+       private void addQuantitiesToQuantityList(
+                       EIfcpropertysetdefinition propertydefinition) throws 
SdaiException {
+               initializeQuantitiesList();
+               EIfcelementquantity elementQuantity = (EIfcelementquantity) 
propertydefinition;
+               AIfcphysicalquantity elementQuantityAggregate = 
elementQuantity.getQuantities(null);
+               SdaiIterator elementQuantityIterator = 
elementQuantityAggregate.createIterator();
+               Map<String, String> physicalQuantityList = new HashMap<String, 
String>();
+               while(elementQuantityIterator.next()) {
+                       EIfcphysicalquantity physicalQuantity = 
elementQuantityAggregate.getCurrentMember(elementQuantityIterator);
+                       //following line of code not used for time being, would 
need include both the name and type of item
+                       //List<NameValuePair> nvpList = 
extractSingleValueAttributes(physicalQuantity);
+                       
+                       //physicalQuantityList.put(nvpList.get(0).name, 
nvpList.get(0).value);
+                       
+                       
+                       /*
+                        * This bit of code is trusting the IFC to correctly 
designate with a name the contents
+                        * of IFCQUANTITY... items.. which might be a little 
dubious
+                        */
+                       if(physicalQuantity.isKindOf(EIfcquantitylength.class)) 
{
+                               
physicalQuantityList.put(physicalQuantity.getName(null), 
String.valueOf(((EIfcquantitylength)physicalQuantity).getLengthvalue(null)));
+                               
+                       } else if 
(physicalQuantity.isKindOf(EIfcquantityarea.class)) {
+                               
physicalQuantityList.put(physicalQuantity.getName(null), 
String.valueOf(((EIfcquantityarea)physicalQuantity).getAreavalue(null)));
+                       } else if 
(physicalQuantity.isKindOf(EIfcquantityvolume.class)) {
+                               
physicalQuantityList.put(physicalQuantity.getName(null), 
String.valueOf(((EIfcquantityvolume)physicalQuantity).getVolumevalue(null)));
+                       }  else if 
(physicalQuantity.isKindOf(EIfcquantitycount.class)) {
+                               
physicalQuantityList.put(physicalQuantity.getName(null), 
String.valueOf(((EIfcquantitycount)physicalQuantity).getCountvalue(null)));
+                       } else if 
(physicalQuantity.isKindOf(EIfcquantityweight.class)) {
+                               
physicalQuantityList.put(physicalQuantity.getName(null), 
String.valueOf(((EIfcquantityweight)physicalQuantity).getWeightvalue(null)));
+                       } else if 
(physicalQuantity.isKindOf(EIfcquantitytime.class)) {
+                               
physicalQuantityList.put(physicalQuantity.getName(null), 
String.valueOf(((EIfcquantitytime)physicalQuantity).getTimevalue(null)));
+                       }
+                       
+               }
+               quantitiesList.put(elementQuantity.getName(null), 
physicalQuantityList);
+       }
+       private void initializeQuantitiesList() {
+               if(this.quantitiesList == null) {
+                       this.quantitiesList = new  HashMap<String, Map<String, 
String>>();
+               }
+       }
+       private void initializePropertiesList() {
+               if(this.propertiesList == null) {
+                       this.propertiesList = new  HashMap<String, Map<String, 
String>>();
+               }
+       }
+       protected void addPropertiesToPropertyList(
+                       EIfcpropertysetdefinition propertydefinition) throws 
SdaiException {
+               this.initializePropertiesList();
+               EIfcpropertyset propertySet = (EIfcpropertyset) 
propertydefinition;
+               AIfcproperty propertiesAggregation = 
propertySet.getHasproperties(null);
+               propertiesList.put(propertySet.getName(null), 
extractProperties(propertiesAggregation));
+       }
+       private HashMap<String, String> extractProperties(AIfcproperty 
propertiesAggregation) throws SdaiException {
+               HashMap<String, String> propertiesMap = new HashMap<String, 
String>();
+               for(int i = 1; i < propertiesAggregation.getMemberCount()+1; 
i++) {
+                       EIfcproperty property = 
propertiesAggregation.getByIndex(i);
+                       
+                       String value = getPropertyValue(property);
+                       propertiesMap.put(property.getName(null), value);
+               }
+               return propertiesMap;
+       }
+       private String getPropertyValue(EIfcproperty property) throws 
SdaiException {
+               if(property.isKindOf(EIfccomplexproperty.class)) {
+                       StringBuilder propertyStringBuilder = new 
StringBuilder();
+                       EIfccomplexproperty complexProperty = 
(EIfccomplexproperty) property;
+                       AIfcproperty properties = 
complexProperty.getHasproperties(null);
+                       SdaiIterator propertiesIterator = 
properties.createIterator();
+                       while(propertiesIterator.next()) {
+                               EIfcproperty currentProperty = 
properties.getCurrentMember(propertiesIterator);
+                               
propertyStringBuilder.append(currentProperty.getName(null)+",");
+                       }
+                       return propertyStringBuilder.toString();
+               } else if (property.isKindOf(EIfcsimpleproperty.class)) {
+                       if(property.isKindOf(EIfcpropertysinglevalue.class)) {
+                               EIfcpropertysinglevalue propertySingle = 
(EIfcpropertysinglevalue) property;
+                               //doing some strange stuff here, the 
alternative is very complex
+                               if(propertySingle.testNominalvalue(null) != 0) {
+                                       EAttribute nominalValueAttribute = 
propertySingle.getAttributeDefinition("nominalvalue");
+                                       Value nominalValueAttributeValue = 
propertySingle.get(nominalValueAttribute);
+                                       String nominalValueString = 
nominalValueAttributeValue.toString();
+                                       String nominalValue = 
nominalValueString.split(" := ")[1];
+                                       return nominalValue;
+                               }
+                               /*
+                               yo.testNominalvalue(null);
+                               System.out.println(yo.testNominalvalue(null));
+                               
+                               if(yo.testNominalvalue(null) == 29) {
+                                       EIfclabel yo2 = new EIfclabel() {
+                                       };
+                                       
System.out.println(yo.getNominalvalue(null, yo2));
+                                       
+                                       AAttribute attribs = 
yo.getInstanceType().getAttributes(null, null);
+                                       for(int c = 1;c< 
attribs.getMemberCount() +1; c++) {
+                                               
System.out.println(attribs.getByIndex(c));
+                                       }
+                                       
+                                       EAttribute attri = 
yo.getAttributeDefinition("nominalvalue");
+                                       Object obj = yo.get_object(attri);
+                                       Value lala = yo.get(attri);
+                                       
+                                       System.out.println("Info:"+lala);
+                               }
+                               */
+                               
+                               return null;
+                       }
+               }
+               return null;
+       }
+       
+       protected List<EIfcobjectdefinition> 
getIsDecomposedBy(EIfcobjectdefinition objectDefinition) throws SdaiException {
+               List<EIfcobjectdefinition> entityList = new 
ArrayList<EIfcobjectdefinition>();
+               decomposesAggregation = 
objectDefinition.getIsdecomposedby(null, null);
+               retrieveRelatedObjects(entityList);
+               return entityList;
+       }
+       protected EIfcobjectdefinition getDecomposes(EIfcobjectdefinition 
objectDefinition) throws SdaiException {
+               List<EIfcobjectdefinition> entityList = new 
ArrayList<EIfcobjectdefinition>();
+               decomposesAggregation = objectDefinition.getDecomposes(null, 
null);
+               retrieveRelatingMembers(entityList);
+               if(entityList.size()>0) {
+                       
+                       return entityList.get(0);
+               } else {
+                       return null;
+               }
+       }
+       
+       protected List<EEntity> getParentEntities(EIfcobjectdefinition entity) 
throws SdaiException {
+               List<EEntity> parents = new ArrayList<EEntity>();
+               EIfcobjectdefinition parentEntity = entity;
+               while( (parentEntity = this.getDecomposes(parentEntity)) != 
null) {
+                       parents.add(parentEntity);
+               }
+               return parents;
+       }
+       
+       private void retrieveRelatingMembers(List<EIfcobjectdefinition> 
entityList) throws SdaiException {
+               SdaiIterator isDecomposedByIterator = 
decomposesAggregation.createIterator();
+               while(isDecomposedByIterator.next()) {
+                       EIfcreldecomposes relDecomposes = 
decomposesAggregation.getCurrentMember(isDecomposedByIterator);
+                       EIfcobjectdefinition objectDefinitionAggregate = 
relDecomposes.getRelatingobject(null);
+                       entityList.add(objectDefinitionAggregate);
+               }
+       }
+       private void retrieveRelatedObjects(List<EIfcobjectdefinition> 
entityList)
+                       throws SdaiException {
+               SdaiIterator isDecomposedByIterator = 
decomposesAggregation.createIterator();
+               while(isDecomposedByIterator.next()) {
+                       EIfcreldecomposes relDecomposes = 
decomposesAggregation.getCurrentMember(isDecomposedByIterator);
+                       AIfcobjectdefinition objectDefinitionAggregate = 
relDecomposes.getRelatedobjects(null);
+                       SdaiIterator objectDefinitionIterator = 
objectDefinitionAggregate.createIterator();
+                       while(objectDefinitionIterator.next()) {
+                               EIfcobjectdefinition innerObjectDefinition = 
objectDefinitionAggregate.getCurrentMember(objectDefinitionIterator);
+                               entityList.add(innerObjectDefinition);
+                       }
+               }
+       }
+       
+
+       public List<NameValuePair> extractSingleValueAttributes(EEntity 
propertySetDefinition)
+       throws SdaiException {
+               List<NameValuePair> listOfProperties = new 
ArrayList<NameValuePair>();
+               Class<? extends EEntity> currentClass = 
propertySetDefinition.getClass();
+               Method[] classMethods = currentClass.getDeclaredMethods();
+               
+               
+               
+               for(Method m : classMethods) {
+                       if(m.getName().startsWith("test")) {
+                               String variableName = 
m.getName().replaceFirst("test", "");
+                               if(this.checkTestParameter(m, 
propertySetDefinition)) {
+                                       try {
+                                               if((Boolean) 
m.invoke(propertySetDefinition, propertySetDefinition)) {
+                                                       
+                                                       
+                                                       Method getMethod = 
this.getGetMethod(m.getName(), classMethods);
+                                                       
+                                                       
+                                                       
if(this.checkTestParameter(getMethod, propertySetDefinition)) {
+                                                               Object result = 
getMethod.invoke(propertySetDefinition, propertySetDefinition);
+                                                               //basic error 
checking, most of the output will be 'primitive' objects 
+                                                               
if(result.getClass().getPackage().getName().equals("java.lang")) {
+                                                                       
NameValuePair nvp = new NameValuePair(variableName, String.valueOf(result));
+                                                                       
//propertyList.getProperties().add(nvp);
+                                                                       
listOfProperties.add(nvp);
+                                                               } else if( 
result instanceof A_string) {
+                                                                       
NameValuePair nvp = new NameValuePair(variableName, 
this.getStringListAsString((A_string) result));
+                                                                       
listOfProperties.add(nvp);
+                                                               }
+                                                       }
+                                               }
+                                       } catch (IllegalArgumentException e) {
+                                               e.printStackTrace();
+                                               throw new SdaiException();
+                                       } catch (IllegalAccessException e) {
+                                               e.printStackTrace();
+                                               throw new SdaiException();
+                                       } catch (InvocationTargetException e) {
+                                               e.printStackTrace();
+                                               throw new SdaiException();
+                                       }
+                               }
+                       }
+                       
+               }
+               return listOfProperties;
+       }
+       
+
+       Method getGetMethod(String testMethod, Method[] methodArray) {
+               String signature = "get"+testMethod.replaceFirst("test", "");
+               for(Method m : methodArray) {
+                       if(m.getName().equals(signature)) {
+                               return m;
+                       }
+               }
+               return null;
+       }
+       /*
+       * input parameter is usually the same type as the class itself that 
contains the method
+       */
+       boolean checkTestParameter(Method m, Object parentClass) {
+               Class<?>[] parameterTypes = m.getParameterTypes();
+               if(parameterTypes.length == 1) {
+                       //System.out.println("length is 
1,"+parentClass.getClass().getName()+", "+parameterTypes[0].getName());
+                       
+                       
if(parameterTypes[0].isAssignableFrom(parentClass.getClass())) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+       
+       
+       protected String getStringListAsString(A_string stringAggregation) 
throws SdaiException {
+               StringBuilder resultingString = new StringBuilder();
+               if(stringAggregation.getMemberCount() > 0) {
+                       integerIterator = stringAggregation.createIterator();
+                       while(integerIterator.next()) {
+                               
resultingString.append(stringAggregation.getCurrentMember(integerIterator)+";");
+                       }
+                       
resultingString.deleteCharAt(resultingString.length()-1);
+               }
+               return resultingString.toString();
+       }
+
+       protected String getIntListAsString(A_integer integerAggregation) 
throws SdaiException {
+               StringBuilder resultingString = new StringBuilder();
+               if(integerAggregation.getMemberCount() > 0) {
+                       integerIterator = integerAggregation.createIterator();
+                       while(integerIterator.next()) {
+                               
resultingString.append(integerAggregation.getCurrentMember(integerIterator)+";");
+                       }
+                       
resultingString.deleteCharAt(resultingString.length()-1);
+               }
+               return resultingString.toString();
+       }
+       public Attributes getAttributes() {
+               return attributes;
+       }
+       public void setAttributes(Attributes attributes2) {
+               this.attributes = attributes2;
+       }
+       @XmlAttribute
+       public String getIfcObjectType() {
+               return ifcObjectType;
+       }
+       public void setIfcObjectType(String ifcObjectType) {
+               this.ifcObjectType = ifcObjectType;
+       }
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectImpl.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectImpl.java
                          (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/CommonObjectImpl.java
  2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,281 @@
+package no.bimconverter.ifc.v2x3.object;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+
+import no.bimconverter.ifc.jaxb.BaseQuantities;
+import no.bimconverter.ifc.jaxb.BoundaryItem;
+import no.bimconverter.ifc.jaxb.ClassificationItem;
+import no.bimconverter.ifc.jaxb.PropertyList;
+import no.bimconverter.ifc.jaxb.owner.OwnerHistory;
+
+
+import jsdai.SIfc2x3.AIfcrelassociates;
+import jsdai.SIfc2x3.EIfcclassification;
+import jsdai.SIfc2x3.EIfcclassificationreference;
+import jsdai.SIfc2x3.EIfcobject;
+import jsdai.SIfc2x3.EIfcobjectdefinition;
+import jsdai.SIfc2x3.EIfcownerhistory;
+import jsdai.SIfc2x3.EIfcproduct;
+import jsdai.SIfc2x3.EIfcproject;
+import jsdai.SIfc2x3.EIfcrelassociates;
+import jsdai.SIfc2x3.EIfcrelassociatesclassification;
+import jsdai.SIfc2x3.EIfcrelspaceboundary;
+import jsdai.SIfc2x3.EIfcroot;
+import jsdai.lang.A_integer;
+import jsdai.lang.A_string;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+
+public class CommonObjectImpl extends CommonObjectDefinition implements 
CommonObject{
+       
+       protected List<PropertyList> properties = null;
+       protected List<BoundaryItem> spaceBoundary = null;
+       private BaseQuantities baseQuantities = null;
+       private List<ClassificationItem> classificationList = null;
+       private OwnerHistory ownerHistory;
+        
+       public CommonObjectImpl() {
+               super();
+       }
+       @Override
+       public void load(EIfcobjectdefinition object){
+               try {
+                       this.loadOwnerHistory(object);
+                       super.loadAttributes(object);
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+       }
+       
+       public enum Classification {
+               ITEM_KEY("Item key"),
+               ITEM_NAME("Item name"),
+               SYSTEM_NAME("System name"),
+               SYSTEM_ID("System id"),
+               SYSTEM_EDITION("System edition");
+               private final String key;
+               Classification(String key) {
+               this.key = key;
+           }
+               public String getKey() {
+                       return key;
+               }
+       }
+       public enum Property {
+               COMMON_PROPERTY("Common property");
+               private final String key;
+               Property(String key) {
+               this.key = key;
+           }
+               public String getKey() {
+                       return key;
+               }
+       }
+       
+       
+       
+       
+       
+
+       protected void loadClassification(EIfcobjectdefinition site) throws 
SdaiException {
+               
+               AIfcrelassociates associationsAggregation = 
site.getHasassociations(null, null);
+               SdaiIterator associationsIterator = 
associationsAggregation.createIterator();
+               while(associationsIterator.next()) {
+                       EIfcrelassociates association = 
associationsAggregation.getCurrentMember(associationsIterator);
+                       
if(association.isKindOf(EIfcrelassociatesclassification.class)) {
+                               EIfcrelassociatesclassification 
relAssociationsClassification = (EIfcrelassociatesclassification) association;
+                               
+                               EEntity relatingClassification = 
relAssociationsClassification.getRelatingclassification(null);
+                               //System.out.println(relatingClassification);
+                               
if(relatingClassification.isKindOf(EIfcclassificationreference.class)){
+                                       initializeClassification();
+                                       ClassificationItem classificationItem = 
new ClassificationItem();
+                                       EIfcclassificationreference 
classificationReference = (EIfcclassificationreference) relatingClassification;
+                                       
if(classificationReference.testItemreference(null))
+                                               classificationItem.itemKey = 
classificationReference.getItemreference(null);
+                                               
//classification.put(ITEM_KEY.key, 
classificationReference.getItemreference(null));
+                                       
if(classificationReference.testName(null))
+                                               classificationItem.itemName = 
classificationReference.getName(null);
+                                               
//classification.put(ITEM_NAME.key, classificationReference.getName(null));
+                                       EIfcclassification 
referencedClassification = classificationReference.getReferencedsource(null);
+                                       
if(referencedClassification.testName(null))
+                                               classificationItem.systemName = 
referencedClassification.getName(null);
+                                               
//classification.put(SYSTEM_NAME.key, referencedClassification.getName(null));
+                                       /*
+                                       
if(referencedClassification.testSource(null)) {
+                                               
classification.put(SYSTEM_ID.key, referencedClassification.getSource(null));
+                                       }
+                                       */
+                                       
if(referencedClassification.testEdition(null))
+                                               
classificationItem.systemEdition = referencedClassification.getEdition(null);
+                                               
//classification.put(SYSTEM_EDITION.key, 
referencedClassification.getEdition(null));
+                                       
this.classificationList.add(classificationItem);
+                                       classificationItem = null;
+                               }
+                       }
+               }
+               //return classification;
+       }
+
+       private void initializeClassification() {
+               if(this.classificationList == null) {
+                       this.classificationList =new 
ArrayList<ClassificationItem>();
+               }
+               
+       }
+
+       
+       
+       @XmlElementWrapper(name="properties")
+       @XmlElement(name="propertySet") 
+       public List<PropertyList> getProperties() {
+               return properties;
+       }
+
+       public void setProperties(List<PropertyList> properties) {
+               this.properties = properties;
+       }
+
+       protected void loadProperties(EIfcobject object) throws SdaiException {
+               this.relateObjectPropertiesAndQuantities(object);
+               populatePropertiesWithPropertyListObjects();
+       }
+       
+       protected void loadOwnerHistory(EIfcroot theEntity) throws 
SdaiException {
+               if(theEntity.testOwnerhistory(null)) {
+                       EIfcownerhistory ownerHistory = 
theEntity.getOwnerhistory(null);
+                       this.ownerHistory = new 
OwnerHistory().loadOwnerHistory(ownerHistory);
+               }
+       }
+
+       protected void populatePropertiesWithPropertyListObjects() {
+               if(propertiesList != null) {
+                       for( String key : propertiesList.keySet()) {
+                               initializeProperties();
+                               PropertyList plist = new PropertyList();
+                               plist.setName(key);
+                               Map<String, String> props = 
propertiesList.get(key);
+                               for(String subKey : props.keySet()) {
+                                       //plist.getProperties().add(new 
NameValuePair(subKey, props.get(subKey)));
+                                       plist.addElement(subKey, 
props.get(subKey));
+                               }
+                               this.properties.add(plist);
+                       }
+               }
+       }
+
+       protected void initializeProperties() {
+               if(this.properties == null) {
+                       this.properties = new ArrayList<PropertyList>();
+               }
+               
+       }
+       protected void setCommonProperty(String commonPropertyName) {
+               if(this.properties != null) {
+                       for( PropertyList key : properties) {
+                               
+                               if(key.getName().equals(commonPropertyName)) {
+                                       
key.setName(CommonObjectImpl.Property.COMMON_PROPERTY.getKey());
+                               }
+                       }
+               }
+       }
+       
+
+       protected void loadBaseQuantities(EIfcobject entity) throws 
SdaiException {
+               if(this.quantitiesList == null) {
+                       this.relateObjectPropertiesAndQuantities(entity);
+               }
+               if(this.quantitiesList !=null &&this.quantitiesList.size() > 0) 
{
+                       if(this.quantitiesList.containsKey("BaseQuantities")) {
+                               this.baseQuantities = new 
BaseQuantities();//new ArrayList<NameValuePair>();
+                               Map<String, String> baseQuantitiesMap  = 
this.quantitiesList.get("BaseQuantities");
+                               for(String key: baseQuantitiesMap.keySet()) {
+                                       //this.baseQuantities.add(new 
NameValuePair(key, baseQuantitiesMap.get(key)));
+                                       this.baseQuantities.addElement(key, 
baseQuantitiesMap.get(key));
+                               }
+                       } 
+               }
+       }
+
+       public void setBaseQuantities(BaseQuantities baseQuantities) {
+               this.baseQuantities = baseQuantities;
+       }
+       
+       
+       public BaseQuantities getBaseQuantities() {
+               return baseQuantities;
+       }
+       
+       @XmlElementWrapper(name="classification")
+       @XmlElement(name="item") 
+       public List<ClassificationItem> getClassificationList() {
+               return classificationList;
+       }
+
+       public void setClassificationList(List<ClassificationItem> 
classificationList) {
+               this.classificationList = classificationList;
+       }
+
+       protected BoundaryItem populateSpaceBoundaryItem(EIfcrelspaceboundary 
relationSpaceBoundary, EIfcproduct childElement)
+                       throws SdaiException {
+                                       //EIfcelement relatedElement = 
relationSpaceBoundary.getRelatedbuildingelement(null);
+                                       BoundaryItem bItem = new BoundaryItem();
+                                       bItem.guid = 
childElement.getGlobalid(null);
+                                       bItem.internalOrExternalBoundary = 
this.processInternalExternal(relationSpaceBoundary.getInternalorexternalboundary(null));
+                                       bItem.physicalOrVirtualBoundary = 
this.processPhysicalOrVirtual(relationSpaceBoundary.getPhysicalorvirtualboundary(null));
+                                       bItem.type = 
childElement.getInstanceType().getName(null);
+                                       return bItem;
+                       }
+
+       String processInternalExternal(int value) {
+               if(value == 1) {
+                       return "Internal";
+               } else if (value == 2) {
+                       return "External";
+               } else {
+                       return "Undefined";
+               }
+       }
+
+       String processPhysicalOrVirtual(int value) {
+               if(value == 1) {
+                       return "Physical";
+               } else if (value == 2) {
+                       return "Virtual";
+               } else {
+                       return "Undefined";
+               }
+       }
+
+       protected void initializeSpaceBoundary() {
+               if ( this.spaceBoundary == null) {
+                       this.spaceBoundary = new ArrayList<BoundaryItem>();
+               }
+               
+       }
+       @XmlElementWrapper(name="spaceBoundary")
+       @XmlElement(name="boundary") 
+       public List<BoundaryItem> getSpaceBoundary() {
+               return spaceBoundary;
+       }
+
+       public void setSpaceBoundary(List<BoundaryItem> spaceBoundary) {
+               this.spaceBoundary = spaceBoundary;
+       }
+       
+       public OwnerHistory getOwnerHistory() {
+               return ownerHistory;
+       }
+       public void setOwnerHistory(OwnerHistory ownerHistory) {
+               this.ownerHistory = ownerHistory;
+       }
+       
+}

Added: 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Project.java
===================================================================
--- 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Project.java
                           (rev 0)
+++ 
thirdparty/BIM_converter/trunk/src/main/java/no/bimconverter/ifc/v2x3/object/Project.java
   2011-01-31 20:43:42 UTC (rev 6890)
@@ -0,0 +1,341 @@
+package no.bimconverter.ifc.v2x3.object;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.Element;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlElementRefs;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlMixed;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.namespace.QName;
+
+import no.bimconverter.ifc.IfcSdaiException;
+import no.bimconverter.ifc.jaxb.Decomposition;
+import no.bimconverter.ifc.jaxb.Units;
+
+
+import jsdai.SIfc2x3.AIfcunit;
+import jsdai.SIfc2x3.EIfcbuilding;
+import jsdai.SIfc2x3.EIfccurrencyenum;
+import jsdai.SIfc2x3.EIfcderivedunit;
+import jsdai.SIfc2x3.EIfcderivedunitenum;
+import jsdai.SIfc2x3.EIfcmonetaryunit;
+import jsdai.SIfc2x3.EIfcnamedunit;
+import jsdai.SIfc2x3.EIfcobjectdefinition;
+import jsdai.SIfc2x3.EIfcproject;
+import jsdai.SIfc2x3.EIfcrelaggregates;
+import jsdai.SIfc2x3.EIfcsite;
+import jsdai.SIfc2x3.EIfcsiunitname;
+import jsdai.SIfc2x3.EIfcunitassignment;
+import jsdai.SIfc2x3.EIfcunitenum;
+import jsdai.lang.AEntity;
+import jsdai.lang.EEntity;
+import jsdai.lang.SdaiException;
+import jsdai.lang.SdaiIterator;
+import jsdai.lang.SdaiModel;
+import jsdai.util.LangUtils;
+/*
+ * there has to be exactly one project object in the exchange file
+ */
address@hidden
+public class Project extends CommonObjectImpl{
+       
+       
+       /*final public static String ATTRIBUTE_KEY_PHASE = "Phase";
+       final public static String ATTRIBUTE_KEY_LONGNAME = "Long name";*/
+       
+       
+       
+       
+       //private Map<String, String> units = new HashMap<String, String>();
+       private Units units = new Units();
+       private Decomposition decomposition = new Decomposition();
+       private EIfcnamedunit unit;
+       
+       
+       
+       public Project() {
+       }
+       
+       
+       /*
+       public void loadModel(SdaiModel model) {
+               List<EEntity> projectList = super.loadModel(model, 
EIfcproject.class);
+               int projectListSize = projectList.size();
+               if(projectListSize == 0) {
+                       throw new IfcSdaiException("No projects found!");
+               } else if (projectListSize > 1) {
+                       throw new IfcSdaiException("Too many projects found!");
+               } else {
+                       EIfcproject theProject = (EIfcproject) 
projectList.get(0);
+                       try {
+                               this.loadAttributes(theProject);
+                               this.loadUnits(theProject);
+                               this.loadDecomposition(theProject);
+                               //this.loadOwnerHistory(theProject);
+                       } catch (SdaiException e) {
+                               throw new IfcSdaiException("Sdai error!", e);
+                       }
+               }
+       }
+       */
+       
+       @Override
+       public void load(EIfcobjectdefinition object) {
+               super.load(object);
+               EIfcproject entity = (EIfcproject)object;
+               try {
+                       this.loadAttributes(entity);
+                       this.loadUnits(entity);
+                       this.loadDecomposition(entity);
+               } catch (SdaiException e) {
+                       e.printStackTrace();
+               }
+       }
+       
+       /*
+        * One site allowed, but optional
+        * Building must be given if no site
+        * Project can not have link to site and building
+        */
+       private void loadDecomposition(EIfcproject theProject) throws 
SdaiException {
+               List<EIfcobjectdefinition> projectIsDecomposedBy = 
this.getIsDecomposedBy(theProject);
+               if(projectIsDecomposedBy.size() > 0 ) {
+                       List<EIfcobjectdefinition> buildings = new 
ArrayList<EIfcobjectdefinition>();
+                       boolean hasSite = false;
+                       for(EIfcobjectdefinition objectDefinition : 
projectIsDecomposedBy) {
+                               if(objectDefinition.isKindOf(EIfcsite.class)) {
+                                       hasSite = true;
+                                       
+                                       
this.decomposition.setSite(objectDefinition.getGlobalid(null));
+                                       
+                                       
//this.decomposition.put(DECOMPOSITION_KEY_SITE,new String[] {guid});
+                                       List<EIfcobjectdefinition> 
siteIsDecomposedBy = getIsDecomposedBy(objectDefinition);
+                                       if(siteIsDecomposedBy.size() == 0) {
+                                               throw new 
IfcSdaiException("There must be at least one building!");
+                                       } else {
+                                               
addBuildings(siteIsDecomposedBy);
+                                       }
+                               } else if 
(objectDefinition.isKindOf(EIfcbuilding.class) && hasSite) {
+                                       throw new IfcSdaiException("Project can 
not have site and building!");

@@ Diff output truncated at 153600 characters. @@



reply via email to

[Prev in Thread] Current Thread [Next in Thread]