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


Java Bpmn2Resource類代碼示例

本文整理匯總了Java中org.eclipse.bpmn2.util.Bpmn2Resource的典型用法代碼示例。如果您正苦於以下問題:Java Bpmn2Resource類的具體用法?Java Bpmn2Resource怎麽用?Java Bpmn2Resource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Bpmn2Resource類屬於org.eclipse.bpmn2.util包,在下文中一共展示了Bpmn2Resource類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createBpmnDiagram

import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
private Resource createBpmnDiagram(URI diagramUri) throws CoreException {
	final Bpmn2Resource resource = Bpmn2DiagramCreator.createBpmn2Resource(diagramUri);
	
	ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
		@Override
		public void run(IProgressMonitor monitor) throws CoreException {
			try {
				resource.save(null);
			} catch (IOException e) {
				throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Failed to save file", e));
			}
		}
	}, new NullProgressMonitor());
	
	return resource;
}
 
開發者ID:camunda,項目名稱:camunda-eclipse-standalone,代碼行數:17,代碼來源:ExternalBpmn2DiagramWizard.java

示例2: getIncomingConversationLinks

import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
 * <!-- begin-user-doc -->
 * Virtual opposite of {@link ConversationLink#getTargetRef()}.
 * For general information about virtual opposites see {@link CategoryValueImpl#getCategorizedFlowElements()}
 * <!-- end-user-doc -->
 * @generated NOT
 */
public List<ConversationLink> getIncomingConversationLinks() {
    if (eResource() instanceof Bpmn2Resource) {
        return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList(
                ConversationLink.class, this,
                Bpmn2Package.Literals.CONVERSATION_LINK__TARGET_REF);
    }
    throw new UnsupportedOperationException();
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:16,代碼來源:ConversationNodeImpl.java

示例3: getOutgoingConversationLinks

import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
 * <!-- begin-user-doc -->
 * Virtual opposite of {@link ConversationLink#getSourceRef()}.
 * For general information about virtual opposites see {@link CategoryValueImpl#getCategorizedFlowElements()}
 * <!-- end-user-doc -->
 * @generated NOT
 */
public List<ConversationLink> getOutgoingConversationLinks() {
    if (eResource() instanceof Bpmn2Resource) {
        return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter().getOppositeList(
                ConversationLink.class, this,
                Bpmn2Package.Literals.CONVERSATION_LINK__SOURCE_REF);
    }
    throw new UnsupportedOperationException();
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:16,代碼來源:ConversationNodeImpl.java

示例4: save

import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
 * 測試方法 不可用
 * @param defintion
 */
public void save(Definitions defintion){
	ResourceSet resourceSet = getResourceSet();
	Bpmn2Resource resource = (Bpmn2Resource) resourceSet.getResource(URI.createFileURI("d:\\node_template.bpmn"), true);
	DocumentRoot documentRoot = (DocumentRoot) resource.getContents().get(0);
	documentRoot.setDefinitions(defintion);
	try {
		resource.save(null);
	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:16,代碼來源:FixFlowConverter.java

示例5: unmarshall

import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
public Bpmn2Resource unmarshall(String json,
                                String preProcessingData) throws JsonParseException, IOException {
    return unmarshall(new JsonFactory().createJsonParser(json),
                      preProcessingData);
}
 
開發者ID:kiegroup,項目名稱:kie-wb-common,代碼行數:6,代碼來源:Bpmn2JsonUnmarshaller.java

示例6: getCategorizedFlowElements

import org.eclipse.bpmn2.util.Bpmn2Resource; //導入依賴的package包/類
/**
 * <!-- begin-user-doc -->
 * Returns a computed list of flow elements where {@link FlowElement#getCategoryValueRef()}
 * contains this CategoryValue.
 * 
 * This object has to be contained in a BPMN2 resource. The resource needs to have attached a
 * {@linkplain Bpmn2Resource#getOppositeReferenceAdapter() OppositeReferenceAdapter} that
 * observes (probably among others) the reference {@link FlowElement#getCategoryValueRef()},
 * which is the default state.
 * 
 * The result only includes those FlowElements that are contained in the same resource or
 * resource set.
 * <!-- end-user-doc -->
 * @generated NOT
 */
public List<FlowElement> getCategorizedFlowElements() {
    if (eResource() instanceof Bpmn2Resource) {
        return ((Bpmn2Resource) eResource()).getOppositeReferenceAdapter()
                .getOppositeList(FlowElement.class, this,
                        Bpmn2Package.Literals.FLOW_ELEMENT__CATEGORY_VALUE_REF);
    }
    throw new UnsupportedOperationException();
}
 
開發者ID:fixteam,項目名稱:fixflow,代碼行數:24,代碼來源:CategoryValueImpl.java


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