Esri Geoportal Server
1.2.9

com.esri.gpt.control.webharvest.client.atom
Class AGPEntryProcessor

java.lang.Object
  extended by com.esri.gpt.control.webharvest.client.atom.AGPEntryProcessor
All Implemented Interfaces:
IEntryProcessor
Direct Known Subclasses:
AGPEntryProcessor2

public class AGPEntryProcessor
extends Object
implements IEntryProcessor

Implements IEntryProcessor.extractMetadata() to process entry node and extract metadata xml.


Field Summary
protected  IterationContext context
           
protected static Logger LOG
           
protected static Map<String,String> namespaces
           
 
Constructor Summary
AGPEntryProcessor(IterationContext context)
           
 
Method Summary
 String extractMetadata(BaseAtomInfo info, Node entry)
          Extracts xml of entry node and returns xml string.
protected  void injectNamespaces(Document mdDoc)
          Injects namespaces into the XML document.
protected  String parseId(Document doc)
          Parses Id from atom entry
protected  String readBbox(BaseAtomInfo info, String id)
          Makes http request to json endpoint and returns georss box string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final Logger LOG

namespaces

protected static final Map<String,String> namespaces

context

protected final IterationContext context
Constructor Detail

AGPEntryProcessor

public AGPEntryProcessor(IterationContext context)
Method Detail

injectNamespaces

protected void injectNamespaces(Document mdDoc)
Injects namespaces into the XML document.

Parameters:
mdDoc - XML document

extractMetadata

public String extractMetadata(BaseAtomInfo info,
                              Node entry)
Extracts xml of entry node and returns xml string.

Specified by:
extractMetadata in interface IEntryProcessor
Parameters:
info - the BaseAtomInfo object
entry - the entry node
Returns:
the metadata xml string

parseId

protected String parseId(Document doc)
                  throws XPathExpressionException
Parses Id from atom entry

Parameters:
doc - the feed
Returns:
the id
Throws:
XPathExpressionException

readBbox

protected String readBbox(BaseAtomInfo info,
                          String id)
                   throws IOException,
                          org.json.JSONException
Makes http request to json endpoint and returns georss box string.

Parameters:
info - the base atom info
id - the item id
Returns:
the georss box string.
Throws:
IOException - if the http request fails due to i/o exception
org.json.JSONException - if json parsing fails

Esri Geoportal Server
1.2.9

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