blob: fd0a35aa620b9d494c4ac43e9c283320c57f4c64 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/*******************************************************************************
* Copyright (c) 2001, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.j2ee.internal.model.translator.webservices;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jst.j2ee.internal.model.translator.common.CommonTranslators;
import org.eclipse.jst.j2ee.webservice.wscommon.WscommonFactory;
import org.eclipse.jst.j2ee.webservice.wscommon.WscommonPackage;
import org.eclipse.jst.j2ee.webservice.wsdd.WsddPackage;
import org.eclipse.wst.common.internal.emf.resource.Translator;
public class SOAPRoleTranslator extends Translator implements WsddXmlMapperI {
private static Translator[] SOAP_ROLE_XLATORS = new Translator[] {
new Translator(TEXT_ATTRIBUTE_VALUE, WscommonPackage.eINSTANCE.getSOAPRole_SoapRole())
};
public SOAPRoleTranslator() {
super(SOAP_ROLE, WsddPackage.eINSTANCE.getHandler_SoapRoles());
}
/* (non-Javadoc)
* @see com.ibm.etools.emf2xml.impl.Translator#getChildren(java.lang.Object, int)
*/
public Translator[] getChildren(Object o, int versionID) {
if (o == null)
return CommonTranslators.EMPTY_CHILDREN;
return SOAP_ROLE_XLATORS;
}
public String getDOMName(Object value) {
return SOAP_ROLE;
}
/* (non-Javadoc)
* @see com.ibm.etools.emf2xml.impl.Translator#createEMFObject(java.lang.String, java.lang.String)
*/
public EObject createEMFObject(String nodeName, String readAheadName) {
WscommonFactory fact = WscommonPackage.eINSTANCE.getWscommonFactory();
return fact.createSOAPRole();
}
public boolean isManagedByParent() {
return false;
}
}
|