|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KFileMetaInfo
public class KFileMetaInfo
Field Summary | |
---|---|
static int |
ContentInfo
|
static int |
DontCare
|
static int |
Everything
|
static int |
ExtenedAttr
|
static int |
Fastest
This is used to specify what a KFileMetaInfo object should read, so you can specify if you want to read "expensive" items or not. |
static int |
Preferred
|
static int |
TechnicalInfo
|
static int |
Thumbnail
|
Constructor Summary | |
---|---|
|
KFileMetaInfo()
Default constructor. |
protected |
KFileMetaInfo(java.lang.Class dummy)
|
|
KFileMetaInfo(KFileMetaInfo original)
Copy constructor. |
|
KFileMetaInfo(KURL url)
|
|
KFileMetaInfo(KURL url,
java.lang.String mimeType)
|
|
KFileMetaInfo(KURL url,
java.lang.String mimeType,
int what)
Another constructor Similar to the above, but takes a URL so that meta-data may be retrieved over other protocols (ftp, etc.) |
|
KFileMetaInfo(java.lang.String path)
|
|
KFileMetaInfo(java.lang.String path,
java.lang.String mimeType)
|
|
KFileMetaInfo(java.lang.String path,
java.lang.String mimeType,
int what)
The constructor. |
Method Summary | |
---|---|
boolean |
addGroup(java.lang.String name)
Try to add the specified group. |
protected KFileMetaInfoGroup |
appendGroup(java.lang.String name)
|
boolean |
applyChanges()
This method writes all pending changes of the meta info back to the file. |
boolean |
contains(java.lang.String key)
Checks whether an item with the given key exists. |
boolean |
containsGroup(java.lang.String key)
Checks whether a group with the given key exists. |
protected void |
deref()
|
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
java.util.ArrayList |
editableGroups()
Returns the list of groups that you can add or remove from the file. |
protected void |
finalize()
Deletes the wrapped C++ instance |
KFileMetaInfoGroup |
group(java.lang.String key)
Returns the KFileMetaInfoGroup with the given key. |
java.util.ArrayList |
groups()
Returns a list of all groups. |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
boolean |
isEmpty()
Returns false if the object contains data, true if it's empty. |
boolean |
isValid()
Returns true if the item is valid, i.e. |
KFileMetaInfoItem |
item(java.lang.String key)
Returns the KFileMetaInfoItem with the given key. |
java.lang.String |
mimeType()
Returns the mime type of file. |
KFileMetaInfoGroup |
op_at(java.lang.String key)
Returns the KFileMetaInfoGroup with the given key. |
java.lang.String |
path()
Returns the path of file - or null if file is non-local |
java.util.ArrayList |
preferredGroups()
Returns a list of the preferred groups. |
java.util.ArrayList |
preferredKeys()
Returns a list of all preferred keys. |
protected void |
ref()
|
java.util.ArrayList |
removedGroups()
Returns a list of removed groups. |
boolean |
removeGroup(java.lang.String name)
Remove the specified group. |
KFileMetaInfoItem |
saveItem(java.lang.String key)
|
KFileMetaInfoItem |
saveItem(java.lang.String key,
java.lang.String preferredGroup)
|
KFileMetaInfoItem |
saveItem(java.lang.String key,
java.lang.String preferredGroup,
boolean createGroup)
Saves the item with the given key. |
java.util.ArrayList |
supportedGroups()
Returns a list of all supported groups. |
java.util.ArrayList |
supportedKeys()
Returns a list of supported keys. |
KURL |
url()
Returns the url of file |
org.kde.qt.QVariant |
value(java.lang.String key)
Returns the value with the given key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int Fastest
public static final int DontCare
public static final int TechnicalInfo
public static final int ContentInfo
public static final int ExtenedAttr
public static final int Thumbnail
public static final int Preferred
public static final int Everything
Constructor Detail |
---|
protected KFileMetaInfo(java.lang.Class dummy)
public KFileMetaInfo(java.lang.String path, java.lang.String mimeType, int what)
path
- The file name. This must be the path to a local file.mimeType
- The name of the file's mimetype. If ommited, the
mimetype is autodetectedwhat
- one or more of the What enum values. It gives some
hint to the plugin what information is desired. The plugin
may still return more items.public KFileMetaInfo(java.lang.String path, java.lang.String mimeType)
public KFileMetaInfo(java.lang.String path)
public KFileMetaInfo(KURL url, java.lang.String mimeType, int what)
public KFileMetaInfo(KURL url, java.lang.String mimeType)
public KFileMetaInfo(KURL url)
public KFileMetaInfo()
public KFileMetaInfo(KFileMetaInfo original)
Method Detail |
---|
public java.util.ArrayList groups()
public java.util.ArrayList supportedGroups()
public java.util.ArrayList preferredGroups()
public java.util.ArrayList preferredKeys()
public java.util.ArrayList supportedKeys()
public java.util.ArrayList editableGroups()
public KFileMetaInfoItem item(java.lang.String key)
key.
key
- the key of the item
key.
public KFileMetaInfoItem saveItem(java.lang.String key, java.lang.String preferredGroup, boolean createGroup)
key.
key
- the key of the itempreferredGroup
- the preferred group, or nullcreateGroup
- true to create the group if necessary
public KFileMetaInfoItem saveItem(java.lang.String key, java.lang.String preferredGroup)
public KFileMetaInfoItem saveItem(java.lang.String key)
public KFileMetaInfoGroup group(java.lang.String key)
key.
key
- the key of the item
key.
public KFileMetaInfoGroup op_at(java.lang.String key)
key.
key
- the key of the item
key.
public boolean addGroup(java.lang.String name)
name
- the name of the group to add
public boolean removeGroup(java.lang.String name)
name
- the name of the group to remove
public java.util.ArrayList removedGroups()
public boolean applyChanges()
public boolean contains(java.lang.String key)
key
exists.
key
- the key to check
key
exists.public boolean containsGroup(java.lang.String key)
key
exists.
key
- the key to check
public org.kde.qt.QVariant value(java.lang.String key)
key.
key
- the key to retrieve
public boolean isValid()
public boolean isEmpty()
public java.lang.String mimeType()
public java.lang.String path()
public KURL url()
protected KFileMetaInfoGroup appendGroup(java.lang.String name)
protected void ref()
protected void deref()
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |