|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.omdocjdom.OJContentCollectionUtil
public class OJContentCollectionUtil
Simple methods to easily find properties of an enclosing
collections as determined by a heuristics.
The heuristics simply relies on the file being part of
a directory an ancestor of which can contain a file
with pattern ContentDescr_*.properties.
| Constructor Summary | |
|---|---|
OJContentCollectionUtil()
|
|
| Method Summary | |
|---|---|
static void |
cleanUpOMDocDoc(File file)
Deprecated. Please refer to OQMathBuffer |
static void |
cleanUpOMDocElt(OJElement elt)
|
static File |
findNotationsFile(File oqmathOrOMdocFile)
|
static Properties |
getCollectionDescriptorOfDocument(File docFile)
|
static File |
getCollectionDirOfDocument(File docFile)
Searches for a directory above docFile which contains a Content-descriptor. |
static String |
getCollectionIdOfDocument(File docFile)
Finds the collection-description and extracts from it a property OmdocJdomMBase.collections.*.publicIdentifier. |
static File |
getDtdFileOfDocument(File docFile)
|
static com.wutka.dtd.DTD |
getDtdOfDocument(File docFile)
|
static List |
getExtasyEnabledCollections(Subconfiguration extasySubconfig)
Finds the name of the loaded collections which are enabled for exercise authoring. |
static File |
getExtasyPictPath(String collectionName,
Subconfiguration extasySubconfig)
Finds the directory where the collection offers space to save picture files to. |
static File |
getExtasySavePath(String collectionName,
Subconfiguration extasySubconfig)
Finds the directory where the collection offers space to save OMDoc files to. |
static void |
main(String[] args)
Invoke with a single parameter... the name of the omdoc file. |
static boolean |
mayAuthorEditCollection(String authorUserId,
String collectionName,
Subconfiguration extasySubconfig)
checks whether the named author is allowed to author into this collection (if there is no author configuration, all authors are allowed to write). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OJContentCollectionUtil()
| Method Detail |
|---|
public static String getCollectionIdOfDocument(File docFile)
OmdocJdomMBase.collections.*.publicIdentifier.
Returns if if found (and alone).
docFile -
public static Properties getCollectionDescriptorOfDocument(File docFile)
public static com.wutka.dtd.DTD getDtdOfDocument(File docFile)
public static File getDtdFileOfDocument(File docFile)
public static File getCollectionDirOfDocument(File docFile)
docFile -
public static List getExtasyEnabledCollections(Subconfiguration extasySubconfig)
extasySubconfig: - the extasy sub-configuration as can be
obtained with new ManagerSubconfiguration("exercises.author-content");
public static File getExtasySavePath(String collectionName,
Subconfiguration extasySubconfig)
extasySubconfig: - the extasy sub-configuration as can be
obtained with new ManagerSubconfiguration("exercises.author-content");collectionName: - the content collection string-identifier
public static File getExtasyPictPath(String collectionName,
Subconfiguration extasySubconfig)
extasySubconfig: - the extasy sub-configuration as can be
obtained with new ManagerSubconfiguration("exercises.author-content");collectionName: - the content collection string-identifier
public static boolean mayAuthorEditCollection(String authorUserId,
String collectionName,
Subconfiguration extasySubconfig)
authorUserId: - the extasy sub-configuration as can be
obtained with new ManagerSubconfiguration("exercises.author-content");collectionName: - the content collection string-identifier
public static void cleanUpOMDocElt(OJElement elt)
public static void cleanUpOMDocDoc(File file)
throws Exception
Exceptionpublic static File findNotationsFile(File oqmathOrOMdocFile)
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||