Download Oracle interMedia User's Guide
Transcript
Description of the IMExample Application
StringBuffer sb = new StringBuffer(
"<xmpMetadata xmlns=\"http://xmlns.oracle.com/ord/meta/xmp\" "
+ " xsi:schemaLocation=\"http://xmlns.oracle.com/ord/meta/xmp "
+ " http://xmlns.oracle.com/ord/meta/xmp\" "
+ " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" > "
+ " <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"> "
+ " <rdf:Description about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"> "
);
String str = null;
if ( (str=m_jTitleField.getText()) != null)
sb.append("<dc:title>" + str + "</dc:title>");
if ( (str=m_jCreatorField.getText()) !=null)
sb.append("<dc:creator>" + str + "</dc:creator>");
if ( (str=m_jDateField.getText()) !=null)
sb.append("<dc:date>" + str + "</dc:date>");
if ( (str=m_jDescriptionField.getText()) !=null)
sb.append("<dc:description>" + str + "</dc:description>");
if ( (str=m_jCopyrightField.getText()) !=null)
sb.append("<dc:rights>" + str + "</dc:rights>");
sb.append("</rdf:Description></rdf:RDF></xmpMetadata>");
XMLType xmp = XMLType.createXML(IMExample.getDBConnection(), sb.toString(),
"http://xmlns.oracle.com/ord/meta/xmp", true, true);
//
// Make sure the image data is local
//
if (!m_img.isLocal())
{
byte[] ctx[] = new byte[1][4000];
m_img.importData(ctx);
}
//
// Call Ordimage.putMetadata
//
m_img.putMetadata(xmp, "XMP", "utf-8");
this.dispose();
}
.
.
.
}
4.2.5 IMVideoPanel Class
This class displays the video panel, the product video, and its attributes. This class is
identical in structure and functions similarly to the IMImagePanel class. See
IMImagePanel Class for descriptions of methods.
The following code example includes the display( ), insertProperty( ), notExist( ),
getDataInByteArray( ), and refreshPanel( ) methods, and highlights in bold any SQL
query statements and areas in the code where interMedia and other Oracle object types
and methods are used:
void display() throws IOException, SQLException
IMExample Java Sample Application
4-11