net.sf.uadetector.datastore
Class SimpleXmlDataStore

java.lang.Object
  extended by net.sf.uadetector.datastore.AbstractDataStore
      extended by net.sf.uadetector.datastore.SimpleXmlDataStore
All Implemented Interfaces:
DataStore

public final class SimpleXmlDataStore
extends AbstractDataStore
implements DataStore

This is the simplest implementation of a DataStore. It initialize the store by reading the UAS data via the passed URL and store it only in the Java heap space.

The given resource must have a valid XML format with UTF-8 charset that validates against specified schema under http://user-agent-string.info/rpc/uasxmldata.dtd.

Author:
André Rouél

Field Summary
 
Fields inherited from interface net.sf.uadetector.datastore.DataStore
DEFAULT_CHARSET, DEFAULT_DATA_URL, DEFAULT_VERSION_URL
 
Constructor Summary
SimpleXmlDataStore(java.net.URL dataUrl, java.net.URL versionUrl)
          Constructs an SimpleXmlDataStore by reading UAS data by the specified default URL DataStore.DEFAULT_DATA_URL (in XML format).
 
Method Summary
 
Methods inherited from class net.sf.uadetector.datastore.AbstractDataStore
getCharset, getData, getDataReader, getDataUrl, getVersionUrl, readData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.uadetector.datastore.DataStore
getCharset, getData, getDataReader, getDataUrl, getVersionUrl
 

Constructor Detail

SimpleXmlDataStore

public SimpleXmlDataStore(java.net.URL dataUrl,
                          java.net.URL versionUrl)
Constructs an SimpleXmlDataStore by reading UAS data by the specified default URL DataStore.DEFAULT_DATA_URL (in XML format).

Parameters:
dataUrl - URL to UAS data
versionUrl - URL to version information about the given UAS data


Copyright © 2011-2014. All Rights Reserved.