Examples of addDomain()


Examples of com.hp.hpl.jena.ontology.DatatypeProperty.addDomain()

    String ns = Namespaces.KARMA;
    autoOntology.setNsPrefix("karma", ns);
    OntClass topClass = autoOntology.createClass( ns + worksheet.getTitle().replaceAll(" ", "_")); // replace blank spaces with undrscore
    for (HNode hNode : sortedLeafHNodes){
      DatatypeProperty dp = autoOntology.createDatatypeProperty(ns+hNode.getColumnName().trim().replaceAll(" ", "_"));
      dp.addDomain(topClass);
      dp.addRange(XSD.xstring);
    }
   
//    OntClass thingClass = autoOntology.createClass(Uris.THING_URI);
    ObjectProperty op = autoOntology.createObjectProperty(ns + "relatedTo");
View Full Code Here

Examples of com.hp.hpl.jena.ontology.ObjectProperty.addDomain()

                log.warn("Source object type reference not found on property definition {}",
                    propertyDefinition.getLocalname());
            }

            for (Resource domain : domains) {
                objectProperty.addDomain(domain);
            }
            for (Resource range : ranges) {
                objectProperty.addRange(range);
            }
            log.debug("ObjectProperty {} not found, creating new one...", propertyURI);
View Full Code Here

Examples of com.hp.hpl.jena.ontology.ObjectProperty.addDomain()

      dp.addRange(XSD.xstring);
    }
   
//    OntClass thingClass = autoOntology.createClass(Uris.THING_URI);
    ObjectProperty op = autoOntology.createObjectProperty(ns + "relatedTo");
    op.addDomain(topClass);
//    op.addRange(thingClass);
   
    Writer outUTF8 =null;
    try {
      outUTF8 = new BufferedWriter(new OutputStreamWriter(
View Full Code Here

Examples of com.hp.hpl.jena.ontology.ObjectProperty.addDomain()

    OntModel model = ModelFactory.createOntologyModel();

    OntClass A = model.createClass( ns + "A" );
    ObjectProperty P = model.createObjectProperty( ns + "P" );
    P.addDomain( A );
    Individual x = model.createIndividual( ns + "x", OWL.Thing );
    Individual y = model.createIndividual( ns + "y", OWL.Thing );
    x.addProperty( P, y );

    assertTrue( x.hasRDFType( A ) );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.ObjectProperty.addDomain()

    OntModel model = ModelFactory.createOntologyModel( spec, null );

    OntClass A = model.createClass( ns + "A" );
    OntClass B = model.createClass( ns + "B" );
    ObjectProperty P = model.createObjectProperty( ns + "P" );
    P.addDomain( model.createUnionClass( null, model.createList( new RDFNode[] { A, B } ) ) );

    OntClass oc = model.getOntClass( ns + "B" );

    assertIteratorValues( oc.listDeclaredProperties(), new Resource[] { P } );
  }
View Full Code Here

Examples of com.hp.hpl.jena.ontology.ObjectProperty.addDomain()

    OntModel model = ModelFactory.createOntologyModel();

    OntClass A = model.createClass( ns + "A" );
    ObjectProperty P = model.createObjectProperty( ns + "P" );
    P.addDomain( A );
    Individual x = model.createIndividual( ns + "x", OWL.Thing );
    Individual y = model.createIndividual( ns + "y", OWL.Thing );
    x.addProperty( P, y );

    assertTrue( x.hasRDFType( A ) );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.ObjectProperty.addDomain()

    OntModel model = ModelFactory.createOntologyModel( spec, null );

    OntClass A = model.createClass( ns + "A" );
    OntClass B = model.createClass( ns + "B" );
    ObjectProperty P = model.createObjectProperty( ns + "P" );
    P.addDomain( model.createUnionClass( null, model.createList( new RDFNode[] { A, B } ) ) );

    OntClass oc = model.getOntClass( ns + "B" );

    assertIteratorValues( oc.listDeclaredProperties(), new Resource[] { P } );
  }
View Full Code Here

Examples of fr.dyade.aaa.agent.ServerConfigHelper.addDomain()

                         AgentId replyTo,
                         String msgId,
                         AgentId from) {
    try {
      ServerConfigHelper helper = new ServerConfigHelper(true);
      if (helper.addDomain(request.getDomainName(), request.getNetwork(), request.getServerId(), request.getPort())) {
        distributeReply(replyTo, msgId, new AdminReply(true, "Domain added"));
      }
      if (from == null)
        broadcastRequest(request, -1, replyTo, msgId);
    } catch (ServerConfigHelper.NameAlreadyUsedException exc) {
View Full Code Here

Examples of fr.dyade.aaa.agent.conf.A3CMLConfig.addDomain()

    if (a3cmlConfig.servers.get(new Short((short)routerId)) == null)
      throw new Exception("Server not found: " + routerId);
   
    // Update the configuration (can't fail)
    A3CMLDomain domain = new A3CMLDomain(domainName, network);
    a3cmlConfig.addDomain(domain);
    A3CMLServer a3cmlServer = a3cmlConfig.getServer((short) routerId);
    domain.addServer(a3cmlServer);
    A3CMLNetwork a3cmlNetwork = new A3CMLNetwork(domainName, port);
    a3cmlServer.addNetwork(a3cmlNetwork);
View Full Code Here

Examples of org.apache.cayenne.conf.Configuration.addDomain()

        Configuration config = Configuration.getSharedConfiguration();
        if (getDomain() != config.getDomain()) {
            if (config.getDomain() != null) {
                config.removeDomain(config.getDomain().getName());
            }
            config.addDomain(getDomain());
        }
    }

    public void testSerializeResolver() throws Exception {
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.