|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.model.DefaultRecognizer oracle.ide.net.URLRecognizer
The URLRecognizer
is the default Recognizer
implementation used in the IDE. It contains support for recognizing
an URL
based on its protocol, extension, or XML root
element name. When an URL
is recognized, the appropriate
Node
class for the URL
can be determined.
Constructor Summary | |
URLRecognizer()
Constructor. |
Method Summary | |
static java.lang.Class |
getClassForExtension(java.lang.String extension)
Return the class that has been registered with the given extension or null if not has been registered. |
java.util.Map |
getExtensionToClassMap()
|
static void |
mapExtensionToClass(java.lang.String extension,
java.lang.Class cls)
Maps the given extension , which is a file extension,
to the given Class which must be a
Node class. |
static void |
mapProtocolToClass(java.lang.String protocol,
java.lang.Class cls)
Maps the given protocol to the given Class ,
which must be a Node class. |
java.lang.Class |
recognize(java.net.URL url)
Gets the Class of the data item associated with the
specified URL . |
Methods inherited from class oracle.ide.model.DefaultRecognizer |
canConvert, clearExtensionToClassMap, create, getDocumentInfo, getValidConversions, registerConversion, registerDocumentInfo, sanitizeExtension, sanitizeExtensionAsString, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLRecognizer()
Method Detail |
public static void mapProtocolToClass(java.lang.String protocol, java.lang.Class cls)
protocol
to the given Class
,
which must be a Node
class. The protocol should not
include the trailing ":" character.
public static void mapExtensionToClass(java.lang.String extension, java.lang.Class cls)
extension
, which is a file extension,
to the given Class
which must be a
Node
class.
The extension
passed in is allowed to contain
or omit the leading "."; if it is omitted, it will be added
automatically.
public static java.lang.Class getClassForExtension(java.lang.String extension)
public java.lang.Class recognize(java.net.URL url)
Recognizer
Class
of the data item associated with the
specified URL
. Implementations must return
null
if the URL
is not recognized. The
Class
returned must be the data model class. This
value is passed to the Recognizer.create(URL, Class)
method
which will create the design-time node.
recognize
in interface Recognizer
recognize
in class DefaultRecognizer
public java.util.Map getExtensionToClassMap()
getExtensionToClassMap
in class DefaultRecognizer
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.