Package model.array

Examples of model.array.ActorArray


   
    return movieList;
  }
 
  public static ActorArray getOntologoyActorList() {
    ActorArray actorList = new ActorArray();
    MovieArray movieList = getOntologoyMovieList();
    for (Movie m : movieList) {
      String queryText =   "SELECT ?actor WHERE { " +
                  "<" + m.getUri() + "> dbpedia-owl:starring ?actor  . " +
                "} ";
      ResultSet resultSet = resultQuery(queryText);
      if (resultSet != null)
        while (resultSet.hasNext())
          actorList.add(new Actor(resultSet.next().get("actor").toString()));
    }
   
    return actorList;
  }
View Full Code Here


  @Override
  public void run() {
    try {
      Thread.sleep(3000);
      MovieArray movieList = getMovieUpdateList();
      ActorArray actorList = getActorUpdateList(movieList);
      new CreateMovieModel(movieList, actorList).execute();
    } catch (Exception e) {
      ProgressBar progessBar = MainController.getInstance().getWindow().getProgessBar();
      progessBar.addProgressBar(0);
      progessBar.setProgress("The connection to DBpedia was not successful. The progam will try to update at next startup.");
View Full Code Here

    return movieUpdateList;
  }
 
  public ActorArray getActorUpdateList(MovieArray movieList) {
    ActorArray actorUpdateList = new ActorArray();
    ActorArray localActorList = OntologyQueryer.getOntologoyActorList();
   
    for (Movie m : movieList) {
      String query =  "SELECT ?actor WHERE { " +
                "<" + m.getUri() + "> " + "dbpedia-owl:starring ?actor . " +
              "} ";
      ResultSet resultSet = DBPediaQueryer.resultQuery(query);
      while(resultSet.hasNext()) {
        Actor actor = new Actor(resultSet.next().get("actor").toString());
        if (!localActorList.contains(actor))
          actorUpdateList.add(actor);
      }
    }
   
    return actorUpdateList;
View Full Code Here

TOP

Related Classes of model.array.ActorArray

Copyright © 2018 www.massapicom. 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.