Tabnine Logo
ONDEXConcept.getTags
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: net.sourceforge.ondex.core/lucene

@Override
public Set<ONDEXConcept> getTags() {
  return parent.getTags();
}
origin: net.sourceforge.ondex.apps/ovtk2

@Override
public boolean accepts() {
  for (ONDEXConcept n : entities) {
    if (!n.getTags().isEmpty())
      return true;
  }
  return false;
}
origin: net.sourceforge.ondex.apps/ovtk2

@Override
public boolean accepts() {
  for (ONDEXConcept n : entities) {
    if (!n.getTags().isEmpty())
      return true;
  }
  return false;
}
origin: net.sourceforge.ondex.modules/legacy

  public HashSet<ONDEXConcept> getNonRedundant(ONDEXConcept acTo, ONDEXConcept acFrom){
    HashSet<ONDEXConcept> nonRedundantConcepts = new HashSet<ONDEXConcept>();
    for (ONDEXConcept concept : acFrom.getTags()){
      if (acTo != null &&  acTo.getTags().contains(concept) == false )
        nonRedundantConcepts.add(concept);
      else if(acTo == null){
        nonRedundantConcepts.add(concept);
      }
    }
    return nonRedundantConcepts;
  }
}
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

  public HashSet<ONDEXConcept> getNonRedundant(ONDEXConcept acTo, ONDEXConcept acFrom){
    HashSet<ONDEXConcept> nonRedundantConcepts = new HashSet<ONDEXConcept>();
    for (ONDEXConcept concept : acFrom.getTags()){
      if (acTo != null &&  acTo.getTags().contains(concept) == false )
        nonRedundantConcepts.add(concept);
      else if(acTo == null){
        nonRedundantConcepts.add(concept);
      }
    }
    return nonRedundantConcepts;
  }
}
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

  public HashSet<ONDEXConcept> getNonRedundant(ONDEXConcept acTo, ONDEXConcept acFrom){
    HashSet<ONDEXConcept> nonRedundantConcepts = new HashSet<ONDEXConcept>();
    for (ONDEXConcept concept : acFrom.getTags()){
      if (acTo != null && !acTo.getTags().contains(concept))
        nonRedundantConcepts.add(concept);
      else if(acTo == null){
        nonRedundantConcepts.add(concept);
      }
    }
    return nonRedundantConcepts;
  }
}
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

  public HashSet<ONDEXConcept> getNonRedundant(ONDEXConcept acTo, ONDEXConcept acFrom){
    HashSet<ONDEXConcept> nonRedundantConcepts = new HashSet<ONDEXConcept>();
    for (ONDEXConcept concept : acFrom.getTags()){
      if (acTo != null &&  acTo.getTags().contains(concept) == false )
        nonRedundantConcepts.add(concept);
      else if(acTo == null){
        nonRedundantConcepts.add(concept);
      }
    }
    return nonRedundantConcepts;
  }
}
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

/**
 * Copies a context list from on concept to another concept
 * @param acFrom
 * @param acTo
 */
public void copyContext(ONDEXConcept acTo, Set<ONDEXConcept> acFrom){
  for (ONDEXConcept concept : acFrom) {
    if (!acTo.getTags().contains(concept)) {
      acTo.addTag(concept);
    }
  }
}
/**
origin: net.sourceforge.ondex.modules/legacy

/**
 * Copies a context list from on concept to another concept
 * @param acFrom
 * @param acTo
 */
public void copyContext(ONDEXConcept acTo, Set<ONDEXConcept> acFrom){
  for (ONDEXConcept concept : acFrom) {
    if (acTo.getTags().contains(concept) == false) {
      acTo.addTag(concept);
    }
  }
}
/**
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

/**
 * Copies a context list from on concept to another concept
 * @param acFrom
 * @param acTo
 */
public void copyContext(ONDEXConcept acTo, Set<ONDEXConcept> acFrom){
  Iterator<ONDEXConcept> concepts = acFrom.iterator();
  while(concepts.hasNext()){
    ONDEXConcept concept = concepts.next();
    if ( acTo.getTags().contains(concept) == false )
      acTo.addTag(concept);
  }
}
/**
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

/**
 * Copies a context list from on concept to another concept
 * @param acFrom
 * @param acTo
 */
