Package org.wymiwyg.rdf.graphs

Examples of org.wymiwyg.rdf.graphs.PropertyNode


   */
  public static Triple replaceInTriple(Triple triple, Node origNode,
      Node replacementNode) {
    Node subject = triple.getSubject();
    Node object = triple.getObject();
    PropertyNode predicate = triple.getPredicate();
    if (subject.equals(origNode)) {
      subject = replacementNode;
    }
    if (object.equals(origNode)) {
      object = replacementNode;
View Full Code Here


          subject = new JenaReferenceNode(jenaSubject);
        } else {
          subject = new NamedNodeImpl(jenaSubject.getURI());
        }*/
        Property jenaProperty = current.getPredicate();
        PropertyNode predicate = nodeFactory.getPropertyNode(jenaProperty);
          //new PropertyNodeImpl(jenaProperty.getURI(), false, false);
        RDFNode jenaObject = current.getObject();
        Node object = nodeFactory.getNode(jenaObject);
        /*
        if (jenaObject instanceof Literal) {
View Full Code Here

  public static boolean isValidMapping(Map<Node, Node> mapping, Graph g1, Graph g2) {
    for (Iterator iter = g1.iterator(); iter.hasNext();) {
      Triple triple = (Triple) iter.next();
      Node subject = triple.getSubject();
      PropertyNode predicate = triple.getPredicate();
      Node object = triple.getObject();
      if (!(subject instanceof GroundedNode)) {
        subject = mapping.get(subject);
      }
      if (!(object instanceof GroundedNode)) {
View Full Code Here

  public static Graph applyMapping(Graph graph, Map mapping) {
    SimpleGraph result = new SimpleGraph();
    for (Iterator iter = graph.iterator(); iter.hasNext();) {
      Triple triple = (Triple) iter.next();
      Node subject = triple.getSubject();
      PropertyNode predicate = triple.getPredicate();
      Node object = triple.getObject();
      if (!(subject instanceof GroundedNode)) {
        subject = (Node) mapping.get(subject);
      }
      if (!(object instanceof GroundedNode)) {
View Full Code Here

  public NodeFactory(Model ontology) {
    this.ontology = ontology;
  }

  public PropertyNode getPropertyNode(Property property) {
    PropertyNode result = predicateMap.get(property);
    if (result == null) {
      result = createPropertyNode(property);
      predicateMap.put(property, result);
    }
    return result;
View Full Code Here

TOP

Related Classes of org.wymiwyg.rdf.graphs.PropertyNode

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.