|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.ide.model.Recognizer
oracle.ide.config.FileTypesRecognizer
public final class FileTypesRecognizer
A Recognizer
class for custom file type mappings that also provides extensions with consolidated information on file type registrations. Custom configured file types are returned or iterated by utility methods alongside registrations established through node-recognizer-hook and governed by Recognizer
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.ide.model.Recognizer |
---|
Recognizer.DeclarativeDocumentInfo |
Constructor Summary | |
---|---|
FileTypesRecognizer() |
Method Summary | |
---|---|
static java.util.Collection<java.io.File> |
allMappedExtensionsToNodes() Returns a Collection of all file extensions known to the IDE. |
static java.lang.String |
getClassNameForExtension(java.lang.String extension) Return the class name that has been registered with the given extension or null if not has been registered. |
static ContentType |
getContentTypeForExtension(java.lang.String extension) Returns the ContentType associated with the given extension. |
static java.util.Set<java.lang.String> |
getNodeExtensions(java.lang.Class nodeClass) Returns an unmodifiable Set of String extensions for the given nodeClass matching as specified. |
static java.util.Set<java.lang.String> |
getNodeExtensions(java.lang.Class[] nodeClasses) Returns an unmodifiable Set of String extensions for the given nodeClasses matching as specified. |
static java.util.Set<java.lang.String> |
getNodeExtensions(java.lang.String nodeClass) Returns an unmodifiable Set of String extensions for the given nodeClass matching as specified. |
static ContentType |
getNonNullContentTypeForExtension(java.lang.String extension) Returns the ContentType associated with the given extension. |
static boolean |
isCustomMappedExtension(java.lang.String extension) Asks whether the given extension/node mapping is a custom (user) configured file type, as opposed to an IDE registered type. |
static void |
mapCustomExtensionToClass(java.lang.String extension, java.lang.String nodeClassName) Maps the given extension , which is a file extension, to the given String which must be the classname of a Node class. |
static void |
mapCustomExtensionToContentType(java.lang.String extension, ContentType contentType) Maps the given extension , which is a file extension, to the given ContentType . |
java.lang.Class<? extends Node> |
recognize(java.net.URL url) This method implements the fundamental responsibility of a Recognizer -- to map a URL to a Node type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileTypesRecognizer()
Method Detail |
---|
public static final java.util.Collection<java.io.File> allMappedExtensionsToNodes()
Collection
of all file extensions known to the IDE.Collection
of extensions each represented by a File
for the purpose of comparison.public static final boolean isCustomMappedExtension(java.lang.String extension)
extension
- the extension.public static final void mapCustomExtensionToClass(java.lang.String extension, java.lang.String nodeClassName)
extension
, which is a file extension, to the given String
which must be the classname of a Node
class. The resulting mapping is a custom configured file type mapping that will be persisted in IDE preferences.extension
- the extension to be mapped.nodeClassName
- the classname of the Node
.public static final void mapCustomExtensionToContentType(java.lang.String extension, ContentType contentType)
extension
, which is a file extension, to the given ContentType
. The resulting mapping is a custom configured content type mapping that will be persisted in IDE preferences.extension
- the extension to be mapped.contentType
- the ContentType
.public static final java.util.Set<java.lang.String> getNodeExtensions(java.lang.Class[] nodeClasses)
Set
of String
extensions for the given nodeClasses matching as specified.nodeClasses
- The Node implementations to compare againstSet
of String
extensions for the given nodeClasses matching as specifiedpublic static final java.util.Set<java.lang.String> getNodeExtensions(java.lang.Class nodeClass)
Set
of String
extensions for the given nodeClass matching as specified.nodeClass
- The Node implementation to compare againstSet
of String
extensions for the given nodeClass matching as specifiedpublic static final java.util.Set<java.lang.String> getNodeExtensions(java.lang.String nodeClass)
Set
of String
extensions for the given nodeClass matching as specified.nodeClass
- The Node implementation to compare againstSet
of String
extensions for the given nodeClass matching as specifiedpublic static final java.lang.String getClassNameForExtension(java.lang.String extension)
public static final ContentType getNonNullContentTypeForExtension(java.lang.String extension)
ContentType
associated with the given extension. If no ContentType association has been registered, this method returns ContentType.TEXT
.extension
- the extension.ContentType
.public static final ContentType getContentTypeForExtension(java.lang.String extension)
ContentType
associated with the given extension. If no ContentType association has been registered, this method returns null.public final java.lang.Class<? extends Node> recognize(java.net.URL url)
Recognizer
Node
type. Efficient implementation of this method is essential for the IDE's performance. In particular, I/O operations should be avoided or deferred as much as possible. If a Recognizer does not recognize a particular URL, this method must return null
. The returned Class representing the Node type is later passed to the Recognizer.create(URL,Class)
method which creates the Node
instance.recognize
in class Recognizer
url
- unique URL
identifying the document.Node
type as a Class
object.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.3.0) E17493-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |