Package edu.isi.karma.rep.model

Examples of edu.isi.karma.rep.model.ClassAtom


    String argument1 = "";
    String argument2 = "";

    for (Atom atom : outputModel.getAtoms()) {
      if (atom instanceof ClassAtom) {
        ClassAtom classAtom = (ClassAtom)atom;
       
        // creating a blank node
        r = model.createResource();
        if (classAtom.getClassPredicate().getPrefix() != null && classAtom.getClassPredicate().getNs() != null)
          model.setNsPrefix(classAtom.getClassPredicate().getPrefix(), classAtom.getClassPredicate().getNs());
        predicateUri = classAtom.getClassPredicate().getUri();
       
        // creating the class resource
        Resource classResource = model.getResource(predicateUri);
        if (classResource == null)
          classResource = model.createResource(predicateUri);

        argument1 = classAtom.getArgument1().getId();
        outputVariablesToResource.put(argument1, r);

        r.addProperty(rdf_type, classResource);
      }
    }
View Full Code Here


    }
   
    Label predicateName = new Label(predicateUri, predicateNs, predicatePrefix);
    Argument arg1 = new Argument(argument1Id, argument1Id, argument1Type);
   
    ClassAtom classAtom = new ClassAtom(predicateName, arg1);

    return classAtom;

  }
View Full Code Here

   
    Label featurePredicatName = new Label(geoOntology + "Feature", geoOntology, "geo");
    Label latPredicatName = new Label(geoOntology + "lat", geoOntology, "geo");
    Label lngPredicatName = new Label(geoOntology + "long", geoOntology, "geo");
   
    ClassAtom c1 = new ClassAtom(featurePredicatName, new Argument("arg1", "arg1", ArgumentType.ATTRIBUTE));
    IndividualPropertyAtom p1 = new IndividualPropertyAtom(latPredicatName,
        new Argument("arg1", "arg1", ArgumentType.ATTRIBUTE),
        new Argument("arg2", "arg2", ArgumentType.ATTRIBUTE));
    IndividualPropertyAtom p2 = new IndividualPropertyAtom(lngPredicatName,
        new Argument("arg1", "arg1", ArgumentType.ATTRIBUTE),
View Full Code Here

    resource.addProperty(has_model, my_model);

    if (semanticModel != null) {
      for (Atom atom : semanticModel.getAtoms()) {
        if (atom instanceof ClassAtom) {
          ClassAtom classAtom = (ClassAtom)atom;

          Resource r = model.createResource();
          r.addProperty(rdf_type, class_atom_resource);

          if (classAtom.getClassPredicate().getPrefix() != null && classAtom.getClassPredicate().getNs() != null)
            model.setNsPrefix(classAtom.getClassPredicate().getPrefix(), classAtom.getClassPredicate().getNs());
          Resource className = model.createResource(classAtom.getClassPredicate().getUri());
          r.addProperty(class_predicate, className);

          Resource arg1 = model.getResource(baseNS + classAtom.getArgument1().getAttOrVarId());
          r.addProperty(has_argument1, arg1);

          my_model.addProperty(has_atom, r);
        }
        else if (atom instanceof IndividualPropertyAtom) {
View Full Code Here

      if (vertexIdToArgument.get(n.getId()) == null)
        continue;
     
      Label classPredicate = new Label(n.getLabel().getUri(), n.getLabel().getNs(), n.getLabel().getPrefix());

      ClassAtom classAtom = new ClassAtom(classPredicate, vertexIdToArgument.get(n.getId()));
      m.getAtoms().add(classAtom);
    }
   
    for (LabeledLink e : steinerTree.getLabeledSteinerTree().edgeSet()) {
View Full Code Here

        continue;
     
     
      Label classPredicate = new Label(n.getLabel().getUri(), n.getLabel().getNs(), n.getLabel().getPrefix());

      ClassAtom classAtom = new ClassAtom(classPredicate, vertexIdToArgument.get(n.getId()));
      m.getAtoms().add(classAtom);
    }
   
    for (LabeledLink e : treeModel.edgeSet()) {
     
View Full Code Here

      if (vertexIdToArgument.get(n.getId()) == null)
        continue;
     
      Label classPredicate = new Label(n.getLabel().getUri(), n.getLabel().getNs(), n.getLabel().getPrefix());

      ClassAtom classAtom = new ClassAtom(classPredicate, vertexIdToArgument.get(n.getId()));
      m.getAtoms().add(classAtom);
    }
   
    for (LabeledLink e : treeModel.edgeSet()) {
     
View Full Code Here

TOP

Related Classes of edu.isi.karma.rep.model.ClassAtom

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.