org.activemath.omdocjdom.slumb
Class SluMBaseXmlRpcServer

java.lang.Object
  extended by org.activemath.omdocjdom.slumb.SluMBaseXmlRpcServer
All Implemented Interfaces:
SlumbConstants

public class SluMBaseXmlRpcServer
extends Object
implements SlumbConstants

Server to be used for XML-RPC calls to SlumbIndex.


Nested Class Summary
static class SluMBaseXmlRpcServer.ErrorLister
           
 
Field Summary
protected static org.apache.commons.logging.Log log
           
 
Fields inherited from interface org.activemath.omdocjdom.slumb.SlumbConstants
COLL_NAMES_book_list, COLL_NAMES_collection_info, COLL_NAMES_collection_info_sole_text, COLL_NAMES_collection_metadata, COLL_NAMES_course_generation_menu, COLL_NAMES_reserved_names, FIELD_attributes, FIELD_colAndRelPath, FIELD_collection, FIELD_columnNumber, FIELD_commonname, FIELD_containedIds, FIELD_dcmetadata, FIELD_elt_absPath, FIELD_elt_relpath, FIELD_file_absPath, FIELD_file_relpath, FIELD_fileNameFromId, FIELD_fmp, FIELD_id, FIELD_importStrings, FIELD_lastModification, FIELD_lineNumber, FIELD_metadata, FIELD_name, FIELD_relSourceId, FIELD_relTargetId, FIELD_textualContent, FIELD_theoryId, FIELD_theoryName, FIELD_type, FIELD_xmlContent, FIELDVALUE_type_fileObject, FIELDVALUE_type_itemObject, FIELDVALUE_type_theoryObject, modifDateFormat
 