public void copyContext(ONDEXConcept acTo, Set<ONDEXConcept> acFrom){
  Iterator<ONDEXConcept> concepts = acFrom.iterator();
  while(concepts.hasNext()){
    ONDEXConcept concept = concepts.next();
    if ( acTo.getTags().contains(concept) == false )
      acTo.addTag(concept);
  }
}
/**
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Shows all other members of all the contexts that the selected concept(s)
 * are members of
 * 
 * @param viewer
 */
public static void showRelevantContexts(OVTK2PropertiesAggregator viewer) {
  ONDEXJUNGGraph graph = viewer.getONDEXJUNGGraph();
  Set<ONDEXConcept> contexts = new HashSet<ONDEXConcept>();
  for (ONDEXConcept c : viewer.getPickedNodes().toArray(new ONDEXConcept[0])) {
    contexts.addAll(c.getTags());
  }
  for (ONDEXConcept contextConcept : contexts) {
    graph.setVisibility(graph.getConceptsOfTag(contextConcept), true);
    graph.setVisibility(graph.getRelationsOfTag(contextConcept), true);
  }
}
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Shows all other members of all the contexts that the selected concept(s)
 * are members of, if the contexts are of particular class
 * 
 * @param viewer
 * @param contextClasses
 */
public static void showRelevantContextsByTypes(OVTK2PropertiesAggregator viewer, String... contextClasses) {
  ONDEXJUNGGraph graph = viewer.getONDEXJUNGGraph();
  Set<ONDEXConcept> contexts = new HashSet<ONDEXConcept>();
  Set<ConceptClass> selectedClasses = new HashSet<ConceptClass>();
  for (String s : contextClasses) {
    createCC(viewer.getONDEXJUNGGraph(), s);
  }
  for (ONDEXConcept c : viewer.getPickedNodes().toArray(new ONDEXConcept[0])) {
    for (ONDEXConcept candidate : c.getTags()) {
      if (selectedClasses.contains(candidate.getOfType()))
        contexts.add(candidate);
    }
  }
  for (ONDEXConcept contextConcept : contexts) {
    graph.setVisibility(graph.getConceptsOfTag(contextConcept), true);
    graph.setVisibility(graph.getRelationsOfTag(contextConcept), true);
  }
}
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

  @Override
  public void pointerToRelation(AbstractNode node) {
    HashSet<ONDEXRelation> relations = new HashSet<ONDEXRelation>();
    Compound compound = (Compound) node;
    for (AbstractNode abstractNode : compound.getCofactorOf()) {
      // Compound (cofactor of)=> Enzyme
      relations.add(graph.getFactory().createRelation(abstractNode.getConcept(), compound.getConcept(), rtCofectorOf, etIMPD));
    }
    for( ONDEXRelation relation: relations ){
      for (ONDEXConcept c : node.getConcept().getTags()){
        relation.addTag(c);
      }
    }/*
    for( AbstractNode n: compound.getCofactorOf()){
      Set<ONDEXConcept> toConcepts = node.getConcept().getContext(s);
      while( toConcepts.hasNext() ){
        ONDEXConcept toContext = toConcepts.next();
        if ( !n.getConcept().getContext(s).contains(toContext) )
          n.getConcept().addContext(toContext);
      }
    }*/
    
  }
}
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

  @Override
  public void pointerToRelation(AbstractNode node) {
    HashSet<ONDEXRelation> relations = new HashSet<ONDEXRelation>();
    Compound compound = (Compound) node;
    for (AbstractNode abstractNode : compound.getCofactorOf()) {
      // Compound (cofactor of)=> Enzyme
      relations.add(graph.getFactory().createRelation(abstractNode.getConcept(), compound.getConcept(), rtCofectorOf, etIMPD));
    }
    for( ONDEXRelation relation: relations ){
      for (ONDEXConcept c : node.getConcept().getTags()){
        relation.addTag(c);
      }
    }/*
    for( AbstractNode n: compound.getCofactorOf()){
      Set<ONDEXConcept> toConcepts = node.getConcept().getContext(s);
      while( toConcepts.hasNext() ){
        ONDEXConcept toContext = toConcepts.next();
        if ( !n.getConcept().getContext(s).contains(toContext) )
          n.getConcept().addContext(toContext);
      }
    }*/
    
  }
}
origin: net.sourceforge.ondex.modules/cyc-pathwaydbs

  @Override
  public void pointerToRelation(AbstractNode node) {
    HashSet<ONDEXRelation> relations = new HashSet<ONDEXRelation>();
    Compound compound = (Compound) node;
    for (AbstractNode abstractNode : compound.getCofactorOf()) {
      // Compound (cofactor of)=> Enzyme
      relations.add(graph.getFactory().createRelation(abstractNode.getConcept(), compound.getConcept(), rtCofectorOf, etIMPD));
    }
    for( ONDEXRelation relation: relations ){
      for (ONDEXConcept c : node.getConcept().getTags()){
        relation.addTag(c);
      }
    }/*
    for( AbstractNode n: compound.getCofactorOf()){
      Set<ONDEXConcept> toConcepts = node.getConcept().getContext(s);
      while( toConcepts.hasNext() ){
        ONDEXConcept toContext = toConcepts.next();
        if ( !n.getConcept().getContext(s).contains(toContext) )
          n.getConcept().addContext(toContext);
      }
    }*/
    
  }
}
origin: net.sourceforge.ondex.modules/legacy

  @Override
  public void pointerToRelation(AbstractNode node) {
    HashSet<ONDEXRelation> relations = new HashSet<ONDEXRelation>();
    Compound compound = (Compound) node;
    for (AbstractNode abstractNode : compound.getCofactorOf()) {
      // Compound (cofactor of)=> Enzyme
      relations.add(graph.getFactory().createRelation(abstractNode.getConcept(), compound.getConcept(), rtCofectorOf, etIMPD));
    }
    for( ONDEXRelation relation: relations ){
      for(ONDEXConcept c : node.getConcept().getTags()){
        relation.addTag(c);
      }
    }/*
    for( AbstractNode n: compound.getCofactorOf()){
      Set<ONDEXConcept> toConcepts = node.getConcept().getContext(s);
      while( toConcepts.hasNext() ){
        ONDEXConcept toContext = toConcepts.next();
        if ( !n.getConcept().getContext(s).contains(toContext) )
          n.getConcept().addContext(toContext);
      }
    }*/
    
  }
}
origin: net.sourceforge.ondex.apps/ovtk2

