|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdom.Content
org.jdom.Element
org.activemath.omdocjdom.OJElement
org.activemath.omdocjdom.map.JDM
public class JDM
RAM-based implementation of OJMap which bases on JDOM
objects.
| Field Summary | |
|---|---|
static DateFormat |
dateFormat
|
static NumberFormat |
fixedFormat
|
static org.jdom.Namespace |
JDMNamespace
|
static NumberFormat |
longFormat
|
| Fields inherited from class org.activemath.omdocjdom.OJElement |
|---|
DEBUG, id, info, log |
| Fields inherited from class org.jdom.Element |
|---|
additionalNamespaces, name, namespace |
| Fields inherited from class org.jdom.Content |
|---|
parent |
| Constructor Summary | |
|---|---|
JDM(File baseDir,
String collectionId)
Constructs the map anew. |
|
| Method Summary | |
|---|---|
int |
computeHash()
Computes the sum of the hashes. |
OJElement |
constructSpecialEltSubclass(String name,
org.jdom.Namespace namespace)
|
boolean |
doesIdExist(ID id)
|
File |
getBaseDir()
|
String |
getCollectionId()
|
Date |
getLastModified(ID id)
|
Date |
getLastUpdate()
|
String |
getType(ID id)
|
Iterator |
listCollectionContent(String collection,
String type)
|
Iterator |
listTheories(String collection)
|
Iterator |
listTheoryContent(ID theoryId)
|
static JDM |
loadFromFile(File baseDir,
String collectionId,
URL sourceLocation)
Constructs the map from existing data, one would still run refresh and clean after this. . |
static void |
main(String[] args)
Invoke with mapFile and a few path-to-directories... |
void |
refresh()
Lists the contained files, parses the ones needed, refills its state. |
void |
setBaseDir(File baseDir)
|
void |
setCollectionId(String collectionId)
|
void |
setDirectories(List directories)
Writes down the directories to be followed (relative to the base-directory) Marks the ones to forget and the ones to relist. |
void |
writeFile(File file)
|
| Methods inherited from class org.jdom.Element |
|---|
addContent, addContent, addContent, addContent, addContent, addNamespaceDeclaration, clone, cloneContent, getAdditionalNamespaces, getAttribute, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getAttributeValue, getChild, getChild, getChildren, getChildren, getChildren, getChildText, getChildText, getChildTextNormalize, getChildTextNormalize, getChildTextTrim, getChildTextTrim, getContent, getContent, getContent, getContentSize, getDescendants, getDescendants, getName, getNamespace, getNamespace, getNamespacePrefix, getNamespaceURI, getQualifiedName, getText, getTextNormalize, getTextTrim, getValue, indexOf, isAncestor, isRootElement, removeAttribute, removeAttribute, removeAttribute, removeChild, removeChild, removeChildren, removeChildren, removeContent, removeContent, removeContent, removeContent, removeNamespaceDeclaration, setAttribute, setAttribute, setAttribute, setAttributes, setAttributes, setContent, setContent, setContent, setContent, setName, setText |
| Methods inherited from class org.jdom.Content |
|---|
detach, equals, getDocument, getParent, getParentElement, hashCode, setParent |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.activemath.omdocjdom.OJNode |
|---|
getDocument, getParent |
| Methods inherited from interface org.jdom.Parent |
|---|
getDocument, getParent |
| Field Detail |
|---|
public static final org.jdom.Namespace JDMNamespace
public static DateFormat dateFormat
public static NumberFormat longFormat
public static NumberFormat fixedFormat
| Constructor Detail |
|---|
public JDM(File baseDir,
String collectionId)
setDirectories(java.util.List) and refresh().
| Method Detail |
|---|
public boolean doesIdExist(ID id)
doesIdExist in interface OJMappublic String getType(ID id)
getType in interface OJMappublic Date getLastModified(ID id)
getLastModified in interface OJMappublic Date getLastUpdate()
getLastUpdate in interface OJMap
public Iterator listCollectionContent(String collection,
String type)
listCollectionContent in interface OJMappublic Iterator listTheoryContent(ID theoryId)
listTheoryContent in interface OJMappublic Iterator listTheories(String collection)
listTheories in interface OJMappublic File getBaseDir()
public void setBaseDir(File baseDir)
public String getCollectionId()
public void setCollectionId(String collectionId)
public void writeFile(File file)
throws IOException
IOException
public static JDM loadFromFile(File baseDir,
String collectionId,
URL sourceLocation)
throws IOException,
org.jdom.JDOMException
IOException
org.jdom.JDOMException
public OJElement constructSpecialEltSubclass(String name,
org.jdom.Namespace namespace)
public void setDirectories(List directories)
public void refresh()
throws IOException,
SAXException,
org.jdom.JDOMException
IOException
SAXException
org.jdom.JDOMException
public static void main(String[] args)
throws Exception
Exceptionpublic int computeHash()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||