/[fenfire]/fenfire/org/fenfire/util/ShortRDF.java
ViewVC logotype

Diff of /fenfire/org/fenfire/util/ShortRDF.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by mudyc, Wed Mar 26 14:00:25 2003 UTC revision 1.6 by mudyc, Wed Mar 26 23:48:15 2003 UTC
# Line 72  public static final String rcsid = "$Id$ Line 72  public static final String rcsid = "$Id$
72          throw new Error("ShortRDF has RDFException!");          throw new Error("ShortRDF has RDFException!");
73      }}      }}
74    
75    
76        static public RDFNode newNode(Model model) {
77            return newNode(model, null);
78        }
79        static public RDFNode newNode(Model model, RDFNode object)
80        { try {
81            String uri = URN5Namespace.instance.generateId();
82            if (object == null) {
83                return model.createResource(uri);
84            } else {
85                Resource res = model.createResource(uri);
86                res.addProperty(RDF.type, (Resource)object);
87                return res;
88            }
89        } catch (RDFException e) {
90            pa("Exception ocurred!: "+e);
91            throw new Error("ShortRDF has RDFException!");
92        }}
93    
94        static public RDFNode newNode(Model model, RDFNode node, Property property)
95        { try {
96            String uri = URN5Namespace.instance.generateId();
97            Resource res = model.createResource(uri);
98    
99            ((Resource)node).addProperty(property, res);
100            return res;
101    
102        } catch (RDFException e) {
103            pa("Exception ocurred!: "+e);
104            throw new Error("ShortRDF has RDFException!");
105        }}
106    
107        
108    
109    
110  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26