コード例 #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;
  }
コード例 #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);
 }
コード例 #3
0
 protected static String directoryFromDocumentInformation(
     IfcDocumentInformation documentInformation) {
   String directoryName = "";
   if ((documentInformation != null)
       && (documentInformation.getDocumentReferences() != null)
       && (documentInformation.getDocumentReferences().size() > 0)) {
     directoryName = documentInformation.getDocumentReferences().get(0).getLocation();
   }
   if (COBieUtility.isNA(directoryName)) {
     directoryName = IfcToDocument.Directory;
   }
   return directoryName;
 }
コード例 #4
0
 protected static String stageFromDocumentInformation(IfcDocumentInformation documentInformation) {
   String stage = documentInformation.getScope();
   if (COBieUtility.isNA(stage)) {
     stage = IfcToDocument.Stage;
   }
   return COBieUtility.getCOBieString(stage);
 }
コード例 #5
0
 protected static String approvalByFromDocumentInformation(
     IfcDocumentInformation documentInformation) {
   String approvalBy = documentInformation.getIntendedUse();
   if (COBieUtility.isNA(approvalBy)) {
     approvalBy = IfcToDocument.ApprovalBy;
   }
   return COBieUtility.getCOBieString(approvalBy);
 }
コード例 #6
0
 protected static String descriptionFromDocumentInformation(
     IfcDocumentInformation documentInformation) {
   String documentation = documentInformation.getDescription();
   return COBieUtility.getCOBieString(documentation);
 }
コード例 #7
0
 protected static String categoryFromDocumentInformation(
     IfcDocumentInformation documentInformation) {
   String category = "";
   category = documentInformation.getPurpose();
   return COBieUtility.getCOBieString(category);
 }
コード例 #8
0
 protected static String nameFromDocumentInformation(IfcDocumentInformation documentInformation) {
   String name = documentInformation.getName();
   return COBieUtility.getCOBieString(name);
 }