public abstract class GenericTag extends AbstractTag
AbstractTag
Modifier and Type | Class and Description |
---|---|
protected class |
GenericTag.GenericTagTextField
Implementations of
TagTextField for use with
"ISO-8859-1" strings. |
Modifier and Type | Field and Description |
---|---|
protected static EnumSet<FieldKey> |
supportedKeys |
commonNumber, fields
Constructor and Description |
---|
GenericTag() |
Modifier and Type | Method and Description |
---|---|
TagField |
createField(Artwork artwork)
Create artwork field based on the data in artwork
|
TagField |
createField(FieldKey genericKey,
String... values)
Create a new field based on generic key, used internally by the library
|
void |
deleteField(FieldKey genericKey)
Delete any fields with this key
|
List<String> |
getAll(FieldKey genericKey)
Retrieve all String values that exist for this generic key
|
List<Artwork> |
getArtworkList() |
List<TagField> |
getFields(FieldKey genericKey)
|
String |
getFirst(FieldKey genericKey)
Retrieve the first value that exists for this generic key
|
TagField |
getFirstField(FieldKey genericKey) |
static EnumSet<FieldKey> |
getSupportedKeys() |
String |
getValue(FieldKey genericKey,
int index)
Retrieve String value of the nth tag field that exists for this generic key
|
protected boolean |
isAllowedEncoding(Charset enc)
Determines whether the given charset encoding may be used for the
represented tagging system.
|
addField, addField, addField, deleteArtworkField, deleteField, getAll, getAll, getFieldCount, getFieldCountIncludingSubValues, getFields, getFields, getFirst, getFirstArtwork, getFirstField, getItem, hasCommonFields, hasField, hasField, isEmpty, setEncoding, setField, setField, setField, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createCompilationField
protected boolean isAllowedEncoding(Charset enc)
AbstractTag
isAllowedEncoding
in class AbstractTag
enc
- charset encoding.true
if the given encoding can be used.public TagField createField(FieldKey genericKey, String... values) throws KeyNotFoundException, FieldDataInvalidException
Tag
Only textual data supported at the moment. The genericKey will be mapped to the correct implementation key and return a TagField. Usually the value field should only be one value, but certain fields may require more than one value currently the only field to require this is the MUSICIAN field, it should contain instrument and then performer name
createField
in interface Tag
createField
in class AbstractTag
genericKey
- is the generic keyvalues
- to storeKeyNotFoundException
FieldDataInvalidException
public String getFirst(FieldKey genericKey) throws KeyNotFoundException
AbstractTag
getFirst
in interface Tag
getFirst
in class AbstractTag
KeyNotFoundException
public String getValue(FieldKey genericKey, int index) throws KeyNotFoundException
Tag
KeyNotFoundException
public List<TagField> getFields(FieldKey genericKey) throws KeyNotFoundException
Tag
genericKey
- The field id.TagField
objects with the given "id".KeyNotFoundException
public List<String> getAll(FieldKey genericKey) throws KeyNotFoundException
Tag
KeyNotFoundException
public void deleteField(FieldKey genericKey) throws KeyNotFoundException
Tag
deleteField
in interface Tag
deleteField
in class AbstractTag
KeyNotFoundException
public TagField getFirstField(FieldKey genericKey) throws KeyNotFoundException
getFirstField
in interface Tag
getFirstField
in class AbstractTag
KeyNotFoundException
public List<Artwork> getArtworkList()
public TagField createField(Artwork artwork) throws FieldDataInvalidException
Tag
FieldDataInvalidException
Copyright © 2005–2020 jthink.net. All rights reserved.