Examples of Origin


Examples of ca.nengo.model.Origin

            for (UITermination terminationUI : nodeUI.getVisibleTerminations()) {
                if (terminationUI.getConnector() != null) {
                    UIOrigin originUI = terminationUI.getConnector().getOriginUI();

                    Termination termination = terminationUI.getModel();
                    Origin origin = originUI.getModel();

                    Projection projection = projectionMap.get(termination);
                    if (projection != null && projection.getOrigin() == origin) {
                        /*
                         * Projection already exists
                         */
                        projectionsToAdd.remove(projectionMap.get(termination));

                    } else {
                        projectionsToRemove.add(terminationUI.getConnector());
                    }
                }
            }
        }

        /*
         * Destroy unreferenced projections
         */
        for (UIProjection projectionUI : projectionsToRemove) {
            UITermination terminationUI = projectionUI.getTermination();

            projectionUI.destroy();
            if (!isFirstUpdate) {
                terminationUI.showPopupMessage("REMOVED Projection to "
                        + terminationUI.getNodeParent().getName() + "." + terminationUI.getName());
            }
        }

        /*
         * Construct projections
         */
        for (Projection projection : projectionsToAdd) {
            Origin origin = projection.getOrigin();
            Termination term = projection.getTermination();

            UINeoNode nodeOrigin = getUINode(origin.getNode());

            UINeoNode nodeTerm = getUINode(term.getNode());

            if (nodeOrigin != null && nodeTerm != null) {
                UIOrigin originUI = nodeOrigin.showOrigin(origin.getName());
                UITermination termUI = nodeTerm.showTermination(term.getName());

                originUI.connectTo(termUI, false);
                if (!isFirstUpdate) {
                    termUI.showPopupMessage("NEW Projection to " + termUI.getName() + "."
                            + getName());
                }
            } else {
                if (nodeOrigin == null) {
                    Util.Assert(false, "Could not find a Origin attached to a projection: "
                            + origin.getNode().getName());
                }
                if (nodeTerm == null) {
                    Util.Assert(false, "Could not find a Termination attached to a projection: "
                            + term.getNode().getName());
                }
View Full Code Here

Examples of dk.brics.misc.Origin

        }
        return a;
    }

    private Origin getOrigin() { // TODO: improve origin tracking (messed up by wrapAndConvertGaps)
        Origin origin = null;
        if (base != null) {
            int line = base.getLine();
            int col = base.getColumn();
            if (locator.getLineNumber() == 1) {
                col += locator.getColumnNumber();
            } else {
                line += locator.getLineNumber();
                col = locator.getColumnNumber();
            }
            origin = new Origin(base.getFile(), line, col);
        }
        return origin;
    }
View Full Code Here

Examples of edu.isi.karma.rep.alignment.SemanticType.Origin

    }

    String domainUri = semanticType.getDomain().getUri();
    String propertyUri = semanticType.getType().getUri();
    Double confidence = semanticType.getConfidenceScore();
    Origin origin = semanticType.getOrigin();

    Integer countOfSemanticType = semanticTypesCount.get(domainUri + propertyUri);
    if (countOfSemanticType == null) {
      logger.error("count of semantic type should not be null or zero");
      return mappings;
View Full Code Here

Examples of edu.isi.karma.rep.alignment.SemanticType.Origin

    }

    String domainUri = semanticType.getDomain().getUri();
    String propertyUri = semanticType.getType().getUri();
    Double confidence = semanticType.getConfidenceScore();
    Origin origin = semanticType.getOrigin();

    if (domainUri == null || domainUri.isEmpty()) {
      logger.error("semantic type does not have any domain");
      return null;
    }
View Full Code Here

Examples of edu.isi.karma.rep.alignment.SemanticType.Origin

    }

    String domainUri = semanticType.getDomain().getUri();
    String propertyUri = semanticType.getType().getUri();
    Double confidence = semanticType.getConfidenceScore();
    Origin origin = semanticType.getOrigin();

    Integer countOfSemanticType = semanticTypesCount.get(domainUri + propertyUri);
    if (countOfSemanticType == null) {
      logger.error("count of semantic type should not be null or zero");
      return mappings;
View Full Code Here

Examples of edu.isi.karma.rep.alignment.SemanticType.Origin

    }

    String domainUri = semanticType.getDomain().getUri();
    String propertyUri = semanticType.getType().getUri();
    Double confidence = semanticType.getConfidenceScore();
    Origin origin = semanticType.getOrigin();

    if (domainUri == null || domainUri.isEmpty()) {
      logger.error("semantic type does not have any domain");
      return null;
    }
View Full Code Here

Examples of edu.isi.karma.rep.alignment.SemanticType.Origin

    }

    String domainUri = semanticType.getDomain().getUri();
    String propertyUri = semanticType.getType().getUri();
    Double confidence = semanticType.getConfidenceScore();
    Origin origin = semanticType.getOrigin();

    Integer countOfSemanticType = semanticTypesCount.get(domainUri + propertyUri);
    if (countOfSemanticType == null) {
      logger.error("count of semantic type should not be null or zero");
      return mappings;
View Full Code Here

Examples of edu.isi.karma.rep.alignment.SemanticType.Origin

    }

    String domainUri = semanticType.getDomain().getUri();
    String propertyUri = semanticType.getType().getUri();
    Double confidence = semanticType.getConfidenceScore();
    Origin origin = semanticType.getOrigin();

    if (domainUri == null || domainUri.isEmpty()) {
      logger.error("semantic type does not have any domain");
      return null;
    }
View Full Code Here

Examples of edu.isi.karma.rep.alignment.SemanticType.Origin

  private static SemanticType readSemanticType(JsonReader reader) throws IOException {

    String hNodeId = null;
    Label domain = null;
    Label type = null;
    Origin origin = null;
    Double confidenceScore = null;
   
    reader.beginObject();
      while (reader.hasNext()) {
        String key = reader.nextName();
View Full Code Here

Examples of genj.util.Origin

      String localGedcomPath = generatedGigFile.getAbsolutePath();
      filename = "file://"+(localGedcomPath.startsWith("/") ? localGedcomPath : "/"+localGedcomPath);
      //generatedGigFile = new File(generatedGigFile.getParentFile(), generatedGigFile.getName()+"_toURL");
      generatedGigFile = fromURL.getGeneratedGigFileToURL(generatedGigFile);
    }
    Origin origin = Origin.create(filename, new Handler());
    LOG.finest("Generating GIG into file: "+generatedGigFile+" while reading from file: "+origin);

    generatedGigFile.getParentFile().mkdirs();
    FileOutputStream fos = new FileOutputStream(generatedGigFile);
    BufferedOutputStream bos = new BufferedOutputStream(fos);
    SniffedInputStream inStream = new SniffedInputStream(origin.open());
    //String encoding = inStream.getEncoding();
    Charset charset = inStream.getCharset();

    if (inStream.getWarning()!=null)
    {
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.