Codota Logo
ONDEXConcept.getId
Code IndexAdd Codota to your IDE (free)

How to use
getId
method
in
net.sourceforge.ondex.core.ONDEXConcept

Best Java code snippets using net.sourceforge.ondex.core.ONDEXConcept.getId (Showing top 20 results out of 315)

  • Common ways to obtain ONDEXConcept
private void myMethod () {
ONDEXConcept o =
  • Codota IconONDEXRelation r;r.getToConcept()
  • Codota IconONDEXRelation r;r.getFromConcept()
  • Codota IconONDEXGraph graph;graph.getConcept(id)
  • Smart code suggestions by Codota
}
origin: net.sourceforge.ondex.core/algorithms

public boolean isValidConcept(ONDEXConcept c) {
  System.out.println("ISVALID");
  if (cidsSet == null|| cidsSet.size() == 0) {
    System.out.println("finalf__"+(c.getId() == cid)+" "+c.getId());
    
    return c.getId() == cid;
  } else {
    System.out.println("final__"+cidsSet.contains( c.getId() )+" "+c.getId());
    return cidsSet.contains( c.getId() );
  }
}
 
origin: net.sourceforge.ondex.modules/cyjs_json

/**
 * Generate metadata for Context.
 * @param context
 *            A Context tag (from the Ondex API).
 * @return JSONObject
 *            JSONObject containing information about the Context tag.
 */
private JSONObject buildContext(ONDEXConcept context) {
 JSONObject contextJson= new JSONObject();
  contextJson.put(JSONAttributeNames.ID, context.getId());
 return contextJson;
}
origin: net.sourceforge.ondex.modules/json

/**
 * Generate metadata for Context.
 * @param context
 *            A Context tag (from the Ondex API).
 * @return JSONObject
 *            JSONObject containing information about the Context tag.
 */
private JSONObject buildContext(ONDEXConcept context) {
 JSONObject contextJson= new JSONObject();
  contextJson.put(JSONAttributeNames.ID, context.getId());
 return contextJson;
}
origin: net.sourceforge.ondex.modules/arabidopsis

public Integer getIndex(ONDEXConcept c, String att) {
  ArrayKey<Object> key = new ArrayKey<Object>(new Object[]{c.getId(), att});
  Integer count = expIndex.get(key);
  if (count == null) {
    count = 0;
  } else {
    count++;
  }
  expIndex.put(key, count);
  return count;
}
origin: net.sourceforge.ondex.modules/rdf

public static String conceptToUri(String graphUri, ONDEXConcept c) {
  return toUri(graphUri, "concept", String.valueOf(c.getId()));
}
public static String relationToUri(String graphUri, ONDEXRelation r) { 
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Returns visibility for a given edge.
 * 
 * @param edge
 *            ONDEXRelation
 * @return is visible
 */
public boolean isVisible(ONDEXRelation edge) {
  if (edge == null)
    return false;
  return edge_visibility.get(edge.getId()) && vertex_visibility.get(edge.getFromConcept().getId()) && vertex_visibility.get(edge.getToConcept().getId());
}
origin: net.sourceforge.ondex.core/berkeley

@Override
protected boolean dropTag(ONDEXConcept concept) {
  if (concept instanceof BerkeleyConcept) {
    berkeley.deleteFromDupDatabase(BerkeleyIntegerName.class,
        concept.getId(), idarray);
    return berkeley.deleteFromDupDatabase(BerkeleyConcept.class,
        (BerkeleyRelationKey) key,
        ((BerkeleyConcept) concept).serialise());
  } else
    throw new UnsupportedOperationException("Tag " + concept.getId()
        + " of class " + concept.getClass()
        + " could not be saved as it is not BerkeleyConcept");
}
origin: net.sourceforge.ondex.core/berkeley

@Override
protected void saveTag(ONDEXConcept concept) {
  if (concept instanceof BerkeleyConcept) {
    berkeley.insertIntoDupDatabase(BerkeleyConcept.class,
        (BerkeleyRelationKey) key,
        ((BerkeleyConcept) concept).serialise());
    berkeley.insertIntoDupDatabase(BerkeleyIntegerName.class,
        concept.getId(), idarray);
  } else
    throw new UnsupportedOperationException("Tag " + concept.getId()
        + " of class " + concept.getClass()
        + " could not be saved as it is not BerkeleyConcept");
}
origin: net.sourceforge.ondex.core/berkeley

@Override
protected boolean dropTag(ONDEXConcept concept) {
  if (concept instanceof BerkeleyConcept) {
    berkeley.deleteFromDupDatabase(Integer.class, concept.getId(),
        idarray);
    return berkeley.deleteFromDupDatabase(BerkeleyConcept.class,
        getId(), ((BerkeleyConcept) concept).serialise());
  } else
    throw new UnsupportedOperationException("Tag " + concept.getId()
        + " of class " + concept.getClass()
        + " could not be saved as it is not BerkeleyConcept");
}
origin: net.sourceforge.ondex.core/tools

public static Set<ONDEXConcept> filteroutUnconnected(ONDEXGraph graph, Set<ONDEXConcept> setOfConcepts, Set<ONDEXRelation> validRelations) {
  BitSet resultSet = new BitSet();
  for (ONDEXConcept c : setOfConcepts) {
    if (BitSetFunctions.and(graph.getRelationsOfConcept(c), validRelations).size() > 0)
      resultSet.set(c.getId());
  }
  Set<ONDEXConcept> result = BitSetFunctions.create(graph, ONDEXConcept.class, resultSet);
  return result;
}
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Updates the graph with the new concept and all tables with it.
 * 
 * @param newConcept
 *            ONDEXConcept newly created
 */
private void updateConceptInGraph(ONDEXConcept newConcept) {
  // update all linked tables
  GraphTableEditor.updateConceptInTables(newConcept, row);
  // delete old concept from graph, also deletes relations etc
  graph.deleteConcept(concept.getId());
}
origin: net.sourceforge.ondex.core/algorithms

public SerializableEvidencePathNode(EvidencePathNode pathNode) {
  List<ONDEXConcept> conceptL = pathNode.getConceptsInPositionOrder();
  List<ONDEXRelation> relationL = pathNode.getRelationsInPositionOrder();
  concepts = new int[conceptL.size()];
  for (int i = 0; i < concepts.length; i++)
    concepts[i] = conceptL.get(i).getId();
  relations = new int[relationL.size()];
  for (int i = 0; i < relations.length; i++)
    relations[i] = relationL.get(i).getId();
  evidences = pathNode.getEvidencesInPositionOrder();
}
origin: net.sourceforge.ondex.modules/generic

private void propagate(BitSet toKeep, ONDEXConcept c, int l) throws NullValueException, AccessDeniedException {
  if (l > depth) return;
  if (toKeep.get(c.getId())) return;
  toKeep.set(c.getId());
  for (ONDEXRelation r : graph.getRelationsOfConcept(c)) {
    if (!r.getToConcept().equals(c)) {
      propagate(toKeep, r.getToConcept(), l + 1);
    } else {
      propagate(toKeep, r.getFromConcept(), l + 1);
    }
  }
}
origin: net.sourceforge.ondex.apps/ovtk2

  @Override
  public Font transform(ONDEXConcept n) {
    ONDEXConcept c = graph.getConcept(n.getId());
    Attribute attribute = c.getAttribute(an);
    if (attribute != null) {
      Float size = (float) (((Double) attribute.getValue() / (Double) gdsMax) * (maxSize - minSize) + minSize);
      return newFont.deriveFont(size);
    }
    return newFont;
  }
});
origin: net.sourceforge.ondex.webservices/soapgraph

