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

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

Best Java code snippets using net.sourceforge.ondex.core.ONDEXConcept.getElementOf (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/lucene

@Override
public DataSource getElementOf() {
  return parent.getElementOf();
}
origin: net.sourceforge.ondex.modules/generic

  @Override
  public int compare(ONDEXConcept o1, ONDEXConcept o2) {
    return o2.getElementOf().compareTo(o1.getElementOf());
  }
});
origin: net.sourceforge.ondex.core/tools

/**
 * Return all of the DataSources of the concepts
 * contained in the collection
 *
 * @param cs
 * @return set of DataSources
 */
public static Set<DataSource> getConceptDataSources(Collection<ONDEXConcept> cs) {
  Set<DataSource> result = new HashSet<DataSource>();
  for (ONDEXConcept c : cs) {
    result.add(c.getElementOf());
  }
  return result;
}
origin: net.sourceforge.ondex.core/tools

/**
 * Return all of the DataSources of the concepts
 * contained in the collection
 *
 * @param cs
 * @return set of DataSources
 */
public static Set<DataSource> getConceptDataSources(Collection<ONDEXConcept> cs) {
  Set<DataSource> result = new HashSet<DataSource>();
  for (ONDEXConcept c : cs) {
    result.add(c.getElementOf());
  }
  return result;
}
origin: net.sourceforge.ondex.modules/tab-tools

public String getValue(ONDEXEntity cOrr) throws InvalidOndexEntityException {
  if(AbstractConcept.class.isAssignableFrom(cOrr.getClass())){
    return ((ONDEXConcept)cOrr).getElementOf().getId();
  }
  throw new InvalidOndexEntityException(cOrr.getClass()+": is not an Ondex class for which cv is known");
}
origin: net.sourceforge.ondex.apps/ovtk2

  private void step() {
    boolean match = false;
    next = null;
    List<String> ofInterest = new ArrayList<String>();
    while (!match && view.hasNext()) {
      ONDEXConcept c = view.next();
      String[] cCvs = c.getElementOf().getId().split(":");
      for (String cCv : cCvs) {
        // System.err.println(cCv+" :: "+validArgs+" :: "+validArgs.contains(cCv.trim()));
        if (validArgs.contains(cCv)) {
          match = true;
          ofInterest.add(cCv);
        }
      }
    }
    if (ofInterest.size() == 0) {
      next = null;
    } else {
      next = ofInterest.toArray(new String[ofInterest.size()]);
    }
  }
}
origin: net.sourceforge.ondex.core/algorithms

public boolean isValidConceptAtDepth(ONDEXConcept toConcept,
                   int currentPosition) {
  if (validConceptDataSourceAtDepth != null) {
    ArrayList<DataSource> list = validConceptDataSourceAtDepth.get(currentPosition);
    if (list != null) {
      if (list.contains(toConcept.getElementOf())) {
        return true;
      } else {
        return false;
      }
    } else {
      return isInclusivePresumption;
    }
  }
  if (validConceptClassAtDepth != null) {
    ArrayList<ConceptClass> list = validConceptClassAtDepth.get(currentPosition);
    if (list != null) {
      if (list.contains(toConcept.getOfType())) {
        return true;
      } else {
        return false;
      }
    } else {
      return isInclusivePresumption;
    }
  }
  return true;
}
origin: net.sourceforge.ondex.apps/ovtk2

  private void step() {
    boolean match = false;
    next = null;
    List<String> ofInterest = new ArrayList<String>();
    while (!match && view.hasNext()) {
      ONDEXRelation r = view.next();
      String[] cCvs = arrAnd(r.getFromConcept().getElementOf().getId().split(":"), r.getToConcept().getElementOf().getId().split(":"), validArgs);
      if (cCvs.length > 0) {
        match = true;
        next = cCvs;
      }
    }
  }
}
origin: net.sourceforge.ondex.core/tools

/**
 * Method to copy a concept
 * 
 * @param graph
 *            - graph to copy concept to
 * @param c
 *            concept to copy
 * @return a copy of a concept created
 * @throws AccessDeniedException
 * @throws NullValueException
 * @throws EmptyStringException
 */
public static ONDEXConcept copyConcept(ONDEXGraph graph, ONDEXConcept c)
    throws NullValueException, AccessDeniedException,
    EmptyStringException {
  return copyConcept(graph, c, c.getOfType(), c.getElementOf());
}
origin: net.sourceforge.ondex.apps.qtlnetminer.common/common-server

/**
 * Create a name for concepts
 * 
 * @param c
 *            ONDEXConcept
 * @return normalised name
 */
private String getDefaultNameForConcept(ONDEXConcept c) {
  String name = null;
  // this is the preferred concept name
  ConceptName cn = c.getConceptName();
  // use accessions as alternatives
  Set<ConceptAccession> accs = c.getConceptAccessions();
  if (cn != null && cn.getName().trim().length() > 0)
    name = cn.getName().trim();
  else if (accs.size() > 0)
    for (ConceptAccession acc : accs) {
      if (acc.getAccession().trim().length() > 0) {
        if (acc.getElementOf().equals(c.getElementOf())) {
          // prefer native accession
          name = acc.getAccession().trim();
          break;
        }
        name = acc.getAccession().trim();
      }
    }
  else
    name = "null";
  return name;
}
origin: net.sourceforge.ondex.apps/ovtk2

