Examples of IDoapRepository


Examples of uk.ac.osswatch.simal.model.IDoapRepository

  @Test
  public void testType() throws SimalRepositoryException {
    Set<IDoapRepository> repos = project1.getRepositories();
    Iterator<IDoapRepository> itr = repos.iterator();
    while (itr.hasNext()) {
      IDoapRepository repo = itr.next();
      if (repo.getURI().contains("cvs")) {
        assertTrue("CVS repo is identified as ARCH", !repo.isARCH());
        assertTrue("CVS repo is identified as Bazaar", !repo.isBazaar());
        assertTrue("CVS repo is identified as BK", !repo.isBK());
        assertTrue("CVS repo is not identified as CVS", repo.isCVS());
        assertTrue("CVS repo is identified as Darcs", !repo.isDarcs());
        assertTrue("CVS repo is identified as Mercurial", !repo.isMercurial());
        assertTrue("SVN repo is identified as Git", !repo.isGit());
        assertTrue("CVS repo is identified as SVN", !repo.isSVN());
      } else if (repo.getURI().contains("svn")) {
        assertTrue("SVN repo is identified as ARCH", !repo.isARCH());
        assertTrue("CVS repo is identified as Bazaar", !repo.isBazaar());
        assertTrue("SVN repo is identified as BK", !repo.isBK());
        assertTrue("SVN repo is identified as CVS", !repo.isCVS());
        assertTrue("CVS repo is identified as Darcs", !repo.isDarcs());
        assertTrue("SVN repo is identified as Git", !repo.isGit());
        assertTrue("CVS repo is identified as Mercurial", !repo.isMercurial());
        assertTrue("SVN repo is not identified as SVN", repo.isSVN());
      }

    }
  }
View Full Code Here

Examples of uk.ac.osswatch.simal.model.IDoapRepository

  @Test
  public void testProjectRepos() throws SimalRepositoryException {
    Set<IDoapRepository> repos = project1.getRepositories();
    Iterator<IDoapRepository> itr = repos.iterator();
    while (itr.hasNext()) {
      IDoapRepository repo = itr.next();
      if (repo.isSVN()) {
        performSVNRepoTest(repo);
      } else if (repo.isCVS()) {
        performCVSRepoTest(repo);
      } else {
        fail("Repository not recognised as CVS or SVN.");
      }
    }
View Full Code Here

Examples of uk.ac.osswatch.simal.model.IDoapRepository

  }
 

  public IDoapRepository create(DoapRepositoryType type) throws SimalException {
    String uri = RDFUtils.getDefaultRepositoryURI(getNewID());
    IDoapRepository repo = null;
    try {
      repo = create(uri, type);
    } catch (DuplicateURIException e) {
      String msg = "Generated URI unexpectedly duplicate : " + uri;
      LOGGER.warn(msg);
View Full Code Here

Examples of uk.ac.osswatch.simal.model.IDoapRepository

    DoapRepositoryType selectedType = inputModel.getcomboChoice();
    String browseAccess = inputModel.getBrowseAccess();

    if (selectedType != null && !StringUtils.isEmpty(browseAccess)) {
      try {
        IDoapRepository repo = SimalRepositoryFactory.getRepositoryService()
            .create(browseAccess, selectedType);
        String anonymousAccess = inputModel.getAnonymousAccess();
        if (!StringUtils.isEmpty(anonymousAccess)) {
          Set<String> allAnonRoots = new HashSet<String>();
          allAnonRoots.add(anonymousAccess);
          repo.setAnonRoots(allAnonRoots);
        }
        String devAccess = inputModel.getDevAccess();
        if (!StringUtils.isEmpty(devAccess)) {
          Set<IDocument> allDevAccesses = new HashSet<IDocument>();
          IDocument devAccessDocument = SimalRepositoryFactory
              .getHomepageService().getOrCreate(devAccess);
          allDevAccesses.add(devAccessDocument);
          repo.setLocations(allDevAccesses);
        }

        getUpdatePanel().addToDisplayList(repo);
        getUpdatePanel().addToModel(repo);
      } catch (SimalRepositoryException e) {
View Full Code Here
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.