Examples of createProperty()


Examples of com.hp.hpl.jena.ontology.OntModel.createProperty()

    Resource a = model.createResource( "a", OWL.Thing );
    Resource b = model.createResource( "b", OWL.Thing );
    Literal lit = model.createLiteral( "l" );

    Property p = model.createProperty( "p" );
    Property dp = model.createProperty( "dp" );
   
    model.add( a, p, b );
    model.add( a, dp, lit );
   
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

        String BASE = "http://example/" ;
        Model model = ModelFactory.createDefaultModel() ;
        model.setNsPrefix("", BASE) ;
        Resource r1 = model.createResource(BASE+"r1") ;
        Resource r2 = model.createResource(BASE+"r2") ;
        Property p1 = model.createProperty(BASE+"p") ;
        Property p2 = model.createProperty(BASE+"p2") ;
        RDFNode v1 = model.createTypedLiteral("1", XSDDatatype.XSDinteger) ;
        RDFNode v2 = model.createTypedLiteral("2", XSDDatatype.XSDinteger) ;
       
        r1.addProperty(p1, v1).addProperty(p1, v2) ;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

        Model model = ModelFactory.createDefaultModel() ;
        model.setNsPrefix("", BASE) ;
        Resource r1 = model.createResource(BASE+"r1") ;
        Resource r2 = model.createResource(BASE+"r2") ;
        Property p1 = model.createProperty(BASE+"p") ;
        Property p2 = model.createProperty(BASE+"p2") ;
        RDFNode v1 = model.createTypedLiteral("1", XSDDatatype.XSDinteger) ;
        RDFNode v2 = model.createTypedLiteral("2", XSDDatatype.XSDinteger) ;
       
        r1.addProperty(p1, v1).addProperty(p1, v2) ;
        r1.addProperty(p2, v1).addProperty(p2, v2) ;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

   
    private static Model makeData()
    {
        Model model = ModelFactory.createDefaultModel() ;
        Resource r = model.createResource(NS+"r") ;
        Property p1 = model.createProperty(NS+"p1") ;
        Property p2 = model.createProperty(NS+"p2") ;
        model.add(r, p1, "xyz") ;
        model.add(r, p2, "abc") ;
        return model ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

    private static Model makeData()
    {
        Model model = ModelFactory.createDefaultModel() ;
        Resource r = model.createResource(NS+"r") ;
        Property p1 = model.createProperty(NS+"p1") ;
        Property p2 = model.createProperty(NS+"p2") ;
        model.add(r, p1, "xyz") ;
        model.add(r, p2, "abc") ;
        return model ;
    }
}
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

    Model m = ctx.getModel();
    String value = getValue(elem);
    if (value==null && _default != null) value = _default;
    String uri = createURI(m,ctx);
    Property prop = null;
    if (uri != null) prop = m.createProperty(uri);
    Statement stmt=null;
    // the element may be defined locally or globally (follow ref)
    element def = getDefinition(ctx.getModel(),ctx);
   
    // explicit xsi:type
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

  throws Exception {
    Model m = subject.getModel();
    Statement stmt = null;
   
    String uri = expandQName(elem, ctx.getModel(), ctx);
    Property prop = m.createProperty(uri);

    // anything with no attributes and a single (or no) value is simple
    // anything with attributes is complex
    // anything with children is complex
   
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

    schema xs = (schema) this.get_owner();
    if (attribute==null && getFixed()==null) return;
   
    String value = attribute!=null?attribute.getValue():getFixed();
    if (value.equals("") && _default!=null) value = _default;
    Property prop = model.createProperty(createURI(model,ctx));
   
    // avoid adding xml namespace attributes
    if (attribute!=null &&
        attribute.getNamespaceURI()!=null &&
        attribute.getNamespaceURI().equals(XML)) return;
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.Model.createProperty()

  /** check validity of simple content */
 
  public boolean isValid(Resource resource, Context ctx) {
    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);
View Full Code Here

Examples of com.ibm.jscript.types.FBSDefaultObject.createProperty()

      List<Object> wregs = ExtensionManager.findServices(null, WrapperOpenDomino.class, WrapperRegistry.class.getName());
      // for (Class<?> clazz : WRAPPED_CLASSES) {
      for (Object wreg : wregs) {
        for (Class<?> clazz : ((WrapperRegistry) wreg).getWrapperClasses()) {
          registry.registerWrapper(clazz, new OpenWrapperFactory(clazz));
          defaultObject.createProperty("Open" + clazz.getSimpleName(), 1338, new OpenConstructor(context, clazz));
        }
      }

    } catch (Exception e) {
      e.printStackTrace();
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.