本文整理匯總了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();
}
示例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());
}
}
}
示例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;
}
示例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();
}
*/
}
示例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;
}
示例6: getXmiType
import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public HandlerEnum getXmiType() {
return xmiType;
}
示例7: setXmiType
import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public void setXmiType(HandlerEnum xmiType) {
this.xmiType = xmiType;
}
示例8: ISOSupportDomainModelGenerator
import gov.nih.nci.ncicb.xmiinout.handler.HandlerEnum; //導入依賴的package包/類
public ISOSupportDomainModelGenerator(HandlerEnum xmiType) {
this.handler = XmiHandlerFactory.getXmiHandler(xmiType);
}