if (!path.endsWith(".xml"))
throw new IllegalArgumentException("File uri " + instanceUri + " must end with .xml");
path = path.substring(0, path.length() - ".xml".length());
if (!path.endsWith(".xml"))
throw new IllegalArgumentException("File uri " + instanceUri + " must end with .xml");
path = path.substring(0, path.length() - ".xml".length());
if (target.isNodeType(NodeType.MIX_REFERENCEABLE)) {
file.setProperty(Property.JCR_ID, target);
if (file.hasProperty(Property.JCR_PATH))
if (target.isNodeType(NodeType.MIX_REFERENCEABLE)) {
file.setProperty(Property.JCR_ID, target);
if (file.hasProperty(Property.JCR_PATH))