예제 #1
0
  protected static String sheetNameFromRoot(IfcRoot root) {
    String worksheetName = "";

    if (root instanceof IfcBuilding) {
      worksheetName = IfcToAttribute.facilitySheetName;
    } else if (root instanceof IfcBuildingStorey) {
      worksheetName = IfcToAttribute.floorSheetName;
    } else if (root instanceof IfcSpace) {
      worksheetName = IfcToAttribute.spaceSheetName;
    } else if (root instanceof IfcZone) {
      worksheetName = COBieUtility.CobieSheetName.Zone.name();
    } else if (root instanceof IfcTypeObject) {
      worksheetName = COBieUtility.CobieSheetName.Type.name();
    } else if (root instanceof IfcProduct) {
      worksheetName = IfcToAttribute.componentSheetName;
    } else if (root instanceof IfcTask) {
      worksheetName = COBieUtility.CobieSheetName.Job.name();
    } else if (root instanceof IfcSystem) {
      worksheetName = COBieUtility.CobieSheetName.System.name();
    } else if ((root instanceof IfcRelNests) || (root instanceof IfcRelAssociates)) {
      worksheetName = COBieUtility.CobieSheetName.Assembly.name();
    } else if (root instanceof IfcConstructionProductResource) {
      worksheetName = COBieUtility.CobieSheetName.Spare.name();
    } else if (root instanceof IfcConstructionEquipmentResource) {
      worksheetName = COBieUtility.CobieSheetName.Resource.name();
    }
    return worksheetName;
  }
예제 #2
0
 @SuppressWarnings("deprecation")
 private static ArrayList<String> getExistingTypes(COBIEType.Documents documents) {
   ArrayList<String> existingTypes = new ArrayList<String>();
   for (DocumentType document : documents.getDocumentArray()) {
     if (document.getSheetName().equalsIgnoreCase(COBieUtility.CobieSheetName.Type.name())
         && !COBieUtility.isNA(document.getName())) {
       existingTypes.add(document.getName());
     }
   }
   return existingTypes;
 }