Package org.wymiwyg.rdf.graphs

Examples of org.wymiwyg.rdf.graphs.NamedNode


        .createTypedLiteral(formFile.getContent()));
    infoBitResource.addProperty(RDF.type, DISCOBITS.InfoBit);
    store.perform(identity, new StoreTransaction() {

      public void execute(SourceStoreView storeView) {
        NamedNode locationNode = new NamedNodeImpl(locationString);
        FCAGraph origGraph = storeView.getGraph().filter(
            Collections.singleton((GroundedNode) locationNode));
        Model origModel = ModelFactory.createModelForGraph(origGraph);
        editableModel.add(origModel);
        Resource locationResource = editableModel
View Full Code Here


    //NamedNode descriptionDoc = null;
    for (Triple triple : graph) {
      if (triple.getPredicate().equals(
          new PropertyNodeImpl(MODELDIFF.functionallyGroundedIn
              .getURI()))) {
        NamedNode descriptionDoc  = (NamedNode) triple.getObject();
        node2descriptionDocMap.put(triple.getSubject(), descriptionDoc);
      } else {
        simpleGraph.add(triple);
      }
    }
View Full Code Here

   * @return
   * @throws IOException
   */
  private CrossGraphFgNode getCgFgNodeFromPathNode(ZipFile zipFile, PathNode currentPath)
      throws IOException {
    NamedNode describingResource = new NamedNodeImpl(
        ReferencingNaturalizer.rootURL + currentPath.getPath());
    CrossGraphFgNode result = new CrossGraphFgNode();
    PathNode nodesIn1Path = currentPath.getSubPath("onlyIn1/");
    deserializeFgNodes(zipFile, nodesIn1Path, result.getNodesIn1());
    PathNode nodesIn2Path = currentPath.getSubPath("onlyIn2/");
View Full Code Here

   * @throws IOException
   */
  private FunctionallyGroundedNode getFgNodeFromPathNode(ZipFile zipFile,
      PathNode pathNode) throws IOException {
   
    NamedNode describingResource = new NamedNodeImpl(
        ReferencingNaturalizer.rootURL + pathNode.getPath());
    FunctionallyGroundedNode existing = descriptionPathToFgNode.get(describingResource);
    if (existing != null) {
      return existing;
    }
View Full Code Here

   * @param string
   */
  private void prepareNames(Set<? extends FunctionallyGroundedNode> fgNodes,
      String categoryLabel,  String baseURL) {
    for (FunctionallyGroundedNode fgNode : fgNodes) {
      NamedNode descriptionDoc = getDescriptionDoc(categoryLabel, baseURL);
      groundedInMap.put(fgNode, descriptionDoc);
    }

  }
View Full Code Here

  /**
   * @param fgNode
   * @return
   */
  NamedNode getGroundedIn(FunctionallyGroundedNode fgNode) {
    NamedNode result = groundedInMap.get(fgNode);
    if (result != null) {
      return result;
    } else {
      throw new RuntimeException("reference to fgNode which was not present in diff "+fgNode);
    }
View Full Code Here

   */
  private void writeFgNodes(Set<? extends FunctionallyGroundedNode> fgNodes,
      ReferencingNaturalizer naturalizer, ZipOutputStream zipOut)
      throws IOException {
    for (FunctionallyGroundedNode fgNode : fgNodes) {
      NamedNode describingModel = naturalizer.getGroundedIn(fgNode);
      writeFgNode(fgNode, describingModel, naturalizer, zipOut);
    }
  }
View Full Code Here

  /**
   *
   */
  private void addOwlSameAs() {
    for (NamedNodeAlternatives alternatives : multiNodeAlternatives) {
      NamedNode canonical = alternatives.getCanonical();
      for (NamedNode other : alternatives.allSorted) {
        if (other == canonical) {
          continue;
        }
        triples.add(new TripleImpl(canonical, sameAsProp, other));
View Full Code Here

   */
  private Set<Triple> prepareMappingTable(Graph base) {
    Set<Triple> result = new HashSet<Triple>();
    for (Triple triple : base) {
      if (triple.getPredicate().equals(nameProp)) {
        NamedNode namedNode = new NamedNodeImpl(((TypedLiteralNode)triple.getObject()).getLexicalForm());
        Node subject = triple.getSubject();
        NamedNodeAlternatives namedNodeAlternatives = replaceMap.get(subject);
        if (namedNodeAlternatives == null) {
          namedNodeAlternatives = new NamedNodeAlternatives(namedNode);
          replaceMap.put(subject, namedNodeAlternatives);
View Full Code Here

TOP

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

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.