Package com.hp.hpl.jena.rdf.model

Examples of com.hp.hpl.jena.rdf.model.RDFNode.asResource()


    }

    // atom argument2
    nodeIterator = model.listObjectsOfProperty(atom_resource, argument2_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
      argument2Id = node.asResource().getLocalName();
      logger.debug("The atom argument2 is: " + argument2Id);
     
      if (isInstanceOfTheClass(node.asResource(), attribute))
        argument2Type = ArgumentType.ATTRIBUTE;
      else if (isInstanceOfTheClass(node.asResource(), variable))
View Full Code Here


    nodeIterator = model.listObjectsOfProperty(atom_resource, argument2_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
      argument2Id = node.asResource().getLocalName();
      logger.debug("The atom argument2 is: " + argument2Id);
     
      if (isInstanceOfTheClass(node.asResource(), attribute))
        argument2Type = ArgumentType.ATTRIBUTE;
      else if (isInstanceOfTheClass(node.asResource(), variable))
        argument2Type = ArgumentType.VARIABLE;
     
    } else {
View Full Code Here

      argument2Id = node.asResource().getLocalName();
      logger.debug("The atom argument2 is: " + argument2Id);
     
      if (isInstanceOfTheClass(node.asResource(), attribute))
        argument2Type = ArgumentType.ATTRIBUTE;
      else if (isInstanceOfTheClass(node.asResource(), variable))
        argument2Type = ArgumentType.VARIABLE;
     
    } else {
      logger.info("atom does not have an argument2.");
      return null;
View Full Code Here

          Property objectMapProp = model.getProperty(Uris.RR_OBJECTMAP_URI);
          Property dataTypeProp = model.getProperty(Uris.RR_DATATYPE_URI);
          RDFNode node = stmt.getSubject().getProperty(objectMapProp).getObject();
          String dataType = null;
          if (node != null && node.isResource()) {
            Statement s = node.asResource().getProperty(dataTypeProp);
            if (s != null) {
              dataType = model.shortForm(s.getObject().toString());
            }
          }
          String shortForm = model.shortForm(stmt.getObject().toString());
View Full Code Here

        if (m == null) {
          logger.info("model uri is null.");
          continue;
        }

        String uri = m.asResource().getNameSpace();
        logger.debug("service uri: " + uri);
        if (IdsAndMappings.get(uri) == null) {
          IdsAndMappings.put(uri, new HashMap<String, String>());
        }
       
View Full Code Here

        }
       
        for (String arg : argList) {
          RDFNode argNode = soln.get(arg) ;
          if (argNode != null && argNode.isResource()) {
            String retrieved_id = argNode.asResource().getLocalName();
            IdsAndMappings.get(uri).put(arg, retrieved_id);
          }
        }
      }
     
View Full Code Here

    variables = getVariables(model, service_resource);
   
    // service input
    nodeIterator = model.listObjectsOfProperty(service_resource, has_input_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
      inputAttributes = getAttributes(model, node.asResource(), IOType.INPUT);
      inputModel = getSemanticModel(model, node.asResource());
    } else
      logger.debug("service does not have an input.");
   
    // service output
View Full Code Here

   
    // service input
    nodeIterator = model.listObjectsOfProperty(service_resource, has_input_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
      inputAttributes = getAttributes(model, node.asResource(), IOType.INPUT);
      inputModel = getSemanticModel(model, node.asResource());
    } else
      logger.debug("service does not have an input.");
   
    // service output
    nodeIterator = model.listObjectsOfProperty(service_resource, has_output_property);
View Full Code Here

      logger.debug("service does not have an input.");
   
    // service output
    nodeIterator = model.listObjectsOfProperty(service_resource, has_output_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
      outputAttributes = getAttributes(model, node.asResource(), IOType.OUTPUT );
      outputModel = getSemanticModel(model, node.asResource());
    } else
      logger.info("service does not have an output.");
   
    WebService service = new WebService(service_id, service_name, service_address);
View Full Code Here

   
    // service output
    nodeIterator = model.listObjectsOfProperty(service_resource, has_output_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
      outputAttributes = getAttributes(model, node.asResource(), IOType.OUTPUT );
      outputModel = getSemanticModel(model, node.asResource());
    } else
      logger.info("service does not have an output.");
   
    WebService service = new WebService(service_id, service_name, service_address);
    service.setMethod(service_method);
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.