當前位置: 首頁>>代碼示例>>Java>>正文


Java NodeSupportLinksElement類代碼示例

本文整理匯總了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;
}
 
開發者ID:ndexbio,項目名稱:ndex-rest,代碼行數:23,代碼來源:CXNetwork.java

示例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;");
}
 
開發者ID:ndexbio,項目名稱:ndex-rest,代碼行數:22,代碼來源:CXMetaDataManager.java

示例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);
	}
 
開發者ID:ndexbio,項目名稱:ndex-rest,代碼行數:24,代碼來源:CXNetworkLoader.java

示例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);
}
 
開發者ID:ndexbio,項目名稱:ndex-common,代碼行數:26,代碼來源:CXNetworkLoader.java

示例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();
  }	
}
 
開發者ID:ndexbio,項目名稱:ndex-common,代碼行數:21,代碼來源:CXNetworkLoader.java

示例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;
}
 
開發者ID:ndexbio,項目名稱:ndex-common,代碼行數:25,代碼來源:CXNetworkExporter.java

示例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);

}
 
開發者ID:ndexbio,項目名稱:ndex-rest,代碼行數:13,代碼來源:CXNetworkLoader.java

示例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;
}
 
開發者ID:ndexbio,項目名稱:ndex-common,代碼行數:48,代碼來源:CXNetworkExporter.java


注:本文中的org.ndexbio.model.cx.NodeSupportLinksElement類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。