org.activemath.omdocjdom.slumb.data
Class Theory
java.lang.Object
org.activemath.omdocjdom.slumb.data.Theory
- All Implemented Interfaces:
- SlumbConstants
public class Theory
- extends Object
- implements SlumbConstants
Denotes a theory element inside a file.
| 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 |
Theory(org.apache.lucene.document.Document doc)
A somewhat greedy loader... |
Theory(ID id,
File sourceFile)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Theory
public Theory(ID id,
File sourceFile)
Theory
public Theory(org.apache.lucene.document.Document doc)
- A somewhat greedy loader...
getSourceFile
public File getSourceFile()
asLuceneDocument
public org.apache.lucene.document.Document asLuceneDocument(SlumbIndex index)
getId
public IID getId()
isNew
public boolean isNew()
getContainedIds
public Collection getContainedIds()
clearContainedIds
public void clearContainedIds(String path)
addImports
public void addImports(ID importTarget,
boolean global)
addImports
public void addImports(Attributes atts)
addContainedId
public boolean addContainedId(String idName,
String fileName)
- Returns:
- true if the id was there already
listContainedIds
public Iterator listContainedIds()
containsId
public boolean containsId(ID id)
absolutizeId
public ID absolutizeId(ID id,
TheoryCollection colls,
Set theoriesVisited)
resolveId
public ID resolveId(ID baseId,
String relativePath,
TheoryCollection colls)
- Uses the imports elements to compute the absolute ID.
- Parameters:
baseId - the id of the element that we take a referene fromrelativePath - the relative expressioncolls - a coll of theories which can provide maps of other theories
- Returns:
- either null if not found or the expanded ID