Codota Logo
RecipeList.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.apache.stanbol.rules.base.api.util.RecipeList
constructor

Best Java code snippets using org.apache.stanbol.rules.base.api.util.RecipeList.<init> (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: 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: stackoverflow.com

RecipeList classObject = new RecipeList();
classObject.updateList(editedRecipe);
selectedRecipe = editedRecipe;
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.utilRecipeList<init>

Popular methods of RecipeList

  • size
  • add
  • contains
  • isEmpty
  • toArray
  • updateList

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • IOException (java.io)
    Signals that an I/O exception of some sort has occurred. This class is the general class of exceptio
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • 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