Esri Geoportal Server
1.0

com.esri.gpt.catalog.publication
Class PublicationRequest

java.lang.Object
  extended by com.esri.gpt.catalog.publication.PublicationRequest
Direct Known Subclasses:
EditorRequest, HarvesterRequest, UploadRequest, ValidationRequest

public class PublicationRequest
extends Object

Super-class for a metadata document publication request.


Constructor Summary
PublicationRequest()
          Default constructor.
PublicationRequest(RequestContext requestContext, Publisher publisher, String sourceXml)
          Constructs a request to publish a metadata document.
 
Method Summary
protected  void determineSourceUri(Schema schema)
          Determines and sets the source URI for the document.
protected  void determineUuid(Schema schema)
          Determines and sets the UUID for the document.
protected  Schemas getConfiguredSchemas()
          Gets the configured schemas.
 PublicationRecord getPublicationRecord()
          Gets the associated publication record.
 Publisher getPublisher()
          Gets the publisher associated with the request.
 RequestContext getRequestContext()
          Gets the associated request context.
 Schema prepareForPublication()
          Prepares publication record for publication.
 void publish()
          Publishes the document.
 void publish(Schema schema)
          Publishes the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublicationRequest

public PublicationRequest()
Default constructor.


PublicationRequest

public PublicationRequest(RequestContext requestContext,
                          Publisher publisher,
                          String sourceXml)
Constructs a request to publish a metadata document.

Parameters:
requestContext - the request context
publisher - the publisher
sourceXml - the XML content
Method Detail

getConfiguredSchemas

protected Schemas getConfiguredSchemas()
Gets the configured schemas.

Returns:
the configured schemas

getPublisher

public Publisher getPublisher()
Gets the publisher associated with the request.

Returns:
the publisher

getPublicationRecord

public PublicationRecord getPublicationRecord()
Gets the associated publication record.

Returns:
the publication record

getRequestContext

public RequestContext getRequestContext()
Gets the associated request context.

Returns:
the request context

determineSourceUri

protected void determineSourceUri(Schema schema)
Determines and sets the source URI for the document.

Parameters:
schema - the evaluated schema for the document being published

determineUuid

protected void determineUuid(Schema schema)
                      throws SQLException
Determines and sets the UUID for the document.
If the UUID has not been set, this step will attempt to avoid duplication by querying the fileIdentifier and sourceUri. If an existing record is not located, a new UUID is generated.

Parameters:
schema - the evaluated schema for the document being published
Throws:
SQLException - if a database exception occurs

prepareForPublication

public Schema prepareForPublication()
                             throws SchemaException,
                                    SQLException
Prepares publication record for publication.

Returns:
schema
Throws:
SchemaException - if record can not have associated schema
SQLException - if accessing database fails

publish

public void publish(Schema schema)
             throws SQLException,
                    ImsServiceException,
                    CatalogIndexException
Publishes the document.

Parameters:
schema - document schema
Throws:
ImsServiceException - in an exception occurs while communication with the ArcIMS metadata publishing service
SQLException - if a database exception occurs
CatalogIndexException - if a document indexing exception occurs

publish

public void publish()
             throws SchemaException,
                    ImsServiceException,
                    SQLException,
                    CatalogIndexException
Publishes the document.

Throws:
SchemaException - if a schems related exception occurs
ImsServiceException - in an exception occurs while communication with the ArcIMS metadata publishing service
SQLException - if a database exception occurs
CatalogIndexException - if a document indexing exception occurs

Esri Geoportal Server
1.0

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