/** * Returns the value of the given Castor XML-specific property. * * @param name Qualified name of the CASTOR XML-specific property. * @return The current value of the given property. * @since 1.1.2 */ public String getProperty(final String name) { return getInternalContext().getStringProperty(name); }
/** * Returns the value of the given Castor XML-specific property. * @param name Qualified name of the CASTOR XML-specific property. * @return The current value of the given property. * @since 1.1.2 */ public String getProperty(final String name) { return getInternalContext().getStringProperty(name); }
/** * Derive class-level properties from {@link XMLProperties} as defined {@link InternalContext}. * This method will be called after a new {@link InternalContext} has been set. * * @link #setInternalContext(InternalContext) */ private void deriveProperties() { _validate = _internalContext.marshallingValidation(); _ignoreExtraElements = (!_internalContext.strictElements()); // -- process namespace to package mappings String mappings = _internalContext.getStringProperty(XMLProperties.NAMESPACE_PACKAGE_MAPPINGS); if (mappings != null && mappings.length() > 0) { StringTokenizer tokens = new StringTokenizer(mappings, ","); while (tokens.hasMoreTokens()) { String token = tokens.nextToken(); int sepIdx = token.indexOf('='); if (sepIdx < 0) { continue; } String ns = token.substring(0, sepIdx).trim(); String javaPackage = token.substring(sepIdx + 1).trim(); addNamespaceToPackageMapping(ns, javaPackage); } } }
/** * Derive class-level properties from {@link XMLProperties} as defined {@link InternalContext}. * This method will be called after a new {@link InternalContext} or a property has been set. * * @link #setInternalContext(InternalContext) */ private void deriveProperties() { _validate = getInternalContext().marshallingValidation(); _saveMapKeys = getInternalContext().getBooleanProperty(XMLProperties.SAVE_MAP_KEYS).booleanValue(); String prop = getInternalContext().getStringProperty(XMLProperties.PROXY_INTERFACES); if (prop != null) { StringTokenizer tokenizer = new StringTokenizer(prop, ", "); while (tokenizer.hasMoreTokens()) { _proxyInterfaces.add(tokenizer.nextToken()); } } }
} catch (Exception ex) { String lenientProperty = context.getInternalContext().getStringProperty(XMLProperties.LENIENT_INTEGER_VALIDATION); if (Boolean.valueOf(lenientProperty).booleanValue()) { try {
_internalContext.getStringProperty(XMLConfiguration.NAMESPACE_PACKAGE_MAPPINGS); if (mappings != null) { StringTokenizer tokens = new StringTokenizer(mappings, ",");
/** * 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();