congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RecipeList.size
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • putExtra (Intent)
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now