PageRenderTime 372ms CodeModel.GetById 358ms RepoModel.GetById 0ms app.codeStats 0ms

/RestFB/library/src/main/java/com/restfb/types/Insight.java

http://restfb.googlecode.com/
Java | 80 lines | 23 code | 10 blank | 47 comment | 0 complexity | a850451a59ef7c916a7493da6414db65 MD5 | raw file
Possible License(s): JSON
  1. /*
  2. * Copyright (c) 2010-2011 Mark Allen.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a copy
  5. * of this software and associated documentation files (the "Software"), to deal
  6. * in the Software without restriction, including without limitation the rights
  7. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. * copies of the Software, and to permit persons to whom the Software is
  9. * furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. * THE SOFTWARE.
  21. */
  22. package com.restfb.types;
  23. import java.util.ArrayList;
  24. import java.util.List;
  25. import com.restfb.Facebook;
  26. import com.restfb.json.JsonObject;
  27. /**
  28. * Represents the <a
  29. * href="http://developers.facebook.com/docs/reference/api/insights" >Insight
  30. * Graph API type</a>.
  31. *
  32. * @author <a href="http://restfb.com">Mark Allen</a>
  33. * @since 1.6.3
  34. */
  35. public class Insight extends NamedFacebookType {
  36. @Facebook
  37. private String period;
  38. @Facebook
  39. private String description;
  40. @Facebook
  41. private List<JsonObject> values = new ArrayList<JsonObject>();
  42. private static final long serialVersionUID = 1L;
  43. /**
  44. * Length of the period during which the insights were collected, e.g. 'day',
  45. * 'week' or 'month'.
  46. *
  47. * @return Length of the period during which the insights were collected.
  48. */
  49. public String getPeriod() {
  50. return period;
  51. }
  52. /**
  53. * The human-readable description of this Insight data.
  54. *
  55. * @return The human-readable description of this Insight data.
  56. */
  57. public String getDescription() {
  58. return description;
  59. }
  60. /**
  61. * Data for this Insight as a list of
  62. * <tt>{@link com.restfb.json.JsonObject}</tt> because its structure can vary
  63. * depending on which type of Insight you're looking at.
  64. *
  65. * @return Data for this Insight.
  66. */
  67. public List<JsonObject> getValues() {
  68. return values;
  69. }
  70. }