Class XSLBasedXMLMagicNumber
- java.lang.Object
-
- org.arakhne.afc.inputoutput.filetype.MagicNumber
-
- org.arakhne.afc.inputoutput.filetype.XMLMagicNumber
-
- org.arakhne.afc.inputoutput.filetype.XSLBasedXMLMagicNumber
-
- All Implemented Interfaces:
Comparable<MagicNumber>
public class XSLBasedXMLMagicNumber extends XMLMagicNumber
This class defines a set of informations that could distinguish a file content from another one. It is also known as Magic Number on several operating systems.This magic number supports XML files and permits to test the XSL namespace.
- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:40
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- inputoutput
-
-
Field Summary
-
Fields inherited from class org.arakhne.afc.inputoutput.filetype.XMLMagicNumber
VERSION, XMLNS
-
-
Constructor Summary
Constructors Constructor Description XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String schema)
Constructor.XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String schema, boolean useRegEx)
Constructor.XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String formatVersion, String schema)
Constructor.XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String formatVersion, String schema, boolean useRegEx)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
isContentType(String schemaId, String schemaVersion, String systemId, String publicId)
Replies if the specified stream contains data that corresponds to this magic number.-
Methods inherited from class org.arakhne.afc.inputoutput.filetype.XMLMagicNumber
isContentType
-
Methods inherited from class org.arakhne.afc.inputoutput.filetype.MagicNumber
compareTo, doStreamEncoding, getFormatVersion, getHostMimeTypes, getMimeType, undoStreamEncoding
-
-
-
-
Constructor Detail
-
XSLBasedXMLMagicNumber
public XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String schema)
Constructor.- Parameters:
mimeType
- is the MIME type associated to this magic number.rootNode
- is the name of the XML root node from which XLS information may be extracted.schema
- is the XSL Schema ID associated to this magic number.
-
XSLBasedXMLMagicNumber
public XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String schema, boolean useRegEx)
Constructor.- Parameters:
mimeType
- is the MIME type associated to this magic number.rootNode
- is the name of the XML root node from which XLS information may be extracted.schema
- is the XSL Schema ID associated to this magic number.useRegEx
- indicates if the schema string is a regular expression or not.
-
XSLBasedXMLMagicNumber
public XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String formatVersion, String schema)
Constructor.- Parameters:
mimeType
- is the MIME type associated to this magic number.rootNode
- is the name of the XML root node from which XLS information may be extracted.formatVersion
- is the version of the supported format.schema
- is the XSL Schema ID associated to this magic number.
-
XSLBasedXMLMagicNumber
public XSLBasedXMLMagicNumber(javax.activation.MimeType mimeType, String rootNode, String formatVersion, String schema, boolean useRegEx)
Constructor.- Parameters:
mimeType
- is the MIME type associated to this magic number.rootNode
- is the name of the XML root node from which XLS information may be extracted.formatVersion
- is the version of the supported format.schema
- is the XSL Schema ID associated to this magic number.useRegEx
- indicates if the schema string is a regular expression or not.- Since:
- 4.0
-
-
Method Detail
-
isContentType
protected boolean isContentType(String schemaId, String schemaVersion, String systemId, String publicId)
Replies if the specified stream contains data that corresponds to this magic number.- Specified by:
isContentType
in classXMLMagicNumber
- Parameters:
schemaId
- is the ID of the XSL schema associated to this magic number.schemaVersion
- is the ID of the XSL schema associated to this magic number.systemId
- is the DTD system ID associated to this magic number.publicId
- is the DTD system ID associated to this magic number.- Returns:
true
if this magic number is corresponding to the given XML document, otherwisefalse
-
-