Once you set primary type, you can just init properties based on mapping table.
Take a look at this code
https://github.com/okulikov/modeshape/blob/master/modeshape-jcr/src/main/java/org/modeshape/connector/filesystem/FileSystemConnector.java#L429