Examples of Index


Examples of org.eclipse.jdt.internal.core.index.Index

  public boolean execute(IProgressMonitor progressMonitor) {

    if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true;
    if (!this.folder.isAccessible()) return true; // nothing to do

    Index index = this.manager.getIndexForUpdate(this.containerPath, true, /*reuse index file*/ true /*create if none*/);
    if (index == null) return true;
    ReadWriteMonitor monitor = index.monitor;
    if (monitor == null) return true; // index got deleted since acquired

    try {
      monitor.enterRead(); // ask permission to read

      String[] paths = index.queryDocumentNames(""); // all file names //$NON-NLS-1$
      int max = paths == null ? 0 : paths.length;
      final SimpleLookupTable indexedFileNames = new SimpleLookupTable(max==0 ? 33 : max+11);
      final String OK = "OK"; //$NON-NLS-1$
      final String DELETED = "DELETED"; //$NON-NLS-1$
      if (paths == null) {
        this.folder.accept(new IResourceProxyVisitor() {
          public boolean visit(IResourceProxy proxy) {
            if (IndexBinaryFolder.this.isCancelled) return false;
            if (proxy.getType() == IResource.FILE) {
              if (org.eclipse.jdt.internal.compiler.util.Util.isClassFileName(proxy.getName())) {
                IFile file = (IFile) proxy.requestResource();
                String containerRelativePath = Util.relativePath(file.getFullPath(), IndexBinaryFolder.this.containerPath.segmentCount());
                indexedFileNames.put(containerRelativePath, file);
              }
              return false;
            }
            return true;
          }
        }, IResource.NONE);
      } else {
        for (int i = 0; i < max; i++) {
          indexedFileNames.put(paths[i], DELETED);
        }
        final long indexLastModified = index.getIndexFile().lastModified();
        this.folder.accept(
          new IResourceProxyVisitor() {
            public boolean visit(IResourceProxy proxy) throws CoreException {
              if (IndexBinaryFolder.this.isCancelled) return false;
              if (proxy.getType() == IResource.FILE) {
View Full Code Here

Examples of org.eclipse.orion.server.git.objects.Index

    return false;
  }

  private boolean handleGet(HttpServletRequest request, HttpServletResponse response, Repository db, String pattern) throws CoreException, IOException,
      ServletException {
    Index index = new Index(null /* not needed */, db, pattern);
    ObjectStream stream = index.toObjectStream();
    if (stream == null) {
      String msg = NLS.bind("{0} not found in index", pattern); //$NON-NLS-1$
      return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.OK, HttpServletResponse.SC_NOT_FOUND, msg, null));
    }
    IOUtilities.pipe(stream, response.getOutputStream(), true, false);
View Full Code Here

Examples of org.elasticsearch.index.Index

        AnalysisService analysisService = testSimpleConfiguration(settings);
        NamedAnalyzer analyzer = analysisService.analyzer("test");       
    }

    private AnalysisService testSimpleConfiguration(Settings settings) {
        Index index = new Index("test");

        Injector parentInjector = new ModulesBuilder().add(new SettingsModule(settings),
                new EnvironmentModule(new Environment(settings)),
                new IndicesAnalysisModule()).createInjector();
        Injector injector = new ModulesBuilder().add(
View Full Code Here

Examples of org.exist.indexing.Index

                NativeStructuralIndexWorker index = (NativeStructuralIndexWorker)
                        broker.getIndexController().getWorkerByIndexName(StructuralIndex.STRUCTURAL_INDEX_ID);
                btree = index.getStorage();
            } else {
                // use index id defined in conf.xml
                Index index = pool.getIndexManager().getIndexByName(id);
                if (index != null) {
                    btree = index.getStorage();
                }
            }
            if (btree == null) {
                System.console().printf("Unkown index: %s\n", id);
                return;
View Full Code Here

Examples of org.exoplatform.services.html.path.NodePath.Index

            count++;
            if (ele == element)
               break;
         }
      }
      return new Index(element.getName(), count);
   }
View Full Code Here

Examples of org.fest.assertions.data.Index

  @Test
  public void should_fail_if_actual_contains_value_at_given_index() {
    int[] actual = {1, 2, 3, 4};
    int value = 3;
    Index index = Index.atIndex(2);
    try {
      arrays.assertDoesNotContain(description, actual, value, index);
    } catch(AssertionError e) {
      verify(failures).failure(description, ShouldNotContainAtIndex.shouldNotContainAtIndex(actual, value, index));
      return;
View Full Code Here

Examples of org.gephi.attribute.api.Index

            for (Transformer transformer : Lookup.getDefault().lookupAll(Transformer.class)) {
                if (transformer instanceof RankingTransformer || transformer instanceof PartitionTransformer) {
                    if (transformer.isNode()) {
                        for (Column col : attributeModel.getNodeTable()) {
                            if (!col.isProperty()) {
                                Index index = localScale ? graphModel.getNodeIndex(graphModel.getVisibleView()) : graphModel.getNodeIndex();
                                if (transformer instanceof RankingTransformer && isRanking(col) && !attributeNodeFunctions.contains(col)) {
                                    nodeFunctions.add(new FunctionImpl(this, col, transformer, uis.get(transformer.getClass()), new RankingImpl(col, index, defaultInterpolator)));
                                } else if (transformer instanceof PartitionTransformer && isPartition(col) && !attributeNodeFunctions.contains(col)) {
                                    nodeFunctions.add(new FunctionImpl(this, col, transformer, uis.get(transformer.getClass()), new PartitionImpl(col, index)));
                                }
                                foundNodeColumns.add(col);
                            }
                        }
                    }
                    if (transformer.isEdge()) {
                        for (Column col : attributeModel.getEdgeTable()) {
                            if (!col.isProperty() && col.isNumber()) {
                                Index index = localScale ? graphModel.getEdgeIndex(graphModel.getVisibleView()) : graphModel.getEdgeIndex();
                                if (transformer instanceof RankingTransformer && isRanking(col) && !attributeEdgeFunctions.contains(col)) {
                                    edgeFunctions.add(new FunctionImpl(this, col, transformer, uis.get(transformer.getClass()), new RankingImpl(col, index, defaultInterpolator)));
                                } else if (transformer instanceof PartitionTransformer && isPartition(col) && !attributeEdgeFunctions.contains(col)) {
                                    edgeFunctions.add(new FunctionImpl(this, col, transformer, uis.get(transformer.getClass()), new PartitionImpl(col, index)));
                                }
View Full Code Here

Examples of org.glassfish.admingui.connector.Index

  // The parent UIComponent
  UIComponent parent = getParentUIComponent();

  // Get the Index
        Index index = (Index) desc.getEvaluatedOption(ctx, "index", parent);

  // The following method should set the "key" to the node containing all
  // the children... the children will also have keys which must be
  // retrievable by the next method (getChildTreeNodeObjects)... these
  // "keys" will be used by the rest of the methods in this file for
View Full Code Here

Examples of org.glassfish.admingui.plugin.Index

  // The parent UIComponent
  UIComponent parent = getParentUIComponent();

  // Get the Index
        Index index = (Index) desc.getEvaluatedOption(ctx, "index", parent);

  // The following method should set the "key" to the node containing all
  // the children... the children will also have keys which must be
  // retrievable by the next method (getChildTreeNodeObjects)... these
  // "keys" will be used by the rest of the methods in this file for
View Full Code Here

Examples of org.h2.index.Index

            undoLog.add(log);
        } else {
            // see also UndoLogRecord.commit
            ArrayList<Index> indexes = table.getIndexes();
            for (int i = 0, size = indexes.size(); i < size; i++) {
                Index index = indexes.get(i);
                index.commit(operation, row);
            }
            row.commit();
        }
    }
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.