@Override protected void setIconProperty( Concept concept, File inDir, String glyphIconFileName, String propertyKey, User user, Authorizations authorizations ) throws IOException { if (glyphIconFileName == null) { concept.setProperty(propertyKey, null, user, authorizations); } else { File iconFile = new File(inDir, glyphIconFileName); if (!iconFile.exists()) { throw new RuntimeException("Could not find icon file: " + iconFile.toString()); } try { try (InputStream iconFileIn = new FileInputStream(iconFile)) { concept.setProperty(propertyKey, IOUtils.toByteArray(iconFileIn), user, authorizations); } } catch (IOException ex) { throw new VisalloException("Failed to set glyph icon to " + iconFile, ex); } } }
@Override protected void addEntityGlyphIconToEntityConcept(Concept entityConcept, byte[] rawImg, Authorizations authorizations) { entityConcept.setProperty(OntologyProperties.GLYPH_ICON.getPropertyName(), rawImg, getSystemUser(), authorizations); }
protected void setIconProperty( Concept concept, File inDir, String glyphIconFileName, String propertyKey, User user, 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()); } try (InputStream iconFileIn = new FileInputStream(iconFile)) { StreamingPropertyValue value = new StreamingPropertyValue(iconFileIn, byte[].class); value.searchIndex(false); value.store(true); concept.setProperty(propertyKey, value, user, authorizations); } } }
@Override protected void addEntityGlyphIconToEntityConcept(Concept entityConcept, byte[] rawImg, Authorizations authorizations) { StreamingPropertyValue raw = new StreamingPropertyValue(new ByteArrayInputStream(rawImg), byte[].class); raw.searchIndex(false); entityConcept.setProperty(OntologyProperties.GLYPH_ICON.getPropertyName(), raw, getSystemUser(), authorizations); graph.flush(); }
result.setProperty(OntologyProperties.SEARCHABLE.getPropertyName(), searchable, user, authorizations); continue; result.setProperty(OntologyProperties.SORTABLE.getPropertyName(), sortable, user, authorizations); continue; result.setProperty(OntologyProperties.SORT_PRIORITY.getPropertyName(), sortPriority, user, authorizations); continue; result.setProperty(OntologyProperties.ADDABLE.getPropertyName(), searchable, user, authorizations); continue; result.setProperty(OntologyProperties.USER_VISIBLE.getPropertyName(), userVisible, user, authorizations); continue; result.setProperty( OntologyProperties.ADD_RELATED_CONCEPT_WHITE_LIST.getPropertyName(), valueString.trim(), result.setProperty(OntologyProperties.DISPLAY_NAME.getPropertyName(), valueString, user, authorizations); continue; result.setProperty(OntologyProperties.UPDATEABLE.getPropertyName(), updateable, user, authorizations); continue; result.setProperty(OntologyProperties.DELETEABLE.getPropertyName(), deleteable, user, authorizations); continue; result.setProperty(annotationIri, valueString, user, authorizations);