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

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

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Option (scala)
  • Top 15 Vim Plugins
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