Package org.impalaframework.graph

Examples of org.impalaframework.graph.Vertex


        final ModuleDefinition moduleDefinition = vertex.getModuleDefinition();
       
        final List<String> dependentModuleNames = moduleDefinition.getDependentModuleNames();
        for (String dependent : dependentModuleNames) {
           
            final Vertex dependentVertex = vertexMap.get(dependent);
           
            if (dependentVertex == null) {
                throw new InvalidStateException("Unable to dependency named named '" + dependent
                        + "' for module definition '" + moduleDefinition.getName() + "'");
               
View Full Code Here


    Assert.notNull(parent, "parent cannot be null");
    Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
   
    logger.info("With parent '" + parent + "', adding module: " + moduleDefinition);
   
    final Vertex parentVertex = getRequiredVertex(parent);
   
    ModuleDefinition parentDefinition = parentVertex.getModuleDefinition();
    parentDefinition.addChildModuleDefinition(moduleDefinition);
    moduleDefinition.setParentDefinition(parentDefinition);
   
    //now recursively add definitions
    List<Vertex> addedVertices = new ArrayList<Vertex>();
View Full Code Here

      dump();
    }
  }

  private Vertex getRequiredVertex(String moduleName) {
    final Vertex parentVertex = vertexMap.get(moduleName);
    if (parentVertex == null) {
     
      if (logger.isDebugEnabled()) {
        logger.debug("Module '" + moduleName + "' not found.");
        dump();
View Full Code Here

   */
    private List<Vertex> getVertexAndOrderedDependants(String name) {
   
    Assert.notNull(name, "name cannot be null");
   
    final Vertex current = getRequiredVertex(name);
   
    //get all dependents
    final List<Vertex> dependents = getVertexDependants(name);
    List<Vertex> ordered = getOrderedDependants(current, dependents);
    return ordered;
View Full Code Here

   */
  private List<Vertex> getVertexDependencyList(String name) { 
   
    Assert.notNull(name, "name cannot be null");
   
    Vertex vertex = getRequiredVertex(name);
   
    //list the vertices in the correct order
    final List<Vertex> vertextList = GraphHelper.list(vertex);
    return vertextList;
  }
View Full Code Here

    Assert.notNull(definitions, "definitions cannot be null");
   
    List<Vertex> vertices = new ArrayList<Vertex>();
    for (ModuleDefinition moduleDefinition : definitions) {
      final Vertex vertex = getRequiredVertex(moduleDefinition.getName());
     
      vertices.add(vertex);
    }
    return vertices;
  }
View Full Code Here

  private Vertex populateVertex(ModuleDefinition moduleDefinition) {
   
    Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
   
    String name = moduleDefinition.getName();
    final Vertex vertex = new Vertex(moduleDefinition);
    vertexMap.put(name, vertex);
    return vertex;
  }
View Full Code Here

    final ModuleDefinition moduleDefinition = vertex.getModuleDefinition();
   
    final List<String> dependentModuleNames = moduleDefinition.getDependentModuleNames();
    for (String dependent : dependentModuleNames) {
     
      final Vertex dependentVertex = vertexMap.get(dependent);
     
      if (dependentVertex == null) {
        throw new InvalidStateException("Unable to dependency named named '" + dependent
            + "' for module definition '" + moduleDefinition.getName() + "'");
       
View Full Code Here

        Assert.notNull(parent, "parent cannot be null");
        Assert.notNull(moduleDefinition, "moduleDefinition cannot be null");
       
        logger.info("With parent '" + parent + "', adding module: " + moduleDefinition);
       
        final Vertex parentVertex = getRequiredVertex(parent);
       
        ModuleDefinition parentDefinition = parentVertex.getModuleDefinition();
        parentDefinition.addChildModuleDefinition(moduleDefinition);
        moduleDefinition.setParentDefinition(parentDefinition);
       
        //now recursively add definitions
        List<Vertex> addedVertices = new ArrayList<Vertex>();
View Full Code Here

            dump();
        }
    }

    private Vertex getRequiredVertex(String moduleName) {
        final Vertex parentVertex = vertexMap.get(moduleName);
        if (parentVertex == null) {
           
            if (logger.isDebugEnabled()) {
                logger.debug("Module '" + moduleName + "' not found.");
                dump();
View Full Code Here

TOP

Related Classes of org.impalaframework.graph.Vertex

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.