Search in sources :

Example 1 with StringUtils.startsWith

use of org.apache.commons.lang3.StringUtils.startsWith in project alf.io by alfio-event.

the class MvcConfiguration method getDefaultTemplateObjectsFiller.

@Bean
public HandlerInterceptorAdapter getDefaultTemplateObjectsFiller() {
    return new HandlerInterceptorAdapter() {

        @Override
        public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
            Optional.ofNullable(modelAndView).filter(mv -> !StringUtils.startsWith(mv.getViewName(), "redirect:")).ifPresent(mv -> {
                mv.addObject("request", request);
                final ModelMap modelMap = mv.getModelMap();
                boolean demoModeEnabled = environment.acceptsProfiles(Initializer.PROFILE_DEMO);
                modelMap.put("demoModeEnabled", demoModeEnabled);
                Optional.ofNullable(request.getAttribute("ALFIO_EVENT_NAME")).map(Object::toString).ifPresent(eventName -> {
                    List<?> availableLanguages = i18nManager.getEventLanguages(eventName);
                    modelMap.put("showAvailableLanguagesInPageTop", availableLanguages.size() > 1);
                    modelMap.put("availableLanguages", availableLanguages);
                });
                modelMap.putIfAbsent("event", null);
                modelMap.putIfAbsent("pageTitle", "empty");
                Event event = modelMap.get("event") == null ? null : modelMap.get("event") instanceof Event ? (Event) modelMap.get("event") : ((EventDescriptor) modelMap.get("event")).getEvent();
                ConfigurationPathKey googleAnalyticsKey = Optional.ofNullable(event).map(e -> alfio.model.system.Configuration.from(e.getOrganizationId(), e.getId(), GOOGLE_ANALYTICS_KEY)).orElseGet(() -> alfio.model.system.Configuration.getSystemConfiguration(GOOGLE_ANALYTICS_KEY));
                modelMap.putIfAbsent("analyticsEnabled", StringUtils.isNotBlank(configurationManager.getStringConfigValue(googleAnalyticsKey, "")));
                if (demoModeEnabled) {
                    modelMap.putIfAbsent("paypalTestUsername", configurationManager.getStringConfigValue(alfio.model.system.Configuration.getSystemConfiguration(PAYPAL_DEMO_MODE_USERNAME), "<missing>"));
                    modelMap.putIfAbsent("paypalTestPassword", configurationManager.getStringConfigValue(alfio.model.system.Configuration.getSystemConfiguration(PAYPAL_DEMO_MODE_PASSWORD), "<missing>"));
                }
            });
        }
    };
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) PathVariable(org.springframework.web.bind.annotation.PathVariable) ZonedDateTime(java.time.ZonedDateTime) Autowired(org.springframework.beans.factory.annotation.Autowired) StringUtils(org.apache.commons.lang3.StringUtils) org.springframework.web.servlet.config.annotation(org.springframework.web.servlet.config.annotation) DeserializationFeature(com.fasterxml.jackson.databind.DeserializationFeature) ModelMap(org.springframework.ui.ModelMap) HandlerInterceptorAdapter(org.springframework.web.servlet.handler.HandlerInterceptorAdapter) RequestContextUtils(org.springframework.web.servlet.support.RequestContextUtils) LocalizationMessageInterceptor(org.springframework.web.servlet.view.mustache.jmustache.LocalizationMessageInterceptor) HandlerMethod(org.springframework.web.method.HandlerMethod) Matcher(java.util.regex.Matcher) DefaultMessageSourceResolvable(org.springframework.context.support.DefaultMessageSourceResolvable) JavaTimeModule(com.fasterxml.jackson.datatype.jsr310.JavaTimeModule) EventDescriptor(alfio.controller.decorator.EventDescriptor) JMustacheTemplateFactory(org.springframework.web.servlet.view.mustache.jmustache.JMustacheTemplateFactory) ConfigurationPathKey(alfio.model.system.Configuration.ConfigurationPathKey) MediaType(org.springframework.http.MediaType) ContentLanguage(alfio.model.ContentLanguage) Collectors(java.util.stream.Collectors) JMustacheTemplateLoader(org.springframework.web.servlet.view.mustache.jmustache.JMustacheTemplateLoader) StringHttpMessageConverter(org.springframework.http.converter.StringHttpMessageConverter) Configuration(org.springframework.context.annotation.Configuration) LocaleChangeInterceptor(org.springframework.web.servlet.i18n.LocaleChangeInterceptor) Environment(org.springframework.core.env.Environment) HttpMessageConverter(org.springframework.http.converter.HttpMessageConverter) Pattern(java.util.regex.Pattern) java.util(java.util) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ConfigurationManager(alfio.manager.system.ConfigurationManager) CommonsMultipartResolver(org.springframework.web.multipart.commons.CommonsMultipartResolver) MustacheViewResolver(org.springframework.web.servlet.view.mustache.MustacheViewResolver) HttpServletRequest(javax.servlet.http.HttpServletRequest) org.springframework.web.servlet(org.springframework.web.servlet) MessageSource(org.springframework.context.MessageSource) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) HttpServletResponse(javax.servlet.http.HttpServletResponse) SessionLocaleResolver(org.springframework.web.servlet.i18n.SessionLocaleResolver) Mustache(com.samskivert.mustache.Mustache) ComponentScan(org.springframework.context.annotation.ComponentScan) MappingJackson2HttpMessageConverter(org.springframework.http.converter.json.MappingJackson2HttpMessageConverter) DateTimeFormatter(java.time.format.DateTimeFormatter) SerializationFeature(com.fasterxml.jackson.databind.SerializationFeature) I18nManager(alfio.manager.i18n.I18nManager) Event(alfio.model.Event) Bean(org.springframework.context.annotation.Bean) CsrfToken(org.springframework.security.web.csrf.CsrfToken) ConfigurationKeys(alfio.model.system.ConfigurationKeys) MustacheCustomTagInterceptor(alfio.util.MustacheCustomTagInterceptor) ConfigurationPathKey(alfio.model.system.Configuration.ConfigurationPathKey) EventDescriptor(alfio.controller.decorator.EventDescriptor) ModelMap(org.springframework.ui.ModelMap) HandlerInterceptorAdapter(org.springframework.web.servlet.handler.HandlerInterceptorAdapter) HttpServletResponse(javax.servlet.http.HttpServletResponse) Event(alfio.model.Event) Bean(org.springframework.context.annotation.Bean)

