RE: metadata
"BARREAU Amandine" <[email protected]>
| Newsgroups | gmane.comp.cms.jahia.template |
|---|---|
| Message-ID | <7F2AAB834036BC48AB9C27DD9EC30BBE15E999@EPLUXSEX02.ep.parl.union.eu> |
and can I sort on this fields? _____ From: Khue Nguyen [mailto:[email protected]] Sent: 14 November 2005 13:38 To: [email protected] Subject: Re: metadata sorry, it's the Jahia 5.0 beta 2 API ( the one in cvs ). If not, use "creator", "creationDate" or maybe you can update from last cvs. ----- Original Message ----- From: BARREAU Amandine <mailto:[email protected]> To: [email protected] Sent: Monday, November 14, 2005 1:31 PM Subject: RE: metadata But the class CoreMetadataConstant doesn't exists in my jahia _____ From: Khue Nguyen [mailto:[email protected]] Sent: 14 November 2005 13:26 To: [email protected] Subject: Re: metadata Hi, You can retrieve the list of metadatas as ContentFields for a given container list this way: List metadatas = jahiaContainer.getContentContainer().getMetadatas(); // list of ContentField metadata then for each ContentField : JahiaField jahiaField = contentField.getJahiaField(jParams.getEntryLoadRequest()); jahiaField.load(LoadFlags.ALL,jParams); // fully load the field or given the name of a specific metadata , i.e the creator : JahiaField jahiaField = jahiaContainer.getContentContainer().getMetadataAsJahiaField(CoreMetadat aConstant.CREATOR,jParams); or a simplified way String creator = jahiaContainer.getContentContainer().getMetadataValue(CoreMetadataConsta nt.CREATOR,jParams,"unknown"); Regards, Khue Nguyen ----- Original Message ----- From: BARREAU Amandine <mailto:[email protected]> To: [email protected] Sent: Monday, November 14, 2005 12:07 PM Subject: metadata Hello How can I retrieve metada from a container? Thanks.