// fire NODE_ADDED for the nt:file/jcr:content
connectorChangeSet.nodeCreated(contentId, docId, contentId, JcrNtLexicon.RESOURCE, Collections.<Name>emptySet(),
Collections.<Name, Property>emptyMap(), queryable);
try {
// fire PROPERTY_ADDED for nt:file/jcr:content/jcr:data
BinaryValue binaryValue = connector.binaryFor(file);
Property dataProperty = connector.propertyFactory().create(JcrLexicon.DATA, binaryValue);
connectorChangeSet.propertyAdded(contentId, JcrNtLexicon.RESOURCE, Collections.<Name>emptySet(), contentId,
dataProperty, queryable);
if (connector.addMimeTypeMixin) {
try {
// fire PROPERTY_ADDED for nt:file/jcr:content/jcr:mimetype
String mimeType = binaryValue.getMimeType();
Property mimeTypeProperty = connector.propertyFactory().create(JcrLexicon.MIMETYPE, mimeType);
connectorChangeSet.propertyAdded(contentId, JcrNtLexicon.RESOURCE, Collections.<Name>emptySet(),
contentId, mimeTypeProperty, queryable);
} catch (Throwable e) {