xml
Class SchemaMappingManager
java.lang.Object
xml.SchemaMappingManager
public final class SchemaMappingManager
- extends java.lang.Object
|
Nested Class Summary |
static class |
SchemaMappingManager.LoggingErrorHandler
logs errors and warnings to Activity Log and rethrow exception on error and fatalError to prevent
invalid documents to result in invalid SchemaMappings. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCHEMA_MAPPING_PROP
public static final java.lang.String SCHEMA_MAPPING_PROP
- See Also:
- Constant Field Values
BUFFER_ENABLE_SCHEMA_MAPPING_PROP
public static final java.lang.String BUFFER_ENABLE_SCHEMA_MAPPING_PROP
- See Also:
- Constant Field Values
ENABLE_SCHEMA_MAPPING_PROP
public static final java.lang.String ENABLE_SCHEMA_MAPPING_PROP
- See Also:
- Constant Field Values
BUFFER_SCHEMA_PROP
public static final java.lang.String BUFFER_SCHEMA_PROP
- See Also:
- Constant Field Values
BUFFER_AUTO_SCHEMA_PROP
public static final java.lang.String BUFFER_AUTO_SCHEMA_PROP
- See Also:
- Constant Field Values
promptSchemaForBuffer
public static void promptSchemaForBuffer(org.gjt.sp.jedit.View view,
org.gjt.sp.jedit.Buffer buffer)
- - let the user choose a schema file from the VFSBrowser
promptTypeIdForBuffer
public static void promptTypeIdForBuffer(org.gjt.sp.jedit.View view,
org.gjt.sp.jedit.Buffer buffer)
- - gather all type Ids
- let the user choose one
- update the SchemaMapping
getGlobalSchemaMapping
public static SchemaMapping getGlobalSchemaMapping(org.xml.sax.ErrorHandler errorHandler)
- Parameters:
errorHandler - notified of errors loading the global schemas.xml
- Returns:
- schema mapping rules in JEDIT_SETTINGS/plugins/xml.XMLPLugin/schemas.xml
getBuiltInSchemaMapping
public static SchemaMapping getBuiltInSchemaMapping(org.xml.sax.ErrorHandler errorHandler)
- Parameters:
errorHandler - notified of errors/warning loading builtin schema mapping (not likely)
- Returns:
- mappings shipped with this plugin : jeditresource:XML.jar!/xml/dtds/schemas.xml
getLocalSchemaMapping
public static SchemaMapping getLocalSchemaMapping(org.gjt.sp.jedit.Buffer buffer,
org.xml.sax.ErrorHandler errorHandler)
- Returns:
- schemas.xml next to buffer or null if it doesn't exist
getSchemaMappingForBuffer
public static SchemaMapping getSchemaMappingForBuffer(org.gjt.sp.jedit.Buffer buffer,
org.xml.sax.ErrorHandler errorHandler)
- Returns:
- local SchemaMapping or global SchemaMapping or built-in SchemaMapping
initGlobalSchemaMapping
public static void initGlobalSchemaMapping(org.gjt.sp.jedit.View view)
- Finds (and creates if needed) the global schema mapping (schemas.xml)
file in the settings directory, for reading or overwriting it.
isSchemaMappingEnabled
public static boolean isSchemaMappingEnabled(org.gjt.sp.jedit.Buffer b)