|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Interface to a property store.
| Field Summary | |
static String |
FilesystemRepo
Standard ID for the local filesystem repository |
static String |
InternalRepo
Standard ID for the implementation internal repository |
static String |
WebRepo
Standard ID for the generic web repository |
| Method Summary | |
int |
countDocuments(Query q)
Find the number of documents that match a query. |
Document |
createDocument(DocumentType docType)
Create a document. |
Document |
createDocument(DocumentType docType,
Schema schema,
Map props)
Create a document with a particular schema enforced. |
boolean |
documentExists(String id)
Determine whether the named document exists. |
DocumentList |
find(Query query)
Find the documents that match a query. |
Document |
getDocument(String id)
Return the named document. |
Object |
getExtension(Class ifclass)
Get an object implementing an extension interface on this storage. |
String |
getInfo()
Get a description of this storage instance. |
String |
getName()
Get the name of this storage implementation. |
QueryFactory |
getQueryFactory()
Produce a QueryFactory for this storage implementation. |
Map |
getValueDistribution(String propertyName)
Find the distribution of values of the specified property. |
Map |
getValueDistribution(String propertyName,
Query query)
Find the distribution of values of the specified property over the set of documents matching the query. |
Map |
getValueMap(String propertyName)
Find the documents with the specified property organized by value of that property. |
Map |
getValueMap(String propertyName,
Query query)
Find the documents matching the query organized by value of the specified property as for the simple form of getValueMap(). |
String |
getVersion()
Get the version of this storage implementation. |
Document |
importDocument(DocumentType docType,
String repo,
Object repoParams)
Import an existing document from an external repository. |
Document |
importDocument(DocumentType docType,
String repo,
Object repoParams,
Schema schema,
Map props)
Import an existing document from an external repository with a particular schema enforced. |
void |
shutdown()
Cleanly terminate operation of this storage. |
void |
validateSchema(Schema schema)
Validate a schema, verifying that the supplied schema definition is consistent with the current stored data. |
| Field Detail |
public static final String InternalRepo
public static final String FilesystemRepo
public static final String WebRepo
| Method Detail |
public void validateSchema(Schema schema)
throws StorageException
schema - the schema definition to be validatedStorageException - if the supplied definition is incompatible with existing enforced definitions
public boolean documentExists(String id)
throws StorageException
id - document ID to test
public Document getDocument(String id)
throws StorageException
StorageException - if ID is invalid or document does not exist
public Document createDocument(DocumentType docType)
throws StorageException
docType - the kind of document to create
public Document createDocument(DocumentType docType,
Schema schema,
Map props)
throws StorageException
docType - the kind of document to createschema - a schema to be enforced upon creationprops - Map supplying property name,value pairs to satisfy the
requirements of the enforced schema, where name is a String.StorageException - if document would not conform to the schema with supplied property values
public Document importDocument(DocumentType docType,
String repo,
Object repoParams)
throws StorageException
docType - the kind of document to create or null to request that
the kind of Bantam document be determined by the implementation based on
the nature of the imported repository document.repo - identifier of the external repositoryrepoParams - repository-specific object identifying the document to
import and any options
public Document importDocument(DocumentType docType,
String repo,
Object repoParams,
Schema schema,
Map props)
throws StorageException
docType - the kind of document to create or null to request that
the kind of Bantam document be determined by the implementation based on
the nature of the imported repository document.repo - identifier of the external repositoryrepoParams - repository-specific object identifying the document to
import and any optionsprops - Map supplying property name,value pairs to satisfy the
requirements of the enforced schema.StorageException - if document would not conform to the schema.public QueryFactory getQueryFactory()
public DocumentList find(Query query)
throws StorageException
query - a query object produced by the QueryFactory for this storage.
public int countDocuments(Query q)
throws StorageException
query - a query object produced by the QueryFactory for this storage.
public Map getValueDistribution(String propertyName)
throws StorageException
propertyName - the property whose value distribution is requested
public Map getValueDistribution(String propertyName,
Query query)
throws StorageException
propertyName - the property whose value distribution is requestedquery - a query object produced by the QueryFactory for this storage.
public Map getValueMap(String propertyName)
throws StorageException
propertyName - the property whose value distribution is requested
public Map getValueMap(String propertyName,
Query query)
throws StorageException
propertyName - the property whose value distribution is requestedquery - a query object produced by the QueryFactory for this storage.public String getName()
public String getVersion()
public String getInfo()
public Object getExtension(Class ifclass)
ifclass - Java interfacepublic void shutdown()
|
Project Harland | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||