KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > xb > binding > Unmarshaller


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.xb.binding;
23
24 import java.io.InputStream JavaDoc;
25 import java.io.Reader JavaDoc;
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 JavaDoc;
32 import org.xml.sax.ErrorHandler JavaDoc;
33
34 /**
35  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
36  * @version <tt>$Revision: 1958 $</tt>
37  */

38 public interface Unmarshaller
39 {
40    String JavaDoc VALIDATION = "http://xml.org/sax/features/validation";
41    String JavaDoc NAMESPACES = "http://xml.org/sax/features/namespaces";
42    String JavaDoc NAMESPACE_PREFIXES = "http://xml.org/sax/features/namespace-prefixes";
43    // set some xerces specific features that allow transparent DTD and Schema validation
44
String JavaDoc DYNAMIC_VALIDATION = "http://apache.org/xml/features/validation/dynamic";
45    String JavaDoc SCHEMA_VALIDATION = "http://apache.org/xml/features/validation/schema";
46    String JavaDoc 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 JavaDoc feature, boolean value) throws JBossXBException;
55
56    void setEntityResolver(EntityResolver JavaDoc entityResolver) throws JBossXBException;
57
58    void setErrorHandler(ErrorHandler JavaDoc errorHandler);
59
60    void mapFactoryToNamespace(ObjectModelFactory factory, String JavaDoc namespaceUri);
61
62    Object JavaDoc unmarshal(String JavaDoc xmlFile, JBossXBParser.ContentHandler handler) throws JBossXBException;
63
64    Object JavaDoc unmarshal(String JavaDoc xmlFile) throws JBossXBException;
65
66    Object JavaDoc unmarshal(String JavaDoc xml, SchemaBinding schemaBinding) throws JBossXBException;
67
68    Object JavaDoc unmarshal(Reader JavaDoc xmlReader, SchemaBinding schemaBinding) throws JBossXBException;
69
70    Object JavaDoc unmarshal(InputStream JavaDoc xmlStream, SchemaBinding schemaBinding) throws JBossXBException;
71
72    Object JavaDoc unmarshal(String JavaDoc xml, SchemaBindingResolver schemaResolver) throws JBossXBException;
73
74    Object JavaDoc unmarshal(Reader JavaDoc xmlReader, SchemaBindingResolver schemaResolver) throws JBossXBException;
75
76    Object JavaDoc unmarshal(InputStream JavaDoc xmlStream, SchemaBindingResolver schemaResolver) throws JBossXBException;
77
78    Object JavaDoc unmarshal(Reader JavaDoc reader, ObjectModelFactory factory, Object JavaDoc root) throws JBossXBException;
79
80    Object JavaDoc unmarshal(InputStream JavaDoc is, ObjectModelFactory factory, Object JavaDoc root) throws JBossXBException;
81
82    Object JavaDoc unmarshal(String JavaDoc systemId, ObjectModelFactory factory, Object JavaDoc root) throws JBossXBException;
83
84    Object JavaDoc unmarshal(String JavaDoc systemId, ObjectModelFactory factory, DocumentBinding binding) throws JBossXBException;
85
86    Object JavaDoc unmarshal(Reader JavaDoc reader, ObjectModelFactory factory, DocumentBinding binding) throws JBossXBException;
87 }
88
Popular Tags