Package net.sourceforge.processdash.util

Examples of net.sourceforge.processdash.util.PatternList


        else
            return new BufferedInputStream(srcZip.getInputStream(e));
    }
   
    public List<ZipEntry> getEntries(String... patterns) {
        PatternList p = new PatternList(patterns);
        List<ZipEntry> result = new ArrayList<ZipEntry>();
        Enumeration<? extends ZipEntry> entries = srcZip.entries();
        while (entries.hasMoreElements()) {
            ZipEntry e = entries.nextElement();
            if (p.matches(e.getName()))
                result.add(e);
        }
        return result;
    }
View Full Code Here


   
    public void disableBaselineData() {
        setBaselineDataSource(null);
        showBaselineColumns = false;
        schedule.getMetrics().discardMetrics(
            new PatternList().addRegexp("Baseline"));
    }
View Full Code Here

    private PatternList setupPatterns(List regexps) {
        if (regexps == null || regexps.isEmpty())
            return null;
        else {
            PatternList result = new PatternList();
            for (Iterator iter = regexps.iterator(); iter.hasNext();) {
                String re = (String) iter.next();
                int bracePos = re.indexOf('}');
                if (bracePos != -1 && re.startsWith("{"))
                    re = re.substring(bracePos + 1);
                try {
                    result.addRegexp(re);
                } catch (Exception e) {
                    logger.log(Level.WARNING, "Bad regular expression ''{0}''",
                            re);
                }
            }
View Full Code Here

                }};
            return result;
        }
        private Map enumerateNames(Collection namePatterns) {
            PatternList pl = new PatternList();
            for (Iterator i = namePatterns.iterator(); i.hasNext();)
                pl.addRegexp(fixupPattern((String) i.next()));
           
            if (pl.getContainsItems() != null || pl.getRegexpItems() != null
                    || pl.getStartsWithItems() != null
                    || pl.getEqualsItems() != null)
                throw new UnsupportedOperationException();
           
            Map result = new HashMap();
            for (Iterator i = pl.getEndsWithItems().iterator(); i.hasNext();) {
                String oneItem = (String) i.next();
                String rootTag = null;
                int tagEnd = oneItem.indexOf(TAG_SEP_CHAR);
                if (tagEnd != -1) {
                    rootTag = oneItem.substring(0, tagEnd);
View Full Code Here

        return result;
    }

    private void scanForInstructions() {
        Iterator keys = data.getKeys(null, new SimplePrefixLocalDataNameFilter(
                new PatternList(INSTRUCTIONS_DATANAME)));
        while (keys.hasNext()) {
            String dataName = (String) keys.next();
            if (!dataName.endsWith("/" + INSTRUCTIONS_DATANAME))
                continue;
View Full Code Here

    private RedactFilterData data;

    private PatternList censoredDataElements;

    public void afterPropertiesSet() {
        censoredDataElements = new PatternList();

        List<Element> cfgXml = ExtensionManager
                .getXmlConfigurationElements("redact-filter-censored-data");
        for (Element xml : cfgXml)
            if (isEnabled(xml))
View Full Code Here

                else if (prefixesMightMatch(prefix, f.prefix) == false)
                    i.remove();
            }

            if (hints instanceof String)
                hints = new PatternList().addRegexp((String) hints);
            if (hints instanceof PatternList)
                hints = new SimplePrefixLocalDataNameFilter((PatternList)hints);
            if (hints instanceof DataNameFilter.PrefixLocal)
                prefixLocalFilter = (DataNameFilter.PrefixLocal) hints;
           
View Full Code Here

    private boolean deleteLogFiles;

    private PatternList filenamePatterns;

    public void afterPropertiesSet() {
        filenamePatterns = new PatternList()
            .addLiteralEndsWith("/changehistory.xml")
            .addLiteralEndsWith("/tabs.xml")
            .addLiteralEndsWith("/workflowdump.xml");

        if (deleteLogFiles)
View Full Code Here

        private RedactFilterData data;
       
        private FilterEvXml xmlFilter;
       
        public InGlobalDat() {
            filenamePatterns = new PatternList("global.dat");
        }
View Full Code Here

    protected PatternList filenamePatterns;

    public void setConfigElement(Element xml, String attrName) {
        String patternAttr = xml.getAttribute("filenamePattern");
        if (XMLUtils.hasValue(patternAttr))
            filenamePatterns = new PatternList(patternAttr);
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.processdash.util.PatternList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.