Package io.lumify.core.exception

Examples of io.lumify.core.exception.LumifyException


        for (int i = 0; i < sandboxStatuses.length; i++) {
            if (sandboxStatuses[i] == SandboxStatus.PUBLIC) {
                continue;
            }
            if (property != null) {
                throw new LumifyException("Found multiple non public properties.");
            }
            property = properties.get(i);
        }

        if (property == null) {
View Full Code Here


            }
            InputStream in = rawPropertyValue.getInputStream();
            try {
                thumbnail = artifactThumbnailRepository.createThumbnail(vertex, type, in, dimensions, user);
            } catch (IOException e) {
                throw new LumifyException("error creating thumbnail", e);
            }
        }

        return thumbnail.getThumbnailData();
    }
View Full Code Here

            if (this.outputDirectory != null) {
                data = tryXmlFormatting(data);

                File f = new File(this.outputDirectory, fileName);
                if (!f.getParentFile().exists() && !f.getParentFile().mkdirs()) {
                    throw new LumifyException("Could not create directory: " + f.getParentFile().getAbsolutePath());
                }
                FileUtils.write(f, data);
            }
        } catch (IOException ex) {
            throw new LumifyException("Could not write file: " + fileName + " with contents: " + data, ex);
        }
    }
View Full Code Here

    @Override
    protected int run(CommandLine cmd) throws Exception {
        String inputFileName = cmd.getOptionValue("in");
        File inputFile = new File(inputFileName);
        if (!inputFile.exists()) {
            throw new LumifyException("Could not find file: " + inputFileName);
        }

        RdfGraphPropertyWorker rdfGraphPropertyWorker = new RdfGraphPropertyWorker();

        Visibility visibility = new Visibility("");
View Full Code Here

                }
            }

            linesProcessedCounter.increment(1);
        } catch (Throwable ex) {
            throw new LumifyException("Could not process line: " + lineString, ex);
        }
    }
View Full Code Here

    public FlightRepository() {
        try {
            loadAirlines();
            loadAirports();
        } catch (IOException ex) {
            throw new LumifyException("Could not read dat files", ex);
        }
    }
View Full Code Here

    private String getCurrentUserId(AtmosphereResource resource) {
        String userId = CurrentUser.get(resource.getRequest());
        if (userId != null && userId.trim().length() > 0) {
            return userId;
        }
        throw new LumifyException("failed to get a current userId via an AtmosphereResource");
    }
View Full Code Here

    // <http://dbpedia.org/resource/Autism> <http://dbpedia.org/ontology/diseasesdb> "1142"@en .
    public static LineData parse(String line) {
        Matcher m = LINE_PATTERN.matcher(line);
        if (!m.matches()) {
            throw new LumifyException("Could not find match for line: " + line);
        }

        String pageUrl = m.group(1);
        String propertyIri = m.group(2);
        String valueRaw = m.group(3);
View Full Code Here

    }

    public static String parsePageTitleFromPageUrl(String pageUrl) {
        int lastSlash = pageUrl.lastIndexOf('/');
        if (lastSlash < 0) {
            throw new LumifyException("Could not parse page title from page url: " + pageUrl);
        }
        String pageTitle = pageUrl.substring(lastSlash + 1);
        pageTitle = pageTitle.replace('_', ' ');
        return pageTitle;
    }
View Full Code Here

        m = OTHER_VALUE_PATTERN.matcher(valueRaw);
        if (m.matches()) {
            return new OtherValue(m.group(1), m.group(2));
        }

        throw new LumifyException("Could not parse value: " + valueRaw);
    }
View Full Code Here

TOP

Related Classes of io.lumify.core.exception.LumifyException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.