1 22 package org.jboss.xb.binding; 23 24 import java.io.InputStream ; 25 import java.io.Reader ; 26 27 import org.jboss.xb.binding.parser.JBossXBParser; 28 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding; 29 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver; 30 import org.jboss.xb.binding.metadata.unmarshalling.DocumentBinding; 31 import org.xml.sax.EntityResolver ; 32 import org.xml.sax.ErrorHandler ; 33 34 38 public interface Unmarshaller 39 { 40 String VALIDATION = "http://xml.org/sax/features/validation"; 41 String NAMESPACES = "http://xml.org/sax/features/namespaces"; 42 String NAMESPACE_PREFIXES = "http://xml.org/sax/features/namespace-prefixes"; 43 String DYNAMIC_VALIDATION = "http://apache.org/xml/features/validation/dynamic"; 45 String SCHEMA_VALIDATION = "http://apache.org/xml/features/validation/schema"; 46 String SCHEMA_FULL_CHECKING = "http://apache.org/xml/features/validation/schema-full-checking"; 47 48 void setValidation(boolean validation) throws JBossXBException; 49 50 void setNamespaceAware(boolean namespaces) throws JBossXBException; 51 52 void setSchemaValidation(boolean validation) throws JBossXBException; 53 54 void setFeature(String feature, boolean value) throws JBossXBException; 55 56 void setEntityResolver(EntityResolver entityResolver) throws JBossXBException; 57 58 void setErrorHandler(ErrorHandler errorHandler); 59 60 void mapFactoryToNamespace(ObjectModelFactory factory, String namespaceUri); 61 62 Object unmarshal(String xmlFile, JBossXBParser.ContentHandler handler) throws JBossXBException; 63 64 Object unmarshal(String xmlFile) throws JBossXBException; 65 66 Object unmarshal(String xml, SchemaBinding schemaBinding) throws JBossXBException; 67 68 Object unmarshal(Reader xmlReader, SchemaBinding schemaBinding) throws JBossXBException; 69 70 Object unmarshal(InputStream xmlStream, SchemaBinding schemaBinding) throws JBossXBException; 71 72 Object unmarshal(String xml, SchemaBindingResolver schemaResolver) throws JBossXBException; 73 74 Object unmarshal(Reader xmlReader, SchemaBindingResolver schemaResolver) throws JBossXBException; 75 76 Object unmarshal(InputStream xmlStream, SchemaBindingResolver schemaResolver) throws JBossXBException; 77 78 Object unmarshal(Reader reader, ObjectModelFactory factory, Object root) throws JBossXBException; 79 80 Object unmarshal(InputStream is, ObjectModelFactory factory, Object root) throws JBossXBException; 81 82 Object unmarshal(String systemId, ObjectModelFactory factory, Object root) throws JBossXBException; 83 84 Object unmarshal(String systemId, ObjectModelFactory factory, DocumentBinding binding) throws JBossXBException; 85 86 Object unmarshal(Reader reader, ObjectModelFactory factory, DocumentBinding binding) throws JBossXBException; 87 } 88 | Popular Tags |