|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.app.itemupdate.MetadataUtilities
public class MetadataUtilities
Miscellaneous methods for metadata handling that build on the API which might have general utility outside of the specific use in context in ItemUpdate. The XML methods were based on those in ItemImport
| Constructor Summary | |
|---|---|
MetadataUtilities()
|
|
| Method Summary | |
|---|---|
static void |
appendMetadata(Item item,
org.dspace.app.itemupdate.DtoMetadata dtom,
boolean isLanguageStrict,
String textToAppend)
Append text to value metadata field to item |
static boolean |
deleteMetadataByValue(Item item,
org.dspace.app.itemupdate.DtoMetadata dtom,
boolean isLanguageStrict)
Working around Item API to delete a value-specific DCValue For a given element/qualifier/lang: get all DCValues clear (i.e. |
static String |
getCompoundForm(String schema,
String element,
String qualifier)
|
static String |
getDCValueString(DCValue dcv)
Get display of DCValue |
static List<org.dspace.app.itemupdate.DtoMetadata> |
loadDublinCore(DocumentBuilder docBuilder,
InputStream is)
Modification of method from ItemImporter.loadDublinCore as a Factory method |
static String[] |
parseCompoundForm(String compoundForm)
Parses metadata field given in the form |
static List<ContentsEntry> |
readContentsFile(File f)
rewrite of ItemImport's functionality but just the parsing of the file, not the processing of its elements |
static List<Integer> |
readDeleteContentsFile(File f)
|
static void |
writeDocument(Document doc,
Transformer transformer,
OutputStream out)
write xml document to output stream |
static Document |
writeDublinCore(DocumentBuilder docBuilder,
List<org.dspace.app.itemupdate.DtoMetadata> dtomList)
Write dublin_core.xml |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MetadataUtilities()
| Method Detail |
|---|
public static boolean deleteMetadataByValue(Item item,
org.dspace.app.itemupdate.DtoMetadata dtom,
boolean isLanguageStrict)
item - dtom - isLanguageStrict - -
public static void appendMetadata(Item item,
org.dspace.app.itemupdate.DtoMetadata dtom,
boolean isLanguageStrict,
String textToAppend)
throws IllegalArgumentException
item - dtom - isLanguageStrict - textToAppend -
IllegalArgumentException - - When target metadata field is not found
public static List<org.dspace.app.itemupdate.DtoMetadata> loadDublinCore(DocumentBuilder docBuilder,
InputStream is)
throws SQLException,
IOException,
ParserConfigurationException,
SAXException,
TransformerException,
AuthorizeException
docBuilder - -is - - InputStream of dublin_core.xml
SQLException
IOException
ParserConfigurationException
SAXException
TransformerException
AuthorizeException
public static Document writeDublinCore(DocumentBuilder docBuilder,
List<org.dspace.app.itemupdate.DtoMetadata> dtomList)
throws ParserConfigurationException,
TransformerConfigurationException,
TransformerException
docBuilder - dtomList -
ParserConfigurationException
TransformerConfigurationException
TransformerException
public static void writeDocument(Document doc,
Transformer transformer,
OutputStream out)
throws IOException,
TransformerException
doc - transformer - out -
IOException
TransformerException
public static List<ContentsEntry> readContentsFile(File f)
throws FileNotFoundException,
IOException,
ParseException
FileNotFoundException
IOException
ParseException
public static List<Integer> readDeleteContentsFile(File f)
throws FileNotFoundException,
IOException
f -
FileNotFoundException
IOExceptionpublic static String getDCValueString(DCValue dcv)
dcv -
public static String getCompoundForm(String schema,
String element,
String qualifier)
public static String[] parseCompoundForm(String compoundForm)
throws ParseException
ParseException - if validity checks fail
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||