@Override
protected void doAction() {
  for (ONDEXConcept node : entities) {
    ONDEXConcept c = node;
    DataSource dataSource = c.getElementOf();
    for (ONDEXConcept oc : viewer.getONDEXJUNGGraph().getConceptsOfDataSource(dataSource)) {
      viewer.getONDEXJUNGGraph().setVisibility(oc, false);
    }
  }
}
origin: net.sourceforge.ondex.modules/generic

private void copyCVToRelation(ONDEXConcept to, ONDEXRelation relation,
    AttributeName att) {
  DataSource dataSource = to.getElementOf();
  String[] typeIds = dataSource.getId().split(":");
  for (String typeId : typeIds) {
    Attribute attribute = relation.getAttribute(att);
    if (attribute == null) {
      relation.createAttribute(att, typeId, false);
    } else if (attribute.getValue() instanceof Collection) {
      Collection collection = (Collection) attribute.getValue();
      if (!collection.contains(typeId)) {
        collection.add(typeId);
        attribute.setValue(collection);
      }
    } else if (!attribute.getValue().equals(typeId)) {
      List<String> cvs = new ArrayList<String>(2);
      cvs.add(typeId);
      cvs.add((String) attribute.getValue());
      attribute.setValue(cvs);
    }
  }
}
origin: net.sourceforge.ondex.apps/ovtk2-poplar

for (ConceptAccession acc : accs) {
  if (acc.getAccession().trim().length() > 0) {
    if (acc.getElementOf().equals(c.getElementOf())) {
origin: net.sourceforge.ondex.apps/ovtk2

for (ConceptAccession acc : accs) {
  if (acc.getAccession().trim().length() > 0) {
    if (acc.getElementOf().equals(c.getElementOf())) {
origin: net.sourceforge.ondex.apps/ovtk2

switch (strategy) {
case DATASOURCE:
  paint = Config.getColorForDataSource(node.getElementOf());
  break;
case EVIDENCETYPE:
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Clone concept with having a new PID.
 * 
 * @param oldC
 *            old ONDEXConcept
 * @param newPID
 *            new PID to use
 * @return new ONDEXConcept
 */
public ONDEXConcept clone(ONDEXConcept oldC, String newPID) {
  // first clone concept with new PID
  ONDEXConcept newC = graph.createConcept(newPID, oldC.getAnnotation(), oldC.getDescription(), oldC.getElementOf(), oldC.getOfType(), oldC.getEvidence());
  // copies everything else
  copyEverythingElse(oldC, newC);
  return newC;
}
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Clone concept with having a new ConceptClass.
 * 
 * @param oldC
 *            old ONDEXConcept
 * @param newCC
 *            new ConceptClass to use
 * @return new ONDEXConcept
 */
public ONDEXConcept clone(ONDEXConcept oldC, ConceptClass newCC) {
  // first clone concept with new ConceptClass
  ONDEXConcept newC = graph.createConcept(oldC.getPID(), oldC.getAnnotation(), oldC.getDescription(), oldC.getElementOf(), newCC, oldC.getEvidence());
  // copies everything else
  copyEverythingElse(oldC, newC);
  return newC;
}
origin: net.sourceforge.ondex.modules/poplar

for (ONDEXRelation rel : graph.getRelationsOfConcept(prot)) {
  if(rel.getOfType().equals(rtSimSeq) &&
      (!rel.getFromConcept().getElementOf().equals(dataSourceUniProtSP) ||
          !rel.getFromConcept().getElementOf().equals(dataSourceUniProtTR))){
    hasHits = true;
    break;
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Initialises table data with the given ONDEXGraph.
 * 
 * @param graph
 *            ONDEXGraph to extract concepts from
 */
public ConceptPanel(ONDEXGraph graph) {
  Object[][] data = new Object[graph.getConcepts().size()][];
  int i = 0;
  for (ONDEXConcept concept : graph.getConcepts()) {
    // first entry in table row is concept itself
    Object[] row = { concept, concept.getPID(), concept.getAnnotation(), concept.getDescription(), concept.getElementOf(), concept.getOfType(), concept.getEvidence() };
    data[i] = row;
    i++;
  }
  // initialise table model and populate table
  DefaultTableModel model = new DefaultTableModel();
  model.setDataVector(data, header);
  table = new ConceptTable(model, graph);
  // add table to panel
  this.setLayout(new GridLayout(1, 1));
  this.add(new JScrollPane(table));
  Util.calcColumnWidths(table, 150);
}
origin: net.sourceforge.ondex.apps/ovtk2

Set<ONDEXRelation> relSet = graph.getRelationsOfConcept(prot);
for (ONDEXRelation rel : relSet) {
  if (rel.getOfType().equals(rtSimSeq) && !rel.getFromConcept().getElementOf().equals(dataSourceUniProt)) {
    hasHits = true;
    break;
net.sourceforge.ondex.coreONDEXConceptgetElementOf

Javadoc

Returns the DataSource, which this AbstractConcept belongs to.

Popular methods of ONDEXConcept

  • getId
  • 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
  • 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

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Table (org.hibernate.mapping)
    A relational table
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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