|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.morpho.util.XMLTransformer
XMLTransformer to style XML documents using XSLT
Field Summary | |
static java.lang.String |
CSS_PATH_XSLPROP
used to hold path to css stylesheets |
static java.lang.String |
DEFAULT_CSS_XSLPROP
used to hold default css stylesheet name |
static java.lang.String |
ENTITY_CSS_XSLPROP
used to hold entity/attribute css stylesheet name |
static java.lang.String |
HREF_PATH_EXTENSION_XSLPROP
used to hold path extension for href links in triples. |
static java.lang.String |
PACKAGE_ID_XSLPROP
used to hold default css stylesheet name |
static java.lang.String |
PACKAGE_INDEX_NAME_XSLPROP
used to hold default css stylesheet name |
static java.lang.String |
SELECTED_ATTRIBS_XSLPROP
SELECTED_ATTRIBS_XSLPROP used to identify selected attribute(s) when clicking on col headers (NOTE - identified by column index (0..n) - not by attribute ID: |
static java.lang.String |
SUPPRESS_TRIPLES_DELIMETER
used to delimit the list of all module ID(s) to be suppressed in DataPackage metaview. |
static java.lang.String |
SUPPRESS_TRIPLES_OBJECTS_XSLPROP
used to hold a list of all module ID(s) to be suppressed in DataPackage metaview. |
static java.lang.String |
SUPPRESS_TRIPLES_SUBJECTS_XSLPROP
used to hold a list of all module ID(s) to be suppressed in DataPackage metaview. |
Method Summary | |
void |
addTransformerProperty(java.lang.String key,
java.lang.String value)
adds a name/value pair to the Properties object containing
the properties to be set for the transformer |
java.util.Properties |
getCurrentTransformerProperties()
Returns all name/value pairs describing the properties to be set for the transformer, in the form of a Properties object
*NOTE* this method returns a clone of the Properties, not a reference to
the Properties object itself! |
org.xml.sax.EntityResolver |
getEntityResolver()
Gets the EntityResolver from the XML parser that will be
used by this transformer. |
static XMLTransformer |
getInstance()
Used to get a shared instance of the XMLTransformer |
java.lang.String |
getTransformerProperty(java.lang.String key)
Gets the String value of the Property corresponding to the
key passed in |
java.util.Enumeration |
getTransformerPropertyNames()
Gets an Enumeration containing the names (keys of all the
properties to be set for the transformer |
void |
removeAllTransformerProperties()
removes all name/value pairs from the Properties
object containing the properties to be set for the transformer |
void |
removeTransformerProperty(java.lang.String key)
removes a name/value pair from the Properties object
containing the properties to be set for the transformer |
void |
setEntityResolver(org.xml.sax.EntityResolver resolver)
Sets the EntityResolver for the XML parser that will be
used by this transformer. |
void |
setTransformerProperties(java.util.Properties newProps)
The Properties object passed to this method will be used to
set all the name/value pairs describing the properties to be
set for the transformer. |
java.io.Reader |
transform(org.w3c.dom.Document domDoc)
transforms the passed XML document, using a "generic" stylesheet, whose name is obtained from the config.xml file |
java.io.Reader |
transform(org.w3c.dom.Document domDoc,
java.io.Reader xslStyleSheet)
Uses the stylesheet provided, to apply XSLT to the XML DOM Document provided |
java.io.Reader |
transform(java.io.Reader xmlDocReader)
transforms the passed XML document, using a "generic" stylesheet, whose name is obtained from the config.xml file |
java.io.Reader |
transform(java.io.Reader xmlDocReader,
java.io.Reader xslStyleSheet)
Uses the stylesheet provided, to apply XSLT to the XML document provided |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String SELECTED_ATTRIBS_XSLPROP
public static final java.lang.String SUPPRESS_TRIPLES_SUBJECTS_XSLPROP
public static final java.lang.String SUPPRESS_TRIPLES_OBJECTS_XSLPROP
public static final java.lang.String SUPPRESS_TRIPLES_DELIMETER
public static final java.lang.String PACKAGE_INDEX_NAME_XSLPROP
public static final java.lang.String PACKAGE_ID_XSLPROP
public static final java.lang.String DEFAULT_CSS_XSLPROP
public static final java.lang.String ENTITY_CSS_XSLPROP
public static final java.lang.String CSS_PATH_XSLPROP
public static final java.lang.String HREF_PATH_EXTENSION_XSLPROP
Method Detail |
public static XMLTransformer getInstance()
XMLTransformer
XMLTransformer
public java.io.Reader transform(java.io.Reader xmlDocReader) throws java.io.IOException
xmlDocReader
- A java.io.Reader
to allow reading of
the XML document to be styled.java.io.Reader
to allow reading of
the (character-based) results of styling the XML
documentpublic java.io.Reader transform(java.io.Reader xmlDocReader, java.io.Reader xslStyleSheet) throws java.io.IOException
xmlDocReader
- A java.io.Reader
to allow reading of
the XML document to be styled.xslStyleSheet
- A java.io.Reader
to allow reading of
the XSL stylesheet to be usedjava.io.Reader
to allow reading of
the results of styling the XML documentpublic java.io.Reader transform(org.w3c.dom.Document domDoc) throws java.io.IOException
domDoc
- A javax.xml.parsers.Document
containing the XML document to be styled.java.io.Reader
to allow reading of
the (character-based) results of styling the XML
documentpublic java.io.Reader transform(org.w3c.dom.Document domDoc, java.io.Reader xslStyleSheet) throws java.io.IOException
domDoc
- A javax.xml.parsers.Document
containing the XML document to be styled.xslStyleSheet
- A java.io.Reader
to allow reading of
the XSL stylesheet to be usedjava.io.Reader
to allow reading of
the results of styling the XML documentpublic void setEntityResolver(org.xml.sax.EntityResolver resolver)
EntityResolver
for the XML parser that will be
used by this transformer. This is used to resolve PUBLIC and SYSTEM
DOCIDsresolver
- the EntityResolver
to be usedpublic org.xml.sax.EntityResolver getEntityResolver()
EntityResolver
from the XML parser that will be
used by this transformer. This is used to resolve PUBLIC and SYSTEM
DOCIDsEntityResolver
to be usedpublic void addTransformerProperty(java.lang.String key, java.lang.String value)
Properties
object containing
the properties to be set for the transformerkey
- the key to be usedvalue
- the corresponding value to be setpublic void removeTransformerProperty(java.lang.String key)
Properties
object
containing the properties to be set for the transformerkey
- the key of the entry to be removedpublic void removeAllTransformerProperties()
Properties
object containing the properties to be set for the transformerpublic void setTransformerProperties(java.util.Properties newProps)
Properties
object passed to this method will be used to
set all the name/value pairs describing the properties to be
set for the transformer. The new settings will supersede any previous
settingsnewProps
- the Properties
containing all the
object name/value pairs describing the properties to
be set for the transformerpublic java.util.Properties getCurrentTransformerProperties()
Properties
object
*NOTE* this method returns a clone of the Properties, not a reference to
the Properties object itself!Properties
containing
object name/value pairs describing the properties to
be set for the transformerpublic java.util.Enumeration getTransformerPropertyNames()
Enumeration
containing the names (keys of all the
properties to be set for the transformerEnumeration
containing the namespublic java.lang.String getTransformerProperty(java.lang.String key)
String
value of the Property corresponding to the
key passed inString
value of the Property
corresponding to the key passed in
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |