public SchemaCollection() { this(new XmlSchemaCollection()); }
public SchemaCollection() { this(new XmlSchemaCollection()); }
public SchemaCollection() { this(new XmlSchemaCollection()); }
public SchemaCollection() { this(new XmlSchemaCollection()); }
public SchemaCollection() { this(new XmlSchemaCollection()); }
public CommonParams(AxisService axisService, DataService dataservice) { this.schemaMap = new HashMap<String, XmlSchema>(); this.xmlSchemaCollection = new XmlSchemaCollection(); this.elementMap = new HashMap<QName, XmlSchemaElement>(); this.typeMap = new HashMap<QName, XmlSchemaComplexType>(); this.axisService = axisService; this.dataservice = dataservice; }
public XSDModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) { this.contribution = contribution; this.schemaCollection = new XmlSchemaCollection(); this.factory = new DefaultXSDFactory(); }
public XSDModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) { this.contribution = contribution; this.schemaCollection = new XmlSchemaCollection(); this.factory = new DefaultXSDFactory(); }
InputStream is = new FileInputStream(fileName); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema schema = schemaCol.read(new StreamSource(is), null);
XmlSchemaCollection xmlSchemaCollection = new XmlSchemaCollection(); xmlSchemaCollection.read(inputSource, new ValidationEventHandler());
/** * Translate the input XML Schema (via Reader). * * @param reader the input XML Schema reader * @param avroNamespace the target Avro namespace * @param avroSchemaName the target Avro schema name * @return the Avro schema as a JSON string * @throws Xsd2AvroTranslatorException if translation fails */ public String translate(Reader reader, String avroNamespace, String avroSchemaName) throws Xsd2AvroTranslatorException { XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema xsd = schemaCol.read(new StreamSource(reader)); return translate(xsd, avroNamespace, avroSchemaName); }
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } return schemaCollection.read(element, baseUri); } }
/** * Given a COBOL annotated XML schema, produce a set of java classes (source * code) used to convert mainframe data at runtime. * * @param reader reads the COBOL-annotated XML schema source (see * legstar-cob2xsd) * @param packageName the java package the generated classes should reside * in * @return a map of java class names to their source code * @throws Xsd2ConverterException if generation fails */ public Map < String, String > generate(Reader reader, String packageName) throws Xsd2ConverterException { XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema xsd = schemaCol.read(new StreamSource(reader)); return generate(xsd, packageName); }
public XmlSchema loadSingleSchemaFile(int i) throws Exception{ File file = new File(SampleSchemasDirectory + "sampleSchema" + i + ".xsd"); InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema schema = schemaCol.read(new StreamSource(is)); return schema; }
public XmlSchema loadSingleSchemaFile(String path) throws Exception{ File file = new File(path); InputStream is = new FileInputStream(file); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema schema = schemaCol.read(new StreamSource(is)); return schema; }
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } if (customResolver != null) { schemaCollection.setSchemaResolver(customResolver); } return schemaCollection.read(element); }
private void initialize(ResolvedType resolvedType) { collection = new XmlSchemaCollection(); final boolean empty = currentElement.isEmpty(); // We use namespace of this element if (empty) { final String target = getTargetNamespace(resolvedType); schema = new XmlSchema(target, "raml-xsd", collection); schema.setTargetNamespace(target); } schema.setElementFormDefault(XmlSchemaForm.QUALIFIED); }
private void initialize(ResolvedType resolvedType) { collection = new XmlSchemaCollection(); final boolean empty = currentElement.isEmpty(); // We use namespace of this element if (empty) { final String target = getTargetNamespace(resolvedType); schema = new XmlSchema(target, "raml-xsd", collection); schema.setTargetNamespace(target); } schema.setElementFormDefault(XmlSchemaForm.QUALIFIED); }
protected XmlSchema getXMLSchema(Element element, String baseUri) { XmlSchemaCollection schemaCollection = new XmlSchemaCollection(); if (baseUri != null) { schemaCollection.setBaseUri(baseUri); } if (customResolver != null) { schemaCollection.setSchemaResolver(customResolver); } return schemaCollection.read(element); }
public String readXMLfromSchemaFile(String path) throws Exception { InputStream is = new FileInputStream(path); XmlSchemaCollection schemaCol = new XmlSchemaCollection(); XmlSchema schema = schemaCol.read(new StreamSource(is)); ByteArrayOutputStream stream = new ByteArrayOutputStream(); schema.write(stream); is.close(); return stream.toString(); }