}
@Override
protected void processRow(PtMediaAndValue row) throws Exception {
String propertyKey = getDataImporter().getIdPrefix() + row.getId();
InputStream in = new TryInflaterInputStream(row.getContents());
try {
StreamingPropertyValue propertyValue = new StreamingPropertyValue(in, byte[].class);
propertyValue.store(true);
propertyValue.searchIndex(false);
String title = row.getTitle();
if (title == null) {
title = "";
}
VertexBuilder vertexBuilder = getDataImporter().getGraph().prepareVertex(getMediaId(row), getDataImporter().getVisibility());
LumifyProperties.RAW.addPropertyValue(vertexBuilder, propertyKey, propertyValue, getDataImporter().getVisibility());
LumifyProperties.TITLE.setProperty(vertexBuilder, title, getDataImporter().getVisibility());
Vertex mediaVertex = vertexBuilder.save(getDataImporter().getAuthorizations());
Vertex sourceVertex = getVertexCache().get(getObjectVertexId(row.getLinkObjectId()));
checkNotNull(sourceVertex, "Could not find source vertex for media object: " + row.getLinkObjectId());
String edgeId = getEdgeId(row);
String edgeLabel = getEdgeLabel(row);
getDataImporter().getGraph().addEdge(edgeId, sourceVertex, mediaVertex, edgeLabel, getDataImporter().getVisibility(), getDataImporter().getAuthorizations());
} finally {
in.close();
}
}