本文整理汇总了Java中org.eclipse.emf.ecore.EClass.setName方法的典型用法代码示例。如果您正苦于以下问题:Java EClass.setName方法的具体用法?Java EClass.setName怎么用?Java EClass.setName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.emf.ecore.EClass
的用法示例。
在下文中一共展示了EClass.setName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visit
import org.eclipse.emf.ecore.EClass; //导入方法依赖的package包/类
@Override
public void visit(Tuple tuple, String param) {
if (hasElement(tuple)) {
return;
}
EPackage firstRoot = this.m_rootPackages.iterator()
.next();
EClass eClass = g_EcoreFactory.createEClass();
setElement(tuple, eClass);
eClass.setName(getTupleName(tuple));
firstRoot.getEClassifiers()
.add(eClass);
int typeIndex = 1;
for (Type type : tuple.getTypes()) {
Field typeField =
new Field(Name.getName(getTupleElementName(tuple, typeIndex++)), type, 1, 1);
EStructuralFeature eStructFeat = (EStructuralFeature) getElement(typeField);
eClass.getEStructuralFeatures()
.add(eStructFeat);
}
}
示例2: createArrayType
import org.eclipse.emf.ecore.EClass; //导入方法依赖的package包/类
private EClass createArrayType(ArrayType arrayType) {
//System.out.println("maaaaap " + occiType2emfType);
EClass type = EcoreFactory.eINSTANCE.createEClass();
type.setName(arrayType.getName());
if (arrayType.getDocumentation() != null) {
attachInfo(type, arrayType.getDocumentation());
}
return type;
}
示例3: createRecordType
import org.eclipse.emf.ecore.EClass; //导入方法依赖的package包/类
private EClass createRecordType(RecordType recordType) {
//System.out.println("maaaaap " + occiType2emfType);
EClass type = EcoreFactory.eINSTANCE.createEClass();
type.setName(recordType.getName());
if (recordType.getDocumentation() != null) {
attachInfo(type, recordType.getDocumentation());
}
return type;
}
示例4: convertKind
import org.eclipse.emf.ecore.EClass; //导入方法依赖的package包/类
/**
* Convert an OCCI kind to an Ecore class.
*
* @param kind
* the OCCI kind to convert.
* @return the resulting Ecore class.
*/
protected EClass convertKind(Kind kind) {
// Create the Ecore class.
EClass eClass = EcoreFactory.eINSTANCE.createEClass();
// Set the name of the Ecore class.
eClass.setName(ConverterUtils.toU1Case(ConverterUtils.formatName(kind.getTerm())));
// Convert all attributes of the OCCI kind.
for (Attribute attribute : kind.getAttributes()) {
// Convert each OCCI attribute to an Ecore attribute.
EStructuralFeature convertAttribute = convertAttribute(attribute);
if (convertAttribute != null) {
// Add the Ecore attribute as a structural feature of the Ecore
// class.
eClass.getEStructuralFeatures().add(convertAttribute);
}
}
// Convert all actions of the OCCI kind.
for (Action action : kind.getActions()) {
// Convert each OCCI action to an Ecore operation.
EOperation convertAction = convertAction(action);
if (convertAction != null) {
// Add the Ecore action as an operation of the Ecore class.
eClass.getEOperations().add(convertAction);
}
}
attachInfo(eClass, kind.getTitle());
// Keep the Ecore class into a cache to search it later.
occiKind2emfEclass.put(kind, eClass);
// Convert all constraints of the OCCI kind.
convertConstraints(eClass, kind);
if(kind.getSource().size() > 0){
addSourceConstraint(kind, eClass);
}
if(kind.getTarget().size() > 0){
addTargetConstraint(kind, eClass);
}
return eClass;
}
示例5: ecl
import org.eclipse.emf.ecore.EClass; //导入方法依赖的package包/类
private EClass ecl(String n) {
EClass c = EcoreFactory.eINSTANCE.createEClass();
c.setName(n);
return c;
}