Package com.hp.gloze.www_w3_org_2001_XMLSchema

Examples of com.hp.gloze.www_w3_org_2001_XMLSchema.complexType


     
      // explicit xsi:type
      if (elem.hasAttributeNS(schema.XSI,"type")) {
        String t = elem.getAttributeNS(schema.XSI,"type");
        String fullname = expandQName(ctx.getDefaultNS(),t,elem,ctx.getModel());
        complexType c = ctx.getComplexType(fullname);
        if (c!=null) {
          String id = c.getID(elem,ctx);
          Resource o = id==null?m.createResource():m.createResource(addFragment(ctx.getBaseMap(), id).toString());
          stmt = m.createStatement(subject,prop,o);
          // the new resource, o, becomes the subject
                   
          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


    if (rdf instanceof Resource) {
      Resource r = (Resource) rdf;
      Model m = r.getModel();
     
      // is the resource explicitly typed
      complexType ct = null;
      for (StmtIterator si = r.listProperties(RDF.type); si.hasNext(); ) {
        Resource t = si.nextStatement().getResource();
       
        // ignore RDF types, e.g. rdf:Seq
        if (t.getURI().startsWith(RDF.getURI())) continue;       
        complexType c = ctx.getComplexType(t.getURI());
        if (c!=null && (ct==null || c.subtype(ct.createURI(m,ctx),m,ctx))) ct = c;
      }   
      if (ct!=null) {
        ct.toXML(elem, r, 0, unsequenced(r), ctx);
        return true;
      }     
View Full Code Here

TOP

Related Classes of com.hp.gloze.www_w3_org_2001_XMLSchema.complexType

Copyright © 2018 www.massapicom. 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.