Example 2 with StringUtils.startsWith

use of org.apache.commons.lang3.StringUtils.startsWith in project eol-globi-data by jhpoelen.

the class StudyImporterForSaproxylic method importStudy.

@Override
public void importStudy() throws StudyImporterException {
    try {
        final Model model = ModelFactory.createDefaultModel();
        NavigableSet<Triple<String, String, String>> triples = DBMaker.newTempTreeSet();
        Tripler add = triple -> {
            Resource resource = model.createResource("sx:" + triple.getLeft());
            Property property = model.createProperty("sx:" + triple.getMiddle());
            String obj = triple.getRight();
            if (StringUtils.startsWith(obj, "{")) {
                Resource food = model.createResource("sx:" + obj);
                model.add(resource, property, food);
            } else if (StringUtils.startsWith(obj, "http")) {
                model.add(resource, property, model.createResource(obj));
            } else if (StringUtils.isNotBlank(obj)) {
                model.add(resource, property, obj);
            }
        };
        parseReferences(add, getDataset().getResource("sx_txt/Reference.txt"));
        parseLocalities(add, getDataset().getResource("sx_txt/Locality.txt"));
        parseTaxa(add, getDataset().getResource("sx_txt/Taxon.txt"));
        parseTaxonRanks(add, getDataset().getResource("sx_txt/TaxonRank.txt"));
        parseOccurrences(add, getDataset().getResource("sx_txt/Occurrence.txt"));
        parseAssociations(add, getDataset().getResource("sx_txt/SX_Association.txt"));
        parseInteractionTypeMap(add, getDataset().getResource("interaction_type_map.tsv"));
        // associations -> occurrences, taxa, reference
        String queryString = "SELECT ?sourceTaxonName ?sourceLifeStage ?interactionTypeId ?targetTaxonName ?targetLifeStage ?referenceCitation ?localityName ?studyTitle " + "WHERE {" + "      ?interaction <sx:mentioned_by> ?studyTitle . " + "      ?studyTitle <sx:hasName> ?referenceCitation . " + "      ?sourceSpecimen <sx:participates_in> ?interaction . " + "      ?targetSpecimen <sx:participates_in> ?interaction . " + "      ?sourceSpecimen ?inter ?targetSpecimen . " + "      ?inter <sx:equivalentTo> ?interactionTypeId . " + "      ?sourceSpecimen <sx:classifiedAs> ?sourceTaxon . " + "      ?sourceTaxon <sx:hasName> ?sourceTaxonName . " + "      ?targetSpecimen <sx:classifiedAs> ?targetTaxon . " + "      ?targetTaxon <sx:hasName> ?targetTaxonName . " + "      ?sourceSpecimen <sx:inStage> ?sourceLifeStage . " + "      ?targetSpecimen <sx:inStage> ?targetLifeStage . " + "      ?targetSpecimen <sx:foundAt> ?locality . " + "      ?locality <sx:hasName> ?localityName . " + "}";
        Query query = QueryFactory.create(queryString);
        QueryExecution qe = QueryExecutionFactory.create(query, model);
        ResultSet results = qe.execSelect();
        toInteractions(results);
        qe.close();
    } catch (IOException e) {
        throw new StudyImporterException("failed to access resource", e);
    }
}
Also used : CSVTSVUtil(org.eol.globi.util.CSVTSVUtil) Query(com.hp.hpl.jena.query.Query) StringUtils(org.apache.commons.lang.StringUtils) Arrays(java.util.Arrays) ModelFactory(com.hp.hpl.jena.rdf.model.ModelFactory) QueryExecutionFactory(com.hp.hpl.jena.query.QueryExecutionFactory) StudyImpl(org.eol.globi.domain.StudyImpl) ArrayList(java.util.ArrayList) Property(com.hp.hpl.jena.rdf.model.Property) Map(java.util.Map) Triple(org.apache.commons.lang3.tuple.Triple) QueryFactory(com.hp.hpl.jena.query.QueryFactory) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) ResultSetFormatter(com.hp.hpl.jena.query.ResultSetFormatter) RDFNode(com.hp.hpl.jena.rdf.model.RDFNode) Iterator(java.util.Iterator) SelectorImpl(com.hp.hpl.jena.rdf.model.impl.SelectorImpl) IOException(java.io.IOException) NavigableSet(java.util.NavigableSet) ResultSet(com.hp.hpl.jena.query.ResultSet) Resource(com.hp.hpl.jena.rdf.model.Resource) File(java.io.File) List(java.util.List) QuerySolution(com.hp.hpl.jena.query.QuerySolution) TreeMap(java.util.TreeMap) LabeledCSVParser(com.Ostermiller.util.LabeledCSVParser) Model(com.hp.hpl.jena.rdf.model.Model) DBMaker(org.mapdb.DBMaker) QueryExecution(com.hp.hpl.jena.query.QueryExecution) InputStream(java.io.InputStream) Query(com.hp.hpl.jena.query.Query) Resource(com.hp.hpl.jena.rdf.model.Resource) IOException(java.io.IOException) QueryExecution(com.hp.hpl.jena.query.QueryExecution) Triple(org.apache.commons.lang3.tuple.Triple) ImmutableTriple(org.apache.commons.lang3.tuple.ImmutableTriple) Model(com.hp.hpl.jena.rdf.model.Model) ResultSet(com.hp.hpl.jena.query.ResultSet) Property(com.hp.hpl.jena.rdf.model.Property)

