|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
eu.scape_project.pc.cc.JpylyzerWrapper
public class JpylyzerWrapper
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(String uri,
String localName,
String qName)
|
int |
getBitsPerComponent()
|
String |
getColourSpaceName()
|
double |
getCompressionRatio()
|
String |
getCompressionType()
|
String[] |
getElementsAsStringArray()
Get the properties as a String array for quick writing to CSV file. |
double |
getHorizontalResolution()
|
int |
getHorizontalSize()
Get the horizontal (x) size of the image |
static JpylyzerWrapper |
getInstance()
|
static JpylyzerWrapper |
getInstance(String pathToJpylyzer)
|
String |
getJpylyzerVersion()
|
static String |
getJpylyzerVersion(String path)
Routine to check that the Jpylyzer executable exists at a path location and obtain the version (a date stamp) |
int |
getNumberOfImageComponents()
|
double |
getVerticalResolution()
|
int |
getVerticalSize()
Get the vertical (y) size of the image |
boolean |
isValid()
Is the image a valid JP2K? |
static void |
main(String[] args)
This is a simple test, note that Jpylyzer MUST be at DEFAULT_JPYLYZER_PATH for this main to work, it doesn't take a path to the exe as an arg. |
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
|
String |
toString()
|
boolean |
validateJp2kFile(File jp2kFile)
|
boolean |
validateJp2kFile(String path)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public boolean validateJp2kFile(String path) throws ParserConfigurationException, SAXException, IOException
path
- the path to a file to run the Jpylyzer is to be run.
ParserConfigurationException
SAXException
IOException
public boolean validateJp2kFile(File jp2kFile) throws ParserConfigurationException, SAXException, IOException
jp2kFile
-
SAXException
ParserConfigurationException
IOException
public int getHorizontalSize()
public int getVerticalSize()
public double getHorizontalResolution()
public double getVerticalResolution()
public boolean isValid()
public int getNumberOfImageComponents()
public int getBitsPerComponent()
public String getCompressionType()
public String getColourSpaceName()
public double getCompressionRatio()
public String getJpylyzerVersion()
public String toString()
toString
in class Object
public String[] getElementsAsStringArray()
public static JpylyzerWrapper getInstance()
public static JpylyzerWrapper getInstance(String pathToJpylyzer)
pathToJpylyzer
- a string path to the jpylyzer executable
public static String getJpylyzerVersion(String path) throws IllegalStateException
path
- the string path to the Jpylyzer executable.
IllegalStateException
- if the Jpylyzer executable cannot be found.public static void main(String[] args)
args
- a list of paths to JP2Ks to validate
SAXException
ParserConfigurationException
FileNotFoundException
public void startElement(String uri, String localName, String qName, Attributes attributes)
startElement
in interface ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
public void endElement(String uri, String localName, String qName)
endElement
in interface ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |