// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/app/servlet/ResourceService.java
// @Path("/resources")
// public class ResourceService
// {
//     private static final Logger LOGGER = LoggerFactory.getLogger(ResourceService.class);
// 
//     @GET
//     @Path("/{filename: [-a-zA-Z_0-9\\.\\/]*}")
//     public Response getResource(@Context ServletContext context, @Context Application application,
//                     @PathParam("filename") String filename)
//     {
//         try
//         {
//             String relative = "WEB-INF/resources/" + filename;
//             String realPath = context.getRealPath("/" + relative);
//             if (realPath == null)
//             {
//                 // web application without context
//                 realPath = relative;
//             }
//             LOGGER.warn("Resource '{}' translated to '{}'.", filename, realPath);
//             java.nio.file.Path path = Paths.get(realPath);
//             if (!path.toFile().exists())
//             {
//                 LOGGER.warn("Resource '{}' not found. Resource translated to '{}'.", filename, path);
//                 return Response.status(404).entity("404 - resource not found: " + filename).build();
//             }
//             return Response.status(200).type(Files.probeContentType(path)).entity(Files.readAllBytes(path)).build();
//         }
//         catch(IOException | NullPointerException e)
//         {
//             String errorID = getUUID(application);
//             LOGGER.error("Error-Identifier: '" + errorID + "' - Load resource '"+filename+"' failed.", e);
//             return Response.status(404).entity("Load resource failed: " + errorID).build();
//         }
//     }
// 
//     private static Injector getInjector(Application application)
//     {
//         return (Injector)application.getProperties().get(ServletConstants.PROPERTY_INJECTOR);
//     }
// 
//     private static String getUUID(Application application)
//     {
//         return getInjector(application).getInstance(UUIDGenerator.class).generate();
//     }
// }


import javax.ws.rs.core.UriInfo;
import de.hatoka.common.capi.app.servlet.ResourceService;
        return localizer.formatMoney(amountString, currencyCode);
    }

    public static String formatDate(Localizer localizer, String dateString)
    {
        return localizer.formatDate(dateString);
    }

    public static String formatDateTime(Localizer localizer, String dateString)
    {
        return localizer.formatDateTime(dateString);
    }

    public static String formatTime(Localizer localizer, String dateString)
    {
        return localizer.formatTime(dateString);
    }

    public static String formatDuration(Localizer localizer, String duration)
    {
        return localizer.formatDuration(duration);
    }

    public static String getResourceURI(String info, String resourceName)
    {
        return "../resources/" + resourceName;
    }

    public static String getResourceURI(UriInfo info, String resourceName)
    {
// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/app/servlet/ResourceService.java
// @Path("/resources")
// public class ResourceService
// {
//     private static final Logger LOGGER = LoggerFactory.getLogger(ResourceService.class);
// 
//     @GET
//     @Path("/{filename: [-a-zA-Z_0-9\\.\\/]*}")
//     public Response getResource(@Context ServletContext context, @Context Application application,
//                     @PathParam("filename") String filename)
//     {
//         try
//         {
//             String relative = "WEB-INF/resources/" + filename;
//             String realPath = context.getRealPath("/" + relative);
//             if (realPath == null)
//             {
//                 // web application without context
//                 realPath = relative;
//             }
//             LOGGER.warn("Resource '{}' translated to '{}'.", filename, realPath);
//             java.nio.file.Path path = Paths.get(realPath);
//             if (!path.toFile().exists())
//             {
//                 LOGGER.warn("Resource '{}' not found. Resource translated to '{}'.", filename, path);
//                 return Response.status(404).entity("404 - resource not found: " + filename).build();
//             }
//             return Response.status(200).type(Files.probeContentType(path)).entity(Files.readAllBytes(path)).build();
//         }
//         catch(IOException | NullPointerException e)
//         {
//             String errorID = getUUID(application);
//             LOGGER.error("Error-Identifier: '" + errorID + "' - Load resource '"+filename+"' failed.", e);
//             return Response.status(404).entity("Load resource failed: " + errorID).build();
//         }
//     }
// 
//     private static Injector getInjector(Application application)
//     {
//         return (Injector)application.getProperties().get(ServletConstants.PROPERTY_INJECTOR);
//     }
// 
//     private static String getUUID(Application application)
//     {
//         return getInjector(application).getInstance(UUIDGenerator.class).generate();
//     }
// }


// Path: de.hatoka.common/src/main/java/de/hatoka/common/capi/app/xslt/Lib.java
import javax.ws.rs.core.UriInfo;
import de.hatoka.common.capi.app.servlet.ResourceService;

        return localizer.formatMoney(amountString, currencyCode);
    }

    public static String formatDate(Localizer localizer, String dateString)
    {
        return localizer.formatDate(dateString);
    }

    public static String formatDateTime(Localizer localizer, String dateString)
    {
        return localizer.formatDateTime(dateString);
    }

    public static String formatTime(Localizer localizer, String dateString)
    {
        return localizer.formatTime(dateString);
    }

    public static String formatDuration(Localizer localizer, String duration)
    {
        return localizer.formatDuration(duration);
    }

    public static String getResourceURI(String info, String resourceName)
    {
        return "../resources/" + resourceName;
    }

    public static String getResourceURI(UriInfo info, String resourceName)
    {
        return info.getBaseUriBuilder().path(ResourceService.class, "getResource").buildFromEncoded("resources/" + resourceName).toString();