forked from ewilderj/doap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstants.cs
50 lines (42 loc) · 882 Bytes
/
Constants.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections;
using Redland;
namespace Doap {
public class NsMaker {
Hashtable terms;
internal string ns;
public Node Node (string name)
{
if (! terms.ContainsKey (name)) {
terms [name] = MakeProperty (name);
}
return (Node) terms [name];
}
public Node MakeProperty (string name)
{
return new Node (new Redland.Uri (ns + name));
}
public Node this [string name] {
get {
return Node (name);
}
}
public NsMaker (string nspace)
{
terms = new Hashtable ();
ns = nspace;
}
}
public class DoapNs : NsMaker {
public DoapNs () : base ("http://usefulinc.com/ns/doap#") {
}
}
public class RdfNs : NsMaker {
public RdfNs () : base ("http://www.w3.org/1999/02/22-rdf-syntax-ns#") {
}
}
public class FoafNs : NsMaker {
public FoafNs () : base ("http://xmlns.com/foaf/0.1/") {
}
}
}