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

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


      if (!node.isResource()) {
        logger.info("object of the hasAttribute property is not a resource.");
        continue;
      }
     
      variables.add(node.asResource().getLocalName());
    }
   
    return variables;

  }
View Full Code Here


      if (!node.isResource()) {
        logger.info("object of the hasAttribute property is not a resource.");
        continue;
      }
     
      attList.add(getAttribute(model, node.asResource(), ioType, AttributeRequirement.NONE));
    }

    // hasMandatoryAttribute
    nodeIterator = model.listObjectsOfProperty(io_resource, has_mandatory_attribute_property);
    while ( nodeIterator.hasNext()) {
View Full Code Here

      if (!node.isResource()) {
        logger.info("object of the hasMandatoryAttribute property is not a resource.");
        continue;
      }
     
      attList.add(getAttribute(model, node.asResource(), ioType, AttributeRequirement.MANDATORY));
    }
   
    // hasOptionalAttribute
    nodeIterator = model.listObjectsOfProperty(io_resource, has_optional_attribute_property);
    while ( nodeIterator.hasNext()) {
View Full Code Here

      if (!node.isResource()) {
        logger.info("object of the hasOptionalAttribute property is not a resource.");
        continue;
      }
     
      attList.add(getAttribute(model, node.asResource(), ioType, AttributeRequirement.OPTIONAL));
    }
   
    return attList;

  }
View Full Code Here

      if (!atomNode.isResource()) {
        logger.info("object of the hasAtom property is not a resource.");
        continue;
      }
     
      atoms.add(getAtom(model, atomNode.asResource()));
    }

    semanticModel.setAtoms(atoms);
    return semanticModel;
View Full Code Here

    if (!nodeIterator.hasNext() || !(node = nodeIterator.next()).isResource()) {
      logger.info("The atom type is not specified.");
      return null;
    }
   
    if (node.asResource().getURI().equalsIgnoreCase(classAtomUri)) {
      logger.debug("The atom is a ClassAtom");
      return getClassAtom(model, atom_resource);
    }
    else if (node.asResource().getURI().equalsIgnoreCase(propertyAtomUri)) {
      logger.debug("The atom is an IndividualPropertyAtom");
View Full Code Here

   
    if (node.asResource().getURI().equalsIgnoreCase(classAtomUri)) {
      logger.debug("The atom is a ClassAtom");
      return getClassAtom(model, atom_resource);
    }
    else if (node.asResource().getURI().equalsIgnoreCase(propertyAtomUri)) {
      logger.debug("The atom is an IndividualPropertyAtom");
      return getPropertyAtom(model, atom_resource);
    }
   
    return null;
View Full Code Here

    if (!nodeIterator.hasNext() || !(node = nodeIterator.next()).isResource()) {
      logger.info("The class predicate resource is not specified.");
      return null;
    }
   
    predicateUri = node.asResource().getURI();
    logger.debug("The atom predicate is: " + predicateUri);
    predicateNs = node.asResource().getNameSpace();
    predicatePrefix = model.getNsURIPrefix(predicateNs);
   
    // atom argument1
View Full Code Here

      return null;
    }
   
    predicateUri = node.asResource().getURI();
    logger.debug("The atom predicate is: " + predicateUri);
    predicateNs = node.asResource().getNameSpace();
    predicatePrefix = model.getNsURIPrefix(predicateNs);
   
    // atom argument1
    nodeIterator = model.listObjectsOfProperty(atom_resource, argument1_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
View Full Code Here

    predicatePrefix = model.getNsURIPrefix(predicateNs);
   
    // atom argument1
    nodeIterator = model.listObjectsOfProperty(atom_resource, argument1_property);
    if (nodeIterator.hasNext() && (node = nodeIterator.next()).isResource()) {
      argument1Id = node.asResource().getLocalName();
      logger.debug("The atom argument1 is: " + argument1Id);
     
      if (isInstanceOfTheClass(node.asResource(), attribute))
        argument1Type = ArgumentType.ATTRIBUTE;
      else if (isInstanceOfTheClass(node.asResource(), variable))
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.