Example 3 with StringUtils.startsWith

use of org.apache.commons.lang3.StringUtils.startsWith in project aem-core-wcm-components by Adobe-Marketing-Cloud.

the class Utils method getWrappedImageResourceWithInheritance.

/**
 * Wraps an image resource with the properties and child resources of the inherited featured image of either
 * the linked page or the page containing the resource.
 *
 * @param resource The image resource
 * @param linkHandler The link handler
 * @param currentStyle The style of the image resource
 * @param currentPage The page containing the image resource
 * @return The wrapped image resource augmented with inherited properties and child resource if inheritance is enabled, the plain image resource otherwise.
 */
public static Resource getWrappedImageResourceWithInheritance(Resource resource, LinkHandler linkHandler, Style currentStyle, Page currentPage) {
    if (resource == null) {
        LOGGER.error("The resource is not defined");
        return null;
    }
    if (linkHandler == null) {
        LOGGER.error("The link handler is not defined");
        return null;
    }
    ValueMap properties = resource.getValueMap();
    String fileReference = properties.get(DownloadResource.PN_REFERENCE, String.class);
    Resource fileResource = resource.getChild(DownloadResource.NN_FILE);
    boolean imageFromPageImage = properties.get(PN_IMAGE_FROM_PAGE_IMAGE, StringUtils.isEmpty(fileReference) && fileResource == null);
    boolean altValueFromPageImage = properties.get(PN_ALT_VALUE_FROM_PAGE_IMAGE, imageFromPageImage);
    if (imageFromPageImage) {
        Resource inheritedResource = null;
        String linkURL = properties.get(ImageResource.PN_LINK_URL, String.class);
        boolean actionsEnabled = (currentStyle != null) ? !currentStyle.get(Teaser.PN_ACTIONS_DISABLED, !properties.get(Teaser.PN_ACTIONS_ENABLED, true)) : properties.get(Teaser.PN_ACTIONS_ENABLED, true);
        Resource firstAction = Optional.of(resource).map(res -> res.getChild(Teaser.NN_ACTIONS)).map(actions -> actions.getChildren().iterator().next()).orElse(null);
        if (StringUtils.isNotEmpty(linkURL)) {
            // the inherited resource is the featured image of the linked page
            Optional<Link> link = linkHandler.getLink(resource);
            inheritedResource = link.map(link1 -> (Page) link1.getReference()).map(ComponentUtils::getFeaturedImage).orElse(null);
        } else if (actionsEnabled && firstAction != null) {
            // the inherited resource is the featured image of the first action's page (the resource is assumed to be a teaser)
            inheritedResource = Optional.of(linkHandler.getLink(firstAction, Teaser.PN_ACTION_LINK)).map(link1 -> {
                if (link1.isPresent()) {
                    Page linkedPage = (Page) link1.get().getReference();
                    return Optional.ofNullable(linkedPage).map(ComponentUtils::getFeaturedImage).orElse(null);
                }
                return null;
            }).orElse(null);
        } else {
            // the inherited resource is the featured image of the current page
            inheritedResource = Optional.ofNullable(currentPage).map(page -> {
                Template template = page.getTemplate();
                // make sure the resource is part of the currentPage or of its template
                if (StringUtils.startsWith(resource.getPath(), currentPage.getPath()) || (template != null && StringUtils.startsWith(resource.getPath(), template.getPath()))) {
                    return ComponentUtils.getFeaturedImage(currentPage);
                }
                return null;
            }).orElse(null);
        }
        Map<String, String> overriddenProperties = new HashMap<>();
        Map<String, Resource> overriddenChildren = new HashMap<>();
        String inheritedFileReference = null;
        Resource inheritedFileResource = null;
        String inheritedAlt = null;
        String inheritedAltValueFromDAM = null;
        if (inheritedResource != null) {
            // Define the inherited properties
            ValueMap inheritedProperties = inheritedResource.getValueMap();
            inheritedFileReference = inheritedProperties.get(DownloadResource.PN_REFERENCE, String.class);
            inheritedFileResource = inheritedResource.getChild(DownloadResource.NN_FILE);
            inheritedAlt = inheritedProperties.get(ImageResource.PN_ALT, String.class);
            inheritedAltValueFromDAM = inheritedProperties.get(PN_ALT_VALUE_FROM_DAM, String.class);
        }
        overriddenProperties.put(DownloadResource.PN_REFERENCE, inheritedFileReference);
        overriddenChildren.put(DownloadResource.NN_FILE, inheritedFileResource);
        // don't inherit the image title from the page image
        overriddenProperties.put(PN_TITLE_VALUE_FROM_DAM, "false");
        if (altValueFromPageImage) {
            overriddenProperties.put(ImageResource.PN_ALT, inheritedAlt);
            overriddenProperties.put(PN_ALT_VALUE_FROM_DAM, inheritedAltValueFromDAM);
        } else {
            overriddenProperties.put(PN_ALT_VALUE_FROM_DAM, "false");
        }
        return new CoreResourceWrapper(resource, resource.getResourceType(), null, overriddenProperties, overriddenChildren);
    }
    return resource;
}
Also used : ValueMap(org.apache.sling.api.resource.ValueMap) ModelFactory(org.apache.sling.models.factory.ModelFactory) LinkHandler(com.adobe.cq.wcm.core.components.internal.link.LinkHandler) ResourceResolver(org.apache.sling.api.resource.ResourceResolver) LoggerFactory(org.slf4j.LoggerFactory) AllowedComponentList(com.day.cq.wcm.foundation.AllowedComponentList) HashMap(java.util.HashMap) DownloadResource(com.day.cq.commons.DownloadResource) StringUtils(org.apache.commons.lang3.StringUtils) Page(com.day.cq.wcm.api.Page) SlingHttpServletRequest(org.apache.sling.api.SlingHttpServletRequest) HashSet(java.util.HashSet) JSONException(org.json.JSONException) Style(com.day.cq.wcm.api.designer.Style) JSONObject(org.json.JSONObject) Image(com.adobe.cq.wcm.core.components.models.Image) Map(java.util.Map) Link(com.adobe.cq.wcm.core.components.commons.link.Link) LinkedHashSet(java.util.LinkedHashSet) Logger(org.slf4j.Logger) ImmutableSet(com.google.common.collect.ImmutableSet) Designer(com.day.cq.wcm.api.designer.Designer) Collection(java.util.Collection) Set(java.util.Set) Resource(org.apache.sling.api.resource.Resource) ExperienceFragment(com.adobe.cq.wcm.core.components.models.ExperienceFragment) CoreResourceWrapper(com.adobe.cq.wcm.core.components.internal.resource.CoreResourceWrapper) ComponentUtils(com.adobe.cq.wcm.core.components.util.ComponentUtils) PageManager(com.day.cq.wcm.api.PageManager) Nullable(org.jetbrains.annotations.Nullable) Template(com.day.cq.wcm.api.Template) Optional(java.util.Optional) ImageResource(com.day.cq.commons.ImageResource) NotNull(org.jetbrains.annotations.NotNull) Teaser(com.adobe.cq.wcm.core.components.models.Teaser) Collections(java.util.Collections) HashMap(java.util.HashMap) ValueMap(org.apache.sling.api.resource.ValueMap) DownloadResource(com.day.cq.commons.DownloadResource) Resource(org.apache.sling.api.resource.Resource) ImageResource(com.day.cq.commons.ImageResource) CoreResourceWrapper(com.adobe.cq.wcm.core.components.internal.resource.CoreResourceWrapper) Page(com.day.cq.wcm.api.Page) Template(com.day.cq.wcm.api.Template) ComponentUtils(com.adobe.cq.wcm.core.components.util.ComponentUtils) Link(com.adobe.cq.wcm.core.components.commons.link.Link)

