org.openide.filesystems 8.5.1

org.openide.filesystems
Annotation Type MIMEResolver.NamespaceRegistration


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

Recognize mime type by looking into header of XML files. The file will be recognized by following rules:

If you want to recognize file just by its extension consider using MIMEResolver.ExtensionRegistration.

Since:
7.58

Required Element Summary
 String displayName
          Display name to present this type of objects to the user.
 String mimeType
          Mime type to be assigned to files that match description of this annotation.
 
Optional Element Summary
 String[] acceptedExtension
          The extension that is automatically accepted.
 String[] checkedExtension
          The extension of the file to check.
 String[] doctypePublicId
          If this attribute is specified, the system will check whether at least one of the specified doctype's public ids, is used in the document.
 String elementName
          Name of root element.
 String[] elementNS
          Accept only elements that have specific namespace.
 int position
          In case ordering of mime resolvers is important, one can specify it by defining their position.
 

Element Detail

displayName

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


mimeType

public abstract String mimeType
Mime type to be assigned to files that match description of this annotation.

position

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

Default:
2147483647

acceptedExtension

public abstract String[] acceptedExtension
The extension that is automatically accepted. If specified, then a file with such extension automatically leads to recognition of defined mimeType().

Default:
{}

checkedExtension

public abstract String[] checkedExtension
The extension of the file to check. By default only .xml files are tested for content. One can change the extension of the file by changing the value of this attribute. Assigning an empty array to attribute turns the content check on every file

Default:
"xml"

elementName

public abstract String elementName
Name of root element. If at least one of the provided element names matches the real element name, this condition is satisfied.

Returns:
one or more element name. May be left empty, if element name should not be checked at all.
Default:
""

elementNS

public abstract String[] elementNS
Accept only elements that have specific namespace. If this attribute is specified, then only such elements are accepted that have the right namespace.

Default:
{}

doctypePublicId

public abstract String[] doctypePublicId
If this attribute is specified, the system will check whether at least one of the specified doctype's public ids, is used in the document.

Default:
{}

org.openide.filesystems 8.5.1

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