Codota Logo
RecipeList.size
Code IndexAdd Codota to your IDE (free)

How to use
size
method
in
org.apache.stanbol.rules.base.api.util.RecipeList

Best Java code snippets using org.apache.stanbol.rules.base.api.util.RecipeList.size (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: apache/stanbol

public RecipeIterator(RecipeList recipeList) {
  this.listSize = recipeList.size();
  this.recipes = new Recipe[listSize];
  this.recipes = recipeList.toArray(this.recipes);
  this.currentIndex = 0;
}
origin: org.apache.stanbol/org.apache.stanbol.rules.manager

@Override
public RecipeList listRecipes() throws NoSuchRecipeException, RecipeConstructionException {
  RecipeList recipeList = new RecipeList();
  for (IRI recipeID : recipes) {
    Recipe recipe;
    try {
      recipe = getRecipe(recipeID);
    } catch (NoSuchRecipeException e) {
      throw e;
    } catch (RecipeConstructionException e) {
      throw e;
    }
    recipeList.add(recipe);
  }
  log.info("The Clerezza rule store contains {} recipes", recipeList.size());
  return recipeList;
}
origin: apache/stanbol

@Override
public RecipeList listRecipes() throws NoSuchRecipeException, RecipeConstructionException {
  RecipeList recipeList = new RecipeList();
  for (IRI recipeID : recipes) {
    Recipe recipe;
    try {
      recipe = getRecipe(recipeID);
    } catch (NoSuchRecipeException e) {
      throw e;
    } catch (RecipeConstructionException e) {
      throw e;
    }
    recipeList.add(recipe);
  }
  log.info("The Clerezza rule store contains {} recipes", recipeList.size());
  return recipeList;
}
origin: apache/stanbol

@Override
public RecipeList findRecipesByDescription(String term) {
  String sparql = "SELECT ?recipe " + "WHERE { ?recipe a " + Symbols.Recipe.toString() + " . "
          + "?recipe " + Symbols.description + " ?description . "
          + "FILTER (regex(?description, \"" + term + "\", \"i\"))" + "}";
  Graph tripleCollection = tcManager.getGraph(new IRI(recipeIndexLocation));
  RecipeList matchingRecipes = new RecipeList();
  try {
    SelectQuery query = (SelectQuery) QueryParser.getInstance().parse(sparql);
    ResultSet resultSet = tcManager.executeSparqlQuery(query, tripleCollection);
    while (resultSet.hasNext()) {
      SolutionMapping solutionMapping = resultSet.next();
      IRI recipeID = (IRI) solutionMapping.get("recipe");
      try {
        Recipe recipe = getRecipe(recipeID);
        log.info("Found recipe {}.", recipeID.toString());
        matchingRecipes.add(recipe);
        log.info("Found {} matching recipes.", matchingRecipes.size());
      } catch (NoSuchRecipeException e) {
        // in this case go on in the iteration by fetching other matching recipes
      } catch (RecipeConstructionException e) {
        // in this case go on in the iteration by fetching other matching recipes
      }
    }
  } catch (ParseException e) {
    log.error("The sparql query contains errors: ", e);
  }
  return matchingRecipes;
}
origin: org.apache.stanbol/org.apache.stanbol.rules.manager

@Override
public RecipeList findRecipesByDescription(String term) {
  String sparql = "SELECT ?recipe " + "WHERE { ?recipe a " + Symbols.Recipe.toString() + " . "
          + "?recipe " + Symbols.description + " ?description . "
          + "FILTER (regex(?description, \"" + term + "\", \"i\"))" + "}";
  Graph tripleCollection = tcManager.getGraph(new IRI(recipeIndexLocation));
  RecipeList matchingRecipes = new RecipeList();
  try {
    SelectQuery query = (SelectQuery) QueryParser.getInstance().parse(sparql);
    ResultSet resultSet = tcManager.executeSparqlQuery(query, tripleCollection);
    while (resultSet.hasNext()) {
      SolutionMapping solutionMapping = resultSet.next();
      IRI recipeID = (IRI) solutionMapping.get("recipe");
      try {
        Recipe recipe = getRecipe(recipeID);
        log.info("Found recipe {}.", recipeID.toString());
        matchingRecipes.add(recipe);
        log.info("Found {} matching recipes.", matchingRecipes.size());
      } catch (NoSuchRecipeException e) {
        // in this case go on in the iteration by fetching other matching recipes
      } catch (RecipeConstructionException e) {
        // in this case go on in the iteration by fetching other matching recipes
      }
    }
  } catch (ParseException e) {
    log.error("The sparql query contains errors: ", e);
  }
  return matchingRecipes;
}
org.apache.stanbol.rules.base.api.utilRecipeListsize

Popular methods of RecipeList

  • <init>
  • add
  • contains
  • isEmpty
  • toArray
  • updateList

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Kernel (java.awt.image)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now