if (sFeatureTypeId != null) {
// Check the feature type id string is a correct id
Optional<ObjectId> id = cli.getGeogig().command(RevParse.class)
.setRefSpec(sFeatureTypeId).call();
checkParameter(id.isPresent(), "Invalid feature type reference", sFeatureTypeId);
TYPE type = cli.getGeogig().command(ResolveObjectType.class).setObjectId(id.get())
.call();
checkParameter(type.equals(TYPE.FEATURETYPE),
"Provided reference does not resolve to a feature type: ", sFeatureTypeId);
outputFeatureType = (SimpleFeatureType) cli.getGeogig()
.command(RevObjectParse.class).setObjectId(id.get())
.call(RevFeatureType.class).get().type();
featureTypeId = id.get();