Codota Logo
Node.get
Code IndexAdd Codota to your IDE (free)

How to use
get
method
in
obvious.data.Node

Best Java code snippets using obvious.data.Node.get (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: com.googlecode.obvious/obvious-ivtk

/**
 * Gets the id of an input node.
 * @param node a node of the graph
 * @return id of the node
 */
private Integer getNodeId(Node node) {
 Integer id = null;
 for (Map.Entry<Node, Integer> e : nodeToId.entrySet()) {
  boolean nodeEquals = true;
  for (int i = 0; i < nodeSchema.getColumnCount(); i++) {
   String colName = nodeSchema.getColumnName(i);
   if (!node.get(colName).equals(e.getKey().get(colName))) {
    nodeEquals = false;
    break;
   }
  }
  if (nodeEquals) {
   id = e.getValue();
   break;
  }
 }
 return id;
}
origin: com.googlecode.obvious/obvious-ivtk

/**
 * Adds a given node to the current graph.
 * @param node node to add to the graph
 * @return true if the node is added
 */
public boolean addNode(Node node) {
 try {
  int rowId = graph.addVertex();
  for (int i = 0; i < node.getSchema().getColumnCount(); i++) {
   if (nodeSchema.hasColumn(node.getSchema().getColumnName(i))) {
    TypedFormat format = formatFactory.getFormat(
      node.getSchema().getColumnType(i).getSimpleName());
     StringBuffer v = format.format(node.get(i),
       new StringBuffer(), new FieldPosition(0));
    graph.getVertexTable().setValueAt(v.toString(), rowId,
      graph.getVertexTable().indexOf(
        node.getSchema().getColumnName(i)));
   }
  }
  nodeToId.put(node, rowId);
  fireNetworkEvent(node.getRow(), node.getRow(), 0,
    NetworkListener.INSERT_NODE);
  return true;
 } catch (Exception e) {
  throw new ObviousRuntimeException(e);
 }
}
origin: com.googlecode.obvious/obvious-prefuse

/**
 * Adds a given node to the current graph.
 * @param node node to add to the graph
 * @return true if the node is added
 */
public boolean addNode(Node node) {
 try {
  // if prefNode (prefuse) tuple and node (obvious) tuple are compatible
  // i.e their schema are compatible.
  prefuse.data.Node prefNode = this.graph.addNode();
  for (int i = 0; i < node.getTable().getSchema().getColumnCount(); i++) {
   prefNode.set(node.getSchema().getColumnName(i), node.get(i));
  }
  int nodeId = prefNode.getRow();
  fireNetworkEvent(nodeId, nodeId, 0,
    NetworkListener.INSERT_NODE);
  return true;
 } catch (Exception e) {
  throw new ObviousRuntimeException(e);
 }
}
origin: com.googlecode.obvious/obvious-prefuse

 prefEdge.set(colName, source.get(nodeKey));
} else if (graphCol && edge.get(colName).equals(targetKey)
  && nodeKey != null) {
 prefEdge.set(colName, target.get(nodeKey));
} else if (graphCol && edge.get(colName).equals(sourceKey)
  && nodeKey == null) {
origin: com.googlecode.obvious/obviousx

/**
 * Loads the table with the data of external CSV files.
 * @return an obvious network
 * @throws ObviousxException when exception occurs
 */
public Network loadGraph() throws ObviousxException {
 CSVTableImport nodeImport = new CSVTableImport(nodeFile, new TableImpl(nodeSchema),
   separator);
 CSVTableImport edgeImport = new CSVTableImport(edgeFile, new TableImpl(edgeSchema),
   separator);
 Table nodeTable = nodeImport.loadTable();
 Table edgeTable = edgeImport.loadTable();
 for (int i = 0; i < nodeTable.getRowCount(); i++) {
  Node node = new NodeImpl(nodeTable, i);
  network.addNode(node);
  if (nodeId == null) {
   idToNode.put(node.getRow(), node);
  } else {
   idToNode.put(node.get(nodeId), node);
  }
 }
 for (int i = 0; i < edgeTable.getRowCount(); i++) {
  Edge edge = new EdgeImpl(edgeTable, i);
  network.addEdge(edge, idToNode.get(edge.get(sourceCol)),
    idToNode.get(edge.get(targetCol)),
    network.getEdgeType(edge));
 }
 return this.network;
}
origin: com.googlecode.obvious/obvious-ivtk

/**
 * Gets the id of an input node.
 * @param node a node of the graph
 * @return id of the node
 */
private Integer getNodeId(Node node) {
 Integer id = null;
 for (Map.Entry<Node, Integer> e : nodeToId.entrySet()) {
  boolean nodeEquals = true;
  for (int i = 0; i < nodeSchema.getColumnCount(); i++) {
   String colName = nodeSchema.getColumnName(i);
   if (!node.get(colName).equals(e.getKey().get(colName))) {
    nodeEquals = false;
    break;
   }
  }
  if (nodeEquals) {
   id = e.getValue();
   break;
  }
 }
 return id;
}
origin: com.googlecode.obvious/obviousx

TypedFormat format = formatFactory.getFormat(
  nodeSchema.getColumnType(i).getSimpleName());
StringBuffer value = format.format(node.get(i),
  new StringBuffer(), new FieldPosition(0));
serializer.writeCharacters(value.toString());
origin: com.googlecode.obvious/obviousx

network.addNode(node);
for (Node n : network.getNodes()) {
 if (n.get(nodeId).equals(id)) {
  node = n;
  break;
obvious.dataNodeget

Popular methods of Node

  • getRow
  • getSchema
  • getInt
  • getTable

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JPanel (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now