Java 类org.jdom2.JDOMFactory 实例源码

项目:epubfx    文件:XHTMLUtils.java   
public static Document parseXHTMLDocument(String xhtml, JDOMFactory factory) throws IOException, JDOMException
{
    //DTD ersetzen, da die originale nicht erreichbar bzw. nur sehr langsam ist,
    xhtml = xhtml.replace("http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd", "http://localhost:8777/dtd/www.w3.org/TR/xhtml11/DTD/xhtml11.dtd");
    ByteArrayInputStream bais = new ByteArrayInputStream(xhtml.getBytes("UTF-8"));
    SAXBuilder builder = new SAXBuilder(XMLReaders.NONVALIDATING);
    builder.setFeature("http://xml.org/sax/features/external-general-entities", false);
    builder.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
    builder.setFeature("http://xml.org/sax/features/resolve-dtd-uris", false);
    builder.setFeature("http://xml.org/sax/features/validation", false);
    builder.setExpandEntities(false);
    if (factory != null)
    {
        builder.setJDOMFactory(factory);
    }
    Document document = builder.build(bais);
    return document;
}
项目:ProjectAres    文件:MapManifest.java   
@Override
protected void configure() {
    // Setup @MapScoped and bind MapDefinition as a seed object
    install(new MapInjectionScope().new Manifest());

    final FactoryModuleBuilder fmb = new FactoryModuleBuilder();
    install(fmb.build(MapFilePreprocessor.Factory.class));
    install(fmb.build(MapLogger.Factory.class));

    bind(SAXHandler.class).to(BoundedSAXHandler.class);
    bind(SAXHandlerFactory.class).toInstance(BoundedSAXHandler::new);
    bind(JDOMFactory.class).to(BoundedJDOMFactory.class);

    bind(PGMMap.Factory.class);
    bind(MapConfiguration.class).to(PGMMapConfiguration.class);
    bind(MapDoc.class).to(MapDocument.class);

    inSet(MapRootParser.class);

    bind(ValidationContext.class).to(FeatureDefinitionContext.class);

    bind(MapModuleContext.class).in(MapScoped.class);
    bind(ModuleExceptionHandler.class).to(MapModuleContext.class);

    expose(MapDefinition.class);
    expose(PGMMap.class);

    requestStaticInjection(XMLUtils.class);
}
项目:ProjectAres    文件:MapManifest.java   
@Provides
SAXBuilder saxBuilder(SAXHandlerFactory saxHandlerFactory, JDOMFactory jdomFactory) {
    return new SAXBuilder(null, saxHandlerFactory, jdomFactory);
}
项目:ProjectAres    文件:BoundedSAXHandler.java   
@Inject public BoundedSAXHandler(JDOMFactory factory) {
    super(factory);
}
项目:lams    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final Element container, final JDOMFactory factory, final NameCoder nameCoder) {
    super(container, nameCoder);
    documentFactory = factory;
}
项目:lams    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final Element container, final JDOMFactory factory) {
    this(container, factory, new XmlFriendlyNameCoder());
}
项目:lams    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final JDOMFactory factory, final NameCoder nameCoder) {
    this(null, factory, nameCoder);
}
项目:lams    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final JDOMFactory factory) {
    this(null, factory);
}
项目:xstream    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final Element container, final JDOMFactory factory, final NameCoder nameCoder) {
    super(container, nameCoder);
    documentFactory = factory;
}
项目:xstream    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final Element container, final JDOMFactory factory) {
    this(container, factory, new XmlFriendlyNameCoder());
}
项目:xstream    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final JDOMFactory factory, final NameCoder nameCoder) {
    this(null, factory, nameCoder);
}
项目:xstream    文件:JDom2Writer.java   
/**
 * @since 1.4.5
 */
public JDom2Writer(final JDOMFactory factory) {
    this(null, factory);
}
项目:FTLAV    文件:EmptyAwareSAXHandlerFactory.java   
@Override
public SAXHandler createSAXHandler(JDOMFactory factory) {
    return new EmptyAwareSAXHandler(factory);
}
项目:FTLAV    文件:EmptyAwareSAXHandlerFactory.java   
public EmptyAwareSAXHandler(JDOMFactory factory) {
    super(factory);
}
项目:QuizUpWinner    文件:JDom2Writer.java   
public JDom2Writer(Element paramElement, JDOMFactory paramJDOMFactory)
{
  this(paramElement, paramJDOMFactory, new XmlFriendlyNameCoder());
}
项目:QuizUpWinner    文件:JDom2Writer.java   
public JDom2Writer(Element paramElement, JDOMFactory paramJDOMFactory, NameCoder paramNameCoder)
{
  super(paramElement, paramNameCoder);
  this.documentFactory = paramJDOMFactory;
}
项目:QuizUpWinner    文件:JDom2Writer.java   
public JDom2Writer(JDOMFactory paramJDOMFactory)
{
  this(null, paramJDOMFactory);
}
项目:QuizUpWinner    文件:JDom2Writer.java   
public JDom2Writer(JDOMFactory paramJDOMFactory, NameCoder paramNameCoder)
{
  this(null, paramJDOMFactory, paramNameCoder);
}
项目:Slipstream-Mod-Manager    文件:EmptyAwareSAXHandlerFactory.java   
@Override
public SAXHandler createSAXHandler( JDOMFactory factory ) {
    return new EmptyAwareSAXHandler( factory );
}
项目:Slipstream-Mod-Manager    文件:EmptyAwareSAXHandlerFactory.java   
public EmptyAwareSAXHandler( JDOMFactory factory ) {
    super( factory );
}