Example 4 with StringUtils.startsWith

use of org.apache.commons.lang3.StringUtils.startsWith in project GDSC-SMLM by aherbert.

the class ResultsManager method run.

@Override
public void run(String arg) {
    extraOptions = ImageJUtils.isExtraOptions();
    SmlmUsageTracker.recordPlugin(this.getClass(), arg);
    if ("load".equals(arg)) {
        batchLoad();
        return;
    }
    if ("save".equals(arg)) {
        batchSave();
        return;
    }
    if (StringUtils.startsWith(arg, "clear")) {
        runClearMemory(arg);
        return;
    }
    if (!showDialog()) {
        return;
    }
    final MemoryPeakResults results = loadResults(settings.inputOption);
    if (MemoryPeakResults.isEmpty(results)) {
        IJ.error(TITLE, "No results could be loaded");
        IJ.showStatus("");
        return;
    }
    IJ.showStatus("Loaded " + TextUtils.pleural(results.size(), "result"));
    boolean saved = false;
    if (resultsSettings.getResultsInMemorySettings().getInMemory() && fileInput) {
        if (!addResultsToMemory(results, settings.inputFilename)) {
            IJ.showStatus("");
            return;
        }
        saved = true;
    }
    if (resultsSettings.getResultsTableSettings().getResultsTableFormatValue() <= 0 && resultsSettings.getResultsImageSettings().getImageTypeValue() <= 0 && TextUtils.isNullOrEmpty(resultsSettings.getResultsFileSettings().getResultsFilename())) {
        // No outputs. Error if results were not saved to memory
        if (!saved) {
            IJ.error(TITLE, "No output selected");
        }
        return;
    }
    final Rectangle bounds = results.getBounds(true);
    final boolean showDeviations = resultsSettings.getShowDeviations() && canShowDeviations(results);
    final boolean showEndFrame = canShowEndFrame(results);
    final boolean showId = canShowId(results);
    final boolean showCategory = canShowCategory(results);
    // Display the configured output
    final PeakResultsList outputList = new PeakResultsList();
    outputList.copySettings(results);
    final int tableFormat = resultsSettings.getResultsTableSettings().getResultsTableFormatValue();
    if (tableFormat == ResultsTableFormat.IMAGEJ_VALUE) {
        addImageJTableResults(outputList, resultsSettings.getResultsTableSettings(), showDeviations, showEndFrame, results.is3D(), showId, showCategory);
    } else if (tableFormat == ResultsTableFormat.INTERACTIVE_VALUE) {
        showInteractiveTable(results, resultsSettings.getResultsTableSettings());
    }
    addImageResults(outputList, resultsSettings.getResultsImageSettings(), bounds, (extraOptions) ? FLAG_EXTRA_OPTIONS : 0);
    addFileResults(outputList, showDeviations, showEndFrame, showId, showCategory);
    if (outputList.numberOfOutputs() == 0) {
        // This occurs when only using the interactive table
        IJ.showStatus("Processed " + TextUtils.pleural(results.size(), "result"));
        return;
    }
    IJ.showStatus("Processing outputs ...");
    // Reduce to single object for speed
    final PeakResults output = (outputList.numberOfOutputs() == 1) ? outputList.toArray()[0] : outputList;
    output.begin();
    // Note: We could add a batch iterator to the MemoryPeakResults.
    // However the speed increase will be marginal as the main time
    // taken is in processing the outputs.
    // Process in batches to provide progress
    final Counter progress = new Counter();
    final int totalProgress = results.size();
    final int batchSize = Math.max(100, totalProgress / 10);
    final FixedPeakResultList batch = new FixedPeakResultList(batchSize);
    IJ.showProgress(0);
    results.forEach((PeakResultProcedureX) result -> {
        batch.add(result);
        if (batch.size == batchSize) {
            if (IJ.escapePressed()) {
                batch.clear();
                return true;
            }
            output.addAll(batch.results);
            batch.clear();
            IJ.showProgress(progress.incrementAndGet(batchSize), totalProgress);
        }
        return false;
    });
    // Will be empty if interrupted
    if (batch.isNotEmpty()) {
        output.addAll(batch.toArray());
    }
    IJ.showProgress(1);
    output.end();
    if (output.size() == results.size()) {
        IJ.showStatus("Processed " + TextUtils.pleural(results.size(), "result"));
    } else {
        IJ.showStatus(String.format("A %d/%s", output.size(), TextUtils.pleural(results.size(), "result")));
    }
}
Also used : PeakResultsList(uk.ac.sussex.gdsc.smlm.results.PeakResultsList) Choice(java.awt.Choice) Java2(ij.util.Java2) Arrays(java.util.Arrays) Rectangle2D(java.awt.geom.Rectangle2D) ItemListener(java.awt.event.ItemListener) StringUtils(org.apache.commons.lang3.StringUtils) ResultsImageSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageSettings) ResultsSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsSettings) Panel(java.awt.Panel) ImageJPluginLoggerHelper(uk.ac.sussex.gdsc.core.ij.ImageJPluginLoggerHelper) YesNoCancelDialog(ij.gui.YesNoCancelDialog) MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults) ResultOption(uk.ac.sussex.gdsc.smlm.results.ResultOption) Map(java.util.Map) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) PeakResults(uk.ac.sussex.gdsc.smlm.results.PeakResults) JFileChooser(javax.swing.JFileChooser) MathUtils(uk.ac.sussex.gdsc.core.utils.MathUtils) CalibrationWriter(uk.ac.sussex.gdsc.smlm.data.config.CalibrationWriter) EnumSet(java.util.EnumSet) LutHelper(uk.ac.sussex.gdsc.core.ij.process.LutHelper) SettingsManager(uk.ac.sussex.gdsc.smlm.ij.settings.SettingsManager) CameraType(uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos.CameraType) Predicate(java.util.function.Predicate) Collection(java.util.Collection) ExtendedGenericDialog(uk.ac.sussex.gdsc.core.ij.gui.ExtendedGenericDialog) ResultsInMemorySettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsInMemorySettings) PeakResultsList(uk.ac.sussex.gdsc.smlm.results.PeakResultsList) Set(java.util.Set) ResultsImageType(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageType) DistanceUnit(uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.DistanceUnit) Logger(java.util.logging.Logger) TextUtils(uk.ac.sussex.gdsc.core.utils.TextUtils) BitFlagUtils(uk.ac.sussex.gdsc.core.utils.BitFlagUtils) List(java.util.List) Builder(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsSettings.Builder) PeakResultTableModelFrame(uk.ac.sussex.gdsc.smlm.ij.gui.PeakResultTableModelFrame) BinaryFilePeakResults(uk.ac.sussex.gdsc.smlm.results.BinaryFilePeakResults) FileUtils(uk.ac.sussex.gdsc.core.utils.FileUtils) PlugIn(ij.plugin.PlugIn) Rectangle(java.awt.Rectangle) PeakResultProcedureX(uk.ac.sussex.gdsc.smlm.results.procedures.PeakResultProcedureX) Prefs(ij.Prefs) ValidationUtils(uk.ac.sussex.gdsc.core.utils.ValidationUtils) HashMap(java.util.HashMap) IntensityUnit(uk.ac.sussex.gdsc.smlm.data.config.UnitProtos.IntensityUnit) FixedPeakResultList(uk.ac.sussex.gdsc.smlm.results.FixedPeakResultList) ResultsFileSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsFileSettings) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) OptionListener(uk.ac.sussex.gdsc.core.ij.gui.ExtendedGenericDialog.OptionListener) OpenDialog(ij.io.OpenDialog) ArrayList(java.util.ArrayList) IJImageSource(uk.ac.sussex.gdsc.smlm.ij.IJImageSource) MultiDialog(uk.ac.sussex.gdsc.core.ij.gui.MultiDialog) ResultsProtosHelper(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtosHelper) ResultsFileFormat(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsFileFormat) ImagePeakResultsFactory(uk.ac.sussex.gdsc.smlm.ij.results.ImagePeakResultsFactory) GenericDialog(ij.gui.GenericDialog) PeakResultTableModel(uk.ac.sussex.gdsc.smlm.ij.gui.PeakResultTableModel) MalkFilePeakResults(uk.ac.sussex.gdsc.smlm.results.MalkFilePeakResults) PeakResultsReader(uk.ac.sussex.gdsc.smlm.results.PeakResultsReader) LinkedHashSet(java.util.LinkedHashSet) TsfPeakResultsWriter(uk.ac.sussex.gdsc.smlm.results.TsfPeakResultsWriter) EventQueue(java.awt.EventQueue) ResultsTableFormat(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsTableFormat) SimpleImageJTrackProgress(uk.ac.sussex.gdsc.core.ij.SimpleImageJTrackProgress) Checkbox(java.awt.Checkbox) Label(java.awt.Label) IOException(java.io.IOException) ResultsImageMode(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsImageMode) Recorder(ij.plugin.frame.Recorder) File(java.io.File) Constants(uk.ac.sussex.gdsc.smlm.ij.settings.Constants) ImageJTablePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJTablePeakResults) Counter(uk.ac.sussex.gdsc.smlm.results.count.Counter) ImageJUtils(uk.ac.sussex.gdsc.core.ij.ImageJUtils) TextFilePeakResults(uk.ac.sussex.gdsc.smlm.results.TextFilePeakResults) IJ(ij.IJ) ExtendedPeakResult(uk.ac.sussex.gdsc.smlm.results.ExtendedPeakResult) ResultsTableSettings(uk.ac.sussex.gdsc.smlm.data.config.ResultsProtos.ResultsTableSettings) LocalList(uk.ac.sussex.gdsc.core.utils.LocalList) Counter(uk.ac.sussex.gdsc.smlm.results.count.Counter) FixedPeakResultList(uk.ac.sussex.gdsc.smlm.results.FixedPeakResultList) MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults) ImageJImagePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJImagePeakResults) PeakResults(uk.ac.sussex.gdsc.smlm.results.PeakResults) BinaryFilePeakResults(uk.ac.sussex.gdsc.smlm.results.BinaryFilePeakResults) MalkFilePeakResults(uk.ac.sussex.gdsc.smlm.results.MalkFilePeakResults) ImageJTablePeakResults(uk.ac.sussex.gdsc.smlm.ij.results.ImageJTablePeakResults) TextFilePeakResults(uk.ac.sussex.gdsc.smlm.results.TextFilePeakResults) Rectangle(java.awt.Rectangle) MemoryPeakResults(uk.ac.sussex.gdsc.smlm.results.MemoryPeakResults)

Aggregations

Map (java.util.Map)3 StringUtils (org.apache.commons.lang3.StringUtils)3 File (java.io.File)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 Arrays (java.util.Arrays)2 Collection (java.util.Collection)2 HashMap (java.util.HashMap)2 LinkedHashSet (java.util.LinkedHashSet)2 List (java.util.List)2 Set (java.util.Set)2 EventDescriptor (alfio.controller.decorator.EventDescriptor)1 I18nManager (alfio.manager.i18n.I18nManager)1 ConfigurationManager (alfio.manager.system.ConfigurationManager)1 ContentLanguage (alfio.model.ContentLanguage)1 Event (alfio.model.Event)1 ConfigurationPathKey (alfio.model.system.Configuration.ConfigurationPathKey)1 ConfigurationKeys (alfio.model.system.ConfigurationKeys)1 MustacheCustomTagInterceptor (alfio.util.MustacheCustomTagInterceptor)1 LabeledCSVParser (com.Ostermiller.util.LabeledCSVParser)1