Package io.lumify.core.exception

Examples of io.lumify.core.exception.LumifyException


        for (String profileFileName : filesList) {
            LOGGER.info("Copying langdetect profile file: %s", profileFileName);
            try {
                copyProfileFile(profileFileName, tempDirectory);
            } catch (Exception ex) {
                throw new LumifyException("Could not load profile file '" + profileFileName + "' to '" + tempDirectory + "'");
            }
        }
        LOGGER.info("created profile directory: %s", tempDirectory);
        return tempDirectory;
    }
View Full Code Here


            if (!(n instanceof Element)) {
                continue;
            }
            if (((Element) n).getTagName().equals(tagName)) {
                if (result != null) {
                    throw new LumifyException("Too many elements with tag name " + tagName);
                }
                result = (Element) n;
            }
        }
        return result;
View Full Code Here

            }
            if (arg.startsWith("tokens=")) {
                formulas.add(arg.substring("tokens=".length()));
                continue;
            }
            throw new LumifyException("Could not parse arg formula " + arg);
        }
    }
View Full Code Here

                twitter4j = true;
                return;
            }
        }

        throw new LumifyException("You must specify one input method");
    }
View Full Code Here

                matcher.appendReplacement(output, Matcher.quoteReplacement(v));
            }
            matcher.appendTail(output);
            return output.toString();
        } catch (Exception ex) {
            throw new LumifyException("Could not format using formula: " + displayFormula, ex);
        }
    }
View Full Code Here

        } else if (stream) {
            spout = new TwitterStreamSpout();
        } else if (twitter4j) {
            spout = new Twitter4jSpout();
        } else {
            throw new LumifyException("You must specify one input method");
        }

        String name = "lumify-twitter";
        builder.setSpout(name + "-spout", spout, 1)
                .setMaxTaskParallelism(1);
View Full Code Here

                    values.put(e.getTagName(), e.getTextContent());
                }
            }
            return values;
        } catch (Exception e) {
            throw new LumifyException("Could not parse value into values: " + value, e);
        }
    }
View Full Code Here

    public void prepare(GraphPropertyWorkerPrepareData workerPrepareData) throws Exception {
        super.prepare(workerPrepareData);

        this.entityHasImageIri = this.getConfiguration().get(Configuration.ONTOLOGY_IRI_ENTITY_HAS_IMAGE);
        if (this.entityHasImageIri == null) {
            throw new LumifyException("Could not find configuration for " + Configuration.ONTOLOGY_IRI_ENTITY_HAS_IMAGE);
        }
    }
View Full Code Here

    public User addUser(String username, String displayName, String emailAddress, String password, String[] userAuthorizations) {
        username = formatUsername(username);
        displayName = displayName.trim();
        User existingUser = findByUsername(username);
        if (existingUser != null) {
            throw new LumifyException("duplicate username");
        }

        String authorizationsString = StringUtils.join(userAuthorizations, ",");

        byte[] salt = UserPasswordUtil.getSalt();
View Full Code Here

    public void open(Map map, TopologyContext topologyContext, SpoutOutputCollector collector) {
        this.collector = collector;
        try {
            tweetStreamReader = new TweetStreamReader(new FileInputStream(fileName));
        } catch (IOException e) {
            throw new LumifyException("Could not read file: " + fileName);
        }
    }
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.