Package ch.entwine.weblounge.common.impl.content.movie

Examples of ch.entwine.weblounge.common.impl.content.movie.MovieResourceSearchResultItemImpl


      throw new RuntimeException(e);
    }

    Option<Date> harvestingDate = Option.<Date> none();
    if (searchResult.getHitCount() > 0) {
      MovieResourceSearchResultItemImpl resultItem = (MovieResourceSearchResultItemImpl) searchResult.getItems()[0];
      harvestingDate = some(resultItem.getMovieResource().getPublishFrom());
    }

    try {
      harvest(repositoryUrl, harvestingDate, handler);
    } catch (Exception e) {
View Full Code Here


      ResourceSearchResultItem resourceResult = (ResourceSearchResultItem) searchResult.getItems()[0];
      deleteResource(resourceResult.getResourceURI());
      logger.info("Deleted harvestet resource " + recordIdentifier);
    } else {
      if (searchResult.getHitCount() == 1) {
        MovieResourceSearchResultItemImpl movieResultItem = (MovieResourceSearchResultItemImpl) searchResult.getItems()[0];
        MovieResource movieResource = movieResultItem.getMovieResource();

        if (!date.after(movieResource.getPublishFrom()))
          return;
        logger.warn("Update harvested element {}", recordIdentifier);
View Full Code Here

      path = URI_PREFIX + "/" + id;
      url = new WebUrlImpl(site, path);
    }

    ResourceURI uri = new MovieResourceURIImpl(site, path, id, version);
    MovieResourceSearchResultItemImpl result = new MovieResourceSearchResultItemImpl(uri, url, relevance, site, metadata);

    if (metadataMap.get(XML) != null)
      result.setResourceXml((String) metadataMap.get(XML).getValues().get(0));
    if (metadataMap.get(HEADER_XML) != null)
      result.setAudioVisualHeaderXml((String) metadataMap.get(HEADER_XML).getValues().get(0));
    // TODO: Add remaining metadata

    return result;
  }
View Full Code Here

TOP

Related Classes of ch.entwine.weblounge.common.impl.content.movie.MovieResourceSearchResultItemImpl

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.