public SchemaIndexImpl(XSDSchema[] schemas) { this.schemas = new XSDSchema[schemas.length + 1]; adapter = new SchemaAdapter(); // set the schemas passed in for (int i = 0; i < schemas.length; i++) { this.schemas[i] = schemas[i]; synchronized (this.schemas[i].eAdapters()) { this.schemas[i].eAdapters().add(adapter); } } // add the schema for xml schema itself this.schemas[schemas.length] = schemas[0].getSchemaForSchema(); }
@Override protected XSDSchema buildSchema() throws IOException { XSDSchema schema = super.buildSchema(); schema.resolveElementDeclaration(NAMESPACE, "_Feature") .eAdapters() .add(new SubstitutionGroupLeakPreventer()); schema.eAdapters().add(new ReferencingDirectiveLeakPreventer()); return schema; } }
@Override protected XSDSchema buildSchema() throws IOException { XSDSchema schema = super.buildSchema(); schema.resolveElementDeclaration(NAMESPACE, "_Feature") .eAdapters() .add(new SubstitutionGroupLeakPreventer()); schema.eAdapters().add(new ReferencingDirectiveLeakPreventer()); return schema; } }
.eAdapters() .add(new SubstitutionGroupLeakPreventer()); schema.eAdapters().add(new ReferencingDirectiveLeakPreventer()); return schema;
synchronized (resolvedSchema.eAdapters()) { resolvedSchema.getReferencingDirectives().remove(directive); for (XSDElementDeclaration dec :
public SchemaIndexImpl(XSDSchema[] schemas) { this.schemas = new XSDSchema[schemas.length + 1]; //set the schemas passed in for (int i = 0; i < schemas.length; i++) { this.schemas[i] = schemas[i]; this.schemas[i].eAdapters().add(new SchemaAdapter()); } //add the schema for xml schema itself this.schemas[schemas.length] = schemas[0].getSchemaForSchema(); }
public SchemaIndexImpl(XSDSchema[] schemas) { this.schemas = new XSDSchema[ schemas.length + 1 ]; //set the schemas passed in for ( int i = 0; i < schemas.length; i++ ) { this.schemas[ i ] = schemas[ i ]; this.schemas[i].eAdapters().add( new SchemaAdapter()); } //add the schema for xml schema itself this.schemas[schemas.length] = schemas[0].getSchemaForSchema(); }
public SchemaIndexImpl(XSDSchema[] schemas) { this.schemas = new XSDSchema[schemas.length + 1]; //set the schemas passed in for (int i = 0; i < schemas.length; i++) { this.schemas[i] = schemas[i]; this.schemas[i].eAdapters().add(new SchemaAdapter()); } //add the schema for xml schema itself this.schemas[schemas.length] = schemas[0].getSchemaForSchema(); }
@Override protected XSDSchema buildSchema() throws IOException { XSDSchema schema = super.buildSchema(); schema.resolveElementDeclaration(NAMESPACE, "_Feature").eAdapters() .add(new SubstitutionGroupLeakPreventer()); schema.eAdapters().add(new ReferencingDirectiveLeakPreventer()); return schema; } }
schema.eAdapters().add(new ReferencingDirectiveLeakPreventer()); return schema;
/** 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; } }