Author: rodche
Date: 2012-10-18 10:35:47 -0700 (Thu, 18 Oct 2012)
New Revision: 30684

Modified:
   
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/BioPaxMapper.java
   
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/util/BioPaxUtil.java
   
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/view/BioPaxDetailsPanel.java
Log:
Removed a feature: the hidden attribute and the results panel html section 
responsible for showing a BioPAX RDF/XML fragment data for a selected node.

Modified: 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/BioPaxMapper.java
===================================================================
--- 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/BioPaxMapper.java
  2012-10-18 15:52:25 UTC (rev 30683)
+++ 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/BioPaxMapper.java
  2012-10-18 17:35:47 UTC (rev 30684)
@@ -63,52 +63,52 @@
        /**
         * BioPax Node Attribute: Entity TYPE
         */
-       public static final String BIOPAX_ENTITY_TYPE = "biopax_type";
+       public static final String BIOPAX_ENTITY_TYPE = "BIOPAX_TYPE";
 
        /**
         * BioPax Node Attribute: CHEMICAL_MODIFICATIONS_MAP
         */
-       public static final String BIOPAX_CHEMICAL_MODIFICATIONS_MAP = 
"chemical_modifications_map";
+       public static final String BIOPAX_CHEMICAL_MODIFICATIONS_MAP = 
"CHEMICAL_MODIFICATIONS_MAP";
 
        /**
         * BioPax Node Attribute: CHEMICAL_MODIFICATIONS_LIST
         */
-       public static final String BIOPAX_CHEMICAL_MODIFICATIONS_LIST = 
"chemical_modifications";
+       public static final String BIOPAX_CHEMICAL_MODIFICATIONS_LIST = 
"CHEMICAL_MODIFICATIONS";
 
        /**
         * Node Attribute: UNIFICATION_REFERENCES
         */
-       public static final String BIOPAX_UNIFICATION_REFERENCES = 
"unification_references";
+       public static final String BIOPAX_UNIFICATION_REFERENCES = 
"UNIFICATION_REFERENCES";
 
        /**
         * Node Attribute: RELATIONSHIP_REFERENCES
         */
-       public static final String BIOPAX_RELATIONSHIP_REFERENCES = 
"relationship_references";
+       public static final String BIOPAX_RELATIONSHIP_REFERENCES = 
"RELATIONSHIP_REFERENCES";
 
        /**
         * Node Attribute: PUBLICATION_REFERENCES
         */
-       public static final String BIOPAX_PUBLICATION_REFERENCES = 
"publication_references";
+       public static final String BIOPAX_PUBLICATION_REFERENCES = 
"PUBLICATION_REFERENCES";
 
        /**
         * Node Attribute:  XREF_IDs.
         */
-       public static final String BIOPAX_XREF_IDS = "identifiers";
+       public static final String BIOPAX_XREF_IDS = "IDENTIFIERS";
 
        /**
         * Node Attribute:  BIOPAX_XREF_PREFIX.
         */
-       public static final String BIOPAX_XREF_PREFIX = "xref.";
+       public static final String BIOPAX_XREF_PREFIX = "XREF.";
 
        /**
         * Node Attribute: IHOP_LINKS
         */
-       public static final String BIOPAX_IHOP_LINKS = "ihop_links";
+       public static final String BIOPAX_IHOP_LINKS = "IHOP_LINKS";
 
        /**
         * Node Attribute: AFFYMETRIX_REFERENCES
         */
-       public static final String BIOPAX_AFFYMETRIX_REFERENCES_LIST = 
"affymetrix_references";
+       public static final String BIOPAX_AFFYMETRIX_REFERENCES_LIST = 
"AFFYMETRIX_REFERENCES";
        
        
        public static final Logger log = 
LoggerFactory.getLogger(BioPaxMapper.class);
@@ -569,7 +569,7 @@
                }
                
                // ihop links
-               String stringRef = addIHOPLinks(network, resource);
+               String stringRef = ihopLinks(resource);
                if (stringRef != null) {
                        AttributeUtil.set(network, node, 
CyNetwork.HIDDEN_ATTRS, BIOPAX_IHOP_LINKS, stringRef, String.class);
                }
@@ -722,11 +722,11 @@
                // add a piece of the BioPAX (RDF/XML without parent|child 
