/[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.8 by mudyc, Thu Mar 27 08:51:57 2003 UTC revision 1.9 by mudyc, Thu Mar 27 09:02:32 2003 UTC
# Line 84  public static final String rcsid = "$Id$ Line 84  public static final String rcsid = "$Id$
84          if (object == null) {          if (object == null) {
85              return model.createResource(uri);              return model.createResource(uri);
86          } else {          } else {
87                pa("JOU!"+object);
88              Resource res = model.createResource(uri);              Resource res = model.createResource(uri);
89              res.addProperty(RDF.type, (Resource)object);              res.addProperty(RDF.type, (Resource)object);
90              return res;              return res;
# Line 108  public static final String rcsid = "$Id$ Line 109  public static final String rcsid = "$Id$
109          throw new Error("ShortRDF has RDFException!");          throw new Error("ShortRDF has RDFException!");
110      }}      }}
111    
112        /** old -pred-> new
113         */
114        static public RDFNode newNode(Model model, RDFNode node, Property property, RDFNode type)
115        { try {
116            String uri = URN5Namespace.instance.generateId();
117            Resource res = model.createResource(uri);
118    
119            ((Resource)node).addProperty(property, res);
120            res.addProperty(RDF.type, (Resource)type);
121            return res;
122    
123        } catch (RDFException e) {
124            pa("Exception ocurred!: "+e);
125            throw new Error("ShortRDF has RDFException!");
126        }}
127    
128    
129    
130      /** New -pred-> old      /** New -pred-> old
131       */       */
132      static public RDFNode newNodeToNode(Model model, RDFNode node, Property property)      static public RDFNode newNodeToNode(Model model, RDFNode node, Property property)

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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