Package de.codecentric.moviedatabase.domain

Examples of de.codecentric.moviedatabase.domain.Tag


  public InMemoryMovieService(){
    // let the dummy Movie have always the same ID to test it easily via command line tools / unit tests
    Movie movie = new Movie(UUID.fromString("240342ea-84c8-415f-b1d5-8e4376191aeb"),
        "Star Wars","In einer Galaxie weit, weit entfernt",
        new Date());
    Tag tag = new Tag("Science Fiction");
    movie.getTags().add(tag);
    idToMovieMap.put(movie.getId(), movie);
    Set<Movie> movies = new HashSet<Movie>();
    movies.add(movie);
    tagToMoviesMap.put(tag, movies);
View Full Code Here


        if (token.length()!=0){
          if (token.startsWith("'")){
            // It's a tag!
            String[] splitAroundQuotes = token.split("'");
            // first one is empty, the second one is the tag
            tags.add(new Tag(splitAroundQuotes[1]));
            // if there is a rest they must be searchwords
            if (splitAroundQuotes.length > 2){
              for (int i = 2; i<splitAroundQuotes.length;i++){
                // split searchwords by blanks
                for (String searchWord: splitAroundQuotes[i].split(" ")){
View Full Code Here

TOP

Related Classes of de.codecentric.moviedatabase.domain.Tag

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.