org.activemath.omdocjdom.lucene
Class OmdocLuceneMBaseRef

java.lang.Object
  extended by org.activemath.omdocjdom.lucene.OmdocLuceneMBaseRef
All Implemented Interfaces:
AuthorExtendedMBaseRef, MBaseRef

public class OmdocLuceneMBaseRef
extends Object
implements AuthorExtendedMBaseRef

This class implements MBaseRef interface. It uses lucene database at back-end.

Version:

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.activemath.abstractcontent.MBaseRef
MBaseRef.Dependency, MBaseRef.Relation
 
Field Summary
 ReadWriteLock lock
           
 
Constructor Summary
OmdocLuceneMBaseRef(Subconfiguration config)
          Complete constructor from the properties which are properties to override makeDefaultProps().
 
Method Summary
 void assertItsUp()
          Asserts that the database connection is up and running.
 void create()
          Does the same as reload(List,String) except with no error-accumulator.
 String deleteTerm(String id)
           
 Collection generateImportIDs(String col, String fileName)
           
 String generateImports(String col, String fileName)
          This method makes omdoc documents compatible with the databse It resolve all references and add necessary imports statements
 AMIndex getAMIndex()
           
 String getAttribute(MBaseID id, String attName)
          Returns the attribute value of the attribute of given name of the element with given ID.
 MBaseID getCanonicalID(MBaseID givenID)
          Returns a fully-qualified unique ID that enables collections of IDs to behave properly.
 OJElement getChildren(MBaseID id, String xPathReducedExpression)
          Returns the content of the named descendant of the element of given ID.
 String getChildrenString(MBaseID id, String xPathReducedExpression)
          This method returns children as text.
 Collection getCollectionsProvided()
          returns a Collection (object) with the collections (content blocks) provided by this MBaseRef
 Map getCommonName(MBaseID id)
          Returns the names of this element which is fetched either from the <metadata><dc:Title> descendant or from the <commonname> elements.
 OJElement getCompleteDCMetadata(MBaseID id)
          Returns a metadata element with only Dublin-Core children including inherited ones from their parents.
 String getCompleteDCMetadataString(MBaseID id)
          This method returns dc metadata as string.
 Iterator getDefinitions(MBaseID id, Collection collections)
          For a symbol, this method returns the IDs of all definitions.
 Iterator getDependencies(MBaseID id)
          Gets an Iterator of MBaseRef.Dependency relations with all relations that stem from this element.
 org.apache.lucene.document.Document getDocument(MBaseID id)
           
 OJElement getFormalContent(MBaseID id)
          From any ID this method returns the content of the FMP element.
 String getFormalContentString(MBaseID id)
          This method returns FMP string
 MBaseID[] getForWhat(MBaseID id)
          Returns the ID contained in the attribute for
 Iterator getIncomingRelations(MBaseID id, Collection collections)
          For now just returns the single-typed relations.
 Collection getInversedDependency(MBaseID id, String wantedType, Collection col)
           
 Iterator getItemsModifiedSince(Date date)
           
 Date getLastModified(Collection ids)
          Returns the latest modification dates of the elements whose IDs are given.
 OJElement getMetadata(MBaseID id)
          Returns the contents of the <metdata> child of this element.
 String getMetadataString(MBaseID id)
          This method returns metadata as string.
 Hashtable getOMDocPath(MBaseID id)
           
 Iterator getOutgoingRelations(MBaseID id)
          For now just returns the single-typed relations.
 Iterator getProofs(MBaseID assertionID, Collection collections)
          For an assertion, this method returns the IDs of all of its proofs.
 Iterator getRelated(MBaseID id, Collection collections)
          Same as MBaseRef.getDependencies(org.activemath.abstractcontent.MBaseID) but returns the converse: all relations whose MBaseRef.Dependency.idOn is the element of given ID.
 OJDocument getStructuredListOfConcepts(Collection collections)
          This expensive operation walks the complete XML structure of one single collection stored in the server and creates a theory element for each theory then a concept element for each of the concepts (symbol, definition, assertion, proof, methods).
 Map getTagFreeCommonName(MBaseID id)
          Returns the titles without any tags, just extracting the text or partially rendering it.
 List getTextualContent(MBaseID id)
          From any ID this method returns the row of CMP elements' contents.
 String getTextualContentString(MBaseID id)
          This method return textual Contents as String.
 MBaseID getTheory(MBaseID id)
          Returns the ID of the closest parent (including the element itself) that either has a theory attribute or is a theory element or null if there is no such parent.
 String getTypeString(MBaseID id)
          Returns the name of the element whose ID is given.
 Iterator listItems(Collection collections, String type)
          Lists all the items being children of the element of the indicated ID.
 Iterator listItems(MBaseID id)
          Lists all the items being children of the element of the indicated ID.
 Iterator listTheories(Collection collections)
          Lists all the IDs of the theory elements contained in the indicated collections .
 Iterator listTheories(String collection)
           
 void reload()
          Does the same as reload(List,String) except with no error-accumulator.
 void reload(Collection collections)
          Works only with OmdocJdomMBaseRef and OmdocLuceneMBaseRef.
 void reload(List errorAccumulator, String fileName)
          Checks the modification dates of the files that were recorded, reloads the newer files, drops the too old files and rebuilds.
 void reload(String fileName)
          Does the same as reload(List,String) except with no error-accumulator.
 void reloadWithErrors(Collection collections, List errorAccumulator)
          Reloads the content from the directory (optional operation).
 Iterator searchIDs(String sub)
          Searches for an id by substring...
 Vector searchIDsVector(String idSubstring)
          Searches for an id by substring...
 Iterator searchText(String textToSearch, Collection collections)
          Searches the union of all text elements, but not the attributes, for the given substring in a case-sensistive manner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lock

