1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_29) on Tue May 15 10:42:53 CEST 2012 -->
<TITLE>
XMPUtils
</TITLE>
<META NAME="date" CONTENT="2012-05-15">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="XMPUtils";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XMPUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/adobe/xmp/XMPSchemaRegistry.html" title="interface in com.adobe.xmp"><B>PREV CLASS</B></A>
<A HREF="../../../com/adobe/xmp/XMPVersionInfo.html" title="interface in com.adobe.xmp"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/adobe/xmp/XMPUtils.html" target="_top"><B>FRAMES</B></A>
<A HREF="XMPUtils.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.adobe.xmp</FONT>
<BR>
Class XMPUtils</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.adobe.xmp.XMPUtils</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>XMPUtils</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Utility methods for XMP. I included only those that are different from the
Java default conversion utilities.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>21.02.2006</DD>
</DL>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#appendProperties(com.adobe.xmp.XMPMeta, com.adobe.xmp.XMPMeta, boolean, boolean)">appendProperties</A></B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> source,
<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> dest,
boolean doAllProperties,
boolean replaceOldValues)</CODE>
<BR>
Alias without the new option <code>deleteEmptyValues</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#appendProperties(com.adobe.xmp.XMPMeta, com.adobe.xmp.XMPMeta, boolean, boolean, boolean)">appendProperties</A></B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> source,
<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> dest,
boolean doAllProperties,
boolean replaceOldValues,
boolean deleteEmptyValues)</CODE>
<BR>
Append properties from one XMP object to another.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#catenateArrayItems(com.adobe.xmp.XMPMeta, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)">catenateArrayItems</A></B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> xmp,
java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.String separator,
java.lang.String quotes,
boolean allowCommas)</CODE>
<BR>
Create a single edit string from an array of strings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertFromBoolean(boolean)">convertFromBoolean</A></B>(boolean value)</CODE>
<BR>
Convert from boolean to string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertFromDate(com.adobe.xmp.XMPDateTime)">convertFromDate</A></B>(<A HREF="../../../com/adobe/xmp/XMPDateTime.html" title="interface in com.adobe.xmp">XMPDateTime</A> value)</CODE>
<BR>
Convert from <code>XMPDateTime</code> to string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertFromDouble(double)">convertFromDouble</A></B>(double value)</CODE>
<BR>
Convert from long to string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertFromInteger(int)">convertFromInteger</A></B>(int value)</CODE>
<BR>
Convert from int to string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertFromLong(long)">convertFromLong</A></B>(long value)</CODE>
<BR>
Convert from long to string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertToBoolean(java.lang.String)">convertToBoolean</A></B>(java.lang.String value)</CODE>
<BR>
Convert from string to Boolean.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../../com/adobe/xmp/XMPDateTime.html" title="interface in com.adobe.xmp">XMPDateTime</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertToDate(java.lang.String)">convertToDate</A></B>(java.lang.String rawValue)</CODE>
<BR>
Converts a string value to an <code>XMPDateTime</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertToDouble(java.lang.String)">convertToDouble</A></B>(java.lang.String rawValue)</CODE>
<BR>
Converts a string value to a <code>double</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertToInteger(java.lang.String)">convertToInteger</A></B>(java.lang.String rawValue)</CODE>
<BR>
Converts a string value to an <code>int</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#convertToLong(java.lang.String)">convertToLong</A></B>(java.lang.String rawValue)</CODE>
<BR>
Converts a string value to a <code>long</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#decodeBase64(java.lang.String)">decodeBase64</A></B>(java.lang.String base64String)</CODE>
<BR>
Decode from Base64 encoded string to raw data.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#encodeBase64(byte[])">encodeBase64</A></B>(byte[] buffer)</CODE>
<BR>
Convert from a byte array to a base64 encoded string.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#removeProperties(com.adobe.xmp.XMPMeta, java.lang.String, java.lang.String, boolean, boolean)">removeProperties</A></B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> xmp,
java.lang.String schemaNS,
java.lang.String propName,
boolean doAllProperties,
boolean includeAliases)</CODE>
<BR>
Remove multiple properties from an XMP object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/adobe/xmp/XMPUtils.html#separateArrayItems(com.adobe.xmp.XMPMeta, java.lang.String, java.lang.String, java.lang.String, com.adobe.xmp.options.PropertyOptions, boolean)">separateArrayItems</A></B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> xmp,
java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.String catedStr,
<A HREF="../../../com/adobe/xmp/options/PropertyOptions.html" title="class in com.adobe.xmp.options">PropertyOptions</A> arrayOptions,
boolean preserveCommas)</CODE>
<BR>
Separate a single edit string into an array of strings.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="catenateArrayItems(com.adobe.xmp.XMPMeta, java.lang.String, java.lang.String, java.lang.String, java.lang.String, boolean)"><!-- --></A><H3>
catenateArrayItems</H3>
<PRE>
public static java.lang.String <B>catenateArrayItems</B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> xmp,
java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.String separator,
java.lang.String quotes,
boolean allowCommas)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Create a single edit string from an array of strings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xmp</CODE> - The XMP object containing the array to be catenated.<DD><CODE>schemaNS</CODE> - The schema namespace URI for the array. Must not be null or
the empty string.<DD><CODE>arrayName</CODE> - The name of the array. May be a general path expression, must
not be null or the empty string. Each item in the array must
be a simple string value.<DD><CODE>separator</CODE> - The string to be used to separate the items in the catenated
string. Defaults to "; ", ASCII semicolon and space
(U+003B, U+0020).<DD><CODE>quotes</CODE> - The characters to be used as quotes around array items that
contain a separator. Defaults to '"'<DD><CODE>allowCommas</CODE> - Option flag to control the catenation.
<DT><B>Returns:</B><DD>Returns the string containing the catenated array items.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Forwards the Exceptions from the metadata processing</DL>
</DD>
</DL>
<HR>
<A NAME="separateArrayItems(com.adobe.xmp.XMPMeta, java.lang.String, java.lang.String, java.lang.String, com.adobe.xmp.options.PropertyOptions, boolean)"><!-- --></A><H3>
separateArrayItems</H3>
<PRE>
public static void <B>separateArrayItems</B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> xmp,
java.lang.String schemaNS,
java.lang.String arrayName,
java.lang.String catedStr,
<A HREF="../../../com/adobe/xmp/options/PropertyOptions.html" title="class in com.adobe.xmp.options">PropertyOptions</A> arrayOptions,
boolean preserveCommas)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Separate a single edit string into an array of strings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xmp</CODE> - The XMP object containing the array to be updated.<DD><CODE>schemaNS</CODE> - The schema namespace URI for the array. Must not be null or
the empty string.<DD><CODE>arrayName</CODE> - The name of the array. May be a general path expression, must
not be null or the empty string. Each item in the array must
be a simple string value.<DD><CODE>catedStr</CODE> - The string to be separated into the array items.<DD><CODE>arrayOptions</CODE> - Option flags to control the separation.<DD><CODE>preserveCommas</CODE> - Flag if commas shall be preserved
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Forwards the Exceptions from the metadata processing</DL>
</DD>
</DL>
<HR>
<A NAME="removeProperties(com.adobe.xmp.XMPMeta, java.lang.String, java.lang.String, boolean, boolean)"><!-- --></A><H3>
removeProperties</H3>
<PRE>
public static void <B>removeProperties</B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> xmp,
java.lang.String schemaNS,
java.lang.String propName,
boolean doAllProperties,
boolean includeAliases)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Remove multiple properties from an XMP object.
RemoveProperties was created to support the File Info dialog's Delete
button, and has been been generalized somewhat from those specific needs.
It operates in one of three main modes depending on the schemaNS and
propName parameters:
<ul>
<li> Non-empty <code>schemaNS</code> and <code>propName</code> - The named property is
removed if it is an external property, or if the
flag <code>doAllProperties</code> option is true. It does not matter whether the
named property is an actual property or an alias.
<li> Non-empty <code>schemaNS</code> and empty <code>propName</code> - The all external
properties in the named schema are removed. Internal properties are also
removed if the flag <code>doAllProperties</code> option is set. In addition,
aliases from the named schema will be removed if the flag <code>includeAliases</code>
option is set.
<li> Empty <code>schemaNS</code> and empty <code>propName</code> - All external properties in
all schema are removed. Internal properties are also removed if the
flag <code>doAllProperties</code> option is passed. Aliases are implicitly handled
because the associated actuals are internal if the alias is.
</ul>
It is an error to pass an empty <code>schemaNS</code> and non-empty <code>propName</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xmp</CODE> - The XMP object containing the properties to be removed.<DD><CODE>schemaNS</CODE> - Optional schema namespace URI for the properties to be
removed.<DD><CODE>propName</CODE> - Optional path expression for the property to be removed.<DD><CODE>doAllProperties</CODE> - Option flag to control the deletion: do internal properties in
addition to external properties.<DD><CODE>includeAliases</CODE> - Option flag to control the deletion:
Include aliases in the "named schema" case above.
<em>Note:</em> Currently not supported.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Forwards the Exceptions from the metadata processing</DL>
</DD>
</DL>
<HR>
<A NAME="appendProperties(com.adobe.xmp.XMPMeta, com.adobe.xmp.XMPMeta, boolean, boolean)"><!-- --></A><H3>
appendProperties</H3>
<PRE>
public static void <B>appendProperties</B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> source,
<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> dest,
boolean doAllProperties,
boolean replaceOldValues)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Alias without the new option <code>deleteEmptyValues</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - The source XMP object.<DD><CODE>dest</CODE> - The destination XMP object.<DD><CODE>doAllProperties</CODE> - Do internal properties in addition to external properties.<DD><CODE>replaceOldValues</CODE> - Replace the values of existing properties.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Forwards the Exceptions from the metadata processing</DL>
</DD>
</DL>
<HR>
<A NAME="appendProperties(com.adobe.xmp.XMPMeta, com.adobe.xmp.XMPMeta, boolean, boolean, boolean)"><!-- --></A><H3>
appendProperties</H3>
<PRE>
public static void <B>appendProperties</B>(<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> source,
<A HREF="../../../com/adobe/xmp/XMPMeta.html" title="interface in com.adobe.xmp">XMPMeta</A> dest,
boolean doAllProperties,
boolean replaceOldValues,
boolean deleteEmptyValues)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD><p>Append properties from one XMP object to another.
<p>XMPUtils#appendProperties was created to support the File Info dialog's Append button, and
has been been generalized somewhat from those specific needs. It appends information from one
XMP object (source) to another (dest). The default operation is to append only external
properties that do not already exist in the destination. The flag
<code>doAllProperties</code> can be used to operate on all properties, external and internal.
The flag <code>replaceOldValues</code> option can be used to replace the values
of existing properties. The notion of external
versus internal applies only to top level properties. The keep-or-replace-old notion applies
within structs and arrays as described below.
<ul>
<li>If <code>replaceOldValues</code> is true then the processing is restricted to the top
level properties. The processed properties from the source (according to
<code>doAllProperties</code>) are propagated to the destination,
replacing any existing values.Properties in the destination that are not in the source
are left alone.
<li>If <code>replaceOldValues</code> is not passed then the processing is more complicated.
Top level properties are added to the destination if they do not already exist.
If they do exist but differ in form (simple/struct/array) then the destination is left alone.
If the forms match, simple properties are left unchanged while structs and arrays are merged.
<li>If <code>deleteEmptyValues</code> is passed then an empty value in the source XMP causes
the corresponding destination XMP property to be deleted. The default is to treat empty
values the same as non-empty values. An empty value is any of a simple empty string, an array
with no items, or a struct with no fields. Qualifiers are ignored.
</ul>
<p>The detailed behavior is defined by the following pseudo-code:
<blockquote>
<pre>
appendProperties ( sourceXMP, destXMP, doAllProperties,
replaceOldValues, deleteEmptyValues ):
for all source schema (top level namespaces):
for all top level properties in sourceSchema:
if doAllProperties or prop is external:
appendSubtree ( sourceNode, destSchema, replaceOldValues, deleteEmptyValues )
appendSubtree ( sourceNode, destParent, replaceOldValues, deleteEmptyValues ):
if deleteEmptyValues and source value is empty:
delete the corresponding child from destParent
else if sourceNode not in destParent (by name):
copy sourceNode's subtree to destParent
else if replaceOld:
delete subtree from destParent
copy sourceNode's subtree to destParent
else:
// Already exists in dest and not replacing, merge structs and arrays
if sourceNode and destNode forms differ:
return, leave the destNode alone
else if form is a struct:
for each field in sourceNode:
AppendSubtree ( sourceNode.field, destNode, replaceOldValues )
else if form is an alt-text array:
copy new items by "xml:lang" value into the destination
else if form is an array:
copy new items by value into the destination, ignoring order and duplicates
</pre>
</blockquote>
<p><em>Note:</em> appendProperties can be expensive if replaceOldValues is not passed and
the XMP contains large arrays. The array item checking described above is n-squared.
Each source item is checked to see if it already exists in the destination,
without regard to order or duplicates.
<p>Simple items are compared by value and "xml:lang" qualifier, other qualifiers are ignored.
Structs are recursively compared by field names, without regard to field order. Arrays are
compared by recursively comparing all items.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - The source XMP object.<DD><CODE>dest</CODE> - The destination XMP object.<DD><CODE>doAllProperties</CODE> - Do internal properties in addition to external properties.<DD><CODE>replaceOldValues</CODE> - Replace the values of existing properties.<DD><CODE>deleteEmptyValues</CODE> - Delete destination values if source property is empty.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Forwards the Exceptions from the metadata processing</DL>
</DD>
</DL>
<HR>
<A NAME="convertToBoolean(java.lang.String)"><!-- --></A><H3>
convertToBoolean</H3>
<PRE>
public static boolean <B>convertToBoolean</B>(java.lang.String value)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Convert from string to Boolean.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - The string representation of the Boolean.
<DT><B>Returns:</B><DD>The appropriate boolean value for the string. The checked values
for <code>true</code> and <code>false</code> are:
<ul>
<li><A HREF="../../../com/adobe/xmp/XMPConst.html#TRUESTR"><CODE>XMPConst.TRUESTR</CODE></A> and <A HREF="../../../com/adobe/xmp/XMPConst.html#FALSESTR"><CODE>XMPConst.FALSESTR</CODE></A>
<li>"t" and "f"
<li>"on" and "off"
<li>"yes" and "no"
<li>"value <> 0" and "value == 0"
</ul>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - If an empty string is passed.</DL>
</DD>
</DL>
<HR>
<A NAME="convertFromBoolean(boolean)"><!-- --></A><H3>
convertFromBoolean</H3>
<PRE>
public static java.lang.String <B>convertFromBoolean</B>(boolean value)</PRE>
<DL>
<DD>Convert from boolean to string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - a boolean value
<DT><B>Returns:</B><DD>The XMP string representation of the boolean. The values used are
given by the constnts <A HREF="../../../com/adobe/xmp/XMPConst.html#TRUESTR"><CODE>XMPConst.TRUESTR</CODE></A> and
<A HREF="../../../com/adobe/xmp/XMPConst.html#FALSESTR"><CODE>XMPConst.FALSESTR</CODE></A>.</DL>
</DD>
</DL>
<HR>
<A NAME="convertToInteger(java.lang.String)"><!-- --></A><H3>
convertToInteger</H3>
<PRE>
public static int <B>convertToInteger</B>(java.lang.String rawValue)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Converts a string value to an <code>int</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rawValue</CODE> - the string value
<DT><B>Returns:</B><DD>Returns an int.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - If the <code>rawValue</code> is <code>null</code> or empty or the
conversion fails.</DL>
</DD>
</DL>
<HR>
<A NAME="convertFromInteger(int)"><!-- --></A><H3>
convertFromInteger</H3>
<PRE>
public static java.lang.String <B>convertFromInteger</B>(int value)</PRE>
<DL>
<DD>Convert from int to string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an int value
<DT><B>Returns:</B><DD>The string representation of the int.</DL>
</DD>
</DL>
<HR>
<A NAME="convertToLong(java.lang.String)"><!-- --></A><H3>
convertToLong</H3>
<PRE>
public static long <B>convertToLong</B>(java.lang.String rawValue)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Converts a string value to a <code>long</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rawValue</CODE> - the string value
<DT><B>Returns:</B><DD>Returns a long.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - If the <code>rawValue</code> is <code>null</code> or empty or the
conversion fails.</DL>
</DD>
</DL>
<HR>
<A NAME="convertFromLong(long)"><!-- --></A><H3>
convertFromLong</H3>
<PRE>
public static java.lang.String <B>convertFromLong</B>(long value)</PRE>
<DL>
<DD>Convert from long to string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - a long value
<DT><B>Returns:</B><DD>The string representation of the long.</DL>
</DD>
</DL>
<HR>
<A NAME="convertToDouble(java.lang.String)"><!-- --></A><H3>
convertToDouble</H3>
<PRE>
public static double <B>convertToDouble</B>(java.lang.String rawValue)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Converts a string value to a <code>double</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rawValue</CODE> - the string value
<DT><B>Returns:</B><DD>Returns a double.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - If the <code>rawValue</code> is <code>null</code> or empty or the
conversion fails.</DL>
</DD>
</DL>
<HR>
<A NAME="convertFromDouble(double)"><!-- --></A><H3>
convertFromDouble</H3>
<PRE>
public static java.lang.String <B>convertFromDouble</B>(double value)</PRE>
<DL>
<DD>Convert from long to string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - a long value
<DT><B>Returns:</B><DD>The string representation of the long.</DL>
</DD>
</DL>
<HR>
<A NAME="convertToDate(java.lang.String)"><!-- --></A><H3>
convertToDate</H3>
<PRE>
public static <A HREF="../../../com/adobe/xmp/XMPDateTime.html" title="interface in com.adobe.xmp">XMPDateTime</A> <B>convertToDate</B>(java.lang.String rawValue)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Converts a string value to an <code>XMPDateTime</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>rawValue</CODE> - the string value
<DT><B>Returns:</B><DD>Returns an <code>XMPDateTime</code>-object.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - If the <code>rawValue</code> is <code>null</code> or empty or the
conversion fails.</DL>
</DD>
</DL>
<HR>
<A NAME="convertFromDate(com.adobe.xmp.XMPDateTime)"><!-- --></A><H3>
convertFromDate</H3>
<PRE>
public static java.lang.String <B>convertFromDate</B>(<A HREF="../../../com/adobe/xmp/XMPDateTime.html" title="interface in com.adobe.xmp">XMPDateTime</A> value)</PRE>
<DL>
<DD>Convert from <code>XMPDateTime</code> to string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - an <code>XMPDateTime</code>
<DT><B>Returns:</B><DD>The string representation of the long.</DL>
</DD>
</DL>
<HR>
<A NAME="encodeBase64(byte[])"><!-- --></A><H3>
encodeBase64</H3>
<PRE>
public static java.lang.String <B>encodeBase64</B>(byte[] buffer)</PRE>
<DL>
<DD>Convert from a byte array to a base64 encoded string.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - the byte array to be converted
<DT><B>Returns:</B><DD>Returns the base64 string.</DL>
</DD>
</DL>
<HR>
<A NAME="decodeBase64(java.lang.String)"><!-- --></A><H3>
decodeBase64</H3>
<PRE>
public static byte[] <B>decodeBase64</B>(java.lang.String base64String)
throws <A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></PRE>
<DL>
<DD>Decode from Base64 encoded string to raw data.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>base64String</CODE> - a base64 encoded string
<DT><B>Returns:</B><DD>Returns a byte array containg the decoded string.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../com/adobe/xmp/XMPException.html" title="class in com.adobe.xmp">XMPException</A></CODE> - Thrown if the given string is not property base64 encoded</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XMPUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/adobe/xmp/XMPSchemaRegistry.html" title="interface in com.adobe.xmp"><B>PREV CLASS</B></A>
<A HREF="../../../com/adobe/xmp/XMPVersionInfo.html" title="interface in com.adobe.xmp"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/adobe/xmp/XMPUtils.html" target="_top"><B>FRAMES</B></A>
<A HREF="XMPUtils.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright 2006-2007 Adobe Systems Inc. All Rights Reserved.</i>
</BODY>
</HTML>
|