/**
 * Copies all context information from old concept to new concept and
 * updates context references on other entities.
 * 
 * @param oldC
 *            old ONDEXConcept
 * @param newC
 *            new ONDEXConcept
 */
private void copyContext(ONDEXConcept oldC, ONDEXConcept newC) {
  // add new concept to same references as old concept
  for (ONDEXConcept c : graph.getConceptsOfTag(oldC)) {
    c.addTag(newC);
  }
  for (ONDEXRelation r : graph.getRelationsOfTag(oldC)) {
    r.addTag(newC);
  }
  // transfer context from old concept to new concept
  for (ONDEXConcept c : oldC.getTags()) {
    newC.addTag(c);
  }
}
origin: net.sourceforge.ondex.apps/ovtk2

@Override
protected void doAction() {
  for (ONDEXConcept c : entities) {
    for (ONDEXConcept concept : c.getTags()) {
      // first set concepts visible
      for (ONDEXConcept ctxt : viewer.getONDEXJUNGGraph().getConceptsOfTag(concept)) {
        viewer.getONDEXJUNGGraph().setVisibility(ctxt, true);
      }
      // second set relations visible
      for (ONDEXRelation r : viewer.getONDEXJUNGGraph().getRelationsOfTag(concept)) {
        viewer.getONDEXJUNGGraph().setVisibility(r, true);
      }
    }
  }
}
origin: net.sourceforge.ondex.apps/ovtk2

@Override
protected void doAction() {
  for (ONDEXConcept vertex : entities) {
    ONDEXConcept c = vertex;
    for (ONDEXConcept concept : c.getTags()) {
      // first set relations invisible
      for (ONDEXRelation r : viewer.getONDEXJUNGGraph().getRelationsOfTag(concept)) {
        viewer.getONDEXJUNGGraph().setVisibility(r, false);
      }
      // second set concepts invisible
      for (ONDEXConcept c2 : viewer.getONDEXJUNGGraph().getConceptsOfTag(concept)) {
        viewer.getONDEXJUNGGraph().setVisibility(c2, false);
      }
    }
  }
}
net.sourceforge.ondex.coreONDEXConceptgetTags

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
  • 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.
  • getConceptName,
  • getAnnotation,
  • addTag,
  • getDescription,
  • getAttributes,
  • getEvidence,
  • setAnnotation,
  • getConceptAccession,
  • setDescription

Popular in Java

  • Updating database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now