/** * Creates a new XMLInstance2Schema * */ public XMLInstance2Schema() { super(); _internalContext = new BackwardCompatibilityContext(); }
/** * Creates a new Unmarshaller with the given Object. * * @param root the instance to unmarshal into. This * may be null, if the Unmarshaller#setMapping is called * to load a mapping for the root element of xml document. */ public Unmarshaller(final Object root) { this(new BackwardCompatibilityContext(), root); }
/** * Creates a new Unmarshaller with the given Mapping. An instance of BackwardsCompatibilityContext * is used as InternalContext. * * @param mapping The Mapping to use. * @throws MappingException in case that Unmarshaller fails to be instantiated */ public Unmarshaller(final Mapping mapping) throws MappingException { this(new BackwardCompatibilityContext(), mapping); }
/** * We need some stuff initialized here. */ public MarshalFramework() { _internalContext = new BackwardCompatibilityContext(); }
/** * A constructor which sets the root class. * * Internally calls constructor Unmarshaller(InternalContext, Class) with * an instance of BackwardCompatibilityContext as context. * * @param clazz root class for unmarshalling */ public Unmarshaller(final Class clazz) { this(new BackwardCompatibilityContext(), clazz); }
/** * A constructor which sets the root class. * * Internally calls constructor Unmarshaller(InternalContext, Class) with an instance of * BackwardCompatibilityContext as context. * * @param clazz root class for unmarshalling */ public Unmarshaller(final Class clazz) { this(new BackwardCompatibilityContext(), clazz); }
/** * Creates a new Unmarshaller with the given Object. * * @param root the instance to unmarshal into. This may be null, if the Unmarshaller#setMapping is * called to load a mapping for the root element of xml document. */ public Unmarshaller(final Object root) { this(new BackwardCompatibilityContext(), root); }
/** * Creates a new Unmarshaller with the given Mapping. * An instance of BackwardsCompatibilityContext is used as InternalContext. * * @param mapping The Mapping to use. * @throws MappingException in case that Unmarshaller fails to be instantiated */ public Unmarshaller(final Mapping mapping) throws MappingException { this(new BackwardCompatibilityContext(), mapping); }
/** * Creates a new XMLInstance2Schema * */ public XMLInstance2Schema() { super(); _internalContext = new BackwardCompatibilityContext(); }
public XMLClassDescriptorAdapter() { super(); _internalContext = new BackwardCompatibilityContext(); }
/** * We need some stuff initialized here. MarshalFramework requires internally an * {@link InternalContext}, so either one is given or {@link BackwardCompatibilityContext} is * instantiated! Mind that instantiating {@link BackwardCompatibilityContext} means to (re-)read * configuration files. * * @param internalContext either an {@link InternalContext} comes from outside or * {@link BackwardCompatibilityContext} is instantiated */ public MarshalFramework(final InternalContext internalContext) { if (internalContext == null) { _internalContext = new BackwardCompatibilityContext(); } else { _internalContext = internalContext; } }
/** * Returns the default instance of XMLNaming. * * @see org.exolab.castor.util.AbstractProperties **/ public static final XMLNaming getInstance() { return new BackwardCompatibilityContext().getXMLNaming(); }
/** * Returns the default instance of XMLNaming. * @see org.exolab.castor.util.Configuration **/ public static final XMLNaming getInstance() { return new BackwardCompatibilityContext().getXMLNaming(); } //-- getInstance
/** * Returns the String representation of this AnyNode. The String * representation is a xml well-formed fragment corresponding to the * representation of this node. * @return the String representation of this AnyNode. */ public String toString() { Serializer serializer = new BackwardCompatibilityContext().getSerializer(); if (serializer == null) { throw new RuntimeException("Unable to obtain serializer"); } StringWriter writer = new StringWriter(); serializer.setOutputCharStream(writer); try { AnyNode2SAX.fireEvents(this, serializer.asDocumentHandler()); } catch (java.io.IOException ioe) { return privateToString(); } catch (org.xml.sax.SAXException saxe) { throw new RuntimeException(saxe.getMessage()); } return writer.toString(); }
/** * Returns the String representation of this AnyNode. The String representation is a xml * well-formed fragment corresponding to the representation of this node. * * @return the String representation of this AnyNode. */ public String toString() { Serializer serializer = new BackwardCompatibilityContext().getSerializer(); if (serializer == null) { throw new RuntimeException("Unable to obtain serializer"); } StringWriter writer = new StringWriter(); serializer.setOutputCharStream(writer); try { AnyNode2SAX.fireEvents(this, serializer.asDocumentHandler()); } catch (java.io.IOException ioe) { return privateToString(); } catch (org.xml.sax.SAXException saxe) { throw new RuntimeException(saxe.getMessage()); } return writer.toString(); }
/** * Initializes this Marshaller. This is common code shared among * the Constructors **/ private void initialize() { setInternalContext(new BackwardCompatibilityContext()); _namespaces = new Namespaces(); _packages = new ArrayList(3); _parents = new SafeStack(); _validate = getInternalContext().marshallingValidation(); // _naming = XMLNaming.getInstance(); _processingInstructions = new ArrayList(3); _attributes = new AttributesImpl(); _topLevelAtts = new AttributeSetImpl(); _saveMapKeys = getInternalContext().getBooleanProperty(XMLConfiguration.SAVE_MAP_KEYS).booleanValue(); String prop = getInternalContext().getStringProperty(XMLConfiguration.PROXY_INTERFACES); if (prop != null) { StringTokenizer tokenizer = new StringTokenizer(prop, ", "); while (tokenizer.hasMoreTokens()) { _proxyInterfaces.add(tokenizer.nextToken()); } } } //-- initialize();
primitiveNodeType = new BackwardCompatibilityContext().getPrimitiveNodeType();
primitiveNodeType = new BackwardCompatibilityContext().getPrimitiveNodeType();
InternalContext ic = new BackwardCompatibilityContext(); ic.setClassLoader(object.getClass().getClassLoader()); v2.setInternalContext(ic);
/** * Creates a SourceGenerator using the specific field info Factory and the given Binding element. * * @param infoFactory the FieldInfoFactory to use. * @param binding the binding element to use. */ public SourceGenerator(final FieldInfoFactory infoFactory, final ExtendedBinding binding) { super(); _internalContext = new BackwardCompatibilityContext(); setJavaNaming(_internalContext.getJavaNaming()); _dialog = new ConsoleDialog(); if (infoFactory == null) { if (useOldFieldNaming()) { _infoFactory = new FieldInfoFactory(); } else { _infoFactory = new FieldInfoFactory(false); } } else { _infoFactory = infoFactory; } super.load(); _groupNaming = new GroupNaming(getJavaNaming()); _jclassPrinterFactoryRegistry = new JClassPrinterFactoryRegistry(this); _singleClassGenerator = new SingleClassGenerator(_dialog, this, _nameConflictStrategy, _jclassPrinterType); _bindingComponent = new XMLBindingComponent(this, _groupNaming); setBinding(binding); _conflictResolver.setSourceGenerator(this); _xmlInfoRegistry = new JClassRegistry(_conflictResolver, getJavaNaming()); } // -- SourceGenerator