|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.xsd.test.XSDGenerateHTML
Generates HTML annotated documentation that summarizes the built-in simple type hierarchy.
It implements the method run
,
which is called just like main during headless workbench invocation.
You can execute this test by running
xsd-generate-schema-for-schema-html.batfrom the directory:
plugins/org.eclipse.xsd.test/test/This script uses the file
plugins/org.eclipse.xsd.test/SampleMarkup.xmlfor annotations. The resultin HTML document is stored in
SchemaForSchema.html
and an index.html
is provided frame-based viewing of the document.
The script
xsd-generate-html.batallows you to pass in your own annotations.
Field Summary | |
static String |
ALLOWS
A markup style indicating the feature not required to be supported. |
Map |
attributeDeclarationMarkupMap
The map from String keys to documentation for XSDAttributeDeclaration s. |
Map |
contentDocumentationMap
The map from String keys to documentation. |
Map |
elementDeclarationMarkupMap
The map from String keys to documentation for XSDElementDeclaration . |
protected String |
errata
The URL for errata. |
static String |
FUTURE
A markup style indicating the feature will eventually be required to be supported. |
static String |
NEVER
A markup style indicating the feature will never be required to be supported. |
protected List |
part1Anchors
The list of anchors in Part 1. |
protected List |
part2Anchors
The list of anchors in Part 2. |
protected List |
part2Components
The list of components in Part 2. |
static String |
REQUIRES
A markup style indicating the feature is required to be supported. |
Map |
schemaTypeToJavaClassMap
The map from schema type to Java class. |
Map |
specialAnchorMap
The map from XSDElementDeclaration to an anchor string. |
Fields inherited from interface org.eclipse.core.runtime.IPlatformRunnable |
EXIT_OK, EXIT_RELAUNCH, EXIT_RESTART |
Constructor Summary | |
XSDGenerateHTML()
Creates an instance. |
Method Summary | |
String |
getAttributeDeclarationDocumentation(String key)
Returns the attribute documentation associated with the key. |
String |
getAttributeDeclarationMarkup(String key)
Returns the attribute markup associated with the key. |
String |
getComponentLinks(XSDElementDeclaration xsdElementDeclaration)
Returns an href in Part 1 or Part 2 of the component specification for the given element. |
String |
getContentDocumentation(String key)
Returns the content documentation associated with the key. |
String |
getElementDeclarationDocumentation(String key)
Returns the element documentation associated with the key. |
String |
getElementDeclarationMarkup(String key)
Returns the element markup associated with the key. |
String |
getLocalAnchor(XSDElementDeclaration xsdElementDeclaration)
Returns an anchor that can be used locally for the given element declaration. |
String |
getSimpleTypeDefinitionLink(XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
Returns an href in Part 2 of the component specification for the given simple type definition. |
String |
getStandardLink(XSDElementDeclaration xsdElementDeclaration)
Returns an href in Part 1 or Part 2 of the XML specification for the given element. |
void |
handleMarkup(Map markupMap,
Element markupElement)
Handle a markup element by caching information in a map. |
void |
loadAndPrint(String xsdFile)
Load the XML Schema file and print the documentation based on it. |
void |
printFooter()
Print the end of the document. |
void |
printHeader()
Print the start of the document. |
void |
printParticle(XSDParticle xsdParticle,
String rootElementDeclarationMarkup)
Print a particle with markup for the document. |
void |
printSimpleTypeDefinition(XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
Print a simple type definition for the document. |
void |
readMarkup(String fileName)
Read the markup from the .xml input. |
Object |
run(Object object)
Generate HTML annotated documentation that summarizes the built-in simple type hierarchy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public Map schemaTypeToJavaClassMap
public Map contentDocumentationMap
readMarkup(java.lang.String)
,
handleMarkup(java.util.Map, org.w3c.dom.Element)
public Map elementDeclarationMarkupMap
XSDElementDeclaration
.
readMarkup(java.lang.String)
,
handleMarkup(java.util.Map, org.w3c.dom.Element)
public Map attributeDeclarationMarkupMap
XSDAttributeDeclaration
s.
readMarkup(java.lang.String)
,
handleMarkup(java.util.Map, org.w3c.dom.Element)
public Map specialAnchorMap
XSDElementDeclaration
to an anchor string.
protected List part1Anchors
protected List part2Anchors
protected List part2Components
protected String errata
public static final String REQUIRES
public static final String ALLOWS
public static final String FUTURE
public static final String NEVER
Constructor Detail |
public XSDGenerateHTML()
Method Detail |
public void readMarkup(String fileName)
fileName
- the name of an XML file.public void handleMarkup(Map markupMap, Element markupElement)
markupMap
- the map to contain the markup.markupElement
- the element specifying the markup.public String getContentDocumentation(String key)
key
- the key to look up.
handleMarkup(java.util.Map, org.w3c.dom.Element)
public String getElementDeclarationMarkup(String key)
key
- the key to look up.
handleMarkup(java.util.Map, org.w3c.dom.Element)
public String getElementDeclarationDocumentation(String key)
key
- the key to look up.
handleMarkup(java.util.Map, org.w3c.dom.Element)
public String getAttributeDeclarationMarkup(String key)
key
- the key to look up.
handleMarkup(java.util.Map, org.w3c.dom.Element)
public String getAttributeDeclarationDocumentation(String key)
key
- the key to look up.
handleMarkup(java.util.Map, org.w3c.dom.Element)
public String getStandardLink(XSDElementDeclaration xsdElementDeclaration)
xsdElementDeclaration
- an element declaration in the schema for schema.
public String getComponentLinks(XSDElementDeclaration xsdElementDeclaration)
xsdElementDeclaration
- a simple type defintion in the schema for schema.
public String getSimpleTypeDefinitionLink(XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
xsdSimpleTypeDefinition
- an element declaration in the schema for schema.
public String getLocalAnchor(XSDElementDeclaration xsdElementDeclaration)
xsdElementDeclaration
- an element declaration in the schema for schema.
public Object run(Object object)
run
in interface IPlatformRunnable
object
- an array of Strings.
0
indicating success, or 1
indicating failure.public void printHeader()
public void printFooter()
public void loadAndPrint(String xsdFile) throws Exception
xsdFile
- the name of an XML Schema file.
Exception
public void printParticle(XSDParticle xsdParticle, String rootElementDeclarationMarkup)
xsdParticle
- a particle.rootElementDeclarationMarkup
- the markup.public void printSimpleTypeDefinition(XSDSimpleTypeDefinition xsdSimpleTypeDefinition)
xsdSimpleTypeDefinition
- a simple type definition in the schema for schema.
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |