public class XMLClusterStorage extends ClusterStorage
allClusterTypes, COLLECTION, HISTORY, JOB, LIFECYCLE, NONE, OUTCOME, PATH, PROPERTY, READ, READWRITE, ROOT, VIEWPOINT, WRITE| Constructor and Description |
|---|
XMLClusterStorage() |
XMLClusterStorage(String root)
Create new XMLClusterStorage with specific setup, Used in predefined step
BulkImport |
XMLClusterStorage(String root,
String ext,
Boolean useDir)
Create new XMLClusterStorage with specific setup, Used in predefined step
BulkImport |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkQuerySupport(String language)
Checks whether the storage support the given type of query or not
|
void |
close()
Shuts down the storage.
|
void |
delete(ItemPath itemPath,
String path)
Remove a CRISTAL local object from storage.
|
String |
executeQuery(Query query)
Executes an SQL/OQL/XQuery/XPath/etc query in the target database.
|
C2KLocalObject |
get(ItemPath itemPath,
String path)
Fetches a CRISTAL local object from storage by path
|
String[] |
getClusterContents(ItemPath itemPath,
String path)
Queries the local path below of the item and returns the possible next elements.
|
protected String |
getFilePath(ItemPath itemPath,
String path) |
String |
getId() |
String |
getName() |
protected String |
getResourceName(String path) |
void |
open(Authenticator auth)
Connects to the storage.
|
void |
postBoostrap()
Informs the ClusterSorage that the Boostrap process has finished.
|
void |
postConnect()
Informs the ClusterSorage that connect was done.
|
void |
postStartServer()
Informs the ClusterSorage that the start server process has finished.
|
void |
put(ItemPath itemPath,
C2KLocalObject obj)
Stores a CRISTAL local object.
|
short |
queryClusterSupport(String clusterType)
Declares whether or not this ClusterStorage can read or write a
particular CRISTAL local object type.
|
getClusterContents, getClusters, getClusterType, getPath, queryClusterSupportpublic XMLClusterStorage()
public XMLClusterStorage(String root)
BulkImportroot - specify the root directorypublic XMLClusterStorage(String root, String ext, Boolean useDir)
BulkImportroot - specify the root directoryext - the extension of the files with dot, e.g. '.xml', used to save the cluster content.
If it is null the default '.xml' extension is used.useDir - specify if the files should be stored in directories or in single files, e.g. Property.Type,xml
If it is null the default is true.public void open(Authenticator auth) throws PersistencyException
ClusterStorageopen in class ClusterStorageauth - The Authenticator instance that the user or server logged in
with.PersistencyException - If storage initialization failedpublic void close()
ClusterStorageclose in class ClusterStoragepublic void postBoostrap()
ClusterStoragepostBoostrap in class ClusterStoragepublic void postStartServer()
ClusterStoragepostStartServer in class ClusterStoragepublic void postConnect()
ClusterStoragepostConnect in class ClusterStoragepublic short queryClusterSupport(String clusterType)
ClusterStoragequeryClusterSupport in class ClusterStorageclusterType - The Cluster type requested. Must be one of the Cluster type
constants from this class.public String getName()
getName in class ClusterStoragepublic String getId()
getId in class ClusterStoragepublic boolean checkQuerySupport(String language)
ClusterStoragecheckQuerySupport in class ClusterStoragelanguage - type of the query (e.g. SQL/XQuery/XPath/....)public String executeQuery(Query query) throws PersistencyException
ClusterStorageexecuteQuery in class ClusterStoragequery - the query to be executedPersistencyExceptionpublic C2KLocalObject get(ItemPath itemPath, String path) throws PersistencyException
ClusterStorageget in class ClusterStorageitemPath - The ItemPath of the containing Itempath - The path of the local objectPersistencyException - when retrieval failedpublic void put(ItemPath itemPath, C2KLocalObject obj) throws PersistencyException
ClusterStorageput in class ClusterStorageitemPath - The Item that the object will be stored underobj - The C2KLocalObject to storePersistencyException - When storage failspublic void delete(ItemPath itemPath, String path) throws PersistencyException
ClusterStoragedelete in class ClusterStorageitemPath - The containing Itempath - The path of the object to be removedPersistencyException - When deletion fails or is not allowedpublic String[] getClusterContents(ItemPath itemPath, String path) throws PersistencyException
ClusterStoragegetClusterContents in class ClusterStorageitemPath - The Item to querypath - The path within that Item to query. May be ClusterStorage.ROOT
(empty String)PersistencyException - When an error occurred during the queryCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.