Package org.patika.mada.util

Examples of org.patika.mada.util.XRef


          if (id.length() < 1) continue;
         
          String dbtext = Character.isDigit(id.charAt(0)) ?
            XRef.ENTREZ_GENE : XRef.UNIPROT;

          refs.add(new XRef(dbtext + ":" + id));
        }
      }
    }

    if (!refs.isEmpty())
    {
      try
      {
        main.lockWithMessage("Querying Pathway Commons Database ...");

        PathwayCommonsIOHandler ioHandler = new PathwayCommonsIOHandler();
        Map<String, String> pathToID = new HashMap<String, String>();
        List<String> resultPathways = new ArrayList<String>();

        XRef xr = XRef.getFirstRef(refs,
          new String[]{XRef.CPATH, XRef.ENTREZ_GENE, XRef.UNIPROT});

        refs.clear();
        if (xr != null)
        {
View Full Code Here


   */
  private void extractReferences()
  {
    for (xref xr : cmp.getXREF())
    {
      this.addReference(new XRef(xr));
    }
  }
View Full Code Here

          if (id.length() < 1) continue;

          String dbtext = Character.isDigit(id.charAt(0)) ?
            XRef.ENTREZ_GENE : XRef.UNIPROT;

          refs.add(new XRef(dbtext + ":" + id));
        }
      }
    }

    if (!refs.isEmpty())
    {
      try
      {
        main.lockWithMessage("Querying Pathway Commons Database ...");
        PathwayCommonsIOHandler ioHandler = new PathwayCommonsIOHandler(new SimpleIOHandler());

        // Names of new pathways for the neighborhood
        Map<XRef, String> ref2pname = new HashMap<XRef, String>();

        // Query for only one xref

        XRef xr = XRef.getFirstRef(refs,
          new String[]{XRef.CPATH, XRef.ENTREZ_GENE, XRef.UNIPROT});

        refs.clear();
        if (xr != null)
        {
View Full Code Here

  {
    String names = "";

    if (ent.getStandardName() != null && ent.getStandardName().length() > 0)
    {
      this.addReference(new XRef(NAME_REF, ent.getStandardName()));
      names = ent.getStandardName();
    }

    for (String nm : ent.getName())
    {
      this.addReference(new XRef(NAME_REF, nm));
      names += (names.length() == 0 ? "" : "\n") + nm;
    }

//    for (xref xr : new ClassFilterSet<unificationXref>(ent.getXREF(), unificationXref.class))
    for (Xref xr : ent.getXref())
    {
      if (xr != null)
      {
        this.addReference(new XRef(xr));
      }
    }

    return names;
  }
View Full Code Here

  {
    Set<String> nameSet = new HashSet<String>();

    if (ent.getSHORT_NAME() != null && ent.getSHORT_NAME().length() > 0)
    {
      this.addReference(new XRef(NAME_REF, ent.getSHORT_NAME()));
      if(ent.getSHORT_NAME() != null) nameSet.add(ent.getSHORT_NAME());
    }

    if (ent.getNAME() != null && ent.getNAME().length() > 0)
    {
      this.addReference(new XRef(NAME_REF, ent.getNAME()));
      nameSet.add(ent.getNAME());
    }

    for (String syn : ent.getSYNONYMS())
    {
      if (syn != null)
      {
        XRef ref = new XRef(NAME_REF, syn);

        if (!this.getReferences().contains(ref))
        {
          this.addReference(ref);
          nameSet.add(syn);
        }
      }
    }

//    for (xref xr : new ClassFilterSet<unificationXref>(ent.getXREF(), unificationXref.class))
    for (xref xr : ent.getXREF())
    {
      if (xr != null)
      {
        this.addReference(new XRef(xr));
      }
    }
    String names = "";

    Iterator<String> iter = nameSet.iterator();
View Full Code Here

      String d = "";

      for (Object ref : row.getRef())
      {
        d += new XRef((Reference) ref).toString() + " ";
      }

      d = d.trim();
      d = d.toLowerCase();
View Full Code Here

TOP

Related Classes of org.patika.mada.util.XRef

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.