Examples of SimpleSelector


Examples of br.com.starcode.parccser.model.SimpleSelector

        ignoreWhitespaces();
        if (end()) {
            throw new ParserException("Selector expected at position " + pos);
        }
        int initialPos = pos;
        SimpleSelector simpleSelector = null;
        if (current == '*') {
            //universal selector
            sb.append(current);
            TypeSelector ts = new TypeSelector("*", new Context(content, "*", initialPos, pos + 1));
            parserListener.negationTypeSelector(ts);
View Full Code Here

Examples of com.github.sommeri.less4j.core.ast.SimpleSelector

    SelectorPart lastPart = selector.getLastPart();
    if (lastPart == null || !(lastPart instanceof SimpleSelector))
      return new Extend(token, selector);

    SimpleSelector possibleAll = (SimpleSelector) lastPart;
    if (possibleAll.hasSubsequent() || !possibleAll.hasElement())
      return new Extend(token, selector);

    if (!EXTEND_ALL_KEYWORD.equals(possibleAll.getElementName().getName()))
      return new Extend(token, selector);

    if (AstLogic.hasNonSpaceCombinator(possibleAll)) {
      possibleAll.setElementName(null);
    } else {
      selector.getParts().remove(possibleAll);
    }
    return new Extend(token, selector, true);
  }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

    super(modelFactory, name);
  }

  public void check( final Resource S, final Property P, final RDFNode O )
  {
    final Selector s = new SimpleSelector(S, P, O);
    Assert.assertTrue(s.isSimple());
    Assert.assertEquals(S, s.getSubject());
    Assert.assertEquals(P, s.getPredicate());
    Assert.assertEquals(O, s.getObject());
  }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

  public void testListStatementsClever()
  {

    ModelHelper.modelAdd(model, "S P O; S P O2; S P2 O; S2 P O");
    final Selector sel = new SimpleSelector(null, null, (RDFNode) null) {
      @Override
      public boolean isSimple()
      {
        return false;
      }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

        GraphTestBase.iteratorToSet(r.listProperties().mapWith(
            Statement.Util.getSubject)));
    //
    r.removeProperties();
    Assert.assertEquals(0,
        model.query(new SimpleSelector(r, null, (RDFNode) null)).size());
  }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

  }

  public void testListWithLiteralSelector()
  {

    final StmtIterator it6 = model.listStatements(new SimpleSelector(null,
        null, tvStrings[1], langs[1]));
    final List<Statement> L6 = GraphTestBase.iteratorToList(it6);
    for (int i = 0; i < L6.size(); i += 1)
    {
      Assert.assertEquals(langs[1], L6.get(i).getLanguage());
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

    Assert.assertEquals(2, L6.size());
  }

  public void testListWithNullSelector()
  {
    final StmtIterator it1 = model.listStatements(new SimpleSelector(null,
        null, (RDFNode) null));
    final List<Statement> L1 = GraphTestBase.iteratorToList(it1);
    Assert.assertEquals(num * num * 7, L1.size());

  }
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

  }

  public void testListWithPredicateSelector()
  {

    final StmtIterator it3 = model.listStatements(new SimpleSelector(null,
        predicate[1], (RDFNode) null));
    final List<Statement> L3 = GraphTestBase.iteratorToList(it3);
    for (int i = 0; i < L3.size(); i += 1)
    {
      Assert.assertEquals(predicate[1], L3.get(i).getPredicate());
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

  // assertEquals( 2, L4.size() );

  public void testListWithRDFSelector()
  {

    final StmtIterator it5 = model.listStatements(new SimpleSelector(null,
        null, model.createTypedLiteral(false)));
    final List<Statement> L5 = GraphTestBase.iteratorToList(it5);
    for (int i = 0; i < L5.size(); i += 1)
    {
      Assert.assertEquals(false, L5.get(i).getBoolean());
View Full Code Here

Examples of com.hp.hpl.jena.rdf.model.SimpleSelector

    Assert.assertEquals(2, L5.size());
  }

  public void testListWithSubjectSelector()
  {
    final StmtIterator it2 = model.listStatements(new SimpleSelector(
        subject[0], null, (RDFNode) null));
    final List<Statement> L2 = GraphTestBase.iteratorToList(it2);
    for (int i = 0; i < L2.size(); i += 1)
    {
      Assert.assertEquals(subject[0], L2.get(i).getSubject());
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.