Examples of Node


Examples of org.maltparserx.core.syntaxgraph.node.Node

    }
    return headEdge;
  }
 
  public void removeDependencyEdge(int headIndex, int dependentIndex) throws MaltChainedException {
    Node head = null;
    Node dependent = null;
    if (headIndex == 0) {
      head = root;
    } else if (headIndex > 0) {
      head = terminalNodes.get(headIndex);
    }

Examples of org.metagrid.gatekeeper.node.Node

                )
            );

        log.debug("----------");
        log.debug("URI [urn://orange/000]");
        Node node = reader.read(
            resources.get(
                new URI("urn://orange/000")
                ).reader()
            );
        //
        // Check the OrangeNode weight.
        assertEquals(
            "0",
            node.properties().get(
                OrangeNode.WEIGHT_PROPERTY_URI
                ).value()
            );

        //
        // Parse the next OrangeNode ...
        log.debug("----------");
        log.debug("URI [urn://orange/001]");
        node = reader.read(
            resources.get(
                new URI("urn://orange/001")
                ).reader()
            );
        //
        // Check the OrangeNode weight.
        assertEquals(
            "1",
            node.properties().get(
                OrangeNode.WEIGHT_PROPERTY_URI
                ).value()
            );

        //
        // Parse the first AppleBean ...
        log.debug("----------");
        log.debug("URI [urn://apple/000]");
        node = reader.read(
            resources.get(
                new URI("urn://apple/000")
                ).reader()
            );
        //
        // Check the AppleNode weight.
        assertEquals(
            "2",
            node.properties().get(
                AppleNode.WEIGHT_PROPERTY_URI
                ).value()
            );

        //
        // Parse the next AppleNode ...
        log.debug("----------");
        log.debug("URI [urn://apple/001]");
        node = reader.read(
            resources.get(
                new URI("urn://apple/001")
                ).reader()
            );
        //
        // Check the AppleNode weight.
        assertEquals(
            "3",
            node.properties().get(
                AppleNode.WEIGHT_PROPERTY_URI
                ).value()
            );
        //
        // Check we can set the modified date.
        node.properties().set(
            FruitNode.MODIFIED_PROPERTY_URI,
            "2008-11-29T06:25:50.379+0000"
            );

        //
        // Check we can't set the created date.
