本文整理汇总了Java中org.eclipse.emf.ecore.impl.EcoreFactoryImpl类的典型用法代码示例。如果您正苦于以下问题:Java EcoreFactoryImpl类的具体用法?Java EcoreFactoryImpl怎么用?Java EcoreFactoryImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EcoreFactoryImpl类属于org.eclipse.emf.ecore.impl包,在下文中一共展示了EcoreFactoryImpl类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addXsiSchemaLocation
import org.eclipse.emf.ecore.impl.EcoreFactoryImpl; //导入依赖的package包/类
@Operation(contextual = true, kind = Operation.Kind.HELPER)
public static void addXsiSchemaLocation(DocumentRoot result,String key,String value) {
EStringToStringMapEntryImpl metadataLocation=(EStringToStringMapEntryImpl) ((EcoreFactoryImpl)EcoreFactory.eINSTANCE).createEStringToStringMapEntry();
metadataLocation.setKey(key);
metadataLocation.setValue(value);
result.getXSISchemaLocation().add(metadataLocation);
}
示例2: stringValue
import org.eclipse.emf.ecore.impl.EcoreFactoryImpl; //导入依赖的package包/类
/**
* convert the value of any EAttribute of an EObject to a string
* @param att
* @param attValue
* @return
*/
private String stringValue(EAttribute att, Object attValue)
{
String val = "";
EDataType type = att.getEAttributeType();
String typeName = type.getName();
EcoreFactoryImpl fac = new EcoreFactoryImpl();
if (typeName.equals("EInt"))
val = fac.convertEIntToString(type, attValue);
else if (typeName.equals("EString"))
val = fac.convertEStringToString(type, attValue);
// ... etc; add more as needed
else {System.out.println("Cannot yet handle Ecore type " + typeName);}
return val;
}
示例3: getXmlNsList
import org.eclipse.emf.ecore.impl.EcoreFactoryImpl; //导入依赖的package包/类
private final static List<BasicEMap.Entry<String, String>> getXmlNsList()
{
List<EPackage> packages = new ArrayList<EPackage>();
// resource packages
packages.add(Db2ResourcePackage.eINSTANCE);
packages.add(DirectoryResourcePackage.eINSTANCE);
packages.add(FileResourcePackage.eINSTANCE);
packages.add(InformixResourcePackage.eINSTANCE);
packages.add(MqResourcePackage.eINSTANCE);
packages.add(OracleResourcePackage.eINSTANCE);
packages.add(QueryResourcePackage.eINSTANCE);
packages.add(ReferenceResourcePackage.eINSTANCE);
packages.add(ShadowDirectResourcePackage.eINSTANCE);
packages.add(SoapIOResourcePackage.eINSTANCE);
packages.add(SybaseResourcePackage.eINSTANCE);
packages.add(TeradataResourcePackage.eINSTANCE);
packages.add(UdbResourcePackage.eINSTANCE);
packages.add(NullResourcePackage.eINSTANCE);
packages.add(TransactionResourcePackage.eINSTANCE);
packages.add(SemaphoreResourcePackage.eINSTANCE);
packages.add(LdapResourcePackage.eINSTANCE);
packages.add(LdapQueryResourcePackage.eINSTANCE);
packages.add(SqliteResourcePackage.eINSTANCE);
packages.add(MssqlResourcePackage.eINSTANCE);
// global packages
packages.add(ValuesPackage.eINSTANCE);
packages.add(TypesPackage.eINSTANCE);
packages.add(ListenersPackage.eINSTANCE);
packages.add(RepetitionPackage.eINSTANCE);
packages.add(SaturnWebPackage.eINSTANCE);
packages.add(SaturnReportPackage.eINSTANCE);
// module packages
packages.add(CpsModulePackage.eINSTANCE);
packages.add(DatacompareModulePackage.eINSTANCE);
packages.add(DsConvertModulePackage.eINSTANCE);
packages.add(DsValidatorModulePackage.eINSTANCE);
packages.add(EnvValidatorModulePackage.eINSTANCE);
packages.add(ExtractDDLModulePackage.eINSTANCE);
packages.add(MailModulePackage.eINSTANCE);
packages.add(MqModulePackage.eINSTANCE);
packages.add(ProcedureCallModulePackage.eINSTANCE);
packages.add(PsManagerModulePackage.eINSTANCE);
packages.add(RuncmdsModulePackage.eINSTANCE);
packages.add(SingularityModulePackage.eINSTANCE);
packages.add(SoapIOModulePackage.eINSTANCE);
packages.add(SqlModulePackage.eINSTANCE);
packages.add(Xml2csvModulePackage.eINSTANCE);
packages.add(XmlDiffModulePackage.eINSTANCE);
packages.add(XmlGenModulePackage.eINSTANCE);
packages.add(XmlManipModulePackage.eINSTANCE);
packages.add(XmlValidatorModulePackage.eINSTANCE);
packages.add(CometModulePackage.eINSTANCE);
packages.add(XSplitModulePackage.eINSTANCE);
packages.add(ReferenceModulePackage.eINSTANCE);
packages.add(DocumentumModulePackage.eINSTANCE);
List<BasicEMap.Entry<String, String>> xmlNsList = new ArrayList<BasicEMap.Entry<String, String>>();
for (EPackage ePackage : packages)
{
((EcoreFactoryImpl) EcoreFactory.eINSTANCE).createEStringToStringMapEntry();
BasicEMap.Entry<String, String> newEntry = (BasicEMap.Entry<String, String>) EcoreUtil
.create((EClass) SaturnPackage.eINSTANCE.getDocumentRoot_XMLNSPrefixMap().getEType());
// new EStringToStringMapEntryImpl();
// //((EcoreFactoryImpl)EcoreFactory.eINSTANCE).createEStringToStringMapEntry();
xmlNsList.add(newEntry);
newEntry.setKey(ePackage.getNsPrefix());
newEntry.setValue(ePackage.getNsURI());
}
return xmlNsList;
}