org.apache.oodt.cas.filemgr.system
Class XmlRpcFileManagerClient
java.lang.Object
org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient
public class XmlRpcFileManagerClient
- extends Object
- Version:
- $Revision: 9683 $
The XML RPC based file manager client.
- Author:
- mattmann, bfoster
Method Summary |
void |
addMetadata(Product product,
org.apache.oodt.cas.metadata.Metadata metadata)
|
void |
addProductReferences(Product product)
|
String |
addProductType(ProductType type)
|
String |
catalogProduct(Product product)
|
List<QueryResult> |
complexQuery(ComplexQuery complexQuery)
|
Query |
getCatalogQuery(Query query,
ProductType productType)
|
org.apache.oodt.cas.metadata.Metadata |
getCatalogValues(org.apache.oodt.cas.metadata.Metadata metadata,
ProductType productType)
|
FileTransferStatus |
getCurrentFileTransfer()
|
List<FileTransferStatus> |
getCurrentFileTransfers()
|
DataTransfer |
getDataTransfer()
|
Element |
getElementById(String elementId)
|
Element |
getElementByName(String elementName)
|
Element |
getElementByName(String elementName,
ProductType type)
|
List<Element> |
getElementsByProductType(ProductType type)
|
URL |
getFileManagerUrl()
|
ProductPage |
getFirstPage(ProductType type)
|
ProductPage |
getLastPage(ProductType type)
|
org.apache.oodt.cas.metadata.Metadata |
getMetadata(Product product)
|
ProductPage |
getNextPage(ProductType type,
ProductPage currPage)
|
int |
getNumProducts(ProductType type)
|
org.apache.oodt.cas.metadata.Metadata |
getOrigValues(org.apache.oodt.cas.metadata.Metadata metadata,
ProductType productType)
|
ProductPage |
getPrevPage(ProductType type,
ProductPage currPage)
|
Product |
getProductById(String productId)
|
Product |
getProductByName(String productName)
|
double |
getProductPctTransferred(Product product)
|
List<Reference> |
getProductReferences(Product product)
|
List<Product> |
getProductsByProductType(ProductType type)
|
ProductType |
getProductTypeById(String productTypeId)
|
ProductType |
getProductTypeByName(String productTypeName)
|
List<ProductType> |
getProductTypes()
|
org.apache.oodt.cas.metadata.Metadata |
getReducedMetadata(Product product,
List elements)
|
double |
getRefPctTransferred(Reference reference)
|
List<Product> |
getTopNProducts(int n)
|
List<Product> |
getTopNProducts(int n,
ProductType type)
|
boolean |
hasProduct(String productName)
|
String |
ingestProduct(Product product,
org.apache.oodt.cas.metadata.Metadata metadata,
boolean clientTransfer)
|
boolean |
isAlive()
|
boolean |
isTransferComplete(Product product)
|
static void |
main(String[] args)
|
boolean |
modifyProduct(Product product)
|
boolean |
moveProduct(Product product,
String newPath)
|
ProductPage |
pagedQuery(Query query,
ProductType type,
int pageNum)
|
List<Product> |
query(Query query,
ProductType type)
|
boolean |
refreshConfigAndPolicy()
|
boolean |
removeFile(String filePath)
|
boolean |
removeProduct(Product product)
|
boolean |
removeProductTransferStatus(Product product)
|
void |
setDataTransfer(DataTransfer dataTransfer)
|
void |
setFileManagerUrl(URL fileManagerUrl)
|
void |
setProductTransferStatus(Product product)
|
void |
transferFile(String filePath,
byte[] fileData,
int offset,
int numBytes)
|
boolean |
transferringProduct(Product product)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XmlRpcFileManagerClient
public XmlRpcFileManagerClient(URL url)
throws ConnectionException
Constructs a new XmlRpcFileManagerClient with the given url
.
- Parameters:
url
- The url pointer to the xml rpc file manager service.
- Throws:
ConnectionException
refreshConfigAndPolicy
public boolean refreshConfigAndPolicy()
isAlive
public boolean isAlive()
transferringProduct
public boolean transferringProduct(Product product)
throws DataTransferException
- Throws:
DataTransferException
removeProductTransferStatus
public boolean removeProductTransferStatus(Product product)
throws DataTransferException
- Throws:
DataTransferException
isTransferComplete
public boolean isTransferComplete(Product product)
throws DataTransferException
- Throws:
DataTransferException
moveProduct
public boolean moveProduct(Product product,
String newPath)
throws DataTransferException
- Throws:
DataTransferException
modifyProduct
public boolean modifyProduct(Product product)
throws CatalogException
- Throws:
CatalogException
removeProduct
public boolean removeProduct(Product product)
throws CatalogException
- Throws:
CatalogException
getCurrentFileTransfer
public FileTransferStatus getCurrentFileTransfer()
throws DataTransferException
- Throws:
DataTransferException
getCurrentFileTransfers
public List<FileTransferStatus> getCurrentFileTransfers()
throws DataTransferException
- Throws:
DataTransferException
getProductPctTransferred
public double getProductPctTransferred(Product product)
throws DataTransferException
- Throws:
DataTransferException
getRefPctTransferred
public double getRefPctTransferred(Reference reference)
throws DataTransferException
- Throws:
DataTransferException
pagedQuery
public ProductPage pagedQuery(Query query,
ProductType type,
int pageNum)
throws CatalogException
- Throws:
CatalogException
getFirstPage
public ProductPage getFirstPage(ProductType type)
throws CatalogException
- Throws:
CatalogException
getLastPage
public ProductPage getLastPage(ProductType type)
throws CatalogException
- Throws:
CatalogException
getNextPage
public ProductPage getNextPage(ProductType type,
ProductPage currPage)
throws CatalogException
- Throws:
CatalogException
getPrevPage
public ProductPage getPrevPage(ProductType type,
ProductPage currPage)
throws CatalogException
- Throws:
CatalogException
addProductType
public String addProductType(ProductType type)
throws RepositoryManagerException
- Throws:
RepositoryManagerException
hasProduct
public boolean hasProduct(String productName)
throws CatalogException
- Throws:
CatalogException
getNumProducts
public int getNumProducts(ProductType type)
throws CatalogException
- Throws:
CatalogException
getTopNProducts
public List<Product> getTopNProducts(int n)
throws CatalogException
- Throws:
CatalogException
getTopNProducts
public List<Product> getTopNProducts(int n,
ProductType type)
throws CatalogException
- Throws:
CatalogException
setProductTransferStatus
public void setProductTransferStatus(Product product)
throws CatalogException
- Throws:
CatalogException
addProductReferences
public void addProductReferences(Product product)
throws CatalogException
- Throws:
CatalogException
addMetadata
public void addMetadata(Product product,
org.apache.oodt.cas.metadata.Metadata metadata)
throws CatalogException
- Throws:
CatalogException
catalogProduct
public String catalogProduct(Product product)
throws CatalogException
- Throws:
CatalogException
getMetadata
public org.apache.oodt.cas.metadata.Metadata getMetadata(Product product)
throws CatalogException
- Throws:
CatalogException
getReducedMetadata
public org.apache.oodt.cas.metadata.Metadata getReducedMetadata(Product product,
List elements)
throws CatalogException
- Throws:
CatalogException
removeFile
public boolean removeFile(String filePath)
throws DataTransferException
- Throws:
DataTransferException
transferFile
public void transferFile(String filePath,
byte[] fileData,
int offset,
int numBytes)
throws DataTransferException
- Throws:
DataTransferException
getProductsByProductType
public List<Product> getProductsByProductType(ProductType type)
throws CatalogException
- Throws:
CatalogException
getElementsByProductType
public List<Element> getElementsByProductType(ProductType type)
throws ValidationLayerException
- Throws:
ValidationLayerException
getElementById
public Element getElementById(String elementId)
throws ValidationLayerException
- Throws:
ValidationLayerException
getElementByName
public Element getElementByName(String elementName)
throws ValidationLayerException
- Throws:
ValidationLayerException
getElementByName
public Element getElementByName(String elementName,
ProductType type)
throws ValidationLayerException
- Throws:
ValidationLayerException
complexQuery
public List<QueryResult> complexQuery(ComplexQuery complexQuery)
throws CatalogException
- Throws:
CatalogException
query
public List<Product> query(Query query,
ProductType type)
throws CatalogException
- Throws:
CatalogException
getProductTypeByName
public ProductType getProductTypeByName(String productTypeName)
throws RepositoryManagerException
- Throws:
RepositoryManagerException
getProductTypeById
public ProductType getProductTypeById(String productTypeId)
throws RepositoryManagerException
- Throws:
RepositoryManagerException
getProductTypes
public List<ProductType> getProductTypes()
throws RepositoryManagerException
- Throws:
RepositoryManagerException
getProductReferences
public List<Reference> getProductReferences(Product product)
throws CatalogException
- Throws:
CatalogException
getProductById
public Product getProductById(String productId)
throws CatalogException
- Throws:
CatalogException
getProductByName
public Product getProductByName(String productName)
throws CatalogException
- Throws:
CatalogException
ingestProduct
public String ingestProduct(Product product,
org.apache.oodt.cas.metadata.Metadata metadata,
boolean clientTransfer)
throws Exception
- Throws:
Exception
getCatalogValues
public org.apache.oodt.cas.metadata.Metadata getCatalogValues(org.apache.oodt.cas.metadata.Metadata metadata,
ProductType productType)
throws org.apache.xmlrpc.XmlRpcException,
IOException
- Throws:
org.apache.xmlrpc.XmlRpcException
IOException
getOrigValues
public org.apache.oodt.cas.metadata.Metadata getOrigValues(org.apache.oodt.cas.metadata.Metadata metadata,
ProductType productType)
throws org.apache.xmlrpc.XmlRpcException,
IOException
- Throws:
org.apache.xmlrpc.XmlRpcException
IOException
getCatalogQuery
public Query getCatalogQuery(Query query,
ProductType productType)
throws org.apache.xmlrpc.XmlRpcException,
IOException
- Throws:
org.apache.xmlrpc.XmlRpcException
IOException
main
public static void main(String[] args)
throws MalformedURLException,
CatalogException,
RepositoryManagerException,
URISyntaxException
- Throws:
MalformedURLException
CatalogException
RepositoryManagerException
URISyntaxException
getFileManagerUrl
public URL getFileManagerUrl()
- Returns:
- Returns the fileManagerUrl.
setFileManagerUrl
public void setFileManagerUrl(URL fileManagerUrl)
- Parameters:
fileManagerUrl
- The fileManagerUrl to set.
getDataTransfer
public DataTransfer getDataTransfer()
- Returns:
- Returns the dataTransfer.
setDataTransfer
public void setDataTransfer(DataTransfer dataTransfer)
- Parameters:
dataTransfer
- The dataTransfer to set.
Copyright © 1999-2011 Apache OODT. All Rights Reserved.