Package org.corpus_tools.pepper.core
Class WorkflowDescriptionReader
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.xml.sax.ext.DefaultHandler2
-
- org.corpus_tools.pepper.core.WorkflowDescriptionReader
-
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler,DeclHandler,EntityResolver2,LexicalHandler
public class WorkflowDescriptionReader extends DefaultHandler2
This class reads the 'new' workflow description file version 1.0 and fills the passedPepperJobobject with the content of the read file. The workflow description file has to be conform to ./src/main/resources/workflowDescription_10.rnc.- Author:
- Florian Zipser
-
-
Field Summary
Fields Modifier and Type Field Description static StringATT_FORMAT_NAMEstatic StringATT_FORMAT_VERSIONstatic StringATT_IDstatic StringATT_KEYstatic StringATT_NAMEstatic StringATT_PATHstatic StringATT_VERSIONstatic StringTAG_CUSTOMIZATIONstatic StringTAG_EXPORTERstatic StringTAG_IMPORTERstatic StringTAG_MANIPULATORstatic StringTAG_PEPEPR_JOBstatic StringTAG_PROP
-
Constructor Summary
Constructors Constructor Description WorkflowDescriptionReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)Reads the property values and adds them to property objectvoidendElement(String uri, String localName, String qName)If a property has no value, it must be created here.org.eclipse.emf.common.util.URIgetLocation()PepperJobgetPepperJob()ReturnsPepperJobobject to be filled with content.org.eclipse.emf.common.util.URIresolveURI(String path)Transforms a given String to a URI.voidsetLocation(org.eclipse.emf.common.util.URI location)voidsetPepperJob(PepperJob pepperJob)SetsPepperJobobject to be filled with content.voidstartElement(String uri, String localName, String qName, Attributes attributes)-
Methods inherited from class org.xml.sax.ext.DefaultHandler2
attributeDecl, comment, elementDecl, endCDATA, endDTD, endEntity, externalEntityDecl, getExternalSubset, internalEntityDecl, resolveEntity, resolveEntity, startCDATA, startDTD, startEntity
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Field Detail
-
TAG_PEPEPR_JOB
public static final String TAG_PEPEPR_JOB
- See Also:
- Constant Field Values
-
TAG_CUSTOMIZATION
public static final String TAG_CUSTOMIZATION
- See Also:
- Constant Field Values
-
TAG_PROP
public static final String TAG_PROP
- See Also:
- Constant Field Values
-
TAG_IMPORTER
public static final String TAG_IMPORTER
- See Also:
- Constant Field Values
-
TAG_MANIPULATOR
public static final String TAG_MANIPULATOR
- See Also:
- Constant Field Values
-
TAG_EXPORTER
public static final String TAG_EXPORTER
- See Also:
- Constant Field Values
-
ATT_ID
public static final String ATT_ID
- See Also:
- Constant Field Values
-
ATT_VERSION
public static final String ATT_VERSION
- See Also:
- Constant Field Values
-
ATT_KEY
public static final String ATT_KEY
- See Also:
- Constant Field Values
-
ATT_PATH
public static final String ATT_PATH
- See Also:
- Constant Field Values
-
ATT_NAME
public static final String ATT_NAME
- See Also:
- Constant Field Values
-
ATT_FORMAT_NAME
public static final String ATT_FORMAT_NAME
- See Also:
- Constant Field Values
-
ATT_FORMAT_VERSION
public static final String ATT_FORMAT_VERSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPepperJob
public void setPepperJob(PepperJob pepperJob)
SetsPepperJobobject to be filled with content.
-
getLocation
public org.eclipse.emf.common.util.URI getLocation()
-
setLocation
public void setLocation(org.eclipse.emf.common.util.URI location)
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXExceptionReads the property values and adds them to property object- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
If a property has no value, it must be created here.- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
resolveURI
public org.eclipse.emf.common.util.URI resolveURI(String path)
Transforms a given String to a URI. A File-URI is returned if:- String is relative
- starts with '/'
- second character is 'colon' and third character is '\', this is to support windows pathes
- starts with file scheme,
- Parameters:
path-- Returns:
-
-