1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.fourthline.cling.binding.xml;
17
18 import org.w3c.dom.Node;
19
20
21
22
23
24
25 public abstract class Descriptor {
26
27 public interface Device {
28
29 public static final String NAMESPACE_URI = "urn:schemas-upnp-org:device-1-0";
30 public static final String DLNA_NAMESPACE_URI = "urn:schemas-dlna-org:device-1-0";
31 public static final String DLNA_PREFIX = "dlna";
32 public static final String SEC_NAMESPACE_URI = "http://www.sec.co.kr/dlna";
33 public static final String SEC_PREFIX = "sec";
34
35 public enum ELEMENT {
36 root,
37 specVersion, major, minor,
38 URLBase,
39 device,
40 UDN,
41 X_DLNADOC,
42 X_DLNACAP,
43 ProductCap,
44 X_ProductCap,
45 deviceType,
46 friendlyName,
47 manufacturer,
48 manufacturerURL,
49 modelDescription,
50 modelName,
51 modelNumber,
52 modelURL,
53 presentationURL,
54 UPC,
55 serialNumber,
56 iconList, icon, width, height, depth, url, mimetype,
57 serviceList, service, serviceType, serviceId, SCPDURL, controlURL, eventSubURL,
58 deviceList;
59
60 public static ELEMENT valueOrNullOf(String s) {
61 try {
62 return valueOf(s);
63 } catch (IllegalArgumentException ex) {
64 return null;
65 }
66 }
67
68 public boolean equals(Node node) {
69 return toString().equals(node.getLocalName());
70 }
71 }
72 }
73
74 public interface Service {
75
76 public static final String NAMESPACE_URI = "urn:schemas-upnp-org:service-1-0";
77
78 public enum ELEMENT {
79 scpd,
80 specVersion, major, minor,
81 actionList, action, name,
82 argumentList, argument, direction, relatedStateVariable, retval,
83 serviceStateTable, stateVariable, dataType, defaultValue,
84 allowedValueList, allowedValue, allowedValueRange, minimum, maximum, step;
85
86 public static ELEMENT valueOrNullOf(String s) {
87 try {
88 return valueOf(s);
89 } catch (IllegalArgumentException ex) {
90 return null;
91 }
92 }
93
94 public boolean equals(Node node) {
95 return toString().equals(node.getLocalName());
96 }
97
98 }
99
100 public enum ATTRIBUTE {
101 sendEvents
102 }
103 }
104
105 }