Esri Geoportal Server
1.0

com.esri.gpt.catalog.schema
Class Interrogation

java.lang.Object
  extended by com.esri.gpt.catalog.schema.Component
      extended by com.esri.gpt.catalog.schema.Interrogation

public class Interrogation
extends Component

Interrogation component associated with a metadata schema.

The component is configured from a node with a schema configuration XML document.

Example:
<interrogation count="count(/metadata/dataIdInfo/*[node()])"/>


Constructor Summary
Interrogation()
          Default constructor.
Interrogation(Interrogation objectToDuplicate)
          Construct by duplicating an existing object.
 
Method Summary
 void configure(CfgContext context, Node node, NamedNodeMap attributes)
          Configures the object based upon a node loaded from a schema configuration XML.
 Interrogation duplicate()
          Produces a deep clone of the object.
 void echo(StringBuffer sb)
          Appends property information for the component to a StringBuffer.
 String getCountExpression()
          Gets the selection expression.
 int getMatchedNodeCount()
          Gets the number of nodes matching the count expression.
 String getToKnownSchemaXslt()
          Gets the XSLT (file path) for translating to a known schema.
 void interrogate(Schema schema, Document dom, XPath xpath)
          Interrogates a metadata document by executing the configured XPath count expression for this interrogation object.
 void setCountExpression(String expression)
          Sets the selection expression.
 void setMatchedNodeCount(int count)
          Sets the number of nodes matching the count expression.
 void setToKnownSchemaXslt(String xslt)
          Sets the XSLT (file path) for translating to a known schema.
 
Methods inherited from class com.esri.gpt.catalog.schema.Component
getKey, setKey, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Interrogation

public Interrogation()
Default constructor.


Interrogation

public Interrogation(Interrogation objectToDuplicate)
Construct by duplicating an existing object.

Parameters:
objectToDuplicate - the object to duplicate
Method Detail

getCountExpression

public String getCountExpression()
Gets the selection expression.

Returns:
the selection expression

setCountExpression

public void setCountExpression(String expression)
Sets the selection expression.

Parameters:
expression - the selection expression

getMatchedNodeCount

public int getMatchedNodeCount()
Gets the number of nodes matching the count expression.

Returns:
the number of matching nodes

setMatchedNodeCount

public void setMatchedNodeCount(int count)
Sets the number of nodes matching the count expression.

Parameters:
count - the number of matching nodes

getToKnownSchemaXslt

public String getToKnownSchemaXslt()
Gets the XSLT (file path) for translating to a known schema.

Certain XML structures require translation to a known schema, for example, the translation of an OGC-WMS GetCapabilities response to a Dublin Core document.

Returns:
the file path to the XSLT

setToKnownSchemaXslt

public void setToKnownSchemaXslt(String xslt)
Sets the XSLT (file path) for translating to a known schema.

Certain XML structures require translation to a known schema, for example, the translation of an OGC-WMS GetCapabilities response to a Dublin Core document.

Parameters:
xslt - the file path to the XSLT

configure

public void configure(CfgContext context,
                      Node node,
                      NamedNodeMap attributes)
Configures the object based upon a node loaded from a schema configuration XML.
The super.configure method should be invoked prior to any sub-class configuration.

The following attributes are configured:
count toKnownSchemaXslt

Overrides:
configure in class Component
Parameters:
context - the configuration context
node - the configuration node
attributes - the attributes of the configuration node

duplicate

public Interrogation duplicate()
Produces a deep clone of the object.
The duplication constructor is invoked.
return new Interrogation(this);

Specified by:
duplicate in class Component

echo

public void echo(StringBuffer sb)
Appends property information for the component to a StringBuffer.
The method is intended to support "FINEST" logging.
super.echo should be invoked prior appending any local information.

Overrides:
echo in class Component
Parameters:
sb - the StringBuffer to use when appending information

interrogate

public void interrogate(Schema schema,
                        Document dom,
                        XPath xpath)
                 throws XPathExpressionException
Interrogates a metadata document by executing the configured XPath count expression for this interrogation object.

Parameters:
schema - the parent schema
dom - the metadata document to interrogate
xpath - an XPath object configured with an appropriate Namespace context for the schema
Throws:
XPathExpressionException - if an evaluation expression fails

Esri Geoportal Server
1.0

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