protected static String fileFromDocumentInformation(IfcDocumentInformation documentInformation) { String fileName = ""; try { if ((documentInformation != null) && (documentInformation.getDocumentReferences() != null) && (documentInformation.getDocumentReferences().size() > 0)) { IfcDocumentReference firstReference = documentInformation.getDocumentReferences().get(0); String itemReference = ""; String name = ""; if (firstReference.isSetItemReference()) { itemReference = firstReference.getItemReference(); } if (firstReference.isSetName()) { name = firstReference.getName(); } if (!COBieUtility.isNA(name) && !documentInformation.getName().equals(name)) { fileName = name; } else if (!COBieUtility.isNA(itemReference)) { fileName = itemReference; } fileName = documentInformation.getDocumentReferences().get(0).getItemReference(); } if (COBieUtility.isNA(fileName)) { fileName = IfcToDocument.File; } } catch (Exception ex) { } return fileName; }
protected static String referenceFromDocumentInformation( IfcDocumentInformation documentInformation) { String referenceString = ""; if (!COBieUtility.isNA(documentInformation.getDescription())) { referenceString = documentInformation.getDescription(); } else { referenceString = documentInformation.getName(); } return COBieUtility.getCOBieString(referenceString); }
protected static String nameFromDocumentInformation(IfcDocumentInformation documentInformation) { String name = documentInformation.getName(); return COBieUtility.getCOBieString(name); }