How to fetch the title of a type?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2012 12:42 PM
Hi there,
As the subject says, I have a custom type described by a QName. How can I get for example the title element of it in Java?
Many thanks,
Rocco
As the subject says, I have a custom type described by a QName. How can I get for example the title element of it in Java?
Many thanks,
Rocco
Labels:
- Labels:
-
Archive
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2012 02:25 AM
With a custom title:
String title = (String) nodeService.getProperty(myNodeRef, QName.createQName("http://www.mycompany.com/model/customModel/1.0", "title");
Change to your namespace and the name of your custom title.
/Erik
String title = (String) nodeService.getProperty(myNodeRef, QName.createQName("http://www.mycompany.com/model/customModel/1.0", "title");
Change to your namespace and the name of your custom title.
/Erik

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2012 08:05 AM
Many thanks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2012 09:23 AM
And what about if is in this situation:
How do I fetch the title?
<namespace uri="http://xxx/model/1.0" prefix="xxx" />
<type name="xxx:customType"> <title>My Title</title>
How do I fetch the title?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2012 09:28 AM
Well that title-element is just a way to name your type (like naming a java class or something). To find that out you will have to use the DictionaryService.getType and on the returned TypeDefinition do a getTitle() I suppose…
/Erik
/Erik

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2012 09:41 AM
Thanks a lot
