class SimpleApplicationWrapper implements ApplicationWrapper {

    @Activate
    protected void start(Map<String, Object> props) {
        ApplicationConfig config = Configurable.createConfigurable(ApplicationConfig.class, props);
        LOG.trace("Starting \"" + config.id() + "\" application...");

        validateConfig(props);
        this.applicationId = config.id();

        Application application = appFactory.createNew(factory.createIRI(NAMESPACE + applicationId));
        application.setProperty(factory.createLiteral(config.title()), factory.createIRI(DCTERMS.TITLE.stringValue()));
        if (config.description() != null && !config.description().equals("")) {
            application.setProperty(factory.createLiteral(config.description()),
                    factory.createIRI(DCTERMS.DESCRIPTION.stringValue()));
        }

        try (RepositoryConnection conn = repository.getConnection()) {
            if (conn.contains(application.getResource(), null, null)) {
                LOG.warn("Replacing existing application \"" + applicationId + "\".");
                conn.remove(application.getResource(), null, null);
            }
            conn.add(application.getModel());
        }
        LOG.debug("Application \"" + applicationId + "\" started.");
    }

}