private static void exportBAMieClassificationReferences( IfcModelInterface model, LogHandler loggerHandler, ArrayList<String> documentNames, COBIEType.Documents documents) { String name; String createdBy; Calendar createdOn; String category; String approvalBy; String stage; String sheetName; String rowName; String directory; String extSystem; String extObject; String extIdentifier; String description; String reference; IfcOwnerHistory oh; DocumentType tempDocument; for (IfcDistributionElement element : model.getAllWithSubTypes(IfcDistributionElement.class)) { try { for (IfcRelAssociates relAssociates : element.getHasAssociations()) { if (relAssociates instanceof IfcRelAssociatesClassification) { category = COBieIfcUtility.getObjectClassificationCategoryString(element); if (ClassificationHandler.isBAMieRelAssociatesClassification( (IfcRelAssociatesClassification) relAssociates)) { name = COBieUtility.getCOBieString(element.getName()); oh = element.getOwnerHistory(); createdBy = COBieIfcUtility.getEmailFromOwnerHistory(oh); createdOn = IfcToContact.getCreatedOn(oh.getCreationDate()); category = IfcToDocument.BAMIE_CATEGORY; approvalBy = IfcToDocument.ApprovalBy; stage = IfcToDocument.Stage; sheetName = COBieUtility.CobieSheetName.Component.name(); rowName = IfcToDocument.bamieRowNameFromDistributionElement(element); extSystem = COBieIfcUtility.getApplicationName(oh); extObject = IfcToComponent.extObjectFromProduct(element); extIdentifier = COBieIfcUtility.extIdFromRoot(element); description = COBieUtility.getCOBieString(element.getName()); reference = IfcToDocument.Reference; IfcClassificationReference classificationReference = COBieIfcUtility.getObjectClassificationReference(element); directory = COBieUtility.getCOBieString(classificationReference.getLocation()); tempDocument = documents.addNewDocument(); tempDocument.setName(name); tempDocument.setCreatedBy(createdBy); tempDocument.setCreatedOn(createdOn); tempDocument.setCategory(category); tempDocument.setApprovalBy(approvalBy); tempDocument.setStage(stage); tempDocument.setSheetName(sheetName); tempDocument.setRowName(rowName); tempDocument.setDirectory(directory); tempDocument.setFile(COBieUtility.COBieNA); tempDocument.setExtSystem(extSystem); tempDocument.setExtObject(extObject); tempDocument.setExtIdentifier(extIdentifier); tempDocument.setDescription(description); tempDocument.setReference(reference); loggerHandler.rowWritten(); } } } } catch (Exception ex) { } } }