|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.portlets.user.results.server.servlet.MetadataConverter
public class MetadataConverter
| Field Summary | |
|---|---|
protected Map<String,String> |
schemaNameId
Schema name to XSLT generic resource id map. |
protected boolean |
setup
|
protected Map<String,String> |
xsltCache
Id to XSLT map cache. |
| Constructor Summary | |
|---|---|
MetadataConverter(NewresultsetServiceImpl myServlet)
Create a new MetadataConverter. |
|
| Method Summary | |
|---|---|
String |
convert(String schemaName,
String xml,
org.gcube.application.framework.core.session.ASLSession d4session)
Convert the given metadata XML to HTML. |
String |
convertUsingDefault(String xml,
org.gcube.application.framework.core.session.ASLSession d4session)
Convert the given XML to HTML using the default XSLT. |
protected String |
getDefaultXSLT()
|
protected String |
getXSL(String xsltId,
org.gcube.application.framework.core.session.ASLSession d4session)
Get a XSLT from is id. |
void |
isReady()
|
protected String |
retrieveXSLT(String xslId,
org.gcube.application.framework.core.session.ASLSession d4session)
Retrieve a schema from his generic resource. |
protected void |
retrieveXSLTIds(org.gcube.application.framework.core.session.ASLSession session)
Retrieve from user profile all transformation schemas id. |
void |
setup(org.gcube.application.framework.core.session.ASLSession d4session)
Load user xslt. |
protected String |
transform(String xml,
String xslt)
Transform an XML string to HTML string using an XSLT processor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,String> schemaNameId
protected Map<String,String> xsltCache
protected boolean setup
| Constructor Detail |
|---|
public MetadataConverter(NewresultsetServiceImpl myServlet)
| Method Detail |
|---|
public void setup(org.gcube.application.framework.core.session.ASLSession d4session)
d4session - public void isReady()
public String convert(String schemaName,
String xml,
org.gcube.application.framework.core.session.ASLSession d4session)
throws Exception
schemaName - xml - d4session -
Exception
public String convertUsingDefault(String xml,
org.gcube.application.framework.core.session.ASLSession d4session)
throws Exception
xml - the XML to convert.d4session - the user session.
Exceptionprotected void retrieveXSLTIds(org.gcube.application.framework.core.session.ASLSession session)
d4session -
protected String getXSL(String xsltId,
org.gcube.application.framework.core.session.ASLSession d4session)
throws RemoteException
xsltId - the XSLT id.d4session -
RemoteException
protected String retrieveXSLT(String xslId,
org.gcube.application.framework.core.session.ASLSession d4session)
throws RemoteException
xslId - the schema id.d4session -
RemoteException
protected String transform(String xml,
String xslt)
throws TransformerException
xml - the XML to convert.xslt - the XML used for the conversion.
TransformerException - if an error occurs.
protected String getDefaultXSLT()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||