public abstract class EntryFromFileCreator
extends java.lang.Object
implements java.io.FileFilter
Constructor and Description |
---|
EntryFromFileCreator(ExternalFileType externalFileType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
accept(java.io.File f)
To support platform independence, a creator must define what types of
files it accepts on it's own.
|
protected void |
addEntryDataToEntry(BibtexEntry entry,
BibtexEntry e) |
protected void |
addEntrysToEntry(BibtexEntry entry,
java.util.List<BibtexEntry> entrys) |
protected void |
addFileInfo(BibtexEntry entry,
java.io.File file) |
protected void |
appendToField(BibtexEntry entry,
java.lang.String field,
java.lang.String value) |
protected abstract BibtexEntry |
createBibtexEntry(java.io.File f) |
BibtexEntry |
createEntry(java.io.File f,
boolean addPathTokensAsKeywords)
Create one BibtexEntry containing information regarding the given File.
|
ExternalFileType |
getExternalFileType()
Returns the ExternalFileType that is imported here
|
abstract java.lang.String |
getFormatName()
Name of this import format.
|
java.lang.String |
toString() |
public EntryFromFileCreator(ExternalFileType externalFileType)
ExternalFileType
instance, which
they build on.externalFileType
- protected abstract BibtexEntry createBibtexEntry(java.io.File f)
public abstract boolean accept(java.io.File f)
To support platform independence, a creator must define what types of files it accepts on it's own.
Basically, accepting files which end with the file extension that is
described in the nested externalFileType
would work on windows
systems. This is also the recommended criterion, on which files should be
accepted.
However, defining what types of files this creator accepts, is a property of entry creators, that is left to the user.
accept
in interface java.io.FileFilter
public abstract java.lang.String getFormatName()
The name must be unique.
null
public BibtexEntry createEntry(java.io.File f, boolean addPathTokensAsKeywords)
f
- addPathTokensAsKeywords
- public ExternalFileType getExternalFileType()
protected void addFileInfo(BibtexEntry entry, java.io.File file)
protected void appendToField(BibtexEntry entry, java.lang.String field, java.lang.String value)
protected void addEntrysToEntry(BibtexEntry entry, java.util.List<BibtexEntry> entrys)
protected void addEntryDataToEntry(BibtexEntry entry, BibtexEntry e)
public java.lang.String toString()
toString
in class java.lang.Object