org.deegree.services.csw
Class AbstractCSWKVPAdapter

java.lang.Object
  extended by org.deegree.services.csw.AbstractCSWKVPAdapter
Direct Known Subclasses:
DescribeRecordKVPAdapter, GetRecordsKVPAdapter

public abstract class AbstractCSWKVPAdapter
extends Object

abstract class for parsing a CSW kvp request it provides utilities

Version:
$Revision: $, $Date: $
Author:
Steffen Thomas, last edited by: $Author: thomas $

Constructor Summary
AbstractCSWKVPAdapter()
           
 
Method Summary
protected static Map<String,String> extractNamespaceBindings(Map<String,String> kvpUC)
          Extracts the namespace bindings from the NAMESPACE parameter.
protected static QName[] extractTypeNames(Map<String,String> kvpParam, Map<String,String> nsBindings)
          Extracts the qualified type names from the TYPENAME parameter.
protected static QName qualifyName(String name, Map<String,String> nsBindings)
          Transforms a (possibly prefixed) type name into a qualified name using the given namespace bindings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCSWKVPAdapter

public AbstractCSWKVPAdapter()
Method Detail

extractTypeNames

protected static QName[] extractTypeNames(Map<String,String> kvpParam,
                                          Map<String,String> nsBindings)
                                   throws InvalidParameterValueException
Extracts the qualified type names from the TYPENAME parameter.

Parameters:
kvpParam - the parameters of the request, normalized
nsBindings - namespace bindings, may be null
Returns:
qualified type names or null if no TYPENAME parameter is present
Throws:
InvalidParameterValueException - if the value of the TYPENAME attribute contains a syntactical error or uses unbound prefices

qualifyName

protected static QName qualifyName(String name,
                                   Map<String,String> nsBindings)
Transforms a (possibly prefixed) type name into a qualified name using the given namespace bindings.

Parameters:
name - possibly prefixed type name
nsBindings - namespace bindings, may be null
Returns:
qualified name

extractNamespaceBindings

protected static Map<String,String> extractNamespaceBindings(Map<String,String> kvpUC)
                                                      throws InvalidParameterValueException
Extracts the namespace bindings from the NAMESPACE parameter.

Example:

The default namespace may also be bound (two variants are supported):

Parameters:
kvpUC - the parameters of the request, normalized
Returns:
mapping between prefices and namespaces (key: prefix, value: namespace), empty string as a key ('') is the binding of the default namespace, null is returned if no NAMESPACE parameter is present
Throws:
InvalidParameterValueException - if the value of the NAMESPACE attribute contains a syntactical error


Copyright © 2011. All Rights Reserved.