title: Architecture with several data sources using Repository pattern
body: <p>I have a project using MVP architecture.
  This project use the Repository pattern.</p>
  
  <p>I have two data sources, the first one come from a remote JSON Api through <code>PollutionApiService</code>, the second is just trivial data I get from an XML file in the assets folder : <code>air_quality_levels.xml</code>. The network data contains real time pollution levels, the XML file contains the limits standard for these pollution levels.</p>
  
  <p>For now I just have a Repository implemented for the JSON Api, it looks like this :</p>
  
  <p><strong>Interface</strong></p>
  
  <pre><code>public interface Repository {
      Observable&lt;Aqicn&gt; getPollutionLevelsFromNetwork(String city, String authToken);
     Observable&lt;Aqicn&gt; getPollutionLevels(String city, String authToken);
  }
  </code></pre>
  
  <p><strong>Class</strong></p>
  
  <pre><code>public class PollutionLevelsRepository implements Repository {
      private PollutionApiService pollutionApiService;
      private static Observable&lt;Aqicn&gt; pollutionData = null;
  
  
      public PollutionLevelsRepository(PollutionApiService pollutionApiService) {
          this.pollutionApiService = pollutionApiService;
      }
  
      @Override
      public Observable&lt;Aqicn&gt; getPollutionLevelsFromNetwork(String city, String authToken) {
          pollutionData = pollutionApiService.getPollutionObservable(city, authToken);
          return pollutionData;
      }
  
      @Override
      public Observable&lt;Aqicn&gt; getPollutionLevels(String city, String authToken) {
          return getPollutionLevelsFromNetwork(city, authToken);
      }
  }
  </code></pre>
  
  <p>Should I use the same repository (adding more methods) for the data I will get from the XML file in the assets folder ? </p>
  
  <p>If I have to use two repositories, How should I name this second repository interface ? I never had several repositories so I always use the generic name "Repository" for the interface. I can't give it the same name as the class and can't add a "I" prefix as I read it's bad practice... Or should I keep this "Repository" name and put the new Repository in another package ?</p>
  
  <p>This is my actual project structure, note that I package by features but I put my both repositories in the common package because it gets data that will be used by my both features (donut and pollutionlevels) :</p>
  
  <p><a href="https://i.stack.imgur.com/S9qyo.png" rel="noreferrer"><img src="https://i.stack.imgur.com/S9qyo.png" alt="enter image description here"></a></p>
  
  <p>If you have short relevant suggestions about the architecture in general they are welcome.</p>