public final ReadWriteLock lock
Constructor Detail

OmdocLuceneMBaseRef

public OmdocLuceneMBaseRef(Subconfiguration config)
                    throws Exception
Complete constructor from the properties which are properties to override makeDefaultProps().

Properties that can be set are the following (note that the ActiveMath manager uses the prefix LuceneMBase:

Throws:
Exception
Method Detail

getAMIndex

public AMIndex getAMIndex()

getDependencies

public Iterator getDependencies(MBaseID id)
                         throws MBaseException
Description copied from interface: MBaseRef
Gets an Iterator of MBaseRef.Dependency relations with all relations that stem from this element. Relations are considered the same as dependencies in this class. They are of many types as described in the MBaseRef.Dependency class. Use MBaseRef.getDependencies(org.activemath.abstractcontent.MBaseID) to read the list of relations that stem from another element but target this element.

Note that the server implementation is not required to return all these types only the content of the <depends-on> elements are required to be returned.

Specified by:
getDependencies in interface MBaseRef
Parameters:
id - which's dependencies are to be returned
Returns:
Iterator of MBaseIDs that are dependent
Throws:
MBaseException - if something's wrong, i.e. if a collection was queried that is not provided

getRelated

public Iterator getRelated(MBaseID id,
                           Collection collections)
                    throws MBaseException
Description copied from interface: MBaseRef
Same as MBaseRef.getDependencies(org.activemath.abstractcontent.MBaseID) but returns the converse: all relations whose MBaseRef.Dependency.idOn is the element of given ID.

Specified by:
getRelated in interface MBaseRef
Parameters:
id - which's relations are to be returned
collections - java.util.Collection of (content) collections as Strings to search in
Returns:
Iterator of MBaseIDs that are dependent
Throws:
MBaseException - if something's wrong.

getChildren

public OJElement getChildren(MBaseID id,
                             String xPathReducedExpression)
                      throws MBaseException
Description copied from interface: MBaseRef
Returns the content of the named descendant of the element of given ID. The descendant are found using the xPathReducedExpression parameter which aims at imitating an XPath expression except it only accepts the ., / and named elements.

This walks the tree of descendants, taking children everytime a /elementName is found in the xPathReducedExpression and returns the content of the end child.

Such a method might be a warmer future for all requests, including getDependencies, getMetaData and getCommonName.

Specified by:
getChildren in interface MBaseRef
Parameters:
id - the MBaseID to get the children of
xPathReducedExpression - as described above
Returns:
the OJElement thus crafted
Throws:
MBaseException - if something fails

getChildrenString

public String getChildrenString(MBaseID id,
                                String xPathReducedExpression)
                         throws MBaseException
This method returns children as text.

Parameters:
id - a MBaseID value
xPathReducedExpression - a String value
Returns:
a String value
Throws:
MBaseException - if an error occurs

getAttribute

public String getAttribute(MBaseID id,
                           String attName)
                    throws MBaseException
Description copied from interface: MBaseRef
Returns the attribute value of the attribute of given name of the element with given ID. throws MBaseException if something fails

Specified by:
getAttribute in interface MBaseRef
Parameters:
id - the id of the XML element that is to be looked for
attName - the name of the attribute to be looked for in this element
Returns:
the attribute value
Throws:
MBaseException - if anything goes wrong

getDefinitions

public Iterator getDefinitions(MBaseID id,
                               Collection collections)
                        throws MBaseException
Description copied from interface: MBaseRef
For a symbol, this method returns the IDs of all definitions.

Specified by:
getDefinitions in interface MBaseRef
Parameters:
id - id the id of the symbol whose definitions are looked at
collections - collections the name of the collections to be searched
Returns:
null for non-symbol elements or if no definition is found.
Throws:
MBaseException - if something's wrong.

getProofs

public Iterator getProofs(MBaseID assertionID,
                          Collection collections)
                   throws MBaseException
Description copied from interface: MBaseRef
For an assertion, this method returns the IDs of all of its proofs.

Specified by:
getProofs in interface MBaseRef
Parameters:
assertionID - MBaseID denoting the assertion whose proofs are to be searched
collections - Collection of (content) collections to search in
Returns:
an Iterator with the proofs, that is empty for non-assertion elements or if no proof is found.
Throws:
MBaseException - if something's wrong.

getTextualContent

public List getTextualContent(MBaseID id)
                       throws MBaseException
Description copied from interface: MBaseRef
From any ID this method returns the row of CMP elements' contents. The server is supposed to "resolve" the occurrences of <OMS> who are "referenced" by means of the xref attribute.

Specified by:
getTextualContent in interface MBaseRef
Parameters:
id - The ID of the item whose CMPs are to be returned
Returns:
A list of OJElements being the CMP nodes
Throws:
MBaseException - if something fails

getTextualContentString

public String getTextualContentString(MBaseID id)
                               throws MBaseException
This method return textual Contents as String.

Parameters:
id - a MBaseID value
Returns:
all cmps
Throws:
MBaseException - if an error occurs

getFormalContent

public OJElement getFormalContent(MBaseID id)
                           throws MBaseException
Description copied from interface: MBaseRef
From any ID this method returns the content of the FMP element. The server is supposed to "resolve" the occurrences of <OMS> who are "referenced" by means of the xref attribute.

Specified by:
getFormalContent in interface MBaseRef
Parameters:
id - The ID whose FMP child is to be fetched
Returns:
a the OJElement representing the <FMP> or null if there is no <FMP> content behind the ID
Throws:
MBaseException - if something fails

getFormalContentString

public String getFormalContentString(MBaseID id)
                              throws MBaseException
This method returns FMP string

Parameters:
id - a MBaseID value
Returns:
a String value
Throws:
MBaseException - if an error occurs

getMetadata

public OJElement getMetadata(MBaseID id)
                      throws MBaseException
Description copied from interface: MBaseRef
Returns the contents of the <metdata> child of this element. This does not apply the inheritance principles of Dublin-Core metadata (as described in OMDoc 1.1 specifications), please use MBaseRef.getCompleteDCMetadata(org.activemath.abstractcontent.MBaseID) for this task.

Specified by:
getMetadata in interface MBaseRef
Parameters:
id - The ID of the item whose metadata element is to be fetched.
Returns:
The metadata OJElement
Throws:
MBaseException - if something fails

getMetadataString

public String getMetadataString(MBaseID id)
                         throws MBaseException
This method returns metadata as string.

Parameters:
id - a MBaseID value
Returns:
a String value. It is string of metadata.
Throws:
MBaseException - if an error occurs

getCompleteDCMetadata

public OJElement getCompleteDCMetadata(MBaseID id)
                                throws MBaseException
Description copied from interface: MBaseRef
Returns a metadata element with only Dublin-Core children including inherited ones from their parents. The inheritance is described in OMDoc 1.1 specifications (i.e. added values with children taking precedence when a triple (language, element-name, role) also exists.

This allows most of the copyright informations to be stored in the metadata element of the OMDoc while additions can override or enrich these values.

Specified by:
getCompleteDCMetadata in interface MBaseRef
Parameters:
id - the ID of the item whose metadata is to be fetched
Returns:
the completed OJElement metadata node
Throws:
MBaseException - If anything happens

getCompleteDCMetadataString

public String getCompleteDCMetadataString(MBaseID id)
                                   throws MBaseException
This method returns dc metadata as string.

Parameters:
id - a MBaseID value
Returns:
a String value. dc metadata value.
Throws:
MBaseException - if an error occurs

getTheory

public MBaseID getTheory(MBaseID id)
                  throws MBaseException
Description copied from interface: MBaseRef
Returns the ID of the closest parent (including the element itself) that either has a theory attribute or is a theory element or null if there is no such parent.

Specified by:
getTheory in interface MBaseRef
Parameters:
id - The item whose theory is to be found
Returns:
The MBaseID of the related theory element
Throws:
MBaseException - if something's wrong.

getCommonName

public Map getCommonName(MBaseID id)
                  throws MBaseException
Description copied from interface: MBaseRef
Returns the names of this element which is fetched either from the <metadata><dc:Title> descendant or from the <commonname> elements.

The table returned has, as keys, the language and as values the text of this common-name.

Specified by:
getCommonName in interface MBaseRef
Parameters:
id - The ID of the item whose titles are to be looked at.
Returns:
A Map of titles (keys String language}, values the String titles
Throws:
MBaseException - if something's wrong.

getTypeString

public String getTypeString(MBaseID id)
                     throws MBaseException
Description copied from interface: MBaseRef
Returns the name of the element whose ID is given.

Specified by:
getTypeString in interface MBaseRef
Parameters:
id - The ID of the element
Returns:
The (XML) element-name of this node
Throws:
MBaseException - if something's wrong.

getForWhat

public MBaseID[] getForWhat(MBaseID id)
                     throws MBaseException
Description copied from interface: MBaseRef
Returns the ID contained in the attribute for

Specified by:
getForWhat in interface MBaseRef
Parameters:
id - The ID of the item whose for attribute is to be looked at.
Returns:
The list of pointers interpreted from the pointer values in the for attribute of the element
Throws:
MBaseException - if something's wrong.

listItems

public Iterator listItems(MBaseID id)
                   throws MBaseException
Description copied from interface: MBaseRef
Lists all the items being children of the element of the indicated ID. Implementations are required to support this operation on omgroup and theory elements only.

Specified by:
listItems in interface MBaseRef
Parameters:
id - the ID of the omgroup, theory or other element
Returns:
An iterator of MBaseID objects
Throws:
MBaseException - If anything goes wrong

listTheories

public Iterator listTheories(Collection collections)
                      throws MBaseException
Description copied from interface: MBaseRef
Lists all the IDs of the theory elements contained in the indicated collections .

Specified by:
listTheories in interface MBaseRef
Parameters:
collections - the set of collection-names to be walked through for theories.
Returns:
an iterator over the list of IDs that are children
Throws:
MBaseException - If anything goes wrong

listItems

public Iterator listItems(Collection collections,
                          String type)
                   throws MBaseException
Description copied from interface: MBaseRef
Lists all the items being children of the element of the indicated ID. Implementations are required to support this operation on omgroup and theory elements only.

Specified by:
listItems in interface MBaseRef
Parameters:
collections - the possible collections where to search for the items of this type
type - the element name wished to be returne
Returns:
An iterator of MBaseID objects to the given elements
Throws:
MBaseException - If anything goes wrong

listTheories

public Iterator listTheories(String collection)
                      throws MBaseException
Throws:
MBaseException

searchText

public Iterator searchText(String textToSearch,
                           Collection collections)
                    throws MBaseException
Description copied from interface: MBaseRef
Searches the union of all text elements, but not the attributes, for the given substring in a case-sensistive manner. This operation is expected to be rather expensive.

Specified by:
searchText in interface MBaseRef
Parameters:
textToSearch - String containing the text to be searched
collections - Collection of collections (as Strings) to search in
Returns:
an Iterator of MBaseIDs that contain the string
Throws:
MBaseException - if something's wrong.

getStructuredListOfConcepts

public OJDocument getStructuredListOfConcepts(Collection collections)
                                       throws MBaseException
Description copied from interface: MBaseRef
This expensive operation walks the complete XML structure of one single collection stored in the server and creates a theory element for each theory then a concept element for each of the concepts (symbol, definition, assertion, proof, methods).

Specified by:
getStructuredListOfConcepts in interface MBaseRef
Parameters:
collections - strings with the name of the collection to search in
Returns:
an XML document structured by theory/element, or null, if there are no contents found
Throws:
MBaseException - if something fails

assertItsUp

public void assertItsUp()
                 throws MBaseException
Description copied from interface: MBaseRef
Asserts that the database connection is up and running. This may include a self test, so use only in code for test purposes (such as in an appropriate checker) or in non-looped code (once at startup or something).

Specified by:
assertItsUp in interface MBaseRef
Throws:
MBaseException - if something's wrong.

getCollectionsProvided

public Collection getCollectionsProvided()
                                  throws MBaseException
Description copied from interface: MBaseRef
returns a Collection (object) with the collections (content blocks) provided by this MBaseRef

Specified by:
getCollectionsProvided in interface MBaseRef
Returns:
Collection of Strings with the names of the provided collections
Throws:
MBaseException - If anything goes wrong (normally nothing is expected to go wrong here)

getCanonicalID

public MBaseID getCanonicalID(MBaseID givenID)
                       throws MBaseException
Description copied from interface: MBaseRef
Returns a fully-qualified unique ID that enables collections of IDs to behave properly. MBase engines may allow heuristics to interpret IDs, among others, to identify an item with an ID not containing a theory although the item is in a theory.

MBase engines should be consistent and never return more than one ID for a given item.

Specified by:
getCanonicalID in interface MBaseRef
Parameters:
givenID - the id that may be missing a theory or collection.
Returns:
a fully-qualified absolute ID pointing to the same element, or null if no such element was found.
Throws:
MBaseException - If anything goes wrong

getInversedDependency

public Collection getInversedDependency(MBaseID id,
                                        String wantedType,
                                        Collection col)
                                 throws MBaseException
Throws:
MBaseException

create

public void create()
            throws org.jdom.JDOMException,
                   NoSuchIDException,
                   IOException,
                   MBaseException,
                   Exception
Does the same as reload(List,String) except with no error-accumulator.

Throws:
org.jdom.JDOMException
NoSuchIDException
IOException
MBaseException
Exception

reload

public void reload()
            throws org.jdom.JDOMException,
                   NoSuchIDException,
                   IOException,
                   MBaseException,
                   Exception
Does the same as reload(List,String) except with no error-accumulator.

Throws:
org.jdom.JDOMException
NoSuchIDException
IOException
MBaseException
Exception

reload

public void reload(String fileName)
            throws org.jdom.JDOMException,
                   NoSuchIDException,
                   IOException,
                   MBaseException,
                   Exception
Does the same as reload(List,String) except with no error-accumulator.

Throws:
org.jdom.JDOMException
NoSuchIDException
IOException
MBaseException
Exception

reload

public void reload(Collection collections)
            throws MBaseException
Description copied from interface: AuthorExtendedMBaseRef
Works only with OmdocJdomMBaseRef and OmdocLuceneMBaseRef.

Specified by:
reload in interface AuthorExtendedMBaseRef
Parameters:
collections - The set of collection-names (Strings) to be reloaded (might be ignored by some implementations)
Throws:
MBaseException

reloadWithErrors

public void reloadWithErrors(Collection collections,
                             List errorAccumulator)
                      throws MBaseException
Description copied from interface: AuthorExtendedMBaseRef
Reloads the content from the directory (optional operation).

Specified by:
reloadWithErrors in interface AuthorExtendedMBaseRef
Parameters:
collections - The set of collection-names (Strings) tobe reloaded
errorAccumulator - a place to accumulate errors reported by the reload process each entry should be a Hashtable with keys
  • "message" for the text of the exception
  • "exceptionClass"
  • "collection": the collection-name of the file where the error happened "itemId": the mbase-id of the item containing where the error happened "systemId": the absolute path to the error's file location
  • "relativePath": the path relative to the configured server root or collection root
  • "lineNumber": the line-number within the file of the error location
  • "columnNumber": the column-number within the file of the error location
Throws:
MBaseException

generateImports

public String generateImports(String col,
                              String fileName)
                       throws Exception
This method makes omdoc documents compatible with the databse It resolve all references and add necessary imports statements

Parameters:
col - a String value. The name of the collection.
fileName - It is a absoulte path of the omdoc fileName
Returns:
It returns a string of all imports statements
Throws:
Exception - Description of the Exception

generateImportIDs

public Collection generateImportIDs(String col,
                                    String fileName)
                             throws Exception
Throws:
Exception

reload

public void reload(List errorAccumulator,
                   String fileName)
            throws org.jdom.JDOMException,
                   NoSuchIDException,
                   IOException,
                   MBaseException,
                   Exception
Checks the modification dates of the files that were recorded, reloads the newer files, drops the too old files and rebuilds. If the rebuild throws an exception, restores the unloaded document and rebuilds. The builder throws an exception only when instructed to do so, on startup, otherwise reports errors as indicated, see MBaseErrorReporter.

Parameters:
errorAccumulator - A list where error records will be added-to. Can be null. (see MBaseErrorReporter.makeAsRecord(org.activemath.omdocjdom.MBaseBuildException)).
Throws:
org.jdom.JDOMException - Missing description of Exception
NoSuchIDException - Missing description of Exception
IOException - Missing description of Exception
MBaseException
Exception

searchIDsVector

public Vector searchIDsVector(String idSubstring)
                       throws IOException
Searches for an id by substring...

Parameters:
idSubstring - The substring to search (may be empty to get a compelte list)
Returns:
The list of IDs that match
Throws:
IOException

searchIDs

public Iterator searchIDs(String sub)
                   throws MBaseException
Description copied from interface: AuthorExtendedMBaseRef
Searches for an id by substring...

Specified by:
searchIDs in interface AuthorExtendedMBaseRef
Parameters:
sub - The substring to search (may be empty to get a complete but expectedly hige list)
Returns:
The list of IDs that match (as MBaseIDs)
Throws:
MBaseException

deleteTerm

public String deleteTerm(String id)
                  throws NoSuchIDException,
                         IOException
Throws:
NoSuchIDException
IOException

getDocument

public org.apache.lucene.document.Document getDocument(MBaseID id)
                                                throws MBaseException
Throws:
MBaseException

getOMDocPath

public Hashtable getOMDocPath(MBaseID id)
                       throws MBaseException
Specified by:
getOMDocPath in interface AuthorExtendedMBaseRef
Parameters:
id - The ID to be found
Returns:
A table with keys
  • path, the path relative to the basePath.
  • lineNumber the line-number in the file
  • columnNumber the column-number in the file
  • absolutePath the absolute path to the file (optional)
  • Throws:
    MBaseItemNotFoundException - if the ID is not found
    MBaseException - If anything happens,

    getLastModified

    public Date getLastModified(Collection ids)
                         throws MBaseException
    Description copied from interface: MBaseRef
    Returns the latest modification dates of the elements whose IDs are given.

    Specified by:
    getLastModified in interface MBaseRef
    Parameters:
    ids - a list of MBaseIDs of items, theories, or Strings of collection name
    Returns:
    the latest modification date or, if unknown, the current date.
    Throws:
    MBaseException

    getItemsModifiedSince

    public Iterator getItemsModifiedSince(Date date)
                                   throws MBaseException
    Specified by:
    getItemsModifiedSince in interface MBaseRef
    Throws:
    MBaseException

    getTagFreeCommonName

    public Map getTagFreeCommonName(MBaseID id)
                             throws MBaseException
    Description copied from interface: MBaseRef
    Returns the titles without any tags, just extracting the text or partially rendering it. Useful for string-only processors.

    Specified by:
    getTagFreeCommonName in interface MBaseRef
    Parameters:
    id - the item id.
    Returns:
    the map, associating a language string to a title-string.
    Throws:
    MBaseException

    getIncomingRelations

    public Iterator getIncomingRelations(MBaseID id,
                                         Collection collections)
                                  throws MBaseException
    For now just returns the single-typed relations.

    Specified by:
    getIncomingRelations in interface MBaseRef
    Parameters:
    id - the id from which to see the relations
    collections - from where should these relations be incoming
    Returns:
    an iterator of MBaseRef.Relations objects
    Throws:
    MBaseException - if anything

    getOutgoingRelations

    public Iterator getOutgoingRelations(MBaseID id)
                                  throws MBaseException
    For now just returns the single-typed relations.

    Specified by:
    getOutgoingRelations in interface MBaseRef
    Parameters:
    id - the id from which to see the relations
    Returns:
    an iterator of MBaseRef.Relations objects
    Throws:
    MBaseException - if anything