Package org.wymiwyg.rdf.molecules.impl

Examples of org.wymiwyg.rdf.molecules.impl.SimpleNonTerminalMolecule


  }

  private FunctionallyGroundedNode functionalyze(NamedNode node) {
    FunctionallyGroundedNodeImpl result = new FunctionallyGroundedNodeImpl();
    Node afgn = new NodeImpl();
    SimpleNonTerminalMolecule molecule = new SimpleNonTerminalMolecule(afgn);
    String uriString = node.getURIRef();
    LiteralNode uriLit = new TypedLiteralNodeImpl(uriString, anyURIDataType);
    Triple triple = new TripleImpl(afgn, nameProp, uriLit);
    molecule.add(triple);
    molecule.markFinalized();
    result.addMolecule(molecule);
    result.markFinalized();
    result.notifyAllFinalized();
    return result;
  }
View Full Code Here


    result.notifyAllFinalized();
    return result;
  }

  private NonTerminalMolecule functionalyze(NonTerminalMolecule molecule) {
    SimpleNonTerminalMolecule result = new SimpleNonTerminalMolecule(NonTerminalMolecule.GROUNDED_NODE);
    Triple origTriple = molecule.iterator().next();
    Node subject = origTriple.getSubject();
    if (subject instanceof GroundedNode) {
      subject = functionalyze((GroundedNode)subject);
    }
    Node object = origTriple.getObject();
    if (object instanceof GroundedNode) {
      object = functionalyze((GroundedNode)object);
    }
    Triple newTriple = new TripleImpl(subject, origTriple.getPredicate(), object);
    result.add(newTriple);
    return result;
  }
View Full Code Here

TOP

Related Classes of org.wymiwyg.rdf.molecules.impl.SimpleNonTerminalMolecule

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.