org.openide.filesystems 8.5.1

org.openide.filesystems
Annotation Type MIMEResolver.Registration


@Retention(value=SOURCE)
public static @interface MIMEResolver.Registration

Registration that allows effective, declarative registration of complex mime resolvers. For simpler cases rather consider using MIMEResolver.NamespaceRegistration or MIMEResolver.ExtensionRegistration.

The resource attribute of the annotation should be a relative reference to an XML like document describing the rules that will be interpreted by the mime recognizing infrastructure.

 @NbBundle.Messages({
    "NICE_NAME=Nice name!"
 })
 @MIMEResolver.Registration(
   displayName="#NICE_NAME"
   resource="your-resolver-definition.xml"
 )
 class AnyClassYouHave {
   // ...
 }
 
The definition is pre-processed during compile time in order to eliminate XML parsing during execution.

Since:
7.58

Required Element Summary
 String displayName
          Display name to present this type of objects to the user.
 String resource
          Relative path to resource XML file describing the mime recognition rules.
 
Optional Element Summary
 int position
          In case ordering of mime resolvers is important, one can specify it by defining their position.
 String[] showInFileChooser
          Show file filters for registered MIME types.
 

Element Detail

resource

public abstract String resource
Relative path to resource XML file describing the mime recognition rules.


displayName

public abstract String displayName
Display name to present this type of objects to the user.

position

public abstract int position
In case ordering of mime resolvers is important, one can specify it by defining their position.

Default:
2147483647

showInFileChooser

public abstract String[] showInFileChooser
Show file filters for registered MIME types. Set localized names of file filters that should accept files resolved by this resolver. Only types resolved by file name or extension (not by file content) are supported.

Since:
8.1
See Also:
FileChooserBuilder.addDefaultFileFilters()
Default:
{}

org.openide.filesystems 8.5.1

Built on June 6 2013.  |  Portions Copyright 1997-2013 Oracle. All rights reserved.