org.milyn.xml
Class LocalEntityResolver

java.lang.Object
  extended by org.milyn.xml.LocalEntityResolver
All Implemented Interfaces:
EntityResolver
Direct Known Subclasses:
LocalDTDEntityResolver, LocalXSDEntityResolver

public abstract class LocalEntityResolver
extends Object
implements EntityResolver

XSD resolver for local XSD's.

Author:
tfennelly

Constructor Summary
LocalEntityResolver(File localEntityFolder)
          Public default Constructor

This constructor allows specification of a local file system folder from which Entitys can be loaded.

LocalEntityResolver(String entityCPLocation)
          Public Constructor.
 
Method Summary
static void clearEntityCache()
          Clear the entity cache.
 String getDocType()
          Get the document type.
 InputSource resolveEntity(String publicId, String systemId)
           
 void setDocType(String docType)
          Set the document type for the resolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalEntityResolver

public LocalEntityResolver(String entityCPLocation)
Public Constructor.

Parameters:
entityCPLocation - Entity classpath location.

LocalEntityResolver

public LocalEntityResolver(File localEntityFolder)
Public default Constructor

This constructor allows specification of a local file system folder from which Entitys can be loaded.

Parameters:
localEntityFolder - Local Entity folder.
Method Detail

resolveEntity

public InputSource resolveEntity(String publicId,
                                 String systemId)
                          throws SAXException,
                                 IOException
Specified by:
resolveEntity in interface EntityResolver
Throws:
SAXException
IOException

clearEntityCache

public static void clearEntityCache()
Clear the entity cache.


getDocType

public String getDocType()
Get the document type.

This is a bit of a hack. There's a way of getting the DOM parser to populate the DocumentType.

Returns:
The Document type (systemId).

setDocType

public void setDocType(String docType)
Set the document type for the resolver.

Parameters:
docType - Primary document type.


Copyright © 2018. All rights reserved.