Package io.lumify.core.exception

Examples of io.lumify.core.exception.LumifyException


    public void format() {
        try {
            LOGGER.info("deleting queue: %s", GRAPH_PROPERTY_QUEUE_NAME);
            channel.queueDelete(GRAPH_PROPERTY_QUEUE_NAME);
        } catch (IOException e) {
            throw new LumifyException("Could not delete queues", e);
        }
    }
View Full Code Here


        objectPropertyElement.setAttributeNS(ns.getNamespaceURI("rdf"), "rdf:about", uriToIri(uri));
        exportRootElement.appendChild(objectPropertyElement);

        if (asymmetricElements != null && asymmetricElements.size() > 0) {
            if (asymmetricElements.size() > 1) {
                throw new LumifyException("To many 'asymmetric' elements found. Expected 0 or 1, found " + asymmetricElements.size());
            }
            String parentToChildLabel = getXmlString(asymmetricElements.get(0), "parentToChild/displayName");
            String childToParentLabel = getXmlString(asymmetricElements.get(0), "childToParent/displayName");

            if (parentToChildLabel != null && parentToChildLabel.length() > 0) {
View Full Code Here

                            } catch (Throwable ex) {
                                LOGGER.error("problem in broadcast thread", ex);
                            }
                        }
                    } catch (InterruptedException e) {
                        throw new LumifyException("broadcast listener has died", e);
                    }
                }
            });
            t.setName("rabbitmq-subscribe-" + broadcastConsumer.getClass().getName());
            t.setDaemon(true);
            t.start();
        } catch (IOException e) {
            throw new LumifyException("Could not subscribe to broadcasts", e);
        }
    }
View Full Code Here

        }

        try {
            return xPath.evaluate(xpath, inXml);
        } catch (Exception ex) {
            throw new LumifyException("Could not run xpath: " + xpath, ex);
        }
    }
View Full Code Here

            JSONObject queueItem = new JSONObject(new String(delivery.getBody()));
            long deliveryTag = delivery.getEnvelope().getDeliveryTag();
            LOGGER.debug("received message from long running process queue [%s]: %s", LONG_RUNNING_PROCESS_QUEUE_NAME, queueItem.toString());
            return new RabbitMQLongRunningProcessMessage(queueItem, deliveryTag);
        } catch (Exception e) {
            throw new LumifyException("Could not read long running process queue", e);
        }
    }
View Full Code Here

            for (int i = 0; i < nodeList.getLength(); i++) {
                results.add((Element) nodeList.item(i));
            }
            return results;
        } catch (Exception ex) {
            throw new LumifyException("Could not run xpath: " + xpath, ex);
        }
    }
View Full Code Here

    public static Channel openChannel(Connection connection) {
        try {
            return connection.createChannel();
        } catch (IOException ex) {
            throw new LumifyException("Could not open channel to RabbitMQ", ex);
        }
    }
View Full Code Here

        String sourceVertexId = getObjectVertexId(row.getParentObjectId());
        String destVertexId = getObjectVertexId(row.getChildObjectId());

        PtLinkType ptLinkType = getDataImporter().getLinkTypes().get(row.getType());
        if (ptLinkType == null) {
            throw new LumifyException("Could not find link type: " + row.getType());
        }
        String linkTypeUri = getLinkTypeUri(ptLinkType.getUri());

        String edgeId = getEdgeId(row);
        getDataImporter().getGraph().addEdge(edgeId, sourceVertexId, destVertexId, linkTypeUri, getDataImporter().getVisibility(), getDataImporter().getAuthorizations());
View Full Code Here

    public static Connection openConnection(Configuration configuration) throws IOException {
        ConnectionFactory factory = new ConnectionFactory();
        Address[] addresses = getAddresses(configuration);
        if (addresses.length == 0) {
            throw new LumifyException("Could not configure RabbitMQ. No addresses specified. expecting configuration parameter 'rabbitmq.addr.0.host'.");
        }
        return factory.newConnection(addresses);
    }
View Full Code Here

        Session session = sessionManager.getSession();
        List workspaces = session.createCriteria(SqlWorkspace.class).add(Restrictions.eq("workspaceId", workspaceId)).list();
        if (workspaces.size() == 0) {
            return null;
        } else if (workspaces.size() > 1) {
            throw new LumifyException("more than one workspace was returned");
        } else {
            if (!hasReadPermissions(workspaceId, user)) {
                throw new LumifyAccessDeniedException("user " + user.getUserId() + " does not have read access to workspace " + workspaceId, user, workspaceId);
            }
            return (SqlWorkspace) workspaces.get(0);
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.