Constructor Summary
SluMBaseXmlRpcServer(SluMBaseRef mbaseRef)
          Constructs an object that offers MBase-access with the XML-RPC-friendly types (and without the parsing overhead of SluMBaseRef, useful with XmlrpcManager to be used with such methods as XmlrpcManager.addServerForPath(String,Object).
SluMBaseXmlRpcServer(SluMBaseRef mbaseRef, SlumbIndex index, int portNum)
          Starts a server with an XML-RPC server on the indicated port.
 
Method Summary
 String assertItsUp()
           
 String generateImports(String col, String fileName)
           
 String getAttribute(String id, String attributeName)
           
 String getCanonicalID(String id)
           
 String getChildren(String id, String xPathReducedExpression)
           
 Vector getCollectionsProvided()
           
 Hashtable getCommonName(String id)
           
 String getCompleteDCMetadata(String id)
           
 Vector getDefinitions(String id, Vector collections)
           
 Vector getDependencies(String id)
           
 String getFormalContent(String id)
           
 Vector getForWhat(String id)
           
 Vector getIncomingRelations(String id, Vector collections)
           
 Vector getItemsModifiedSince(Date date)
           
 Vector getItemsModifiedSince(String date)
           
 Date getLastModified(Vector ids)
           
 String getMetadata(String id)
           
 Hashtable getOMDocPath(String id)
           
 Vector getOutgoingRelations(String id)
           
 Vector getProofs(String assertionID, Vector collections)
           
 Vector getRelated(String id)
           
 Vector getRelated(String id, Vector collections)
           
 Vector getTextualContent(String id)
           
 String getTheory(String id)
           
 String getTypeString(String id)
           
 Vector listItems(String theoryId)
           
 Vector listItems(Vector collections)
           
 Vector listItems(Vector collections, String type)
           
 Vector listTheories(Vector collections)
           
 Hashtable previewMetadataInheritance(String fileContents, String filePath, String collName, int lineNumber)
           
 String reload()
           
 String reload(Collection collections)
           
 String reload(Vector collections)
           
 String reloadWithErrors()
           
 String reloadWithErrors(String collName)
           
 String reloadWithErrors(Vector collections)
           
 Vector searchIDs(String idSubstring)
           
 Vector searchIDs(String idSubstring, int max)
           
 Vector searchText(String textToSearch, Vector collections)
           
 void setXmlRpcServer(org.apache.xmlrpc.XmlRpcServer server)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Constructor Detail

SluMBaseXmlRpcServer

public SluMBaseXmlRpcServer(SluMBaseRef mbaseRef)
Constructs an object that offers MBase-access with the XML-RPC-friendly types (and without the parsing overhead of SluMBaseRef, useful with XmlrpcManager to be used with such methods as XmlrpcManager.addServerForPath(String,Object).

Parameters:
mbaseRef - the mbase-ref to be served.

SluMBaseXmlRpcServer

public SluMBaseXmlRpcServer(SluMBaseRef mbaseRef,
                            SlumbIndex index,
                            int portNum)
                     throws IOException
Starts a server with an XML-RPC server on the indicated port.

Parameters:
mbaseRef - the mbase to server
portNum - the port number where to listen for XML-RPC requests.
Throws:
IOException
Method Detail

setXmlRpcServer

public void setXmlRpcServer(org.apache.xmlrpc.XmlRpcServer server)

assertItsUp

public String assertItsUp()
                   throws MBaseException
Throws:
MBaseException

getOMDocPath

public Hashtable getOMDocPath(String id)
                       throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

searchIDs

public Vector searchIDs(String idSubstring)
                 throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

searchIDs

public Vector searchIDs(String idSubstring,
                        int max)
                 throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

reload

public String reload()
              throws Exception
Throws:
Exception

reload

public String reload(Vector collections)
              throws Exception
Throws:
Exception

reload

public String reload(Collection collections)
              throws Exception
Throws:
Exception

reloadWithErrors

public String reloadWithErrors()
                        throws Exception
Throws:
Exception

reloadWithErrors

public String reloadWithErrors(String collName)
                        throws Exception
Throws:
Exception

reloadWithErrors

public String reloadWithErrors(Vector collections)
                        throws Exception
Throws:
Exception

getDependencies

public Vector getDependencies(String id)
                       throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getRelated

public Vector getRelated(String id)
                  throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getRelated

public Vector getRelated(String id,
                         Vector collections)
                  throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getForWhat

public Vector getForWhat(String id)
                  throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getChildren

public String getChildren(String id,
                          String xPathReducedExpression)
                   throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getAttribute

public String getAttribute(String id,
                           String attributeName)
                    throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getDefinitions

public Vector getDefinitions(String id,
                             Vector collections)
                      throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getProofs

public Vector getProofs(String assertionID,
                        Vector collections)
                 throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getTextualContent

public Vector getTextualContent(String id)
                         throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getFormalContent

public String getFormalContent(String id)
                        throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getMetadata

public String getMetadata(String id)
                   throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getCompleteDCMetadata

public String getCompleteDCMetadata(String id)
                             throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getTheory

public String getTheory(String id)
                 throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getCanonicalID

public String getCanonicalID(String id)
                      throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getCommonName

public Hashtable getCommonName(String id)
                        throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getTypeString

public String getTypeString(String id)
                     throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

searchText

public Vector searchText(String textToSearch,
                         Vector collections)
                  throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

listItems

public Vector listItems(String theoryId)
                 throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

listTheories

public Vector listTheories(Vector collections)
                    throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

listItems

public Vector listItems(Vector collections,
                        String type)
                 throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

listItems

public Vector listItems(Vector collections)
                 throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getCollectionsProvided

public Vector getCollectionsProvided()
                              throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getLastModified

public Date getLastModified(Vector ids)
                     throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getItemsModifiedSince

public Vector getItemsModifiedSince(String date)
                             throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getItemsModifiedSince

public Vector getItemsModifiedSince(Date date)
                             throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

generateImports

public String generateImports(String col,
                              String fileName)
                       throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getIncomingRelations

public Vector getIncomingRelations(String id,
                                   Vector collections)
                            throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

getOutgoingRelations

public Vector getOutgoingRelations(String id)
                            throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException

previewMetadataInheritance

public Hashtable previewMetadataInheritance(String fileContents,
                                            String filePath,
                                            String collName,
                                            int lineNumber)
                                     throws org.apache.xmlrpc.XmlRpcException
Throws:
org.apache.xmlrpc.XmlRpcException