Search in sources :

Example 6 with PatternList

use of net.sourceforge.processdash.util.PatternList in project processdash by dtuma.

the class AbstractLibraryEditor method openLibrary.

private void openLibrary(Component parent, boolean export) throws UserCancelledException {
    WBSLibrary result = null;
    while (true) {
        File file = selectFile(parent, export);
        if (file == null)
            throw new UserCancelledException();
        result = openLibrary(parent, export, file);
        if (result != null)
            break;
    }
    libraryFile = result;
    library = result.getWbs();
    library.getRoot().setName(resources.getString("Library_Root_Name"));
    if (export == false)
        library.removeAttributes(new PatternList("^exportSourceID$", "^relaunchSourceID$"));
}
Also used : PatternList(net.sourceforge.processdash.util.PatternList) File(java.io.File)

Example 7 with PatternList

use of net.sourceforge.processdash.util.PatternList in project processdash by dtuma.

the class AbstractWBSModelMerger method ignoreAttributeConflicts.

protected void ignoreAttributeConflicts(String... attributeNames) {
    PatternList pattern = new PatternList();
    for (String attr : attributeNames) {
        if (isRegexp(attr))
            pattern.addRegexp(attr);
        else
            pattern.addLiteralEquals(attr);
    }
    contentMerger.addHandler(pattern, SILENTLY_PREFER_MAIN);
}
Also used : PatternList(net.sourceforge.processdash.util.PatternList)

Aggregations

PatternList (net.sourceforge.processdash.util.PatternList)7 Iterator (java.util.Iterator)2 Element (org.w3c.dom.Element)2 File (java.io.File)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 ZipEntry (java.util.zip.ZipEntry)1 ListData (net.sourceforge.processdash.data.ListData)1 SimplePrefixLocalDataNameFilter (net.sourceforge.processdash.data.repository.SimplePrefixLocalDataNameFilter)1 SAXException (org.xml.sax.SAXException)1