本文整理汇总了Java中org.ndexbio.model.cx.NodeSupportLinksElement类的典型用法代码示例。如果您正苦于以下问题:Java NodeSupportLinksElement类的具体用法?Java NodeSupportLinksElement怎么用?Java NodeSupportLinksElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NodeSupportLinksElement类属于org.ndexbio.model.cx包,在下文中一共展示了NodeSupportLinksElement类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNdexCXWriter
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
private static CxWriter getNdexCXWriter(OutputStream out, boolean use_default_pretty_printer) throws IOException {
CxWriter cxwtr = CxWriter.createInstance(out, use_default_pretty_printer);
cxwtr.addAspectFragmentWriter(NodesFragmentWriter.createInstance());
cxwtr.addAspectFragmentWriter(EdgesFragmentWriter.createInstance());
cxwtr.addAspectFragmentWriter(NetworkAttributesFragmentWriter.createInstance());
cxwtr.addAspectFragmentWriter(EdgeAttributesFragmentWriter.createInstance());
cxwtr.addAspectFragmentWriter(NodeAttributesFragmentWriter.createInstance());
cxwtr.addAspectFragmentWriter(VisualPropertiesFragmentWriter.createInstance());
GeneralAspectFragmentWriter cfw = new GeneralAspectFragmentWriter(CitationElement.ASPECT_NAME);
cxwtr.addAspectFragmentWriter(cfw);
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(SupportElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(FunctionTermElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(NodeCitationLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(EdgeCitationLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(EdgeSupportLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(NodeSupportLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(NamespacesElement.ASPECT_NAME));
return cxwtr;
}
示例2: CXMetaDataManager
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
public CXMetaDataManager() {
NdexSupportedAspects = new TreeMap<>();
NdexSupportedAspects.put(NodesElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(EdgesElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(NetworkAttributesElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(NodeAttributesElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(EdgeAttributesElement.ASPECT_NAME, "1.0");
NdexSupportedAspects.put(CitationElement.ASPECT_NAME, "1.0");
NdexSupportedAspects.put(SupportElement.ASPECT_NAME, "1.0");
NdexSupportedAspects.put(EdgeCitationLinksElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(EdgeSupportLinksElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(NodeCitationLinksElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put( NodeSupportLinksElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put( FunctionTermElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put( NamespacesElement.ASPECT_NAME, "1.0");
NdexSupportedAspects.put(NdexNetworkStatus.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(Provenance.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(ReifiedEdgeElement.ASPECT_NAME,"1.0");
NdexSupportedAspects.put(BELNamespaceElement.ASPECT_NAME, "1.0;");
}
示例3: createCXReader
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
private static CxElementReader2 createCXReader (InputStream in) throws IOException {
HashSet<AspectFragmentReader> readers = new HashSet<>(20);
readers.add(EdgesFragmentReader.createInstance());
readers.add(EdgeAttributesFragmentReader.createInstance());
readers.add(NetworkAttributesFragmentReader.createInstance());
readers.add(NodesFragmentReader.createInstance());
readers.add(NodeAttributesFragmentReader.createInstance());
readers.add(new GeneralAspectFragmentReader<> (NdexNetworkStatus.ASPECT_NAME,
NdexNetworkStatus.class));
readers.add(new GeneralAspectFragmentReader<> (NamespacesElement.ASPECT_NAME,NamespacesElement.class));
readers.add(new GeneralAspectFragmentReader<> (FunctionTermElement.ASPECT_NAME,FunctionTermElement.class));
readers.add(new GeneralAspectFragmentReader<> (CitationElement.ASPECT_NAME,CitationElement.class));
readers.add(new GeneralAspectFragmentReader<> (SupportElement.ASPECT_NAME,SupportElement.class));
// readers.add(new GeneralAspectFragmentReader (ReifiedEdgeElement.ASPECT_NAME,ReifiedEdgeElement.class));
readers.add(new GeneralAspectFragmentReader<> (EdgeCitationLinksElement.ASPECT_NAME,EdgeCitationLinksElement.class));
readers.add(new GeneralAspectFragmentReader<> (EdgeSupportLinksElement.ASPECT_NAME,EdgeSupportLinksElement.class));
readers.add(new GeneralAspectFragmentReader<> (NodeCitationLinksElement.ASPECT_NAME,NodeCitationLinksElement.class));
readers.add(new GeneralAspectFragmentReader<> (NodeSupportLinksElement.ASPECT_NAME,NodeSupportLinksElement.class));
readers.add(new GeneralAspectFragmentReader<> (Provenance.ASPECT_NAME,Provenance.class));
return new CxElementReader2(in, readers,false);
}
示例4: createCXReader
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
private CxElementReader createCXReader () throws IOException {
HashSet<AspectFragmentReader> readers = new HashSet<>(20);
readers.add(EdgesFragmentReader.createInstance());
readers.add(EdgeAttributesFragmentReader.createInstance());
readers.add(NetworkAttributesFragmentReader.createInstance());
readers.add(NodesFragmentReader.createInstance());
readers.add(NodeAttributesFragmentReader.createInstance());
readers.add(new GeneralAspectFragmentReader (NdexNetworkStatus.ASPECT_NAME,
NdexNetworkStatus.class));
readers.add(new GeneralAspectFragmentReader (NamespacesElement.ASPECT_NAME,NamespacesElement.class));
readers.add(new GeneralAspectFragmentReader (FunctionTermElement.ASPECT_NAME,FunctionTermElement.class));
readers.add(new GeneralAspectFragmentReader (CitationElement.ASPECT_NAME,CitationElement.class));
readers.add(new GeneralAspectFragmentReader (SupportElement.ASPECT_NAME,SupportElement.class));
readers.add(new GeneralAspectFragmentReader (ReifiedEdgeElement.ASPECT_NAME,ReifiedEdgeElement.class));
readers.add(new GeneralAspectFragmentReader (EdgeCitationLinksElement.ASPECT_NAME,EdgeCitationLinksElement.class));
readers.add(new GeneralAspectFragmentReader (EdgeSupportLinksElement.ASPECT_NAME,EdgeSupportLinksElement.class));
readers.add(new GeneralAspectFragmentReader (NodeCitationLinksElement.ASPECT_NAME,NodeCitationLinksElement.class));
readers.add(new GeneralAspectFragmentReader (NodeSupportLinksElement.ASPECT_NAME,NodeSupportLinksElement.class));
readers.add(new GeneralAspectFragmentReader (Provenance.ASPECT_NAME,Provenance.class));
return CxElementReader.createInstance(inputStream, true,
readers);
}
示例5: createNodeSupport
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
private void createNodeSupport(NodeSupportLinksElement elmt) throws ObjectNotFoundException, DuplicateObjectException {
for (Long sourceId : elmt.getSourceIds()) {
ODocument nodeDoc = getOrCreateNodeDocBySID(sourceId);
Set<Long> supportIds = nodeDoc.field(NdexClasses.Support);
if(supportIds == null)
supportIds = new HashSet<>(elmt.getSupportIds().size());
for ( Long supportSID : elmt.getSupportIds()) {
Long supportId = supportSIDMap.get(supportSID);
if ( supportId == null) {
supportId = createSupportBySID(supportSID);
}
supportIds.add(supportId);
}
nodeDoc.field(NdexClasses.Support, supportIds).save();
}
}
示例6: getNdexCXWriter
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
private static CxWriter getNdexCXWriter(OutputStream out, boolean use_default_pretty_printer) throws IOException {
CxWriter cxwtr = CxWriter.createInstance(out, use_default_pretty_printer);
GeneralAspectFragmentWriter cfw = new GeneralAspectFragmentWriter(CitationElement.ASPECT_NAME);
for (AspectFragmentWriter afw : CxioUtil.getAllAvailableAspectFragmentWriters() ) {
cxwtr.addAspectFragmentWriter(afw);
}
cxwtr.addAspectFragmentWriter(cfw);
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(SupportElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(NodeCitationLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(EdgeCitationLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(EdgeSupportLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(NodeSupportLinksElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(FunctionTermElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(NamespacesElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(ReifiedEdgeElement.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(NdexNetworkStatus.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(Provenance.ASPECT_NAME));
cxwtr.addAspectFragmentWriter(new GeneralAspectFragmentWriter(BELNamespaceElement.ASPECT_NAME));
return cxwtr;
}
示例7: createNodeSupport
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
private void createNodeSupport(NodeSupportLinksElement elmt) throws IOException {
for ( Long sourceId : elmt.getSourceIds()) {
nodeIdTracker.addReferenceId(sourceId);
}
for ( Long supportId : elmt.getSupportIds()) {
supportIdTracker.addReferenceId(supportId);
}
writeCXElement(elmt);
}
示例8: getMetaDataCollection_aux
import org.ndexbio.model.cx.NodeSupportLinksElement; //导入依赖的package包/类
private MetaDataCollection getMetaDataCollection_aux (boolean setEdgeAndNodeCounts) {
MetaDataCollection md = networkDoc.field(NdexClasses.Network_P_metadata);
if ( md != null) {
if ( setEdgeAndNodeCounts)
return md;
// otherwise remove all the element counts from metadata.
for ( MetaDataElement m : md ) {
m.setElementCount(null);
}
return md;
}
md = CXMetaDataManager.getInstance().createCXMataDataTemplate();
Timestamp lastUpdate = new Timestamp( ((Date)networkDoc.field(NdexClasses.ExternalObj_mTime)).getTime());
if ( setEdgeAndNodeCounts) {
int edgecount = networkDoc.field(NdexClasses.Network_P_edgeCount);
int nodecount = networkDoc.field(NdexClasses.Network_P_nodeCount);
md.setElementCount(NodesElement.ASPECT_NAME, new Long(nodecount));
md.setElementCount(EdgesElement.ASPECT_NAME, new Long(edgecount));
}
//check citation
populateMDElementCnt(md, NdexClasses.Network_E_Citations, CitationElement.ASPECT_NAME);
populateMDElementCnt(md, NdexClasses.Network_E_FunctionTerms, FunctionTermElement.ASPECT_NAME);
populateMDElementCnt(md, NdexClasses.Network_E_Namespace, NamespacesElement.ASPECT_NAME);
populateMDElementCnt(md, NdexClasses.Network_E_ReifiedEdgeTerms, ReifiedEdgeElement.ASPECT_NAME);
populateMDElementCnt(md, NdexClasses.Network_E_Supports, SupportElement.ASPECT_NAME);
populateMDElementCnt(md, BELNamespaceElement.ASPECT_NAME, BELNamespaceElement.ASPECT_NAME);
if ( md.getMetaDataElement(CitationElement.ASPECT_NAME)==null) {
md.remove(NodeCitationLinksElement.ASPECT_NAME);
md.remove(EdgeCitationLinksElement.ASPECT_NAME);
}
if ( md.getMetaDataElement(SupportElement.ASPECT_NAME) == null) {
md.remove(NodeSupportLinksElement.ASPECT_NAME);
md.remove(EdgeSupportLinksElement.ASPECT_NAME);
}
for ( MetaDataElement e : md ) {
e.setLastUpdate(lastUpdate.getTime());
}
return md;
}