Example usage for org.apache.commons.lang NotImplementedException NotImplementedException

List of usage examples for org.apache.commons.lang NotImplementedException NotImplementedException

Introduction

In this page you can find the example usage for org.apache.commons.lang NotImplementedException NotImplementedException.

Prototype

public NotImplementedException(Class clazz) 

Source Link

Document

Constructs a new NotImplementedException referencing the specified class.

Usage

From source file:com.opengamma.analytics.math.statistics.leastsquare.LeastSquareResults.java

/**
 * This a matrix where the i,jth element is the (infinitesimal) sensitivity of the ith fitting parameter to the jth data
 * point (NOT the model point), when the fitting parameter are such that the chi-squared is minimised. So it is a type of (inverse)
 * Jacobian, but should not be confused with the model jacobian (sensitivity of model data points, to parameters) or its inverse.
 * @return a matrix// ww w  .j  av  a2 s.c o m
 */
public DoubleMatrix2D getFittingParameterSensitivityToData() {
    if (_inverseJacobian == null) {
        throw new NotImplementedException("The inverse Jacobian was not set");
    }
    return _inverseJacobian;
}

From source file:io.mandrel.endpoints.web.DataController.java

@RequestMapping(value = "/spiders/{id}/data/{extractor}", method = RequestMethod.POST)
@ResponseBody/*w w w .j a v  a  2 s  .com*/
public PageResponse data(@PathVariable Long id, @PathVariable String extractor, PageRequest request,
        Model model) {
    Spider spider = spiderService.get(id);

    DocumentStore theStore = DocumentStores.get(id, extractor).orElseThrow(() -> new NotFoundException(""));

    if (!theStore.isNavigable()) {
        throw new NotImplementedException("Not a navigable document store");
    }
    NavigableDocumentStore store = (NavigableDocumentStore) theStore;

    DataExtractor theExtractor = spider.getExtractors().getData().stream()
            .filter(ex -> extractor.equals(ex.name())).findFirst().orElseThrow(() -> new NotFoundException(""));

    if (theExtractor instanceof DefaultDataExtractor) {
        throw new NotImplementedException("Not a default data extractor");
    }

    Collection<Document> page = store.byPages(request.getLength(), request.getStart() / request.getLength());
    page.forEach(doc -> ((DefaultDataExtractor) theExtractor).getFields()
            .forEach(f -> doc.putIfAbsent(f.getName(), Collections.emptyList())));
    Long total = store.total();

    PageResponse dataPage = PageResponse.of(page);
    dataPage.setDraw(request.getDraw());
    dataPage.setRecordsTotal(total);
    dataPage.setRecordsFiltered(total);
    return dataPage;
}

From source file:com.opengamma.analytics.financial.provider.description.forex.BlackForexVannaVolgaProvider.java

/**
 * Returns volatility smile for an expiration.
 * @param ccy1 The first currency.//www. j a va 2s  .  c  o  m
 * @param ccy2 The second currency.
 * @param time The expiration time.
 * @return The smile.
 */
@Override
public SmileDeltaParameters getSmile(final Currency ccy1, final Currency ccy2, final double time) {
    ArgumentChecker.notNull(ccy1, "first currency");
    ArgumentChecker.notNull(ccy2, "second currency");
    ArgumentChecker.isTrue(checkCurrencies(ccy1, ccy2), "Incomptabile currencies");
    final SmileDeltaParameters smile = _smile.getSmileForTime(time);
    if (ccy1.equals(getCurrencyPair().getFirst()) && ccy2.equals(getCurrencyPair().getSecond())) {
        return smile;
    }
    throw new NotImplementedException("Currency pair is not in expected order " + getCurrencyPair().toString());
}

From source file:com.bloatit.framework.webprocessor.url.Loaders.java

