// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String DATASETS = "/datasets/";
// 
// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String DICOM_STORES = "/dicomStores/";
// 
// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String LOCATIONS = "/locations/";
// 
// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String PROJECTS = "/projects/";
// 
// Path: src/main/java/com/google/dicomwebfuse/exception/DicomFuseException.java
// public class DicomFuseException extends Exception {
// 
//   private int statusCode;
// 
//   public DicomFuseException(String message) {
//     super(message);
//   }
// 
//   public DicomFuseException(String message, Exception e) {
//     super(message, e);
//   }
// 
//   public DicomFuseException(Exception e) {
//     super(e);
//   }
// 
//   public DicomFuseException(String message, int statusCode) {
//     super(message);
//     this.statusCode = statusCode;
//   }
// 
//   public int getStatusCode() {
//     return statusCode;
//   }
// }


import static com.google.dicomwebfuse.dao.Constants.DATASETS;
import static com.google.dicomwebfuse.dao.Constants.DICOM_STORES;
import static com.google.dicomwebfuse.dao.Constants.LOCATIONS;
import static com.google.dicomwebfuse.dao.Constants.PROJECTS;
import com.google.dicomwebfuse.exception.DicomFuseException;
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.dicomwebfuse.dao.spec;



public class DicomStorePathBuilder implements PathBuilder {

  private QueryBuilder queryBuilder;

  public DicomStorePathBuilder(QueryBuilder queryBuilder) {
    this.queryBuilder = queryBuilder;
  }

  @Override
  public String toPath() throws DicomFuseException {
    String stage = queryBuilder.getCloudConf().getStage();
    if (stage == null) {
      throw new DicomFuseException("Stage must not be null!");
    }
// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String DATASETS = "/datasets/";
// 
// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String DICOM_STORES = "/dicomStores/";
// 
// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String LOCATIONS = "/locations/";
// 
// Path: src/main/java/com/google/dicomwebfuse/dao/Constants.java
// public static final String PROJECTS = "/projects/";
// 
// Path: src/main/java/com/google/dicomwebfuse/exception/DicomFuseException.java
// public class DicomFuseException extends Exception {
// 
//   private int statusCode;
// 
//   public DicomFuseException(String message) {
//     super(message);
//   }
// 
//   public DicomFuseException(String message, Exception e) {
//     super(message, e);
//   }
// 
//   public DicomFuseException(Exception e) {
//     super(e);
//   }
// 
//   public DicomFuseException(String message, int statusCode) {
//     super(message);
//     this.statusCode = statusCode;
//   }
// 
//   public int getStatusCode() {
//     return statusCode;
//   }
// }


// Path: src/main/java/com/google/dicomwebfuse/dao/spec/DicomStorePathBuilder.java
import static com.google.dicomwebfuse.dao.Constants.DATASETS;
import static com.google.dicomwebfuse.dao.Constants.DICOM_STORES;
import static com.google.dicomwebfuse.dao.Constants.LOCATIONS;
import static com.google.dicomwebfuse.dao.Constants.PROJECTS;
import com.google.dicomwebfuse.exception.DicomFuseException;

// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.dicomwebfuse.dao.spec;



public class DicomStorePathBuilder implements PathBuilder {

  private QueryBuilder queryBuilder;

  public DicomStorePathBuilder(QueryBuilder queryBuilder) {
    this.queryBuilder = queryBuilder;
  }

  @Override
  public String toPath() throws DicomFuseException {
    String stage = queryBuilder.getCloudConf().getStage();
    if (stage == null) {
      throw new DicomFuseException("Stage must not be null!");
    }
    String project = queryBuilder.getCloudConf().getProject();