Esri Geoportal Server
1.0

com.esri.gpt.framework.search
Class SearchXslProfiles<P extends SearchXslProfile<?,?,?,?>>

java.lang.Object
  extended by com.esri.gpt.framework.search.SearchXslProfiles<P>
Type Parameters:
P - the generic type
Direct Known Subclasses:
CswProfiles, SearchGptXslProfiles

public abstract class SearchXslProfiles<P extends SearchXslProfile<?,?,?,?>>
extends Object

The collection of Search Profiles.


Field Summary
static String CONFIG_FOLDER_PATH
          The configuration folder path.
 
Constructor Summary
SearchXslProfiles()
          Instantiates a new search profiles.
 
Method Summary
 void addProfile(P profile)
          Add a key value pair to profile collection.
 String getConfigurationFileName()
          Gets the configuration file name.
 String getConfigurationFolderPath()
          Gets the configuration folder path.
 P getProfileById(String id)
          Get csw profile with its id.
 Collection<P> getProfilesAsCollection()
          Gets the profiles as collection.
 int getSize()
          Gets the size.
abstract  void loadProfilefromConfig()
          Loads the profile details from configuration file.
 void loadProfilefromConfig(String filename, P xslProfileClass, String profileTag)
          Loads the profile details from configuration file.
 void setConfigurationFileName(String configurationFileName)
          Sets the configuration file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FOLDER_PATH

public static final String CONFIG_FOLDER_PATH
The configuration folder path.

See Also:
Constant Field Values
Constructor Detail

SearchXslProfiles

public SearchXslProfiles()
Instantiates a new search profiles.

Method Detail

getConfigurationFileName

public String getConfigurationFileName()
Gets the configuration file name.

Returns:
the configuration file name (trimmed, never null)

setConfigurationFileName

public void setConfigurationFileName(String configurationFileName)
Sets the configuration file name.

Parameters:
configurationFileName - the new configuration file name

getConfigurationFolderPath

public String getConfigurationFolderPath()
Gets the configuration folder path.

Returns:
the configuration folder path (trimmed, never null)

addProfile

public void addProfile(P profile)
Add a key value pair to profile collection. Add to profile collection

Parameters:
profile - the profile

loadProfilefromConfig

public abstract void loadProfilefromConfig()
                                    throws ParserConfigurationException,
                                           SAXException,
                                           IOException,
                                           XPathExpressionException
Loads the profile details from configuration file. The profiles details are loaded in the collection. Duplicate or invalid profiles are ignored.

Throws:
ParserConfigurationException
SAXException
ParserConfigurationException
IOException
SAXException
XPathExpressionException

loadProfilefromConfig

public void loadProfilefromConfig(String filename,
                                  P xslProfileClass,
                                  String profileTag)
                           throws ParserConfigurationException,
                                  SAXException,
                                  IOException,
                                  XPathExpressionException
Loads the profile details from configuration file. The profiles details are loaded in the collection. Duplicate or invalid profiles are ignored.

Parameters:
filename -
xslProfileClass - Can never be null
Throws:
ParserConfigurationException
SAXException
ParserConfigurationException
IOException
SAXException
XPathExpressionException

getProfileById

public P getProfileById(String id)
Get csw profile with its id.

Parameters:
id - the id
Returns:
the profile by id

getProfilesAsCollection

public Collection<P> getProfilesAsCollection()
Gets the profiles as collection.

Returns:
the profiles as collection

getSize

public int getSize()
Gets the size.

Returns:
the size

Esri Geoportal Server
1.0

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