Examples of Index


Examples of org.python.antlr.ast.Index

        }
        if (isSlice) {
           return new Slice(tok, s, e, o);
        }
        else {
           return new Index(tok, s);
        }
    }
View Full Code Here

Examples of org.python.pydev.parser.jython.ast.Index

                        }
                    }
                }
                SimpleNode sliceRet;
                if (k == 0) {
                    sliceRet = new Index(values[0]);
                } else {
                    sliceRet = new Slice(values[0], values[1], values[2]);
                }
                //this may happen if we have no values
                sliceRet.getSpecialsBefore().addAll(specialsBefore);
View Full Code Here

Examples of org.springframework.data.mongodb.core.index.Index

   * @see org.springframework.data.repository.core.support.QueryCreationListener#onCreation(org.springframework.data.repository.query.RepositoryQuery)
   */
  public void onCreation(PartTreeMongoQuery query) {

    PartTree tree = query.getTree();
    Index index = new Index();
    index.named(query.getQueryMethod().getName());
    Sort sort = tree.getSort();

    for (Part part : tree.getParts()) {
      if (GEOSPATIAL_TYPES.contains(part.getType())) {
        return;
      }
      String property = part.getProperty().toDotPath();
      Direction order = toDirection(sort, property);
      index.on(property, order);
    }

    // Add fixed sorting criteria to index
    if (sort != null) {
      for (Sort.Order order : sort) {
        index.on(order.getProperty(), order.getDirection());
      }
    }

    MongoEntityMetadata<?> metadata = query.getQueryMethod().getEntityInformation();
    operations.indexOps(metadata.getCollectionName()).ensureIndex(index);
View Full Code Here

Examples of org.teiid.internal.core.index.Index

  public MetadataStore getMetadataStore(Collection<Datatype> systemDatatypes) throws IOException {
    if (this.store == null) {
      this.store = new MetadataStore();
        ArrayList<Index> tmp = new ArrayList<Index>();
      for (VirtualFile f : indexFiles) {
        Index index = new Index(f, true);
        index.setDoCache(true);
              tmp.add(index);
      }
      this.indexes = tmp.toArray(new Index[tmp.size()]);
      getAnnotationCache();
      getExtensionCache();     
      Map<String, Datatype> datatypes = getDatatypeCache();
      if (systemDatatypes != null) {
        for (Datatype datatype : systemDatatypes) {
          datatypes.put(datatype.getUUID(), datatype);
        }
      }
      List<KeyRecord> keys = findMetadataRecords(MetadataConstants.RECORD_TYPE.PRIMARY_KEY, null, false);
      for (KeyRecord keyRecord : keys) {
        this.primaryKeyCache.put(keyRecord.getUUID(), keyRecord);
      }
      getModels();
      getTables();
      getProcedures();
      //force close, since we cached the index files
      for (Index index : tmp) {
        index.close();
      }
    }
    return store;
    }
View Full Code Here

Examples of org.terrier.structures.Index

   * @throws Exception
   */
  public static void main (String[] args) throws Exception
  {
    Index.setIndexLoadingProfileAsRetrieval(false);
    Index i = Index.createIndex();
    if (i== null)
    {
      System.err.println("Sorry, no index could be found in default location");
      return;
    }
    new BlockInverted2DirectIndexBuilder(i).createDirectIndex();
    i.close();
  }
View Full Code Here

Examples of org.uberfire.metadata.engine.Index

        ioService().write( path2,
                           xml2 );

        Thread.sleep( 5000 ); //wait for events to be consumed from jgit -> (notify changes -> watcher -> index) -> lucene index

        final Index index = getConfig().getIndexManager().get( org.uberfire.metadata.io.KObjectUtil.toKCluster( basePath.getFileSystem() ) );

        //Test Scenarios using org.drools.workbench.screens.testscenario.backend.server.indexing.classes.Applicant
        {
            final IndexSearcher searcher = ( (LuceneIndex) index ).nrtSearcher();
            final TopScoreDocCollector collector = TopScoreDocCollector.create( 10,
View Full Code Here

Examples of org.voltdb.catalog.Index

     * @param catalogTable
     * @return An ordered list of the primary key columns
     */
    public static Collection<Column> getPrimaryKeyColumns(Table catalogTable) {
        Collection<Column> columns = new ArrayList<Column>();
        Index catalog_idx = null;
        try {
            catalog_idx = CatalogUtil.getPrimaryKeyIndex(catalogTable);
        } catch (Exception ex) {
            // IGNORE
            return (columns);
        }
        assert(catalog_idx != null);

        for (ColumnRef catalog_col_ref : getSortedCatalogItems(catalog_idx.getColumns(), "index")) {
            columns.add(catalog_col_ref.getColumn());
        }
        return (columns);
    }
View Full Code Here

Examples of org.xBaseJ.micro.indexes.Index

   */
  public Index useIndex(String filename)
    throws xBaseJException, IOException
  {
    int i;
    Index NDXes;
    for (i=1; i <= jNDXes.size(); i++)
        {
          NDXes = (Index) jNDXes.elementAt(i-1);
          if (NDXes.getName().compareTo(filename) == 0)
        {
          jNDX = NDXes;
              return jNDX;
        }
        }
View Full Code Here

Examples of plan_runner.thetajoin.indexes.Index

    // is separated by AND

    for (int i = 0; i < oppositeIndexes.size(); i++) {
      TIntArrayList currentRowIds = null;

      final Index currentOpposIndex = oppositeIndexes.get(i);
      final String value = valuesToApplyOnIndex.get(i);

      int currentOperator = _operatorForIndexes.get(i);
      // Switch inequality operator if the tuple coming is from the other
      // relation
      if (isFromFirstEmitter) {
        final int operator = currentOperator;

        if (operator == ComparisonPredicate.GREATER_OP)
          currentOperator = ComparisonPredicate.LESS_OP;
        else if (operator == ComparisonPredicate.NONGREATER_OP)
          currentOperator = ComparisonPredicate.NONLESS_OP;
        else if (operator == ComparisonPredicate.LESS_OP)
          currentOperator = ComparisonPredicate.GREATER_OP;
        else if (operator == ComparisonPredicate.NONLESS_OP)
          currentOperator = ComparisonPredicate.NONGREATER_OP;
        else
          currentOperator = operator;
      }

      // Get the values from the index (check type first)
      if (_typeOfValueIndexed.get(i) instanceof String)
        currentRowIds = currentOpposIndex.getValues(currentOperator, value);
      // Even if valueIndexed is at first time an integer with
      // precomputation a*col +b, it become a double
      else if (_typeOfValueIndexed.get(i) instanceof Double)
        currentRowIds = currentOpposIndex.getValues(currentOperator,
            Double.parseDouble(value));
      else if (_typeOfValueIndexed.get(i) instanceof Integer)
        currentRowIds = currentOpposIndex.getValues(currentOperator,
            Integer.parseInt(value));
      else if (_typeOfValueIndexed.get(i) instanceof Date)
        try {
          currentRowIds = currentOpposIndex.getValues(currentOperator,
              _convDateFormat.parse(value));
        } catch (final ParseException e) {
          e.printStackTrace();
        }
      else
View Full Code Here

Examples of prefuse.data.util.Index

            double v = item.getDouble(VALUE);
            double x = span==0 ? 0 : ((v-m_lo)/span)*breadth;
            set(item, x, b);
        }

        Index index = labels.index(VALUE);
        double step = getLinearStep(span, span==0 ? 0 : breadth/span);
        if ( step == 0 ) step = 1;
        int r;

        for ( double x, v=vlo; v<=m_hi; v+=step ) {
            x = ((v-m_lo)/span)*breadth;
            if ( x < -0.5 ) {
                continue;
            } else if ( (r=index.get(v)) >= 0 ) {
                VisualItem item = labels.getItem(r);
                item.setVisible(true);
                item.setEndVisible(true);
            } else {
                VisualItem item = labels.addItem();
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.