1
14
15 package com.liferay.portal.cmis.model;
16
17 import javax.xml.namespace.QName;
18
19 import org.apache.abdera.factory.Factory;
20 import org.apache.abdera.model.Element;
21 import org.apache.abdera.model.ElementWrapper;
22
23
28 public class CMISRepositoryInfo extends ElementWrapper {
29
30 public CMISRepositoryInfo(Element element) {
31 super(element);
32
33 _cmisConstants = CMISConstants.getInstance();
34 }
35
36 public CMISRepositoryInfo(Factory factory) {
37 super(factory, CMISConstants.getInstance().REPOSITORY_INFO);
38
39 _cmisConstants = CMISConstants.getInstance();
40 }
41
42 public String getDescription() {
43 return getFirstChildText(_cmisConstants.REPOSITORY_DESCRIPTION);
44 }
45
46 public String getId() {
47 return getFirstChildText(_cmisConstants.REPOSITORY_ID);
48 }
49
50 public String getName() {
51 return getFirstChildText(_cmisConstants.REPOSITORY_NAME);
52 }
53
54 public String getProductName() {
55 return getFirstChildText(_cmisConstants.REPOSITORY_PRODUCT_NAME);
56 }
57
58 public String getProductVersion() {
59 return getFirstChildText(_cmisConstants.REPOSITORY_PRODUCT_VERSION);
60 }
61
62 public String getRelatonship() {
63 return getFirstChildText(_cmisConstants.REPOSITORY_RELATIONSHIP);
64 }
65
66 public String getRootFolderId() {
67 return getFirstChildText(_cmisConstants.REPOSITORY_ROOT_FOLDER_ID);
68 }
69
70 public Element getSpecificInfo() {
71 return getFirstChild(_cmisConstants.REPOSITORY_SPECIFIC_INFO);
72 }
73
74 public String getVendorName() {
75 return getFirstChildText(_cmisConstants.REPOSITORY_VENDOR_NAME);
76 }
77
78 public String getVersionSupported() {
79 return getFirstChildText(_cmisConstants.REPOSITORY_VERSION_SUPPORTED);
80 }
81
82 protected String getFirstChildText(QName qName) {
83 String text = null;
84
85 Element element = getFirstChild(qName);
86
87 if (element != null) {
88 text = element.getText();
89 }
90
91 return text;
92 }
93
94 private CMISConstants _cmisConstants;
95
96 }