// This is the only test for ReadOnlyProperty at the moment.
        final Node frog = node ;
        assertThrows(
            PropertyException.class,
            new TestBlock()
                {
                public void run()
                    {
                    frog.properties().set(
                        FruitNode.CREATED_PROPERTY_URI,
                        "2008-11-29T06:25:50.379+0000"
                        );
                    }
                }

Examples of org.mindswap.pellet.Node

        // (i) x is blockable or if
        // (ii) x is a nominal node and y is not blocked.
        boolean neighborSafe = x.isBlockable();
        // y is going to be the node we create, and edge its connection to the
        // current node
        Node y = null;
        Edge edge = null;

        // edges contains all the edges going into of coming out from the node
        // And labeled with the role R
        EdgeList edges = x.getRNeighborEdges( role );
        // We examine all those edges one by one and check if the neighbor has
        // type C, in which case we set neighborFound to true
        for( Iterator<Edge> i = edges.iterator(); i.hasNext(); ) {
            edge = i.next();

            y = edge.getNeighbor( x );           
           
            if( PelletOptions.USE_COMPLETION_QUEUE && y.isPruned() ){
                y = null;
                continue;
            }              
           
            if( y.hasType( c ) ) {
              neighborFound = neighborSafe || y.isLiteral() || !strategy.getBlocking().isBlocked( (Individual) y );
                if( neighborFound ) {
                    break;
                }
            }
        }

        // If we have found a R-neighbor with type C, continue, do nothing
        if( neighborFound )
            return;

        // If not, we have to create it
        // If the role is a datatype property...
        if( role.isDatatypeRole() ) {
            Literal literal = (Literal) y;
      if( ATermUtils.isNominal( c ) && !PelletOptions.USE_PSEUDO_NOMINALS ) {
        strategy.getABox().copyOnWrite();

        final ATermAppl input = (ATermAppl) c.getArgument( 0 );
        ATermAppl canonical;
        if( input.getArgument( ATermUtils.LIT_URI_INDEX ).equals( ATermUtils.NO_DATATYPE ) ) {
          canonical = input;
        }
        else {
          try {
            canonical = strategy.getABox().getDatatypeReasoner().getCanonicalRepresentation( input );
          } catch( InvalidLiteralException e ) {
            final String msg = "Invalid literal encountered in nominal when attempting to apply some values rule: "
                + e.getMessage();
            throw new InternalReasonerException( msg, e );
          } catch( UnrecognizedDatatypeException e ) {
            final String msg = "Unrecognized datatype for literal encountered in nominal when attempting to apply some values rule: "
                + e.getMessage();
            throw new InternalReasonerException( msg, e );
          }
        }
        literal = strategy.getABox().addLiteral( canonical );
      }
            else {
                if( !role.isFunctional() || literal == null ) {
                    literal = strategy.getABox().addLiteral( ds );
                }
                else {
                  ds = ds.union( role.getExplainFunctional(), strategy.getABox().doExplanation()  );
                  ds = ds.union( edge.getDepends(), strategy.getABox().doExplanation()  );
                }
                strategy.addType( literal, c, ds );
            }
           
            if( log.isLoggable( Level.FINE ) )
                log.fine( "SOME: " + x + " -> " + s + " -> " + literal + " : " + ATermUtils.toString( c ) + " - " + ds );
           
            strategy. addEdge( x, role, literal, ds );
        }
        // If it is an object property
        else {
            if( ATermUtils.isNominal( c ) && !PelletOptions.USE_PSEUDO_NOMINALS ) {
                strategy.getABox().copyOnWrite();

                ATermAppl value = (ATermAppl) c.getArgument( 0 );
                y = strategy.getABox().getIndividual( value );

                if( log.isLoggable( Level.FINE ) )
                    log.fine( "VAL : " + x + " -> " + ATermUtils.toString( s ) + " -> " + y + " - " + ds );

                if( y == null ) {
                    if( ATermUtils.isAnonNominal( value ) ) {
                        y = strategy.getABox().addIndividual( value, ds );
                    }
                    else if( ATermUtils.isLiteral( value ) )
                        throw new InternalReasonerException( "Object Property " + role
                            + " is used with a hasValue restriction "
                            + "where the value is a literal: " + ATermUtils.toString( value ) );
                    else
                        throw new InternalReasonerException( "Nominal " + c
                            + " is not found in the KB!" );
                }

                if( y.isMerged() ) {
                    ds = ds.union( y.getMergeDependency( true ), strategy.getABox().doExplanation() );

                    y = y.getSame();
                }

                strategy.addEdge( x, role, y, ds );
            }
            else {
                boolean useExistingNode = false;
                boolean useExistingRole = false;
                DependencySet maxCardDS = role.isFunctional()
          ? role.getExplainFunctional()
          : x.hasMax1( role );
                if( maxCardDS != null ) {
                    ds = ds.union( maxCardDS, strategy.getABox().doExplanation() );

                    // if there is an r-neighbor and we can have at most one r then
                    // we should reuse that node and edge. there is no way that neighbor
                    // is not safe (a node is unsafe only if it is blockable and has
                    // a nominal successor which is not possible if there is a cardinality
                    // restriction on the property)
                    if( edge != null ) {
                        useExistingRole = useExistingNode = true;                      
                    }
                    else {
                        // this is the tricky part. we need some merges to happen
                        // under following conditions:
                        // 1) if r is functional and there is a p-neighbor where
                        // p is superproperty of r then we need to reuse that
                        // p neighbor for the some values restriction (no
                        // need to check subproperties because functionality of r
                        // precents having two or more successors for subproperties)
                        // 2) if r is not functional, i.e. max(r, 1) is in the types,
                        // then having a p neighbor (where p is subproperty of r)
                        // means we need to reuse that p-neighbor
                        // In either case if there are more than one such value we also
                        // need to merge them together
                        Set<Role> fs = role.isFunctional() ? role.getFunctionalSupers() : role
                            .getSubRoles();
                       
                        for( Iterator<Role> it = fs.iterator(); it.hasNext(); ) {
                            Role f = it.next();
                            edges = x.getRNeighborEdges( f );
                            if( !edges.isEmpty() ) {
                                if( useExistingNode ) {
                                  DependencySet fds = DependencySet.INDEPENDENT;
                                  if (PelletOptions.USE_TRACING) {
                                    if (role.isFunctional()) {
                                      fds = role.getExplainSuper(f.getName());
                                    } else {
                                      fds = role.getExplainSub(f.getName());
                                    }
                                  }
                                    Edge otherEdge = edges.edgeAt( 0 );
                                    Node otherNode = otherEdge.getNeighbor( x );
                                    DependencySet d = ds.union( edge.getDepends(), strategy.getABox().doExplanation() ).union(
                                        otherEdge.getDepends(), strategy.getABox().doExplanation() ).union(fds, strategy.getABox().doExplanation());
                                    strategy.mergeTo( y, otherNode, d );
                                }
                                else {

Examples of org.mozilla.javascript.Node

        throw new WinkAstException("OBJECTLIT Node: props and childs count are not equal");
      }
    }

    for (final Node c : nodeChilds) {
      Node cidentified = c;
      if (c.getType() == Token.FUNCTION) {
        final int fnIndex = c.getExistingIntProp(Node.FUNCTION_PROP);
        cidentified = scope.getAsScriptOrFn().getFunctionNode(fnIndex);
      }

Examples of org.mule.context.notification.Node


    @Override
    public RestrictedNode getSpecification()
    {
        return new Node()
                .serial(pre())      //Two routes with chain with one element
                .serial(prePost())
                .serial(prePost())
                .serial(post())
                .serial(prePost())    //MP after the Scope;

Examples of org.mvel2.templates.res.Node

import static java.nio.ByteBuffer.allocateDirect;
import static org.mvel2.util.ParseTools.balancedCapture;

public class TemplateTools {
  public static Node getLastNode(Node node) {
    Node n = node;
    while (true) {
      if (n.getNext() instanceof TerminalNode) return n;
      n = n.getNext();
    }
  }

Examples of org.neo4j.graphdb.Node

    throw new UnsupportedOperationException( "LockMode " + lockMode + " is not supported by the Neo4j GridDialect" );
  }

  @Override
  public Tuple getTuple(EntityKey key, TupleContext context) {
    Node entityNode = entityQueries.get( key.getMetadata() ).findEntity( executionEngine, key.getColumnValues() );
    if ( entityNode == null ) {
      return null;
    }
    return createTuple( entityNode, context );
  }

Examples of org.netbeans.jellytools.nodes.Node

        new FileCustomEditorOperator("Öffnen").setSelectedFile(SAMPLE_SCALA_MAVEN);
        new FileCustomEditorOperator("Öffnen").pushKey(KeyEvent.VK_ENTER);
        new JButtonOperator(new NbDialogOperator("Import Project(s) from ZIP"), "Import").push();
        ProjectsTabOperator pto = ProjectsTabOperator.invoke();
        ProjectRootNode prn = pto.getProjectRootNode("sample-scala-maven");
        Node node = new Node(prn, "Scala Packages|sample|App.scala");
        node.select();
        node.performPopupAction("Open");
        new ActionNoBlock("Window|Action Items", null).performMenu();
        TopComponentOperator actionItems = new TopComponentOperator("Action Items");
        actionItems.makeComponentVisible();
        JTableOperator t = new JTableOperator(actionItems);
        int row = t.findCellColumn("SampleJavaError");

Examples of org.nexml.model.Node

          break;
        }
      }
    }
    for ( PhyloTreeNode tbChildNode : tbNode.getChildNodes() ) {
      Node xmlChildNode = xmlTree.createNode();
      xmlChildNode.setId(tbChildNode.getTreebaseIDString().toString());
      FloatEdge xmlEdge = xmlTree.createEdge(xmlNode, xmlChildNode);
      if ( null != tbChildNode.getBranchLength() ) {
        xmlEdge.setLength(tbChildNode.getBranchLength());
      }
      traverseTreeBaseTree(tbTree, tbChildNode, xmlChildNode, xmlTree);

Examples of org.nfunk.jep.Node

  @Override
  protected void fillImage(SimpleImage res) {
    if (this.seed != 0)
      Tools.srand123(this.seed);
    JEPWrapper parser = null;
    Node node = null;
    if (transform) {
      parser = new JEPWrapper();
      parser.addVariable("x", 0.0);
      node = parser.parse(transformation);
    }
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.