Package com.hp.gloze

Examples of com.hp.gloze.XMLBean


        xs.toRDF(attribute, subject, prop, value, t, null, null, ctx);
      }
      return;
    }
    else {
      XMLBean type = def.get_type(ctx);
      // simple type?
      if (type instanceof simpleType)
        ((simpleType) type).toRDF(subject, prop, attribute, value, null, null, ctx);
      // else add plain literal
      else subject.addProperty(prop, model.createLiteral(schema.processWhitespace(attribute,value,null,ctx)));
View Full Code Here


        a.setPrefix(ctx.getModel().getNsURIPrefix(ns));
        e.setAttributeNodeNS(a);
      }
      else e.setAttributeNode(a = doc.createAttribute(def.getName()));

      XMLBean t = get_type(ctx);
      if (t instanceof simpleType) ((simpleType) t).toXML(a,object,ctx);
      else if (type != null && type.endsWith("IDREFS"))
        xs.listToXML(a,(RDFList) object.as(RDFList.class),XSD.IDREF.getURI(),ctx);
      else a.setValue(xs.toXMLValue(e,object,type,ctx));
    }
View Full Code Here

    Model model = ctx.getModel();
    Property prop = model.createProperty(createURI(model,ctx));
    Statement stmt = resource.getProperty(prop);
    String value = stmt!=null?stmt.getString():null;
    attribute def = getDefinition(model,ctx);
    XMLBean t = def.get_type(ctx);
    if (t instanceof simpleType) return ((simpleType)t).isValid(value, ctx);
    return true;
  }
View Full Code Here

TOP

Related Classes of com.hp.gloze.XMLBean

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.