XSDElementDeclaration element = (XSDElementDeclaration) e.next(); if (ft.getName().equals(element.getName())) { type = element.getTypeDefinition(); break;
public XSDTypeDefinition getTypeDefinition() { return declaration.getTypeDefinition(); }
type = ((XSDElementDeclaration)named).getTypeDefinition(); desc = "element";
type = e.getTypeDefinition();
XSDTypeDefinition contentType = content.getTypeDefinition(); if (contentType.getName() == null) {
/** * Uses EMF reflection to create an instance of the EMF model object this binding maps to. * * <p>The properties of the resulting object are set using the the contents of * <param>node</param>. In the case that the name of a child element or attributes does not * match the name of a property on the object, subclasses may wish to extend this method and set * the property explicitly. */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { // does this binding actually map to an eObject? if (EObject.class.isAssignableFrom(getType()) && (factory != null)) { EObject eObject = createEObject(value); if (eObject == null) { return value; } setProperties(eObject, node, false); setProperties(eObject, node, true); // check for a complex type with simpleContent, in this case use // the string value (if any) to set the value property if (instance.getElementDeclaration().getTypeDefinition().getBaseType() instanceof XSDTypeDefinition) { if ((value != null) && EMFUtils.has(eObject, "value")) { setProperty(eObject, "value", value, false); } } return eObject; } // could not do it, just return whatever was passed in return value; }
Schemas.getChildElementParticles(element.getTypeDefinition(), true)) { XSDElementDeclaration childElement = (XSDElementDeclaration) childParticle.getContent(); if (childElement.isElementDeclarationReference()) {
type = e.getTypeDefinition(); .get(XSDElementDeclaration.class); if (e != null) { type = e.getTypeDefinition(); } else if (element != null) { XSDTypeDefinition elementTypeDef = element.getTypeDefinition(); QName qualifiedElementTypeName = new QName(
XSDTypeDefinition childType = element.getTypeDefinition(); if (childType == null) { childType = findGlobalElementXSDType(element);
XSDSchema dctSchema = DCT.getInstance().getSchema(); XSDElementDeclaration declaration = dctSchema.resolveElementDeclaration(sl.getName()); if (declaration.getTypeDefinition() == null) { XSDSchema dcSchema = DC.getInstance().getSchema(); declaration = dcSchema.resolveElementDeclaration(sl.getName());
XSDTypeDefinition typeDef = element.getTypeDefinition(); boolean isAnyType = typeDef.getName() != null for (XSDParticle childParticle : (List<XSDParticle>) Schemas.getChildElementParticles(element.getTypeDefinition(), true)) { XSDElementDeclaration childElement = (XSDElementDeclaration) childParticle.getContent(); Schemas.getAnyElementParticles(element.getTypeDefinition())); if (anyElementParticles.size() > 0) { Collection complexAtts = null; new ArrayList<XSDParticle>( Schemas.getChildElementParticles( element.getTypeDefinition(), false)); for (Object complex : complexAtts) { if (complex instanceof ComplexAttribute) {
typeDefinition = elemDecl.getTypeDefinition(); typeDefinition = elemDecl.getTypeDefinition();
if (child.getTypeDefinition() == null) { foundNull = true;
element = element.getResolvedElementDeclaration(); XSDTypeDefinition childType = element.getTypeDefinition(); if (childType == null) { childType = findGlobalElementXSDType(element);
if (child.getTypeDefinition() == null) { foundNull = true;
public void visitXSDElementDeclaration(XSDElementDeclaration xsdElementDeclaration) { indent += 2; XSDTypeDefinition td = xsdElementDeclaration.getTypeDefinition(); if (td == null) { td = xsdElementDeclaration.getAnonymousTypeDefinition(); } visitXSDObject(td); indent -= 2; }
protected XSDDiagnostic checkElementComplexContent (String elementName, String part, String anchor, Element element) { XSDElementDeclaration xsdElementDeclaration = getSchema().getSchemaForSchema().resolveElementDeclaration(elementName); return checkComplexContent((XSDComplexTypeDefinition)xsdElementDeclaration.getTypeDefinition(), part, anchor, element); }
protected XSDDiagnostic checkElementComplexContent (String elementName, String part, String anchor, Element element) { XSDElementDeclaration xsdElementDeclaration = getSchema().getSchemaForSchema().resolveElementDeclaration(elementName); return checkComplexContent((XSDComplexTypeDefinition)xsdElementDeclaration.getTypeDefinition(), part, anchor, element); }
public IType getType() { XSDTypeDefinition td = getXSDElementDeclaration().getResolvedElementDeclaration().getTypeDefinition(); //if (td != null && // td.getTargetNamespace() != null && td.getTargetNamespace().equals(XSDConstants.SCHEMA_FOR_SCHEMA_URI_2001)) return null; return (td != null) ? (IType) XSDAdapterFactory.getInstance().adapt(td) : null; }
public void visitElementDeclaration(org.eclipse.xsd.XSDElementDeclaration element) { if (element.getTypeDefinition() == target) { XSDSimpleTypeDefinition type = target.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition("string"); //$NON-NLS-1$ element.setTypeDefinition(type); } super.visitElementDeclaration(element); } };