Ejemplo n.º 1
0
  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;
  }
Ejemplo n.º 2
0
 protected static String referenceFromDocumentInformation(
     IfcDocumentInformation documentInformation) {
   String referenceString = "";
   if (!COBieUtility.isNA(documentInformation.getDescription())) {
     referenceString = documentInformation.getDescription();
   } else {
     referenceString = documentInformation.getName();
   }
   return COBieUtility.getCOBieString(referenceString);
 }
Ejemplo n.º 3
0
 protected static String nameFromDocumentInformation(IfcDocumentInformation documentInformation) {
   String name = documentInformation.getName();
   return COBieUtility.getCOBieString(name);
 }