Examples of Directory


Examples of org.hivedb.meta.directory.Directory

    return Hive.load(getConnectString(H2TestCase.TEST_DB), CachingDataSourceProvider.getInstance());
  }

  @Test
  public void testInsertPrimaryIndexKey() throws Exception {
    Directory d = getDirectory();
    Integer key = new Integer(43);
    Hive hive = getHive();
    Node firstNode = Atom.getFirst(hive.getNodes());
    d.insertPrimaryIndexKey(Atom.getFirst(hive.getNodes()), key);
    for (Integer id : Transform.map(semaphoreToId(), d.getKeySemamphoresOfPrimaryIndexKey(key)))
      assertEquals((Integer) firstNode.getId(), id);
  }
View Full Code Here

Examples of org.jamesii.gui.utils.parameters.factories.converter.Directory

    switch (mode) {
    case INPLACE:
      if (textField != null) {
        try {
          if (value == null) {
            value = new Directory(textField.getText());
          } else {
            value.setDir(new File(textField.getText()));
          }
        } catch (Exception e) {
          return false;
View Full Code Here

Examples of org.jbpm.designer.repository.Directory

        Collection<Directory> foundDirectories = new ArrayList<Directory>();
        Iterator<Path> it = directories.iterator();
        while (it.hasNext()) {
            Path dir = it.next();
            String uniqueId = encodeUniqueId(dir.toUri().toString());
            foundDirectories.add(new Directory(uniqueId, dir.getFileName().toString(), trimLocation(dir)));
        }

        return foundDirectories;
    }
View Full Code Here

Examples of org.myphotodiary.model.Directory

    EntityManager em = ModelFactory.getEntityManager();
    EntityTransaction tx = null;
    try {
      tx = em.getTransaction();
      tx.begin();
      Directory directory = null;
      // search if directory exists, or create it
      try {
        TypedQuery<Directory> query = em.createQuery("select directory from Directory directory where directory.path = ?1",
            Directory.class).setParameter(1, path);
        directory = query.getSingleResult();
        if  (directory.isIndexingAllowedBoolean()) {
          updateDirectory(directory, dirData, em);
          em.merge(directory);
        }
      } catch (NoResultException ex) {
        getServletContext().log(
            "No directory data for: " + path, ex);
        directory = new Directory(path, null);
        updateDirectory(directory, dirData, em);
        em.persist(directory);
      }
    } catch (Exception ex) {
      getServletContext().log("Cannot persist directory data", ex);
View Full Code Here

Examples of org.nxplanner.file.Directory

                String contentType = formFile.getContentType();
                InputStream input = formFile.getInputStream();
                int fileSize = formFile.getFileSize();
                int projectId = request.getParameter("projectId") != null ?
                        Integer.parseInt(request.getParameter("projectId")) : 0;
                Directory directory = fileSystem.getDirectory("/attachments/project/"+projectId);
                File file = fileSystem.createFile(directory, filename, contentType, fileSize, input);
                note.setFile(file);

                Logger.getLogger(EditNoteAction.class).debug("Saving note: filename="
                        + filename + ", fileSize=" + fileSize + ", contentType=" + contentType);
View Full Code Here

Examples of org.restlet.Directory

       
        getConnectorService().getClientProtocols().add(Protocol.CLAP);
       
        getContext().getAttributes().put("serverProvider", serverConnectionProvider);
       
        final Directory jsDirectory = new Directory(getContext(),
                "clap://class/jminix/js");
       
        Router router = new Router(getContext());
             
        router.attach("/js", jsDirectory);
View Full Code Here

Examples of org.restlet.resource.Directory

    return path;
  }

  protected Directory createDirectory(Context context)
  {
    Directory directory = new Directory(context, rootUri);
    directory.setIndexName(indexName);
    directory.setDeeplyAccessible(deeplyAccessible);
    directory.setModifiable(modifiable);
    directory.setNegotiatingContent(negotiatingContent);
    return directory;
  }
View Full Code Here

Examples of org.richfaces.model.entity.Directory

      public Object getData() {
        if (data == null) {
          data = new LinkedHashMap();
          Project projectA = new Project("projectA", 10);

          Directory adir1 = new Directory("ADir1", 50);

          adir1.addFile(new File("AFile1", 60));
          adir1.addFile(new File("AFile2", 61));

          Directory adir2 = new Directory("ADir2", 101);

          projectA.addDirectory(adir1);
          projectA.addDirectory(adir2);

          data.put(projectA.getName(), projectA);

          Project projectB = new Project("projectB", 501);

          Directory bdir1 = new Directory("BDir1", 600);
          Directory bdir2 = new Directory("BDir2", 700);
          Directory bdir3 = new Directory("BDir3", 801);

          projectB.addDirectory(bdir1);
          projectB.addDirectory(bdir2);
          projectB.addDirectory(bdir3);
View Full Code Here

Examples of org.sleuthkit.datamodel.Directory

        final Content content = this.getLookup().lookup(Content.class);
        if (content != null) {
            actions.addAll(DirectoryTreeFilterNode.getDetailActions(content));

            //extract dir action
            Directory dir = this.getLookup().lookup(Directory.class);
            if (dir != null) {
                actions.add(ExtractAction.getInstance());
            }

            // file search action
View Full Code Here

Examples of org.sonar.api.resources.Directory

    this.duplicateIncludeRule = DuplicatedIncludeCheck.getActiveRule(checkFactory);
  }

  public void addFile(File sonarFile, Collection<CxxPreprocessor.Include> includedFiles) {
    //Store the directory and file
    Directory sonarDir = sonarFile.getParent();
    packagesGraph.addVertex(sonarDir);
    directoryFiles.put(sonarDir, sonarFile);

    //Build the dependency graph
    for (CxxPreprocessor.Include include : includedFiles) {
      File includedFile = File.fromIOFile(new java.io.File(include.getPath()), project);
      if (includedFile == null) {
        CxxUtils.LOG.warn("Unable to find resource '" + include.getPath() + "' to create a dependency with '" + sonarFile.getKey() + "'");
      }
      else if (filesGraph.hasEdge(sonarFile, includedFile)) {
        FileEdge fileEdge = filesGraph.getEdge(sonarFile, includedFile);
        Issuable issuable = perspectives.as(Issuable.class, sonarFile);
        if ((issuable != null) && (duplicateIncludeRule != null)) {
          Issue issue = issuable.newIssueBuilder()
              .ruleKey(duplicateIncludeRule.getRule().ruleKey())
              .line(include.getLine())
              .message("Remove duplicated include, \"" + includedFile.getLongName() + "\" is already included at line " + fileEdge.getLine() + ".")
              .build();
          if (issuable.addIssue(issue))
            violationsCount++;
        }
        else {
          CxxUtils.LOG.warn("Already created edge from '" + sonarFile.getKey() + "' (line " + include.getLine() + ") to '" + includedFile.getKey() + "'" +
              ", previous edge from line " + fileEdge.getLine());
        }
      }
      else {
        //Add the dependency in the files graph
        FileEdge fileEdge = new FileEdge(sonarFile, includedFile, include.getLine());
        filesGraph.addEdge(fileEdge);

        //Add the dependency in the packages graph, if the directories are different
        Directory includedDir = includedFile.getParent();
        if (!sonarDir.equals(includedDir)) {
          DirectoryEdge edge = packagesGraph.getEdge(sonarDir, includedDir);
          if (edge == null) {
            edge = new DirectoryEdge(sonarDir, includedDir);
            packagesGraph.addEdge(edge);
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.