/** * @see org.castor.xml.InternalContext#getLoadPackageMapping() */ public Boolean getLoadPackageMapping() { return _configuration.getBoolean(XMLConfiguration.LOAD_PACKAGE_MAPPING); }
/** * @see org.castor.xml.InternalContext#getUseIntrospector() */ public Boolean getUseIntrospector() { return _configuration.getBoolean(XMLConfiguration.USE_INTROSPECTION); }
/** * @see org.castor.xml.InternalContext#getBooleanProperty(java.lang.String) */ public Boolean getBooleanProperty(final String propertyName) { return _configuration.getBoolean(propertyName); }
/** * @see org.castor.xml.InternalContext#marshallingValidation() */ public boolean marshallingValidation() { Boolean marshallingValidation = _configuration.getBoolean(XMLConfiguration.MARSHALLING_VALIDATION); if (marshallingValidation == null) { String message = "Property marshallingValidation must not be null"; LOG.warn(message); throw new IllegalStateException(message); } return marshallingValidation.booleanValue(); }
/** * @see org.castor.xml.InternalContext#getLenientIdValidation() */ public boolean getLenientIdValidation() { Boolean lenientIdValidation = _configuration.getBoolean(XMLConfiguration.LENIENT_ID_VALIDATION); if (lenientIdValidation == null) { String message = "Property lenientIdValidation must not be null"; LOG.warn(message); throw new IllegalStateException(message); } return lenientIdValidation.booleanValue(); }
/** * @see org.castor.xml.InternalContext#getLenientSequenceOrder() */ public boolean getLenientSequenceOrder() { Boolean lenientSequenceOrder = _configuration.getBoolean(XMLConfiguration.LENIENT_SEQUENCE_ORDER); if (lenientSequenceOrder == null) { String message = "Property lenientSequenceOrder must not be null"; LOG.warn(message); throw new IllegalStateException(message); } return lenientSequenceOrder.booleanValue(); }
/** * @see org.castor.xml.InternalContext#strictElements() */ public boolean strictElements() { Boolean strictElements = _configuration.getBoolean(XMLConfiguration.STRICT_ELEMENTS); if (strictElements == null) { String message = "Property strictElements must not be null"; LOG.warn(message); throw new IllegalStateException(message); } return strictElements.booleanValue(); }
Boolean validation = _configuration.getBoolean(XMLConfiguration.PARSER_VALIDATION); Boolean namespaces = _configuration.getBoolean(XMLConfiguration.NAMESPACES);
public static Parser getParser(final Configuration configuration, final String features) { Parser parser = null; Boolean validation = configuration.getBoolean(XMLConfiguration.PARSER_VALIDATION); Boolean namespaces = configuration.getBoolean(XMLConfiguration.NAMESPACES); String parserClassName = configuration.getString(XMLConfiguration.PARSER); if ((parserClassName == null) || (parserClassName.length() == 0)) {
/** * @see org.castor.xml.InternalContext#getOutputFormat() */ public static OutputFormat getOutputFormat(final Configuration configuration) { boolean indent = configuration.getBoolean(XMLConfiguration.USE_INDENTATION, false); OutputFormat format = getSerializerFactory( configuration.getString( XMLConfiguration.SERIALIZER_FACTORY)) .getOutputFormat(); format.setMethod(OutputFormat.XML); format.setIndenting(indent); // There is a bad interaction between the indentation and the // setPreserveSpace option. The indentated output is strangely indented. if (!indent) { format.setPreserveSpace(true); } return format; } //-- getOutputFormat