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


Java HandlerEnum類代碼示例

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


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

示例1: initialize

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
private void initialize() {
    NotifyingButtonGroup xmiTypeGroup = new NotifyingButtonGroup();
    xmiTypeGroup.addGroupSelectionListener(new GroupSelectionListener() {
        public void selectionChanged(ButtonModel previousSelection, ButtonModel currentSelection) {
            getConfiguration().setXmiType(currentSelection == getEaXmiTypeRadioButton().getModel() ? 
                HandlerEnum.EADefault : HandlerEnum.ArgoUMLDefault);
        }
    });
    xmiTypeGroup.add(getEaXmiTypeRadioButton());
    xmiTypeGroup.add(getArgoXmiTypeRadioButton());
    xmiTypeGroup.setSelected(getEaXmiTypeRadioButton().getModel(), true);
    configureValidation();
    setLayout(new GridLayout());
    add(getValidationOverlayPanel());
    validateInput();
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:17,代碼來源:ModelFromXmiPanel.java

示例2: setUp

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public void setUp() {
    if (validator == null) {
        validator = new ISODomainModelValidator();
    }
    if (model == null) {
        File modelFile = new File(XMI_MODEL_FILENAME);
        assertTrue("XMI model file " + modelFile.getAbsolutePath() + " not found", modelFile.exists());
        try {
            ISOSupportDomainModelGenerator generator = new ISOSupportDomainModelGenerator(HandlerEnum.EADefault);
            model = generator.generateDomainModel(modelFile.getAbsolutePath());
        } catch (Exception ex) {
            ex.printStackTrace();
            fail("Error reading domain model: " + ex.getMessage());
        }
    }
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:17,代碼來源:ISODomainModelValidationTestCase.java

示例3: getDomainModelConfiguration

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
private AbstractStyleConfigurationStep getDomainModelConfiguration() throws Exception {
    DomainModelConfigurationStep config = new DomainModelConfigurationStep(getServiceInformation());
    config.setModelSource(DomainModelConfigurationSource.XMI);
    config.setXmiType(HandlerEnum.EADefault);
    config.setXmiFile(getDomainModelXmiFile());
    config.setProjectShortName(ExampleProjectInfo.EXAMPLE_PROJECT_NAME);
    config.setProjectVersion(ExampleProjectInfo.EXAMPLE_PROJECT_VERSION);
    return config;
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:10,代碼來源:CreateDataServiceStep.java

示例4: main

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public static void main(String[] args) {
    ISOSupportDomainModelGenerator generator = new ISOSupportDomainModelGenerator(HandlerEnum.EADefault);
    try {
        System.out.println("generating model");
        DomainModel model = generator.generateDomainModel("test/resources/sdk.xmi");
        System.out.println("serializing");
        FileWriter writer = new FileWriter("sample-domain-model.xml");
        MetadataUtils.serializeDomainModel(model, writer);
        System.out.println(writer.toString());
        writer.close();
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    
    /*
    try {
        XmiInOutHandler handler = XmiHandlerFactory.getXmiHandler(HandlerEnum.EADefault);
        handler.load("test/resources/sdk.xmi");
        UMLModel model = handler.getModel();
        List<UMLClass> classes = generator.getAllClassesInModel(model);
        UMLClass discovered = generator.deriveRealClass("DSET<AD>", classes);
        if (discovered == null) {
            System.out.println("fail");
        } else {
            System.out.println(generator.getFullPackageName(discovered) + "." + discovered.getName());
        }
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    */
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:32,代碼來源:ISOSupportDomainModelGenerator.java

示例5: initXmiHandler

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
private XmiInOutHandler initXmiHandler(String fileName)
{
	XmiInOutHandler rtnHandler;
    // Check for the agrUML or EA XMI
    // Decide which parser to use to open this XMI file
    boolean eaExporter = false;
    try {
        BufferedReader in = new BufferedReader(new FileReader( xmiFileName ));
        String str;
        while ((str = in.readLine()) != null&&!eaExporter)
        {
            if ( str.contains("<XMI.exporter>Enterprise Architect</XMI.exporter>") )
            {
                eaExporter = true;
            }
        }
        in.close();
    }
    catch (IOException e) {
    	e.printStackTrace();
    }

    if ( eaExporter == true ) {
        System.out.println("Handler using EADefault:"+HandlerEnum.EADefault);
        rtnHandler = XmiHandlerFactory.getXmiHandler(HandlerEnum.EADefault);
    } else {
        System.out.println("Handler using ArgoUMLDefault:"+HandlerEnum.ArgoUMLDefault);
        rtnHandler = XmiHandlerFactory.getXmiHandler(HandlerEnum.ArgoUMLDefault);
    }
	return rtnHandler;
}
 
開發者ID:NCIP,項目名稱:caadapter,代碼行數:32,代碼來源:XmiModelMetadata.java

示例6: getXmiType

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public HandlerEnum getXmiType() {
    return xmiType;
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:4,代碼來源:DomainModelConfigurationStep.java

示例7: setXmiType

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public void setXmiType(HandlerEnum xmiType) {
    this.xmiType = xmiType;
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:4,代碼來源:DomainModelConfigurationStep.java

示例8: ISOSupportDomainModelGenerator

import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public ISOSupportDomainModelGenerator(HandlerEnum xmiType) {
    this.handler = XmiHandlerFactory.getXmiHandler(xmiType);
}
 
開發者ID:NCIP,項目名稱:cagrid-core,代碼行數:4,代碼來源:ISOSupportDomainModelGenerator.java


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