本文整理匯總了Java中org.biopax.paxtools.model.level3.Interaction類的典型用法代碼示例。如果您正苦於以下問題:Java Interaction類的具體用法?Java Interaction怎麽用?Java Interaction使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Interaction類屬於org.biopax.paxtools.model.level3包,在下文中一共展示了Interaction類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createInteractionEdges
import org.biopax.paxtools.model.level3.Interaction; //導入依賴的package包/類
private void createInteractionEdges(CyNetwork network) {
// Extract the List of all Interactions
Collection<Interaction> interactionList = model.getObjects(Interaction.class);
for (Interaction itr : interactionList) {
if(log.isTraceEnabled()) {
log.trace("Mapping " + itr.getModelInterface().getSimpleName()
+ " edges : " + itr.getUri());
}
if (itr instanceof Conversion) {
addConversionInteraction(network, (Conversion)itr);
} else if (itr instanceof Control) {
addControlInteraction(network, (Control) itr);
} else {
addPhysicalInteraction(network, itr);
}
}
}
示例2: getName
import org.biopax.paxtools.model.level3.Interaction; //導入依賴的package包/類
/**
* Creates a name for to the BioPAX model
* using its top-level process name(s).
*
* @param model
* @return
*/
public static String getName(Model model) {
StringBuffer modelName = new StringBuffer();
Collection<Pathway> pws = ModelUtils.getRootElements(model, Pathway.class);
for(Pathway pw: pws) {
modelName.append(" ").append(getName(pw));
}
if(modelName.length()==0) {
Collection<Interaction> itrs = ModelUtils.getRootElements(model, Interaction.class);
for(Interaction it: itrs) {
modelName.append(" ").append(getName(it));
}
}
if(modelName.length()==0) {
modelName.append(model.getXmlBase());
}
String name = modelName.toString().trim();
return name;
}
示例3: addPhysicalInteraction
import org.biopax.paxtools.model.level3.Interaction; //導入依賴的package包/類
private void addPhysicalInteraction(CyNetwork network, Interaction interactionElement) {
// Add all Participants
Collection<Entity> participantElements = interactionElement.getParticipant();
for (Entity participantElement : participantElements) {
linkNodes(network, interactionElement, participantElement, "participant");
}
}
示例4: createSummaryHtmlTextPane
import org.biopax.paxtools.model.level3.Interaction; //導入依賴的package包/類
private JTextPane createSummaryHtmlTextPane() {
final JTextPane textPane = new JTextPane();
textPane.setEditable(false);
textPane.setBorder(new EmptyBorder(7,7,7,7));
textPane.setContentType("text/html");
textPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);
textPane.addHyperlinkListener(new HyperlinkListener() {
public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
if (hyperlinkEvent.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
//import/create a network if the link is clicked
SearchHit currentItem = current;
String uri = hyperlinkEvent.getURL().toString();
boolean isProccess = "Pathway".equalsIgnoreCase(currentItem.getBiopaxClass());
if(!isProccess) {
for(Class<? extends BioPAXElement> t : SimpleEditorMap.L3.getKnownSubClassesOf(Interaction.class)) {
if(t.getSimpleName().equalsIgnoreCase(currentItem.getBiopaxClass())) {
isProccess = true;
break;
}
}
}
if(!isProccess) {
// create new 'neighborhood' query for a physical entity or entity reference type hit;
// use global organism and datasource filters
final CPathGraphQuery graphQuery = App.client.createGraphQuery()
.datasourceFilter(App.options.selectedDatasources())
.organismFilter(App.options.selectedOrganisms())
.sources(Collections.singleton(uri))
.kind(GraphType.NEIGHBORHOOD);
App.cyServices.taskManager.execute(new TaskIterator(
new NetworkAndViewTask(graphQuery, currentItem.toString())));
} else { // for a biological process (pathway or interaction), use '/get' command
final CPathGetQuery getQuery = App.client.createGetQuery()
.sources(Collections.singleton(uri));
App.cyServices.taskManager.execute(new TaskIterator(
new NetworkAndViewTask(getQuery, currentItem.toString())));
}
}
}
});
style(textPane);
return textPane;
}