/** * Encodes a property name to use it in a url. * * @param propertyName like dc:title, file:content.3.filename (?) */ public static String encodePropertyName(String propertyName) { if (propertyName == null) { return null; } String[] items = propertyName.split(":"); return join(items, "/"); }
/** * Decodes a property path given in a url. * * @param propertyPath like dc:title file/content/3/filename (?) */ public static String decodePropertyName(String propertyPath) { if (propertyPath == null) { return null; } String[] items = propertyPath.split("/"); return join(items, "."); }