elements)
                
                
-               //the following attr. was experimental, not so important for 
users...
-               if(network.getNodeCount() < 100) { //- this condition was added 
for performance/memory...
-                       String owl = BioPaxUtil.toOwl(element); // (requires 
common-lang-2.4 bundle to be started)
-                       AttributeUtil.set(network, node, 
CyNetwork.HIDDEN_ATTRS, BioPaxUtil.BIOPAX_DATA, owl, String.class);
-               }
+//             //the following attr. was experimental, not so important for 
users...
+//             if(network.getNodeCount() < 100) { //- this condition was added 
for performance/memory...
+//                     String owl = BioPaxUtil.toOwl(element); // (requires 
common-lang-2.4 bundle to be started)
+//                     AttributeUtil.set(network, node, 
CyNetwork.HIDDEN_ATTRS, BioPaxUtil.BIOPAX_DATA, owl, String.class);
+//             }
                
                String name = 
BioPaxUtil.truncateLongStr(BioPaxUtil.getNodeName(element) + "");
                
@@ -941,19 +941,17 @@
        }
 
        
-       private static String addIHOPLinks(CyNetwork network, BioPAXElement 
bpe) {
+       private static String ihopLinks(BioPAXElement bpe) {
                List<String> synList = new 
ArrayList<String>(BioPaxUtil.getSynonyms(bpe));
                List<ExternalLink> dbList = xrefToExternalLinks(bpe, 
Xref.class);
+               String htmlLink = null;
                
                if (!synList.isEmpty() || !dbList.isEmpty()) {
-                       String htmlLink = 
ExternalLinkUtil.createIHOPLink(bpe.getModelInterface().getSimpleName(),
-                                       synList, dbList, 
BioPaxUtil.getOrganismTaxonomyId(network, bpe));
-                       if (htmlLink != null) {
-                               return htmlLink;
-                       }
+                       htmlLink = 
ExternalLinkUtil.createIHOPLink(bpe.getModelInterface().getSimpleName(),
+                                       synList, dbList, 
BioPaxUtil.getOrganismTaxonomyId(bpe));
                }
 
-               return null;
+               return htmlLink;
        }
 
        

Modified: 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/util/BioPaxUtil.java
===================================================================
--- 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/util/BioPaxUtil.java
       2012-10-18 15:52:25 UTC (rev 30683)
+++ 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/util/BioPaxUtil.java
       2012-10-18 17:35:47 UTC (rev 30684)
@@ -53,7 +53,6 @@
 import org.biopax.paxtools.model.level3.XReferrable;
 import org.biopax.paxtools.model.level3.Xref;
 import org.biopax.paxtools.util.ClassFilterSet;
-import org.cytoscape.model.CyNetwork;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -319,11 +318,11 @@
        
        /**
         * Gets the NCBI Taxonomy ID.
-        *
         * @param bpe BioPAX element
+        *
         * @return taxonomyId, or -1, if not available.
         */
-       public static int getOrganismTaxonomyId(CyNetwork network, 
BioPAXElement bpe) {
+       public static int getOrganismTaxonomyId(BioPAXElement bpe) {
                int taxonomyId = -1;
                
                try {

Modified: 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/view/BioPaxDetailsPanel.java
===================================================================
--- 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/view/BioPaxDetailsPanel.java
       2012-10-18 15:52:25 UTC (rev 30683)
+++ 
core3/impl/trunk/biopax-impl/src/main/java/org/cytoscape/biopax/internal/view/BioPaxDetailsPanel.java
       2012-10-18 17:35:47 UTC (rev 30684)
@@ -207,14 +207,14 @@
                addLinks(network,node, buf);
 
                
-               // excerpt from the BioPAX OWL
-               stringRef = null;
-               //the following attr. was experimental, not so important for 
users; may be null (not generated) in large networks
-        stringRef = 
network.getRow(node,CyNetwork.HIDDEN_ATTRS).get(BioPaxUtil.BIOPAX_DATA, 
String.class);
-        if (stringRef != null) {
-               appendHeader("BioPAX L3 (fragment)", buf);
-            buf.append("<pre class='excerpt'>" + 
StringEscapeUtils.escapeXml(stringRef) + "</pre>");
-        }
+//             // excerpt from the BioPAX OWL
+//             stringRef = null;
+//             //the following attr. was experimental, not so important for 
users; may be null (not generated) in large networks
+//        stringRef = 
network.getRow(node,CyNetwork.HIDDEN_ATTRS).get(BioPaxUtil.BIOPAX_DATA, 
String.class);
+//        if (stringRef != null) {
+//             appendHeader("BioPAX L3 (fragment)", buf);
+//            buf.append("<pre class='excerpt'>" + 
StringEscapeUtils.escapeXml(stringRef) + "</pre>");
+//        }
                
                buf.append("</BODY></HTML>");
                textPane.setText(buf.toString());

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to