Package org.jboss.util.graph

Examples of org.jboss.util.graph.Vertex


/*  47 */     super(name);
/*     */   }
/*     */
/*     */   public void visit()
/*     */   {
/*  53 */     Vertex parent = getParent(this);
/*  54 */     Set children = getChildren(this);
/*     */
/*  56 */     if (this.log.isTraceEnabled()) {
/*  57 */       this.log.trace("Structure visit, parent: " + parent + ", children: " + children);
/*     */     }
View Full Code Here


/*     */
/*     */   protected static Vertex<String> getParent(Vertex<String> vertex)
/*     */   {
/*  87 */     List edges = vertex.getIncomingEdges();
/*     */
/*  89 */     Vertex parent = null;
/*  90 */     if (!edges.isEmpty())
/*     */     {
/*  92 */       Set previous = new HashSet();
/*  93 */       for (Edge edge : edges) {
/*  94 */         previous.add(edge.getFrom());
View Full Code Here

/*     */   {
/* 122 */     int p = key.indexOf('.', index + 1);
/* 123 */     int end = p > 0 ? p : key.length();
/* 124 */     String name = key.substring(0, end);
/*     */
/* 126 */     Vertex current = this.graph.findVertexByName(name);
/* 127 */     if (current == null)
/*     */     {
/* 129 */       current = this.vertexFactory.createVertex(level, name);
/* 130 */       this.graph.addVertex(current);
/*     */     }
/* 132 */     this.graph.addEdge(previous, current, level);
/*     */
/* 134 */     if (p < 0)
/*     */     {
/* 136 */       Vertex valueVertex = this.vertexFactory.valueVertex(value);
/* 137 */       this.graph.addVertex(valueVertex);
/* 138 */       this.graph.addEdge(current, valueVertex, -1);
/*     */     }
/*     */     else {
/* 141 */       buildVertices(current, p, key, value, level + 1);
View Full Code Here

/*    */           continue;
/*    */         }
/* 54 */         String name = vertex.getName();
/* 55 */         if (name.endsWith("type"))
/*    */         {
/* 57 */           Vertex next = getNext(vertex);
/* 58 */           value.setType(next.getName());
/*    */         }
/* 60 */         else if (name.endsWith("trim"))
/*    */         {
/* 62 */           Vertex next = getNext(vertex);
/* 63 */           value.setTrim(Boolean.parseBoolean(next.getName()));
/*    */         }
/* 65 */         else if (name.endsWith("replace"))
/*    */         {
/* 67 */           Vertex next = getNext(vertex);
/* 68 */           value.setReplace(Boolean.parseBoolean(next.getName()));
/*    */         }
/*    */       }
/* 71 */       ValueMetaDataAware valueMetaDataAware = (ValueMetaDataAware)parent;
/* 72 */       valueMetaDataAware.setValue(value);
/*    */     }
View Full Code Here

/* 50 */       super();
/*    */     }
/*    */
/*    */     public void visit(BeanVertexFactory.BeanVertex parent, Set<Vertex<String>> children)
/*    */     {
/* 55 */       Vertex value = getNext(this);
/* 56 */       parent.getBeanMetaData().setBean(value.getName());
/*    */     }
View Full Code Here

/*     */
/*     */   public Graph<Map<String, ManagedObject>> getDeepManagedObjects(String name) throws DeploymentException
/*     */   {
/* 679 */     DeploymentContext context = getDeploymentContext(name);
/* 680 */     Graph managedObjectsGraph = new Graph();
/* 681 */     Vertex parent = new Vertex(context.getName());
/* 682 */     managedObjectsGraph.setRootVertex(parent);
/* 683 */     Map managedObjects = getManagedObjects(context);
/* 684 */     parent.setData(managedObjects);
/* 685 */     processManagedObjects(context, managedObjectsGraph, parent);
/*     */
/* 687 */     return managedObjectsGraph;
/*     */   }
View Full Code Here

/*     */     throws DeploymentException
/*     */   {
/* 701 */     List children = context.getChildren();
/* 702 */     for (DeploymentContext child : children)
/*     */     {
/* 704 */       Vertex vertex = new Vertex(child.getName());
/* 705 */       Map managedObjects = getManagedObjects(context);
/* 706 */       vertex.setData(managedObjects);
/* 707 */       graph.addEdge(parent, vertex, 0);
/* 708 */       processManagedObjects(child, graph, vertex);
/*     */     }
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.util.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.