#include <AISResources.h>
Collaboration diagram for AISResources:
Public Member Functions | |
AISResources (const string &database) throw (AISDatabaseReadFailed) | |
AISResources () | |
virtual ResourceVector | get_resource (const string &primary) |
virtual bool | has_resource (const string &primary) const |
virtual void | read_database (const string &database) |
virtual void | write_database (const string &filename) |
virtual | ~AISResources () |
Methods used by the AISDatabaseParser class | |
virtual void | add_regexp_resource (const string ®exp, const ResourceVector &rv) |
virtual void | add_regexp_resource (const string ®exp, const Resource &ancillary) |
virtual void | add_url_resource (const string &url, const ResourceVector &rv) |
virtual void | add_url_resource (const string &url, const Resource &ancillary) |
Friends | |
class | AISResourcesTest |
ostream & | operator<< (ostream &os, const AISResources &ais_res) |
Note that read_database() takes filenames because the underlying XML parser library uses filenames. The write_database() method takes a filename to be symmetrical.
Definition at line 67 of file AISResources.h.
|
Build an empty instance. Definition at line 118 of file AISResources.h. |
|
Use an existing AIS database to build an instance.
Definition at line 101 of file AISResources.cc. |
|
Definition at line 122 of file AISResources.h. |
|
Add a vector of AIS resources for the given primary data source regular expression. If there is already an entry for the primary, append the new ancillary resources to those.
Definition at line 154 of file AISResources.cc. References ResourceVectorCIter. |
|
Add the given ancillary resource to the in-memory collection of mappings between regular expressions and ancillary data sources.
Definition at line 142 of file AISResources.cc. References ResourceVector. |
|
Add a vector of AIS resources for the given primary data source URL. If there is already an entry for the primary, append the new ancillary resources to those.
Definition at line 124 of file AISResources.cc. References ResourceVectorCIter. |
|
Add the given ancillary resource to the in-memory collection of mappings between primary and ancillary data sources.
Definition at line 113 of file AISResources.cc. References ResourceVector. |
|
Return a vector of AIS Resource objects which are bound to the given primary resource. If a given Aside from reading the database, this is the main workhorse for this class. Once a database has been read, a client uses has_resource() to see if a Data URL has anything in the database and then calls this method to get a vector of those things.
Definition at line 209 of file AISResources.cc. References ResourceVector. Referenced by AISMerge::merge(). |
|
Return True if the given primary resource is listed in the current set of AIS resource mappings. That is, return true if there are some AIS resources registered for the given primary resource.
Definition at line 177 of file AISResources.cc. Referenced by AISMerge::merge(). |
|
Read the AIS database (an XML file) and internalize it. This method is almost always used to build an in-memory database that has_resource() and get_resource() use.
Definition at line 238 of file AISResources.cc. References AISDatabaseParser::intern(). |
Here is the call graph for this function:
|
Write the current in-memory mapping of primary and ancillary resources to the named file so that the read_database() method can read them and recreate the in-memory mapping.
Definition at line 254 of file AISResources.cc. |
|
Definition at line 113 of file AISResources.h. |
|
Output the XML for a collection of AIS resources. This function is a friend of the AISResource class.
Definition at line 58 of file AISResources.cc. |