|
COSMOS ${releaseVersion} resource-modeling Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ISMLRepository
Represents a repository that can be used to connect to and fetch stored documents from. This interface provides an abstraction from the type of repository used and the query method used to retrieve stored documents.
| Method Summary | |
|---|---|
void |
addDocument(ISMLMetadata metadata,
java.io.InputStream input)
Add a document to this repository. |
void |
connect(java.util.Map attributes)
A connection will first need to be established before a repository can be used |
void |
disconnect()
Disconnects this repository |
ISMLDocument[] |
fetchDocuments(ISMLMetadata metadata)
Returns the set of documents that match the meta-data that is passed in. |
ISMLDocument[] |
getActiveDocuments()
Returns the set of active documents of this repository |
ISMLOperation |
getOperation(java.lang.String id)
Returns the operation matching the operation id passed in. |
boolean |
getProperty(java.lang.String name,
boolean defaultValue)
Retrieve the property of type boolean with the name passed in. |
int |
getProperty(java.lang.String name,
int defaultValue)
Retrieve the property of type int with the name passed in. |
java.lang.Object |
getProperty(java.lang.String name,
java.lang.Object defaultValue)
Retrieve the property of type Object with the name passed
in. |
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Retrieve the property of type String with the name passed
in. |
java.lang.String[] |
getSupportedOperations()
Returns the ID of the supported operations of this repository. |
boolean |
isConnection()
Returns a boolean indicating the connection status of the repository. |
void |
removeDocuments(ISMLMetadata metadata)
Remove the SML document with the meta-data that is passed in. |
ISMLDocument[] |
retrieveRootDocuments()
Retrieves the SML documents representing the root context of a model. |
void |
setActiveDocuments(ISMLDocument[] documents)
Sets the set of active documents of this repository |
void |
setProperty(java.lang.String name,
boolean value)
Sets the property of type boolean with the name and value passed in |
void |
setProperty(java.lang.String name,
int value)
Sets the property of type int with the name and value passed in |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Sets the property of type Object with the name and
value passed in |
void |
setProperty(java.lang.String name,
java.lang.String value)
Sets the property of type String with the name and
value passed in |
| Method Detail |
|---|
void connect(java.util.Map attributes)
throws RepositoryConnectionException
attributes - The attributes required as part of the connection. This
is specific to an implementation.
RepositoryConnectionException - If a connection cannot be establishedboolean isConnection()
java.lang.Object getProperty(java.lang.String name,
java.lang.Object defaultValue)
Object with the name passed
in. The default value is returned if no such property is found
name - The name of the propertydefaultValue - The default value
void setProperty(java.lang.String name,
java.lang.Object value)
Object with the name and
value passed in
name - The name of the propertyvalue - The value of the property
java.lang.String getProperty(java.lang.String name,
java.lang.String defaultValue)
String with the name passed
in. The default value is returned if no such property is found
name - The name of the propertydefaultValue - The default value
void setProperty(java.lang.String name,
java.lang.String value)
String with the name and
value passed in
name - The name of the propertyvalue - The value of the property
boolean getProperty(java.lang.String name,
boolean defaultValue)
name - The name of the propertydefaultValue - The default value
void setProperty(java.lang.String name,
boolean value)
name - The name of the propertyvalue - The value of the property
int getProperty(java.lang.String name,
int defaultValue)
name - The name of the propertydefaultValue - The default value
void setProperty(java.lang.String name,
int value)
name - The name of the propertyvalue - The value of the property
ISMLDocument[] retrieveRootDocuments()
throws RepositoryOperationException
RepositoryOperationException - If the operation fails
void addDocument(ISMLMetadata metadata,
java.io.InputStream input)
throws RepositoryOperationException
metadata - The meta-data of the document. The only relevant fields that
should be read from the meta-data is the id, alias(es), and bound rule(s). Other
fields can potentially be used by implementers.input - The input stream that contains the document
RepositoryOperationException - If the operation fails
void removeDocuments(ISMLMetadata metadata)
throws RepositoryOperationException
metadata - The meta-data matching the stored documents that will be removed
RepositoryOperationException - If the operation failsjava.lang.String[] getSupportedOperations()
ISMLOperation getOperation(java.lang.String id)
id - The operation id
ISMLDocument[] fetchDocuments(ISMLMetadata metadata)
throws RepositoryOperationException
metadata - The meta-data used to perform the query
RepositoryOperationException - If the operation failsISMLDocument[] getActiveDocuments()
void setActiveDocuments(ISMLDocument[] documents)
documents - The active documents of this repositoryvoid disconnect()
|
COSMOS ${releaseVersion} resource-modeling Project Public API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||