本文整理汇总了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;
}