/** * @see org.artificer.common.visitors.HierarchicalArtifactVisitor#visit(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ComplexTypeDeclaration) */ @Override public void visit(ComplexTypeDeclaration artifact) { super.visit(artifact); try { createProperty("namespace", artifact.getNamespace()); createProperty("ncName", artifact.getNCName()); } catch (Exception e) { throw new RuntimeException(e); } }
private void processComplexTypeDeclarations(Element schema, String targetNS) throws XPathExpressionException { // xpath expression to find all global complex type decls NodeList nodes = (NodeList) query(schema, "./xsd:complexType", XPathConstants.NODESET); for (int idx = 0; idx < nodes.getLength(); idx++) { Element node = (Element) nodes.item(idx); if (node.hasAttribute("name")) { String nsName = node.getAttribute("name"); ComplexTypeDeclaration complexTypeDecl = new ComplexTypeDeclaration(); complexTypeDecl.setArtifactType(BaseArtifactEnum.COMPLEX_TYPE_DECLARATION); complexTypeDecl.setName(nsName); complexTypeDecl.setNamespace(targetNS); complexTypeDecl.setNCName(nsName); derivedArtifacts.add(complexTypeDecl); } } }
} else if (artifact instanceof ComplexTypeDeclaration) { ComplexTypeDeclaration arty = (ComplexTypeDeclaration) artifact; index.put(new QName(arty.getArtifactType().toString(), arty.getNCName()), artifact);
/** * @see org.artificer.common.visitors.HierarchicalArtifactVisitor#visit(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ComplexTypeDeclaration) */ @Override public void visit(ComplexTypeDeclaration artifact) { super.visit(artifact); artifact.setNamespace(getProperty("namespace")); }
} else if (dat instanceof ComplexTypeDeclaration) { numComplexTypes++; complexTypeNames.add(((ComplexTypeDeclaration) dat).getNCName());
/** * Create an instance of {@link ComplexTypeDeclaration } * */ public ComplexTypeDeclaration createComplexTypeDeclaration() { return new ComplexTypeDeclaration(); }
/** * @see org.overlord.sramp.common.visitors.HierarchicalArtifactVisitorAdapter#visit(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ComplexTypeDeclaration) */ @Override public void visit(ComplexTypeDeclaration artifact) { super.visit(artifact); artifact.setNamespace(getProperty(jcrNode, "sramp:namespace")); //$NON-NLS-1$ }
/** * Processes the global complex type declarations found in the schema. * @param derivedArtifacts * @param sourceArtifact * @param schema * @param xpath * @throws XPathExpressionException */ private void processComplexTypeDeclarations(Collection<BaseArtifactType> derivedArtifacts, BaseArtifactType sourceArtifact, Element schema, XPath xpath) throws XPathExpressionException { String targetNS = schema.getAttribute("targetNamespace"); //$NON-NLS-1$ // xpath expression to find all global complex type decls NodeList nodes = (NodeList) this.query(xpath, schema, "./xsd:complexType", XPathConstants.NODESET); //$NON-NLS-1$ for (int idx = 0; idx < nodes.getLength(); idx++) { Element node = (Element) nodes.item(idx); if (node.hasAttribute("name")) { //$NON-NLS-1$ String nsName = node.getAttribute("name"); //$NON-NLS-1$ ComplexTypeDeclaration complexTypeDecl = new ComplexTypeDeclaration(); complexTypeDecl.setArtifactType(BaseArtifactEnum.COMPLEX_TYPE_DECLARATION); complexTypeDecl.setName(nsName); complexTypeDecl.setNamespace(targetNS); complexTypeDecl.setNCName(nsName); derivedArtifacts.add(complexTypeDecl); } } }
/** * @see org.overlord.sramp.common.visitors.HierarchicalArtifactVisitorAdapter#visit(org.oasis_open.docs.s_ramp.ns.s_ramp_v1.ComplexTypeDeclaration) */ @Override public void visit(ComplexTypeDeclaration artifact) { super.visit(artifact); try { setProperty("sramp:namespace", artifact.getNamespace()); //$NON-NLS-1$ setProperty("sramp:ncName", artifact.getNCName()); //$NON-NLS-1$ } catch (Exception e) { throw new RuntimeException(e); } }
} else if (artifact instanceof ComplexTypeDeclaration) { ComplexTypeDeclaration complexType = (ComplexTypeDeclaration) artifact; QName key = new QName(complexType.getNamespace(), complexType.getNCName()); schemaTypeIndex.put(key, complexType); } else if (artifact instanceof Message) {
} else if (artifact instanceof ComplexTypeDeclaration) { ComplexTypeDeclaration complexType = (ComplexTypeDeclaration) artifact; QName key = new QName(complexType.getNamespace(), complexType.getNCName()); schemaTypeIndex.put(key, complexType); } else if (artifact instanceof Message) {