public class MetaData
extends java.lang.Object
implements java.lang.Iterable<java.lang.String>
Constructor and Description |
---|
MetaData()
The MetaData object can be constructed with no data in it.
|
MetaData(java.util.HashMap<java.lang.String,java.lang.String> inData,
BibtexDatabase db)
The MetaData object stores all meta data sets in Vectors.
|
Modifier and Type | Method and Description |
---|---|
java.util.Vector<java.lang.String> |
getData(java.lang.String key)
Retrieves the stored meta data.
|
DBStrings |
getDBStrings() |
java.io.File |
getFile() |
java.lang.String[] |
getFileDirectory(java.lang.String fieldName)
Look up the directory set up for the given field type for this database.
|
GroupTreeNode |
getGroups() |
LabelPattern |
getLabelPattern() |
void |
initializeNewDatabase()
Add default metadata for new database:
|
boolean |
isGroupTreeValid() |
java.util.Iterator<java.lang.String> |
iterator() |
void |
putData(java.lang.String key,
java.util.Vector<java.lang.String> orderedData)
Stores the specified data in this object, using the specified key.
|
void |
remove(java.lang.String key)
Removes the given key from metadata.
|
void |
setDBStrings(DBStrings dbStrings) |
void |
setFile(java.io.File file) |
void |
setGroups(GroupTreeNode root)
Sets a new group root node.
|
void |
setLabelPattern(LabelPattern labelPattern)
Updates the stored key patterns to the given key patterns.
|
void |
writeMetaData(java.io.Writer out)
Writes all data to the specified writer, using each object's toString()
method.
|
public MetaData(java.util.HashMap<java.lang.String,java.lang.String> inData, BibtexDatabase db)
public MetaData()
public void initializeNewDatabase()
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
public java.util.Vector<java.lang.String> getData(java.lang.String key)
key
- the key to look uppublic void remove(java.lang.String key)
key
- the key to removepublic void putData(java.lang.String key, java.util.Vector<java.lang.String> orderedData)
public java.lang.String[] getFileDirectory(java.lang.String fieldName)
fieldName
- The field typepublic GroupTreeNode getGroups()
public void setGroups(GroupTreeNode root)
public void writeMetaData(java.io.Writer out) throws java.io.IOException
java.io.IOException
public java.io.File getFile()
public void setFile(java.io.File file)
public DBStrings getDBStrings()
public void setDBStrings(DBStrings dbStrings)
public boolean isGroupTreeValid()
public LabelPattern getLabelPattern()
public void setLabelPattern(LabelPattern labelPattern)
labelPattern
- the key patterns to update to.