Package model.array

Examples of model.array.MovieArray


      return null;
    }
  }
 
  public static MovieArray getOntologoyMovieList() {
    MovieArray movieList = new MovieArray();
    String queryText =   "SELECT ?uri WHERE { " +
                "?uri rdf:type h2mdb:Film . " +
              "} ";
    ResultSet resultSet = resultQuery(queryText);
   
    if (resultSet != null)
      while (resultSet.hasNext())
        movieList.add(new Movie(resultSet.next().get("uri").toString()));
   
    return movieList;
  }
View Full Code Here


    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);
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);
View Full Code Here

      progessBar.setProgress("The connection to DBpedia was not successful. The progam will try to update at next startup.");
    }
  }
 
  public MovieArray getMovieUpdateList() {
    MovieArray movieUpdateList = new MovieArray();
    MovieArray localMovieList = OntologyQueryer.getOntologoyMovieList();

    String queryDBPediaText =   "SELECT DISTINCT ?uri WHERE { " +
                    "?uri rdf:type yago:NorwegianFilms . " +
                  "}";
    ResultSet resultSet = DBPediaQueryer.resultQuery(queryDBPediaText);

    while(resultSet.hasNext()) {
      Movie movie = new Movie(resultSet.next().get("uri").toString());
      if (!localMovieList.contains(movie))
        movieUpdateList.add(movie);
    }

    return movieUpdateList;
  }
View Full Code Here

TOP

Related Classes of model.array.MovieArray

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.