Package de.swa.fuh.xml
Class GenericXMLImporter
java.lang.Object
org.xml.sax.helpers.DefaultHandler
de.swa.fuh.xml.GenericXMLImporter
- All Implemented Interfaces:
GMAF_Plugin
,org.xml.sax.ContentHandler
,org.xml.sax.DTDHandler
,org.xml.sax.EntityResolver
,org.xml.sax.ErrorHandler
public class GenericXMLImporter extends org.xml.sax.helpers.DefaultHandler implements GMAF_Plugin
-
Constructor Summary
Constructors Constructor Description GenericXMLImporter()
-
Method Summary
Modifier and Type Method Description boolean
canProcess(java.lang.String extension)
this method returns, if the plugin is able to process files with a given extensionvoid
characters(char[] ch, int start, int length)
void
endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
java.util.Vector<Node>
getDetectedNodes()
this method is called by the GMAF to receive the results of this plugin and to fuse it into the MMFGboolean
isGeneralPlugin()
if this plugin contains overall metadata, e.g.void
process(java.net.URL url, java.io.File f, byte[] bytes, MMFG fv)
this method is called by the GMAF framework, when a new asset has to be processedboolean
providesRecoursiveData()
this method should indicate, if it returns recursive data, which are then re-processed within the GMAF frameworkvoid
startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
Constructor Details
-
GenericXMLImporter
public GenericXMLImporter()
-
-
Method Details
-
canProcess
public boolean canProcess(java.lang.String extension)Description copied from interface:GMAF_Plugin
this method returns, if the plugin is able to process files with a given extension- Specified by:
canProcess
in interfaceGMAF_Plugin
- Returns:
- true or false
-
getDetectedNodes
Description copied from interface:GMAF_Plugin
this method is called by the GMAF to receive the results of this plugin and to fuse it into the MMFG- Specified by:
getDetectedNodes
in interfaceGMAF_Plugin
- Returns:
- a vector of MMFG nodes
-
isGeneralPlugin
public boolean isGeneralPlugin()Description copied from interface:GMAF_Plugin
if this plugin contains overall metadata, e.g. EXIF data, this method should return true to indicate, that these general data have to be attached to the MMFG's root node- Specified by:
isGeneralPlugin
in interfaceGMAF_Plugin
- Returns:
- true, if it is a general plugin
-
process
Description copied from interface:GMAF_Plugin
this method is called by the GMAF framework, when a new asset has to be processed- Specified by:
process
in interfaceGMAF_Plugin
- Parameters:
url
- represents the temporary URL of the Multimedia asset to be processf
- represents the temporary file of the asset to be processedbytes
- contains the file's bytesfv
- represents the current MMFG, where the results of this plugin should be fused into
-
providesRecoursiveData
public boolean providesRecoursiveData()Description copied from interface:GMAF_Plugin
this method should indicate, if it returns recursive data, which are then re-processed within the GMAF framework- Specified by:
providesRecoursiveData
in interfaceGMAF_Plugin
- Returns:
- true, if recursive data is available
-
startElement
public void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException- Specified by:
startElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
startElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
characters
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException- Specified by:
characters
in interfaceorg.xml.sax.ContentHandler
- Overrides:
characters
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-
endElement
public void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException- Specified by:
endElement
in interfaceorg.xml.sax.ContentHandler
- Overrides:
endElement
in classorg.xml.sax.helpers.DefaultHandler
- Throws:
org.xml.sax.SAXException
-