Esri Geoportal Server
1.0

com.esri.gpt.catalog.schema
Class MetadataDocument

java.lang.Object
  extended by com.esri.gpt.catalog.schema.MetadataDocument

public class MetadataDocument
extends Object

Provides functionality to connect a Schema with a metadata document.


Constructor Summary
MetadataDocument()
          Default constructor.
 
Method Summary
 Schema prepareForCreate(RequestContext context, String schemaKey)
          Prepares a schema for creation by the metadata editor.
 String prepareForDownload(RequestContext context, Publisher publisher, String uuid)
          Prepares a document for download by a publisher.
 Schema prepareForEdit(RequestContext context, Publisher publisher, String uuid)
          Prepares a document for editing.
 String prepareForFullViewing(String xml)
          Prepare xml for full viewing.
 Schema prepareForPublication(PublicationRequest request)
          Prepares a document for publication.
 Schema prepareForPublication(RequestContext context, PublicationRecord record)
          Prepares a document for publication.
 Schema prepareForView(RequestContext context, String xml)
          Prepares a document for viewing.
 String transform(String xml, String xsltPath)
          Executes a transformation.
 String transformDetails(String xml, String xsltPath)
          Transforms an metadata document XML to an HTML fragment suitable for display within the Metadata Details page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataDocument

public MetadataDocument()
Default constructor.

Method Detail

prepareForCreate

public Schema prepareForCreate(RequestContext context,
                               String schemaKey)
                        throws SchemaException
Prepares a schema for creation by the metadata editor.

Parameters:
context - the active request context
schemaKey - the key associated with the schema to create
Returns:
the new schema
Throws:
SchemaException - if a schema related exception occurs

prepareForDownload

public String prepareForDownload(RequestContext context,
                                 Publisher publisher,
                                 String uuid)
                          throws ImsServiceException,
                                 SchemaException
Prepares a document for download by a publisher.

Parameters:
context - the active request context
publisher - the active publisher
uuid - the document UUID
Returns:
the document XML
Throws:
ImsServiceException - if an ArcIMS communication exception occurs
SchemaException - if a schema related exception occurs

prepareForEdit

public Schema prepareForEdit(RequestContext context,
                             Publisher publisher,
                             String uuid)
                      throws ImsServiceException,
                             SchemaException
Prepares a document for editing.

Parameters:
context - the active request context
publisher - the active publisher
uuid - the document UUID
Returns:
the evaluated schema
Throws:
ImsServiceException - if an ArcIMS communication exception occurs
SchemaException - if a schema related exception occurs

prepareForPublication

public Schema prepareForPublication(RequestContext context,
                                    PublicationRecord record)
                             throws SchemaException
Prepares a document for publication.
The schema is loaded, interrogated, evaluated and validated.

Parameters:
context - request context
record - publication record
Returns:
the evaluated and validated schema
Throws:
SchemaException - if a schema related exception occurs

prepareForPublication

public Schema prepareForPublication(PublicationRequest request)
                             throws SchemaException
Prepares a document for publication.
The schema is loaded, interrogated, evaluated and validated.

Parameters:
request - publication request
Returns:
the evaluated and validated schema
Throws:
SchemaException - if a schema related exception occurs

prepareForView

public Schema prepareForView(RequestContext context,
                             String xml)
                      throws SchemaException
Prepares a document for viewing.

Parameters:
context - the active request context
xml - the document xml
Returns:
the evaluated schema
Throws:
SchemaException - if a schema related exception occurs

prepareForFullViewing

public String prepareForFullViewing(String xml)
                             throws SchemaException
Prepare xml for full viewing.

Parameters:
xml - the xml to be prepared
Returns:
the xml string
Throws:
SchemaException - the schema exception

transform

public String transform(String xml,
                        String xsltPath)
                 throws TransformerException
Executes a transformation.

Parameters:
xml - the document XML
xsltPath - the path to the XSLT
Returns:
the transformed document
Throws:
TransformerException - if an exception occurs

transformDetails

public String transformDetails(String xml,
                               String xsltPath)
                        throws TransformerException
Transforms an metadata document XML to an HTML fragment suitable for display within the Metadata Details page.

Parameters:
xml - the document xml to transform
xsltPath - the path to the details XSLT for the schema
Returns:
the HTML fragment
Throws:
TransformerException

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.