XSDImport imprt = (XSDImport) im.next(); if (config.getNamespaceURI().equals(imprt.getNamespace())) { found = true;
gml.setNamespace(gmlNamespace); gml.setSchemaLocation(baseURL.toString() + "/" + gmlLocation); gml.setResolvedSchema(gmlConfiguration.getXSD().getSchema()); xsd.getContents().add(gml);
XSDImport imprt = (XSDImport) content; if (!added.contains(imprt.getNamespace())) { imports.add(imprt); added.add(imprt.getNamespace()); XSDSchema resolvedSchema = imprt.getResolvedSchema(); if (resolvedSchema == null) { LOGGER.info( "Schema import wasn't resolved: " + imprt.getNamespace() + " declared location: " + imprt.getSchemaLocation()); } else { queue.addLast(resolvedSchema);
protected void addImport(String namespace, String schemaLocation) { XSDImport xsdImport = XSDFactory.eINSTANCE.createXSDImport(); xsdImport.setNamespace(namespace); xsdImport.setSchemaLocation(schemaLocation); xsdSchema.getContents().add(0, xsdImport); }
if (namespace == null ? xsdImport.getNamespace() == null : namespace.equals(xsdImport.getNamespace())) xsdImport.setNamespace(namespace); xsdImport.setSchemaLocation(ePackage.getNsURI());
final XSDResourceImpl rsrc = new XSDResourceImpl(URI.createFileURI(xsdFileWithPath)); rsrc.load(new HashMap()); final XSDSchema schema = rsrc.getSchema(); for (Object content : schema.getContents()) { if (content instanceof XSDImport) { XSDImport xsdImport = (XSDImport) content; xsdImport.resolveTypeDefinition(xsdImport.getNamespace(), ""); } }
XSDImport imprt = (XSDImport) content; if (!added.contains(imprt.getNamespace())) { imports.add(imprt); added.add(imprt.getNamespace()); queue.addLast(imprt.getResolvedSchema());
/** Imports the WFS 1.0.0 schema as a dependency. */ private static XSDSchema importWfsSchema(XSDSchema schema) throws IOException { XSDSchema wfsSchema = org.geotools.wfs.v1_1.WFS.getInstance().getSchema(); if (wfsSchema == null || !(wfsSchema instanceof XSDSchemaImpl)) { return schema; } XSDImport wfsImport = XSDFactory.eINSTANCE.createXSDImport(); wfsImport.setNamespace(org.geotools.wfs.v1_1.WFS.NAMESPACE); wfsImport.setResolvedSchema(wfsSchema); schema.getContents().add(wfsImport); schema.getQNamePrefixToNamespaceMap().put("wfs", org.geotools.wfs.v1_1.WFS.NAMESPACE); synchronized (wfsSchema.eAdapters()) { ((XSDSchemaImpl) wfsSchema).imported(wfsImport); } // make sure that GML 3.1 namespace is used schema.getQNamePrefixToNamespaceMap().put("gml", GML.NAMESPACE); return schema; } }
public XSDSchema imported(XSDImport xsdImport) { xsdImport.setResolvedSchema(this); getReferencingDirectives().add(xsdImport); propogateComponents(xsdImport.getSchema()); return this; }
imprt.setNamespace(importee.getTargetNamespace()); schema.getContents().add(imprt);
((XSDImport)component).setAnnotation(xsdAnnotation);
@Override public String getText(Object object) { XSDImport xsdImport = ((XSDImport)object); String result = xsdImport.getSchemaLocation(); return result == null ? "" : result; }
xsdAnnotation = xsdComp.getAnnotation(); if (createIfNotExist && xsdAnnotation == null) xsdComp.setAnnotation(xsdAnnotation);
protected void addImport(String namespace, String schemaLocation) { XSDImport xsdImport = XSDFactory.eINSTANCE.createXSDImport(); xsdImport.setNamespace(namespace); xsdImport.setSchemaLocation(schemaLocation); xsdSchema.getContents().add(0, xsdImport); }
if (namespace == null ? xsdImport.getNamespace() == null : namespace.equals(xsdImport.getNamespace())) xsdImport.setNamespace(namespace); xsdImport.setSchemaLocation(ePackage.getNsURI());
xsdImport.resolveTypeDefinition(xsdImport.getNamespace(), "");
XSDImport imprt = (XSDImport) content; if (!added.contains(imprt.getNamespace())) { imports.add(imprt); added.add(imprt.getNamespace()); queue.addLast(imprt.getResolvedSchema());
public XSDSchema imported(XSDImport xsdImport) { xsdImport.setResolvedSchema(this); getReferencingDirectives().add(xsdImport); propogateComponents(xsdImport.getSchema()); return this; }
xsdImport.setNamespace(componentNamespace); directive = xsdImport;
((XSDImport)component).setAnnotation(xsdAnnotation);