07.04.2013 Views

ALMA Archive Tutorial - ESO

ALMA Archive Tutorial - ESO

ALMA Archive Tutorial - ESO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EXAMPLE<br />

➜ get <strong>Archive</strong> and Identifier reference:<br />

<strong>Archive</strong>Connection ac=<strong>Archive</strong>ConnectionHelper.narrow(<br />

containerServices.getComponent("ARCHIVE_CONNECTION"));<br />

Operational archive = ac.getOperational("userName");<br />

Identifier ident = IdentifierHelper.narrow(<br />

containerServices.getComponent("ARCHIVE_IDENTIFIER"));<br />

➜ create document structure<br />

XmlEntityStruct struct = new XmlEntityStruct();<br />

struct.xmlString = "example"; // fill the rest, too<br />

➜ get an ID:<br />

containerServices.assignUniqueEntityId(struct);<br />

➜ store document structure<br />

archive.store(struct);<br />

➜ retrieve document<br />

XmlEntityStruct struct = archive.retrieve(id);<br />

XAMPLE 18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!