public GraphAttribute createAttribute(String name, GraphCollection value, Graph graph ){ GraphAttribute ga=new GraphAttributeImp(name,((GraphCollectionImp)value).getValue(),((GraphImp)graph).getGraph(),ids); return ga; }
public GraphAttribute createAttribute(String name, Object value, Graph graph ){ GraphAttribute ga=new GraphAttributeImp(name,value,((GraphImp)graph).getGraph(),ids); return ga; }
public static GraphRelationshipFactory createDefaultGraphFactory(Browser browser) throws NotInitialised{ return new GraphRelationshipFactory(browser.getState()); }
public static boolean isTargetOfAnyRelationship(GraphEntity ge) throws NullEntity { for (GraphRelationship gr : ge.getRelationships()) { for (GraphRole gRole : gr.getRoles()) { if (gRole.getPlayer().getID().equals(ge.getID()) && gRole.getName().endsWith("target")) { return true; } } } return false; }
/** * Description of the Method * *@param args Description of Parameter *@exception Exception Description of Exception */ public static void main(String args[]) throws Exception { String file = args[0]; Browser b = new BrowserImp(file); Graph[] gs = b.getGraphs(); for (int k = 0; k < gs.length; k++) { System.err.println(gs[k].getType() + ":" + gs[k].getName()); } }
public static String getAttributeByName(GraphEntity ge, String attributeName) { for (GraphAttribute ga : ge.getAllAttrs()) { if (ga.getName().equals(attributeName)) { return ga.getSimpleValue(); } } return ""; }
public static GraphEntity getSourceEntity(GraphEntity ge, GraphRelationship gr) { GraphRole gRole = getSourceRole(gr.getRoles()); try { if (gRole != null && gRole.getPlayer().getID() != ge.getID()) { return gRole.getPlayer(); } } catch (NullEntity e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; }
public static GraphAttributeFactory createDefaultGraphFactory(Browser browser) throws NotInitialised{ return new GraphAttributeFactory(browser.getState()); }
public static GraphEntityFactory createDefaultGraphFactory(Browser browser) throws NotInitialised{ return new GraphEntityFactory(browser.getState()); }
public static GraphFactory createDefaultGraphFactory(Browser browser) throws NotInitialised{ return new GraphFactory(browser.getState()); }
public GraphEntity findEntity(String id){ GraphEntity[] ents=this.getAllEntities(); boolean found=false; int k=0; for (k=0;k<ents.length &&!found;k++){ found=ents[k].getID().equals(id); } if (found) return ents[k-1]; else return null; }
private static boolean hasField(GraphEntity task, String fieldName) { GraphAttribute d; try { d = task.getAttributeByName(fieldName); } catch (NotFound ex) { return false; } return true;//d != null && !d.getSimpleValue().equals(""); }
public UpdateToolsAndCG(ManageExtensions me, ModuleLoader ml, IDEState ids) { this.me = me; this.ids=ids; this.ml=ml; browser=new BrowserImp(ids); }
public static String getAttributeByName(GraphEntity ge, String attributeName, String defaultValue) { for (GraphAttribute ga : ge.getAllAttrs()) { if (ga.getName().equals(attributeName)) { return (ga.getSimpleValue().equals("")) ? defaultValue : ga.getSimpleValue(); } } return defaultValue; }
public ObjectTreeMenuEntries(IDEState ids, GUIResources resources){ this.ids=ids; this.resources=resources; browser=new BrowserImp(ids); }
/** * Performs an empty initialisation. Only works when there is an already existing * instance of GraphManager * *@exception Exception Description of Exception */ public static void initialise(IDEState ids) { // To check if it is initialised browser = new BrowserImp(ids); }
public CommonMenuEntriesActionFactory(GUIResources resources, IDEState state){ this.resources=resources; this.state=state; browser=new BrowserImp(state); }
public HyperlinkAction(IDEState ids, GUIResources resources){ this.ids=ids; this.resources=resources; browser=new BrowserImp(ids); }
public GraphRelationshipFactory(IDEState ids){ this.ids=ids; browser=new BrowserImp(ids); }