org.exist.xquery.functions.validation
Class Shared

java.lang.Object
  extended by org.exist.xquery.functions.validation.Shared

public class Shared
extends Object

Shared methods for validation functions.

Author:
dizzzz

Field Summary
static String simplereportText
           
static String xmlreportText
           
 
Constructor Summary
Shared()
           
 
Method Summary
static void closeInputSource(InputSource source)
          Safely close the input source and underlying inputstream.
static void closeStreamSource(StreamSource source)
          Safely close the stream source and underlying inputstream.
static void closeStreamSources(StreamSource[] sources)
          Safely close the stream sources and underlying inputstreams.
static InputSource getInputSource(Item s, XQueryContext context)
          Get input source for specified resource, containing inputStream and location.
static InputStream getInputStream(Item s, XQueryContext context)
          Get input stream for specified resource.
static StreamSource getStreamSource(InputSource in)
           
static StreamSource getStreamSource(Item item, XQueryContext context)
           
static StreamSource[] getStreamSource(Sequence s, XQueryContext context)
          Get stream source for specified resource, containing InputStream and location.
static String getUrl(Item item)
          Get URL value of item.
static String[] getUrls(Sequence s)
          Get URL values of sequence.
static NodeImpl writeReport(ValidationReport report, MemTreeBuilder builder)
          Create validation report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

simplereportText

public static final String simplereportText
See Also:
Constant Field Values

xmlreportText

public static final String xmlreportText
See Also:
Constant Field Values
Constructor Detail

Shared

public Shared()
Method Detail

getInputStream

public static InputStream getInputStream(Item s,
                                         XQueryContext context)
                                  throws XPathException,
                                         MalformedURLException,
                                         IOException
Get input stream for specified resource.

Throws:
XPathException
MalformedURLException
IOException

getStreamSource

public static StreamSource[] getStreamSource(Sequence s,
                                             XQueryContext context)
                                      throws XPathException,
                                             MalformedURLException,
                                             IOException
Get stream source for specified resource, containing InputStream and location. Used by @see Jaxv.

Throws:
XPathException
MalformedURLException
IOException

getStreamSource

public static StreamSource getStreamSource(Item item,
                                           XQueryContext context)
                                    throws XPathException,
                                           MalformedURLException,
                                           IOException
Throws:
XPathException
MalformedURLException
IOException

getInputSource

public static InputSource getInputSource(Item s,
                                         XQueryContext context)
                                  throws XPathException,
                                         MalformedURLException,
                                         IOException
Get input source for specified resource, containing inputStream and location. Used by @see Jing.

Throws:
XPathException
MalformedURLException
IOException

getStreamSource

public static StreamSource getStreamSource(InputSource in)
                                    throws XPathException,
                                           MalformedURLException,
                                           IOException
Throws:
XPathException
MalformedURLException
IOException

getUrl

public static String getUrl(Item item)
                     throws XPathException
Get URL value of item.

Throws:
XPathException

getUrls

public static String[] getUrls(Sequence s)
                        throws XPathException
Get URL values of sequence.

Throws:
XPathException

writeReport

public static NodeImpl writeReport(ValidationReport report,
                                   MemTreeBuilder builder)
Create validation report.


closeInputSource

public static void closeInputSource(InputSource source)
Safely close the input source and underlying inputstream.


closeStreamSource

public static void closeStreamSource(StreamSource source)
Safely close the stream source and underlying inputstream.


closeStreamSources

public static void closeStreamSources(StreamSource[] sources)
Safely close the stream sources and underlying inputstreams.



Copyright (C) Wolfgang Meier. All rights reserved.