本文整理匯總了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;
}