|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xbrlapi.xlink.XLinkHandlerDefaultImpl
org.xbrlapi.xlink.Validator
public class Validator
Utility handler to perform validation of XLink content in XML documents
| Constructor Summary | |
|---|---|
Validator(File file)
Constructor that is given the URI of the document to be validated |
|
Validator(InputSource is)
Constructor that is given the URI of the document to be validated. |
|
Validator(URI uri)
Constructor that is given the URI of the document to be validated |
|
| Method Summary | |
|---|---|
protected static void |
badUsage(String message)
Report incorrect usage of the command line XLink validator |
void |
endArc(String namespaceURI,
String sName,
String qName)
Handles straight pass through of SAX event for the end of simple link elements. |
void |
endExtendedLink(String namespaceURI,
String sName,
String qName)
Handles straight pass through of SAX event for the end of extended link elements. |
void |
endLocator(String namespaceURI,
String sName,
String qName)
Handles straight pass through of SAX event for the end of locators. |
void |
endResource(String namespaceURI,
String sName,
String qName)
Handles straight pass through of SAX event for the end of local resources. |
void |
endSimpleLink(String namespaceURI,
String sName,
String qName)
Handles straight pass through of SAX event for the end of simple link elements. |
void |
endTitle(String namespaceURI,
String sName,
String qName)
Handles straight pass through of SAX event for the end of simple title elements. |
void |
error(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
Record the error message |
Document |
getResults()
Returns an XML DOM document that contains one message element (as a child of the root message element) for each of the errors and warnings generated during the validation process. |
static void |
main(String[] args)
Enable commandline usage of the XLink validator |
void |
printMessages()
Print the errors and warnings to System out |
void |
startArc(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String from,
String to,
String arcrole,
String title,
String show,
String actuate)
Handles the start of processing an arc. |
void |
startExtendedLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title)
Handles the start of processing an extended link. |
void |
startLocator(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String title,
String label)
Handles the start of processing a locator. |
void |
startResource(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title,
String label)
Handles the start of processing a local resource. |
void |
startSimpleLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String arcrole,
String title,
String show,
String actuate)
Handles the start of processing a simple link (and custom links). |
void |
startTitle(String namespaceURI,
String lName,
String qName,
Attributes attrs)
Handles straight pass through of SAX event for XLink title elements |
void |
titleCharacters(char[] buf,
int offset,
int len)
Handles the character content of a title element |
void |
warning(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
Record the warning |
void |
xmlBaseEnd()
Handles end of an element so that XML base related operations can to done |
void |
xmlBaseStart(String value)
Handles the start of an element, providing any XML Base attribute value. |
| Methods inherited from class org.xbrlapi.xlink.XLinkHandlerDefaultImpl |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Validator(URI uri)
uri - The URI of the document to be validatedpublic Validator(File file)
file - The file to be validatedpublic Validator(InputSource is)
is - The input source for the XML to be validated| Method Detail |
|---|
public Document getResults()
public void startSimpleLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String arcrole,
String title,
String show,
String actuate)
throws XLinkException
XLinkHandler
startSimpleLink in interface XLinkHandlerstartSimpleLink in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.startSimpleLink(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void endSimpleLink(String namespaceURI,
String sName,
String qName)
throws XLinkException
XLinkHandler
endSimpleLink in interface XLinkHandlerendSimpleLink in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.endSimpleLink(java.lang.String, java.lang.String, java.lang.String)
public void startTitle(String namespaceURI,
String lName,
String qName,
Attributes attrs)
throws XLinkException
XLinkHandler
startTitle in interface XLinkHandlerstartTitle in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.startTitle(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endTitle(String namespaceURI,
String sName,
String qName)
throws XLinkException
XLinkHandler
endTitle in interface XLinkHandlerendTitle in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.endTitle(java.lang.String, java.lang.String, java.lang.String)
public void titleCharacters(char[] buf,
int offset,
int len)
throws XLinkException
XLinkHandler
titleCharacters in interface XLinkHandlertitleCharacters in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.titleCharacters(char[], int, int)
public void startExtendedLink(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title)
throws XLinkException
XLinkHandler
startExtendedLink in interface XLinkHandlerstartExtendedLink in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.startExtendedLink(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String)
public void endExtendedLink(String namespaceURI,
String sName,
String qName)
throws XLinkException
XLinkHandler
endExtendedLink in interface XLinkHandlerendExtendedLink in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.endExtendedLink(java.lang.String, java.lang.String, java.lang.String)
public void startResource(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String role,
String title,
String label)
throws XLinkException
XLinkHandler
startResource in interface XLinkHandlerstartResource in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.startResource(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String, java.lang.String)
public void endResource(String namespaceURI,
String sName,
String qName)
throws XLinkException
XLinkHandler
endResource in interface XLinkHandlerendResource in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.endResource(java.lang.String, java.lang.String, java.lang.String)
public void startLocator(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String href,
String role,
String title,
String label)
throws XLinkException
XLinkHandler
startLocator in interface XLinkHandlerstartLocator in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.startLocator(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void endLocator(String namespaceURI,
String sName,
String qName)
throws XLinkException
XLinkHandler
endLocator in interface XLinkHandlerendLocator in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.endLocator(java.lang.String, java.lang.String, java.lang.String)
public void startArc(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String from,
String to,
String arcrole,
String title,
String show,
String actuate)
throws XLinkException
XLinkHandler
startArc in interface XLinkHandlerstartArc in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.startArc(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)
public void endArc(String namespaceURI,
String sName,
String qName)
throws XLinkException
XLinkHandler
endArc in interface XLinkHandlerendArc in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.endArc(java.lang.String, java.lang.String, java.lang.String)
public void xmlBaseStart(String value)
throws XLinkException
XLinkHandler
xmlBaseStart in interface XLinkHandlerxmlBaseStart in class XLinkHandlerDefaultImplvalue - The value of the XML Base attribute
XLinkExceptionXLinkHandler.xmlBaseStart(java.lang.String)
public void xmlBaseEnd()
throws XLinkException
XLinkHandler
xmlBaseEnd in interface XLinkHandlerxmlBaseEnd in class XLinkHandlerDefaultImplXLinkExceptionXLinkHandler.xmlBaseEnd()
public void error(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
throws XLinkException
error in interface XLinkHandlererror in class XLinkHandlerDefaultImplnamespaceURI - Namespace of the element generating the errorlName - local name of the element generating the errorqName - qName of the element generating the errorattrs - attributes of the element generating the errormessage - The text of the error message
XLinkException - if the handler does not deal with
the XLink problem internallyXLinkHandler.error(java.lang.String,java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String)
public void warning(String namespaceURI,
String lName,
String qName,
Attributes attrs,
String message)
throws XLinkException
warning in interface XLinkHandlerwarning in class XLinkHandlerDefaultImplnamespaceURI - Namespace of the element generating the errorlName - local name of the element generating the errorqName - qName of the element generating the errorattrs - attributes of the element generating the errormessage - The text of the warning message
XLinkException - if the handler does not deal with
the XLink warning internallyXLinkHandler.warning(java.lang.String,java.lang.String, java.lang.String, org.xml.sax.Attributes, java.lang.String)public void printMessages()
public static void main(String[] args)
args - protected static void badUsage(String message)
message - The error message describing why the
commandline usage of the XLink validator failed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||