private @SuppressWarnings({ "unchecked", "synthetic-access", "rawtypes" }) static <T> Loader<T> getLoader(
        final Class<T> theClass) {
    if (theClass.equals(Integer.class)) {
        return (Loader<T>) new ToInteger();
    }//from   w ww . j av a 2s. c  o m
    if (theClass.equals(Byte.class)) {
        return (Loader<T>) new ToByte();
    }
    if (theClass.isEnum()) {
        return new ToEnum(theClass);
    }
    if (theClass.equals(Short.class)) {
        return (Loader<T>) new ToShort();
    }
    if (theClass.equals(Long.class)) {
        return (Loader<T>) new ToLong();
    }
    if (theClass.equals(Float.class)) {
        return (Loader<T>) new ToFloat();
    }
    if (theClass.equals(Double.class)) {
        return (Loader<T>) new ToDouble();
    }
    if (theClass.equals(Character.class)) {
        return (Loader<T>) new ToCharacter();
    }
    if (theClass.equals(Boolean.class)) {
        return (Loader<T>) new ToBoolean();
    }
    if (theClass.equals(BigDecimal.class)) {
        return (Loader<T>) new ToBigdecimal();
    }
    if (theClass.equals(String.class)) {
        return (Loader<T>) new ToString();
    }
    if (theClass.equals(Locale.class)) {
        return (Loader<T>) new ToLocale();
    }
    if (theClass.equals(Date.class)) {
        return (Loader<T>) new ToDate();
    }
    if (Commentable.class.equals(theClass)) {
        return (Loader<T>) new ToCommentable();
    }
    if (theClass.equals(DateLocale.class)) {
        return (Loader<T>) new ToBloatitDate();
    }
    if (IdentifiableInterface.class.isAssignableFrom(theClass)) {
        return new ToIdentifiable(theClass);
    }
    if (WebProcess.class.isAssignableFrom(theClass)) {
        return new ToWebProcess();
    }
    throw new NotImplementedException("Cannot find a conversion class for: " + theClass);
}

From source file:com.ikon.principal.UsersRolesPrincipalAdapter.java

@Override
public List<String> getRolesByUser(String user) throws PrincipalAdapterException {
    throw new NotImplementedException("getRolesByUser");
}

From source file:edu.unc.lib.dl.admin.controller.RESTProxyController.java

@RequestMapping(value = { "/services/rest", "/services/rest/*", "/services/rest/**/*" })
public final void proxyAjaxCall(HttpServletRequest request, HttpServletResponse response) throws IOException {
    log.debug("Prepending service url " + this.servicesUrl + " to " + request.getRequestURI());
    String url = request.getRequestURI().replaceFirst(".*/services/rest/?", this.servicesUrl);
    if (request.getQueryString() != null)
        url = url + "?" + request.getQueryString();

    OutputStreamWriter writer = new OutputStreamWriter(response.getOutputStream());
    HttpClient client = new HttpClient();
    HttpMethod method = null;//from   w w  w. j  av  a2s .  com
    try {
        log.debug("Proxying ajax request to services REST api via " + request.getMethod());
        // Split this according to the type of request
        if (request.getMethod().equals("GET")) {
            method = new GetMethod(url);
        } else if (request.getMethod().equals("POST")) {
            method = new PostMethod(url);
            // Set any eventual parameters that came with our original
            // request (POST params, for instance)
            Enumeration<String> paramNames = request.getParameterNames();
            while (paramNames.hasMoreElements()) {
                String paramName = paramNames.nextElement();
                ((PostMethod) method).setParameter(paramName, request.getParameter(paramName));
            }
        } else {
            throw new NotImplementedException("This proxy only supports GET and POST methods.");
        }

        // Forward the user's groups along with the request
        method.addRequestHeader(HttpClientUtil.SHIBBOLETH_GROUPS_HEADER, GroupsThreadStore.getGroupString());
        method.addRequestHeader("On-Behalf-Of", GroupsThreadStore.getUsername());

        // Execute the method
        client.executeMethod(method);

        // Set the content type, as it comes from the server
        Header[] headers = method.getResponseHeaders();
        for (Header header : headers) {
            if ("Content-Type".equalsIgnoreCase(header.getName())) {
                response.setContentType(header.getValue());
            }
        }
        try (InputStream responseStream = method.getResponseBodyAsStream()) {
            int b;
            while ((b = responseStream.read()) != -1) {
                response.getOutputStream().write(b);
            }
        }
        response.getOutputStream().flush();
    } catch (HttpException e) {
        writer.write(e.toString());
        throw e;
    } catch (IOException e) {
        e.printStackTrace();
        writer.write(e.toString());
        throw e;
    } finally {
        if (method != null)
            method.releaseConnection();
    }
}

From source file:de.tudarmstadt.lt.utilities.io.LineProcessor.java

void runParallel(Reader r) {
    throw new NotImplementedException("This functionality is not implemented here");
    // TODO: once java8 is activated uncomment the following lines 
    //      BufferedReader br = new BufferedReader(r);
    //      br.lines().parallel().forEach(line -> processLine(line));
}

From source file:com.impetus.kundera.query.QueryImpl.java

@Override
public Query setParameter(int position, Object value) {
    throw new NotImplementedException("TODO");
}

From source file:at.ac.tuwien.infosys.jcloudscale.utility.ReferenceHashmap.java

@Override
public Set<K> keySet() {

    throw new NotImplementedException("keySet not implemented");

}

From source file:com.feilong.framework.netpay.advance.AbstractPaymentAdvanceAdaptor.java

@Override
public boolean closeTrade(String orderNo, TradeRole tradeRole) throws TradeCloseException {
    throw new NotImplementedException("closeTrade is not implemented!");
}