Package hu.sztaki.ilab.longneck.bootstrap

Source Code of hu.sztaki.ilab.longneck.bootstrap.RepositoryUtils

package hu.sztaki.ilab.longneck.bootstrap;

import hu.sztaki.ilab.longneck.process.FileType;
import hu.sztaki.ilab.longneck.process.SplitId;
import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
*
* @author Péter Molnár <molnar.peter@sztaki.mta.hu>
*/
public class RepositoryUtils {

    public static Set<PathToDirPair> getPackageNames(List<RefToDirPair> references, String repositorypath) throws IOException {
        Set<PathToDirPair> retval = new HashSet<PathToDirPair>();
        for (RefToDirPair reftodir : references) {
            retval.add(new PathToDirPair((new SplitId(reftodir.getRef().getId())).pkg,
                    reftodir.getDefaultdirectory(),FileType.forReference(reftodir.getRef()))
                    .normalizePath(repositorypath));
        }
        return retval;
    }
}
TOP

Related Classes of hu.sztaki.ilab.longneck.bootstrap.RepositoryUtils

TOP
Copyright © 2018 www.massapi.com. 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.