Return all submissions using the specified verb from the specified submitter for the resource
@param submitter
@param resourceUrl
@return
@throws Exception
322177
public List<ISubmission> getSubmissionsForSubmitter(ISubmitter submitter, String resourceUrl, String verb) throws Exception{
		return new SubmitterSubmissionsFilter().include(new NormalizingFilter(IRating.VERB).filter(getSubmissions(resourceUrl)), submitter);
	}
751352
static public JSONObject getSubmittedDocumentFromSubmission(JSONObject submissionDoc) throws Exception {
		JSONObject submissionInfo = submissionDoc.getJSONObject("nunaliit_submission");
		
		JSONObject doc = submissionInfo.getJSONObject("submitted_doc");
		JSONObject reserved = submissionInfo.optJSONObject("submitted_reserved");
		
		return recreateDocumentFromDocAndReserved(doc, reserved);
	}
1153150
protected String excuteGet(String url, boolean useURI) throws Exception {
		HttpClient httpClient = getHttpClient();
		HttpUriRequest request = getGetRequest(url, useURI);
		
		HttpResponse httpResponse = httpClient.execute(request);

		String response = parseResponse(url, httpResponse);
		return response;
	}
626452
public static vpnurl get(nitro_service service, String urlname) throws Exception{
		vpnurl obj = new vpnurl();
		obj.set_urlname(urlname);
		vpnurl response = (vpnurl) obj.get_resource(service);
		return response;
	}
499552
private static Reader readerFromUrl(String resourceName) throws IOException {
    URL resourceUrl = TemplateVars.class.getResource(resourceName);
    InputStream in;
    try {
      if (resourceUrl.getProtocol().equalsIgnoreCase("file")) {
        in = inputStreamFromFile(resourceUrl);
      } else if (resourceUrl.getProtocol().equalsIgnoreCase("jar")) {
        in = inputStreamFromJar(resourceUrl);
      } else {
        throw new AssertionError("Template fallback logic fails for: " + resourceUrl);
      }
    } catch (URISyntaxException e) {
      throw new IOException(e);
    }
    return new InputStreamReader(in, StandardCharsets.UTF_8);
  }
542577
public void submitAnswer(JSONObject answer, String realm) {
        if (answers == null) {
            answers = new JSONObject();
        }

        try {
            answers.put(realm, answer);
            if (isAnswersFilled()) {
                resendRequest();
            }
        } catch (Throwable t) {
            logger.error("submitAnswer failed with exception: " + t.getLocalizedMessage(), t);
        }
    }
866765
protected void processJawrServlets(String destDirPath,
			List<ServletDefinition> jawrServletDefinitions,
			boolean keepUrlMapping) throws Exception {

		String appRootDir = "";
		String jsServletMapping = "";
		String cssServletMapping = "";
		String binaryServletMapping = "";

		for (Iterator<ServletDefinition> iterator = jawrServletDefinitions
				.iterator(); iterator.hasNext();) {

			ServletDefinition servletDef = (ServletDefinition) iterator.next();
			ServletConfig servletConfig = servletDef.getServletConfig();

			// Force the production mode, and remove config listener parameters
			Map<?, ?> initParameters = ((MockServletConfig) servletConfig)
					.getInitParameters();
			initParameters.remove("jawr.config.reload.interval");

			String jawrServletMapping = servletConfig
					.getInitParameter(JawrConstant.SERVLET_MAPPING_PROPERTY_NAME);
			String servletMapping = servletConfig
					.getInitParameter(JawrConstant.SPRING_SERVLET_MAPPING_PROPERTY_NAME);
			if (servletMapping == null) {
				servletMapping = jawrServletMapping;
			}

			ResourceBundlesHandler bundleHandler = null;
			BinaryResourcesHandler binaryRsHandler = null;

			// Retrieve the bundle Handler
			ServletContext servletContext = servletConfig.getServletContext();
			String type = servletConfig.getInitParameter(TYPE_INIT_PARAMETER);
			if (type == null || type.equals(JawrConstant.JS_TYPE)) {
				bundleHandler = (ResourceBundlesHandler) servletContext
						.getAttribute(JawrConstant.JS_CONTEXT_ATTRIBUTE);
				String contextPathOverride = bundleHandler.getConfig()
						.getContextPathOverride();
				if (StringUtils.isNotEmpty(contextPathOverride)) {
					int idx = contextPathOverride.indexOf("//");
					if (idx != -1) {
						idx = contextPathOverride.indexOf("/", idx + 2);
						if (idx != -1) {
							appRootDir = PathNormalizer
									.asPath(contextPathOverride.substring(idx));
						}
					}
				}

				if (jawrServletMapping != null) {
					jsServletMapping = PathNormalizer
							.asPath(jawrServletMapping);
				}

			} else if (type.equals(JawrConstant.CSS_TYPE)) {
				bundleHandler = (ResourceBundlesHandler) servletContext
						.getAttribute(JawrConstant.CSS_CONTEXT_ATTRIBUTE);
				if (jawrServletMapping != null) {
					cssServletMapping = PathNormalizer
							.asPath(jawrServletMapping);
				}
			} else if (type.equals(JawrConstant.BINARY_TYPE)) {
				binaryRsHandler = (BinaryResourcesHandler) servletContext
						.getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE);
				if (jawrServletMapping != null) {
					binaryServletMapping = PathNormalizer
							.asPath(jawrServletMapping);
				}
			}

			if (bundleHandler != null) {
				createBundles(servletDef.getServlet(), bundleHandler,
						destDirPath, servletMapping, keepUrlMapping);
			} else if (binaryRsHandler != null) {
				createBinaryBundle(servletDef.getServlet(), binaryRsHandler,
						destDirPath, servletConfig, keepUrlMapping);
			}
		}

		// Create the apache rewrite config file.
		createApacheRewriteConfigFile(destDirPath, appRootDir,
				jsServletMapping, cssServletMapping, binaryServletMapping);

	}