@Override
public boolean removeTag(ONDEXConcept ac) {
  try {
    return soapGraph.removeTagConcept(graphId, id, ac.getId());
  } catch (WebserviceException_Exception e) {
    parent.fireActionEvent(e, e.getMessage());
    e.printStackTrace();
  }
  // indicates error
  return false;
}
origin: net.sourceforge.ondex.webservices/soapgraph

@Override
public void addTag(ONDEXConcept ac) throws AccessDeniedException,
    NullValueException {
  try {
    soapGraph.addTagConcept(graphId, id, ac.getId());
  } catch (WebserviceException_Exception e) {
    parent.fireActionEvent(e, e.getMessage());
    e.printStackTrace();
  }
}
origin: net.sourceforge.ondex.webservices/soapgraph

@Override
public boolean removeTag(ONDEXConcept ac) {
  try {
    return soapGraph.removeTagRelation(graphId, id, ac.getId());
  } catch (WebserviceException_Exception e) {
    parent.fireActionEvent(e, e.getMessage());
    e.printStackTrace();
  }
  // indicates error
  return false;
}
origin: net.sourceforge.ondex.webservices/soapgraph

@Override
public void addTag(ONDEXConcept ac) throws AccessDeniedException,
    NullValueException {
  try {
    soapGraph.addTagRelation(graphId, id, ac.getId());
  } catch (WebserviceException_Exception e) {
    parent.fireActionEvent(e, e.getMessage());
    e.printStackTrace();
  }
}
origin: net.sourceforge.ondex.modules/relevance

/**
 * searches for paths.
 */
public void search() {
    for (ONDEXConcept c : og.getConcepts()) {
        if (!instanceOf(ccs[0], c)) {
            continue;
        }
        PathNode pn = new PathNode(c.getId());
        searchRelations(c, pn, 1, false);
    }
}
origin: net.sourceforge.ondex.modules/poplar

public int getOrCreateGeneID(String geneId) {
  if (poplarReg.containsGene(geneId)) {
    return poplarReg.getGene(geneId);
  } else {
    ONDEXConcept gene = og.getFactory().createConcept(geneId, dataSourcePHYTOZOME, ccGene, etIMPD);
    gene.createConceptAccession(geneId, dataSourcePHYTOZOME, false);
    gene.createConceptName(geneId, false);
    Integer ondexGeneId = gene.getId();
    gene.createAttribute(anTaxID, Parser.POPLAR_TAX_ID, false);
    poplarReg.addGene(geneId, ondexGeneId);
    return ondexGeneId;
  }
}
net.sourceforge.ondex.coreONDEXConceptgetId

Popular methods of ONDEXConcept

  • createAttribute
  • createConceptAccession
    Creates a new ConceptAccession with the given accession, the information which DataSource it belongs
  • createConceptName
    Creates a new ConceptName with the given name and the information if this name is preferred. Then ad
  • getOfType
  • getConceptAccessions
  • getElementOf
    Returns the DataSource, which this AbstractConcept belongs to.
  • getPID
    Returns the parser id of this instance of AbstractConcept.
  • getConceptNames
    Returns all ConceptNames contained in the list of ConceptNames.
  • getAttribute
  • getConceptName
    Returns a ConceptName or null if unsuccessful for a given name or null if unsuccessful.
  • getAnnotation
    Returns the annotation of this instance of AbstractConcept.
  • addTag
  • getAnnotation,
  • addTag,
  • getDescription,
  • getAttributes,
  • getTags,
  • getEvidence,
  • setAnnotation,
  • getConceptAccession,
  • setDescription

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Join (org.hibernate.mapping)
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