Examples of toArray()


Examples of org.apache.shiro.web.filter.mgt.NamedFilterList.toArray()

        DefaultFilterChainManager fcManager = (DefaultFilterChainManager) resolver.getFilterChainManager();
        NamedFilterList chain = fcManager.getChain("/test");
        assertNotNull(chain);
        assertEquals(chain.size(), 2);
        Filter[] filters = new Filter[chain.size()];
        filters = chain.toArray(filters);
        assertTrue(filters[0] instanceof DummyFilter);
        assertTrue(filters[1] instanceof FormAuthenticationFilter);
    }

    /**
 
View Full Code Here

Examples of org.apache.solr.common.SolrDocumentList.toArray()

        query.setIncludeScore(true);
        try {
            StreamQueryRequest request = new StreamQueryRequest(query);
            QueryResponse response = request.process(solrServer);
            SolrDocumentList results = response.getResults();
            for (SolrDocument result : results.toArray(new SolrDocument[0])) {
                String conceptUri = (String) result.getFirstValue(conceptUriField);
                if (conceptUri == null) {
                    throw new ClassifierException(String.format(
                        "Solr Core '%s' is missing required field '%s'.", solrCoreId, conceptUriField));
                }
View Full Code Here

Examples of org.apache.stanbol.rules.base.api.util.RecipeList.toArray()

    private void removeRecipeTest() throws Exception {

        RecipeList recipeListInitial = store.listRecipes();
        Recipe[] initialRecipes = new Recipe[recipeListInitial.size()];
        initialRecipes = recipeListInitial.toArray(initialRecipes);

        Recipe recipe = store.getRecipe(new UriRef("http://incubator.apache.com/stanbol/rules/test/recipeA"));
        store.removeRecipe(recipe);

        RecipeList recipeListFinal = store.listRecipes();
View Full Code Here

Examples of org.apache.tajo.catalog.Schema.toArray()

      state.addVerification("each " + type.name() + " query must have the same number of columns");
      return;
    }

    Column[] leftColumns = left.toArray();
    Column[] rightColumns = right.toArray();

    for (int i = 0; i < leftColumns.length; i++) {
      if (!leftColumns[i].getDataType().equals(rightColumns[i].getDataType())) {
        state.addVerification(type + " types " + leftColumns[i].getDataType().getType() + " and "
            + rightColumns[i].getDataType().getType() + " cannot be matched");
View Full Code Here

Examples of org.apache.uima.cas.ArrayFS.toArray()

    // From CAS array to Java array.
    FeatureStructure fs1 = this.cas.createFS(this.ts.getType(CAS.TYPE_NAME_ANNOTATION));
    FeatureStructure fs2 = this.cas.createFS(this.ts.getType(CAS.TYPE_NAME_TOP));
    FeatureStructure fs3 = this.cas.createFS(this.ts.getType(CASTestSetup.TOKEN_TYPE));
    ArrayFS array = this.cas.createArrayFS(3);
    FeatureStructure[] fsArray = array.toArray();
    for (int i = 0; i < 3; i++) {
      assertTrue(fsArray[i] == null);
    }
    array.set(0, fs1);
    array.set(1, fs2);
View Full Code Here

Examples of org.apache.uima.cas.FloatArrayFS.toArray()

        FloatArrayFS arrayFS = (FloatArrayFS) aFS.getFeatureValue(feat);
        if (arrayFS == null) {
          attrs.addAttribute("", featName, featName, "CDATA", "null");
        } else {
          StringBuffer buf = new StringBuffer();
          float[] vals = arrayFS.toArray();
          buf.append('[');
          for (int i = 0; i < vals.length - 1; i++) {
            buf.append(vals[i]);
            buf.append(',');
          }
View Full Code Here

Examples of org.apache.uima.cas.IntArrayFS.toArray()

        IntArrayFS arrayFS = (IntArrayFS) aFS.getFeatureValue(feat);
        if (arrayFS == null) {
          attrs.addAttribute("", featName, featName, "CDATA", "null");
        } else {
          StringBuffer buf = new StringBuffer();
          int[] vals = arrayFS.toArray();
          buf.append('[');
          for (int i = 0; i < vals.length - 1; i++) {
            buf.append(vals[i]);
            buf.append(',');
          }
View Full Code Here

Examples of org.apache.uima.cas.StringArrayFS.toArray()

  }

  public void testToArray() {
    // From CAS array to Java array.
    StringArrayFS array = this.cas.createStringArrayFS(3);
    String[] fsArray = array.toArray();
    for (int i = 0; i < 3; i++) {
      assertTrue(fsArray[i] == null);
    }
    array.set(0, "1");
    array.set(1, "2");
View Full Code Here

Examples of org.apache.uima.cas.impl.DoubleArrayFSImpl.toArray()

    if(vname != null) {
      narray = vname.toArray();
    }
    double[] tarray = vtotal.toArray();
    int[] aarray = vamount.toArray();
    double[] parray = vpart.toArray();

    int i = 0;
    for (String each : narray) {
      result.add(new StatisticsEntry(each, tarray[i], aarray[i], parray[i]));
      i++;
View Full Code Here

Examples of org.apache.uima.cas.impl.IntArrayFSImpl.toArray()

    String[] narray = new String[0];
    if(vname != null) {
      narray = vname.toArray();
    }
    double[] tarray = vtotal.toArray();
    int[] aarray = vamount.toArray();
    double[] parray = vpart.toArray();

    int i = 0;
    for (String each : narray) {
      result.add(new StatisticsEntry(each, tarray[i], aarray[i], parray[i]));
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.