|
From: Nicholas N. <nn...@ae...> - 2010-07-06 13:47:43
|
Would it be timely to mention that the XML produced is not compliant with the XSD issued by buildingSMART ? There are three issues: (a) header The <ifc:uos> ... </ifc:uos> should be < uos> ... </ uos> (b) set and list ex:cType="list" and ex:cType="set" are used incorrectly (perhaps even always the wrong one). I removed them all. (c) IFC defined types. Many, many fields that are simple types are reported as complex types. An example is: <IfcShapeRepresentation id="i56441"> <ContextOfItems> <IfcGeometricRepresentationContext xsi:nil="true" ref="i54795"/> </ContextOfItems> <RepresentationIdentifier> <IfcLabel>Axis</IfcLabel> </RepresentationIdentifier> <RepresentationType> <IfcLabel>Curve2D</IfcLabel> </RepresentationType> <Items > <IfcPolyline pos="0" xsi:nil="true" ref="i56442"/> </Items> </IfcShapeRepresentation> Which should be <IfcShapeRepresentation id="i56441"> <ContextOfItems> <IfcGeometricRepresentationContext xsi:nil="true" ref="i54795"/> </ContextOfItems> <RepresentationIdentifier>Axis</RepresentationIdentifier> <RepresentationType>Curve2D</RepresentationType> <Items > <IfcPolyline pos="0" xsi:nil="true" ref="i56442"/> </Items> </IfcShapeRepresentation> The IFC defined types should only appear on lists and where select types are used. Whilst I probably dont have the expertise to fix these, I am happy to validate any new samples. Regards, Nick. Nicholas Nisbet MA(Cantab) DipArch(UNL) Director: AEC3 UK Ltd Web: http://www.aec3.com E-mail: nn...@ae... Direct: +44 (0) 1494 714 933 Mobile: +44 (0) 781 616 8554 Skype: nicholasnisbet Registered in the UK: 03484881 Registered Address: 46 St Margaret's Grove, Great Kingshill, High Wycombe, Bucks, HP15 6HP, UK Technical Coordinator: buildingSMART UK Chapter ifcXML Coordinator: buildingSMART Model Support Group Web: http://www.buildingsmart.org.uk/ E-mail: nn...@bu... -----Original Message----- From: Ruben de Laat [mailto:ru...@lo...] Sent: 06 July 2010 12:07 To: bimserver-devel Subject: Re: [Bimserver-devel] Use of IfcXmlWriter Hello Anders, The "No source code is available for type java.io.File" is strange because it's a standard java class. Are you able to run a simple hello world program in your project? Could you check if you have a JRE/JDK library referenced in your dependencies as well, and also what Java Compiler is used for the project (see Project properties)? Kind regards, Ruben de Laat 2010/7/6 Anders Hjod <and...@ca...>: > Hi, > > I am trying to parse an ifc file to xml by using a method equal to the > start() method in Tests/src/org/tests/IfcXmlWriteTester.java > > private void start() { > ExpressSchemaParser schemaParser = new > ExpressSchemaParser(IfcFileReader.DEFAULT_SCHEMA_FILE); > schemaParser.parse(); > SchemaDefinition schema = schemaParser.getSchema(); > > FastIfcFileReader reader = new FastIfcFileReader(schema); > try { > reader.read(TestFile.HAUS_SOURCE_FILE.getFile()); > } catch (IncorrectIfcFileException e) { > e.printStackTrace(); > } catch (Exception e) { > e.printStackTrace(); > } > EmfModel<Long> model = reader.getModel(); > IfcXmlSerializer ifcXmlWriter = new IfcXmlSerializer("", > model, schema); > ifcXmlWriter.write(new File("test.xml")); > } > > I have added all the modules "Tests" depend on to my project > .classpath, and I get no compile errors, but when I try to run the > application, I get errors > like: > "No source code is available for type > nl.tue.buildingsmart.express.parser.ExpressSchemaParser; did you > forget to inherit a required module? > No source code is available for type java.io.File; did you forget to > inherit a required module?" > > Is there something else I have to set to be able to use the parser in > another project? > > Regards > Anders H > > ---------------------------------------------------------------------- > -------- This SF.net email is sponsored by Sprint What will you do > first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Bimserver-devel mailing list > Bim...@li... > https://lists.sourceforge.net/lists/listinfo/bimserver-devel > > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Bimserver-devel mailing list Bim...@li... https://lists.sourceforge.net/lists/listinfo/bimserver-devel |