private void setIconProperty(
     Concept concept,
     File inDir,
     String glyphIconFileName,
     String propertyKey,
     Authorizations authorizations)
     throws IOException {
   if (glyphIconFileName != null) {
     File iconFile = new File(inDir, glyphIconFileName);
     if (!iconFile.exists()) {
       throw new RuntimeException("Could not find icon file: " + iconFile.toString());
     }
     InputStream iconFileIn = new FileInputStream(iconFile);
     try {
       StreamingPropertyValue value = new StreamingPropertyValue(iconFileIn, byte[].class);
       value.searchIndex(false);
       value.store(true);
       concept.setProperty(
           propertyKey, value, OntologyRepository.VISIBILITY.getVisibility(), authorizations);
     } finally {
       iconFileIn.close();
     }
   }
 }
  protected Concept importOntologyClass(
      OWLOntology o, OWLClass ontologyClass, File inDir, Authorizations authorizations)
      throws IOException {
    String uri = ontologyClass.getIRI().toString();
    if ("http://www.w3.org/2002/07/owl#Thing".equals(uri)) {
      return getEntityConcept();
    }

    String label = getLabel(o, ontologyClass);
    checkNotNull(label, "label cannot be null or empty: " + uri);
    LOGGER.info("Importing ontology class " + uri + " (label: " + label + ")");

    Concept parent = getParentConcept(o, ontologyClass, inDir, authorizations);
    Concept result = getOrCreateConcept(parent, uri, label);

    String color = getColor(o, ontologyClass);
    if (color != null) {
      result.setProperty(
          OntologyLumifyProperties.COLOR.getPropertyName(),
          color,
          OntologyRepository.VISIBILITY.getVisibility(),
          authorizations);
    }

    String displayType = getDisplayType(o, ontologyClass);
    if (displayType != null) {
      result.setProperty(
          OntologyLumifyProperties.DISPLAY_TYPE.getPropertyName(),
          displayType,
          OntologyRepository.VISIBILITY.getVisibility(),
          authorizations);
    }

    String titleFormula = getTitleFormula(o, ontologyClass);
    if (titleFormula != null) {
      result.setProperty(
          OntologyLumifyProperties.TITLE_FORMULA.getPropertyName(),
          titleFormula,
          OntologyRepository.VISIBILITY.getVisibility(),
          authorizations);
    }

    String subtitleFormula = getSubtitleFormula(o, ontologyClass);
    if (subtitleFormula != null) {
      result.setProperty(
          OntologyLumifyProperties.SUBTITLE_FORMULA.getPropertyName(),
          subtitleFormula,
          OntologyRepository.VISIBILITY.getVisibility(),
          authorizations);
    }

    String timeFormula = getTimeFormula(o, ontologyClass);
    if (timeFormula != null) {
      result.setProperty(
          OntologyLumifyProperties.TIME_FORMULA.getPropertyName(),
          timeFormula,
          OntologyRepository.VISIBILITY.getVisibility(),
          authorizations);
    }

    boolean userVisible = getUserVisible(o, ontologyClass);
    result.setProperty(
        OntologyLumifyProperties.USER_VISIBLE.getPropertyName(),
        userVisible,
        OntologyRepository.VISIBILITY.getVisibility(),
        authorizations);

    String glyphIconFileName = getGlyphIconFileName(o, ontologyClass);
    setIconProperty(
        result,
        inDir,
        glyphIconFileName,
        LumifyProperties.GLYPH_ICON.getPropertyName(),
        authorizations);

    String mapGlyphIconFileName = getMapGlyphIconFileName(o, ontologyClass);
    setIconProperty(
        result,
        inDir,
        mapGlyphIconFileName,
        LumifyProperties.MAP_GLYPH_ICON.getPropertyName(),
        authorizations);

    return result;
  }