Examples of toRDF()


Examples of com.hp.gloze.XMLBean.toRDF()

      case Node.ELEMENT_NODE:
        // run through the choices
        for (int x=0; x < _any.size(); x++) {
          int i = index;
          XMLBean b = (XMLBean) _any.elementAt(x);
          index = b.toRDF(subject, node, index, seq, mixed, ctx);
          if (i<index) {
            occurs++;
            continue next;
          }
        }
View Full Code Here

Examples of com.hp.gloze.www_w3_org_2001_XMLSchema.complexType.toRDF()

                   
          Seq subSeq = null;
          if (ctx.isSequenced() && elem.hasChildNodes() && c.needSeq(new HashSet<String>(), ctx))
            subSeq = m.getSeq(o.addProperty(RDF.type, RDF.Seq));
   
          int index = c.toRDF(o, elem, 0, subSeq,null,true,ctx);
          // mop up remaining values in sequence
          produceMixed(subSeq, index, elem);

          m.add(stmt);
          return true;
View Full Code Here

Examples of com.hp.gloze.www_w3_org_2001_XMLSchema.element.toRDF()

    Resource rez;
    if (base != null) rez = model.createResource(base.toString());
    else rez = model.createResource();
   
    element e = ctx.getElement(element.createURI(d,ctx));
    if (e!=null) return e.toRDF(rez, d, null,ctx);
   
    logger.warn("using no schema mapping for document element: "+d.getLocalName());
    // use default no-schema mapping
    XMLBean.noSchemaToRDF(d,base,ctx);
    return true;
View Full Code Here

Examples of com.hp.gloze.www_w3_org_2001_XMLSchema.element.toRDF()

    Resource rez;
    if (base != null) rez = model.createResource(base.toString());
    else rez = model.createResource();
   
    element e = ctx.getElement(element.createURI(d,ctx));
    if (e!=null) return e.toRDF(rez, d, null,ctx);
   
    logger.warn("using no schema mapping for document element: "+d.getLocalName());
    // use default no-schema mapping
    XMLBean.noSchemaToRDF(d,base,ctx);
    return true;
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleList.toRDF()

        // TODO: handle list containment cycles (e.g. list containing a list containing the original list) as well.
        // These are actually more likely than circular lists.
        Set<RDFValue> alreadyInterned = new HashSet<RDFValue>();

        RippleList cur = list;
        RDFValue id = cur.toRDF(this);
        while (!cur.isNil()) {
            if (alreadyInterned.contains(id)) {
                break;
            } else {
                alreadyInterned.add(id);
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleList.toRDF()

            if (cur.getFirst() instanceof RippleList) {
                internalize((RippleList) cur.getFirst());
            }

            RippleList rest = cur.getRest();
            RDFValue restRdf = rest.toRDF(this);

            buffer.put(
                    valueFactory.createStatement((Resource) id.sesameValue(), RDF.TYPE, RDF.LIST));
            buffer.put(
                    valueFactory.createStatement((Resource) id.sesameValue(), RDF.FIRST, firstRdf.sesameValue()));
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue.toRDF()

                         final ModelConnection mc)
            throws RippleException {
        Sink<RippleList> typeSink = new Sink<RippleList>() {
            public void put(final RippleList l) throws RippleException {
                RippleValue type = l.getFirst();
                Value t = (URI) type.toRDF(mc).sesameValue();
                if (t instanceof URI) {
                    sink.put(mc.list().push(mc.valueOf(value, (URI) t)));
                } else {
                    qe.getErrorPrintStream().println("datatype does not map to a URI reference: " + type);
                }
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue.toRDF()

                        pushSink.put(new RDFValue(st.getObject()));
                    }
                }
            };

            mc.getStatements(head.toRDF(mc), null, null, stSink);

            /*
            int i = 1;
            while (true) { // Break out when there are no more members to produce
                Collector<RippleValue, RippleException> results = new Collector<RippleValue, RippleException>();
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue.toRDF()

        RippleValue obj = h.findSingleObject(subj, pred);

        if (null == obj) {
            return null;
        } else {
            return obj.toRDF(mc).sesameValue().stringValue();
        }
    }

    private class UriTestCase {
        public TestType type;
View Full Code Here

Examples of net.fortytwo.ripple.model.RippleValue.toRDF()

        Collection<RippleList> r = reduce("time.");
        assertEquals(1, r.size());
        RippleList l = r.iterator().next();
        assertEquals(1, l.length());
        RippleValue v = l.getFirst();
        Value rv = v.toRDF(this.modelConnection).sesameValue();
        assertTrue(rv instanceof Literal);
        assertEquals(XMLSchema.LONG, ((Literal) rv).getDatatype());
        long t = ((Literal) rv).longValue();
        // April 10, 2011 will never come again.
        assertTrue(t > 1302390000000l);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.