331356
private static File getFile(URL resourceUrl) {
    try {
      return new File(new URI(resourceUrl.toString()).getPath());
    } catch (URISyntaxException e) {
      throw new RuntimeException(e);
    } catch (NullPointerException npe) {
      LOG.error("NullPointerException is thrown. Resource url: {} ", resourceUrl);
      throw new RuntimeException(npe);
    }
  }
512607
@Override
	NodeList eval(XMLResource resource) throws Exception {
		NodeList retVal = (NodeList) xPathExpression.evaluate(resource.doc(), XPathConstants.NODESET);
		return retVal;
	}
553796
@RequestMapping(value = "/api/resource/{pluginName}/**", method = RequestMethod.GET)
    public
    @ResponseBody
    byte[] getResourceFile(Model model, @PathVariable String pluginName, HttpServletRequest request) throws Exception {
        try {
            String url = (String) request.getAttribute(
                    HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
            String fileName = url.replaceFirst("/api/resource/" + pluginName + "/", "");

            return PluginManager.getInstance().getResource(pluginName, fileName);
        } catch (Exception e) {
            throw new ResourceNotFoundException();
        }
    }
548817
public List<ISubmission> getSubmissions() throws Exception{
		
		List<ISubmission> submissions = new ArrayList<ISubmission>();
		
		LRImporter importer = new LRImporter(node.getHost(), node.getScheme());
		
		submissions = getMoreSubmissions(importer, submissions, null);
		
		return submissions;
	}
1117321
public <T> T performGetRequest(String url, Class<T> returnType, Map<String, String> uriVariables) {

        int tryNumber = 1;
        while(tryNumber <= API_RETRY) {
            try {
                return restTemplate.getForObject(url, returnType, uriVariables);
            } catch (HttpStatusCodeException error) {
                boolean isTooManyRequestsError = handleHttpStatusCodeError(uriVariables, tryNumber, error);
                if (isTooManyRequestsError) {
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        log.error("Error in performGetRequest", e);
                    }
                } else {
                    tryNumber++;
                }
            } catch (Exception e) {
                handleApiError(tryNumber, e);
                tryNumber++;
            }
        }

        throw new RestApiException("Error getting " + returnType.getSimpleName() + " url variables " + uriVariables.toString());

    }
1127850
def get_resource(url, subdomain):
    
    headers = {"Accept": "application/vnd.collection+json"}
    response = IASYSTEM_DAO().getURL(url, headers, subdomain)

    logger.info("%s ==status==> %s" % (url, response.status))

    if response.status != 200:
        logger.error("%s ==data==> %s" % (url, response.data))
        raise DataFailureException(url, response.status, response.data)

    return json.loads(response.data)
840440
@Override
    public URL getResource() {
        EntryInfo entryInfo = getEntryInfo();
        if (entryInfo == null) {
            return null;
        }
        Collection<URL> urls = entryInfo.getURLs(getPath());
        Iterator<URL> urlIterator = urls.iterator();

        URL url = urlIterator.hasNext() ? urlIterator.next() : null;
        return url;
    }
667619
def get_submissions():
    """"""
    print(request.args.to_dict())
    print(request.args.get('search[value]'))
    print(request.args.get('draw', 1))
    # submissions  = session.query(Submission).all()
    if request.args.get('correct_filter', 'all') == 'all':
        correct_filter = [True, False]
    elif request.args['correct_filter'] == 'correct':
        correct_filter = [True]
    else:
        correct_filter = [False]
    
    if request.args.get('order[0][column]', '0') == '0':
        column = 'id'
    elif request.args['order[0][column]'] == '1':
        column = 'text'
    else:
        column = 'primary_error'
        
    order_str = "{} {}".format(column, request.args.get('order[0][dir]', 'desc'))

    search_val = request.args.get('search[value]')
    draw = request.args.get('draw', 1)
    filtered_len = session.query(Submission)\
            .filter(Submission.text.startswith(search_val))\
            .filter(Submission.correct.in_(correct_filter))\
            .count()
    subs = \
            session.query(Submission).filter(Submission.text.startswith(search_val))\
            .filter(Submission.correct.in_(correct_filter))\
            .order_by(order_str)\
            .offset(request.args.get('start', 0))\
            .limit(request.args.get('length', 10))\
            .all()
    submissions = {'draw': draw, 'recordsTotal':0, 'recordsFiltered':0, 'data':[]}
    i = 0
    for i, submission in enumerate(subs):
       submissions['data'].append([submission.id, submission.text,
           submission.primary_error, submission.correct]) 
    submissions['recordsTotal'] = session.query(Submission).count() 
    submissions['recordsFiltered'] = filtered_len 

    return jsonify(submissions)
8687
public static Response post(String url)
        throws URISyntaxException, UnsupportedEncodingException, HttpException {
        return postParams(new HttpPost(url), new ArrayList<NameValuePair>(), null, null);
    }
696824
def do_requests_to_getall(self, uri, requested_count):
        
        items = []

        while uri:
            logger.debug('Making HTTP request to get all resources. Uri: {0}'.format(uri))
            response = self._connection.get(uri)
            members = self.get_members(response)
            items += members

            logger.debug("Response getAll: nextPageUri = {0}, members list length: {1}".format(uri, str(len(members))))
            uri = self.get_next_page(response, items, requested_count)

        logger.debug('Total # of members found = {0}'.format(str(len(items))))
        return items