com.japisoft.xmlpad
Interface SchemaAccessibility


public interface SchemaAccessibility

Set of method for handling Schema

Version:
1.0
Author:
(c) 2004 JAPISoft / http://www.japisoft.com
See Also:
XMLContainer

Method Summary
 void dispose()
          This is only for inner usage, it mustn't be called by the user
 java.lang.String getCurrentDTD()
           
 java.lang.String getCurrentDTDRoot()
           
 java.lang.String getCurrentSchema()
           
 java.lang.String getCurrentSchemaRoot()
           
 java.lang.String getDefaultDTDLocation()
           
 java.lang.String getDefaultDTDRoot()
           
 java.lang.String getDefaultSchemaLocation()
           
 java.lang.String getDefaultSchemaRoot()
           
 java.lang.String getDTDLocation(boolean resolve)
           
 SchemaLocator getRelaxNGValidationLocation()
           
 java.lang.String getSchemaLocation(boolean resolve)
           
 void setDefaultDTD(java.lang.String dtdRoot, java.lang.String dtd)
          Reset the default document DTD location
 void setDefaultDTD(java.lang.String dtdRoot, java.net.URL dtd)
          Reset the default document DTD location
 void setDefaultSchema(java.lang.String root, java.lang.String location)
          Reset the default schema root tag and document location (url or file path)
 void setDTD(java.lang.String dtdRoot, SchemaLocator locator)
          Reset a local DTD.
 void setDTD(java.lang.String dtdRoot, java.lang.String dtdLocation, int dtdDeclarationLine)
          Reset the current dtd root and dtd location by this one.
 void setRelaxNGValidationLocation(SchemaLocator locator)
          Reset the current RelaxNG document path for validating the current document
 void setRelaxNGValidationLocation(java.lang.String location)
          Reset the current RelaxNG document path for validating the current document.
 void setSchema(java.lang.String schemaRoot, java.lang.String[] namespace, java.lang.String[] schemaLocation, int schemaDeclarationLine)
          Reset the current schema location
 

Method Detail

getCurrentDTD

public java.lang.String getCurrentDTD()
Returns:
the current DTD location

getCurrentDTDRoot

public java.lang.String getCurrentDTDRoot()
Returns:
the current DTD root

setDefaultDTD

public void setDefaultDTD(java.lang.String dtdRoot,
                          java.lang.String dtd)
Reset the default document DTD location

Parameters:
dtdRoot - The DTD Root element
dtd - The DTD path or URL

setDefaultDTD

public void setDefaultDTD(java.lang.String dtdRoot,
                          java.net.URL dtd)
Reset the default document DTD location

Parameters:
dtdRoot - The DTD Root element
dtd - The DTD inputStream content

setDTD

public void setDTD(java.lang.String dtdRoot,
                   java.lang.String dtdLocation,
                   int dtdDeclarationLine)
Reset the current dtd root and dtd location by this one. This is done automatically for a new document and for parsing action. If you want default dtd, call rather the setDefaultDTD method


setDTD

public void setDTD(java.lang.String dtdRoot,
                   SchemaLocator locator)
            throws java.lang.Exception
Reset a local DTD. The SchemaLocator object will contain a path or a stream towards a full DTD. This is used for sample for a local DTD declaration. Don't use this method if your know the DTD location or URL.

Parameters:
dtdRoot - the dtd root element
locator - The dtd content
Throws:
java.lang.Exception - if a problem occurs when using this locator

getCurrentSchema

public java.lang.String getCurrentSchema()
Returns:
the current schema location

getCurrentSchemaRoot

public java.lang.String getCurrentSchemaRoot()
Returns:
the current schema root

setSchema

public void setSchema(java.lang.String schemaRoot,
                      java.lang.String[] namespace,
                      java.lang.String[] schemaLocation,
                      int schemaDeclarationLine)
Reset the current schema location

Parameters:
namespace - list of namespace bound to the schema location
schemaLocation - Schema URL or current document relative location
schemaDeclarationLine - The location of the declaration inside the Document, you can ignore this value and put -1

getDefaultDTDRoot

public java.lang.String getDefaultDTDRoot()
Returns:
the current DTD root element

getDefaultDTDLocation

public java.lang.String getDefaultDTDLocation()
Returns:
the current DTDLocation built with the current document location

getDTDLocation

public java.lang.String getDTDLocation(boolean resolve)
Parameters:
resolve - if true the location is built using the current document location
Returns:
the current DTD location. This DTD location can take into account relative document location

getDefaultSchemaLocation

public java.lang.String getDefaultSchemaLocation()
Returns:
the default schema file/url location

getDefaultSchemaRoot

public java.lang.String getDefaultSchemaRoot()
Returns:
the default schema root tag

setDefaultSchema

public void setDefaultSchema(java.lang.String root,
                             java.lang.String location)
Reset the default schema root tag and document location (url or file path)


setRelaxNGValidationLocation

public void setRelaxNGValidationLocation(java.lang.String location)
Reset the current RelaxNG document path for validating the current document. At this moment, there's no way to embedded th RelaxNG usage inside the XML document like for the DTD or the schema, so you Must specify the relaxNG location each time you need it for parsing. Note that to remove this option, you have to call it with a null value


setRelaxNGValidationLocation

public void setRelaxNGValidationLocation(SchemaLocator locator)
Reset the current RelaxNG document path for validating the current document


getRelaxNGValidationLocation

public SchemaLocator getRelaxNGValidationLocation()
Returns:
the current RelaxNG documant location

getSchemaLocation

public java.lang.String getSchemaLocation(boolean resolve)
Parameters:
resolve - if true the location is built using the current document location
Returns:
the current Schema location. This schema location can take into account relative document location

dispose

public void dispose()
This is only for inner usage, it mustn't be called by the user



Copyright © 2006 JAPISoft. All Rights Reserved.