Examples of Reifier


Examples of com.hp.hpl.jena.graph.Reifier

    Node s = env.getGroundVersion(args[0]);
    Node p = env.getGroundVersion(args[1]);
    Node o = env.getGroundVersion(args[2]);
    try {
      Triple t = Triple.create(s,p,o);
      Reifier r = graph.getReifier();
      Node a = Node.createAnon();
      r.reifyAs(a,t);
      env.bind(args[3],a);
      return true;
    } catch (Exception e) {
      return false;
    }
View Full Code Here

Examples of com.hp.hpl.jena.graph.Reifier

    Node o = env.getGroundVersion(args[2]);
    try {
      Triple t = Triple.create(s,p,o);
      context.add(t);
      Node a = Node.createAnon();
      Reifier r = graph.getReifier();
      r.reifyAs(a,t);
      env.bind(args[3],a);
    } catch (Exception e) {
      e.printStackTrace(System.err);
    }   
  }
View Full Code Here

Examples of com.hp.hpl.jena.graph.Reifier

        s1.createReifiedStatement();
        s2.createReifiedStatement();
       
        assertEquals(2, model.listReifiedStatements().toList().size());
       
        Reifier r = new Reifier2(model.getGraph()) ;
        //r = model.getGraph().getReifier() ;
        r.remove(s2.asTriple()) ;
        assertEquals(1, model.listReifiedStatements().toList().size());
    }
View Full Code Here

Examples of com.hp.hpl.jena.graph.Reifier

        s1.createReifiedStatement();
        s2.createReifiedStatement();
       
        assertEquals(2, model.listReifiedStatements().toList().size());
       
        Reifier r = new Reifier2(model.getGraph()) ;
        //r = model.getGraph().getReifier() ;
        r.remove(s2.asTriple()) ;
        assertEquals(1, model.listReifiedStatements().toList().size());
    }
View Full Code Here

Examples of com.strobel.assembler.metadata.signatures.Reifier

    protected TypeReference makeTypeBound(final FieldTypeSignature... bounds) {
        final TypeReference baseType;
        final List<TypeReference> interfaceTypes;

        Reifier reifier = null;

        if (ArrayUtilities.isNullOrEmpty(bounds)) {
            return null;
        }

        if (bounds[0] != BottomSignature.make()) {
            reifier = Reifier.make(this);
            bounds[0].accept(reifier);
            baseType = reifier.getResult();
            assert baseType != null;
        }
        else {
            baseType = null;
        }

        if (bounds.length == 1) {
            return baseType;
        }

        if (reifier == null) {
            reifier = Reifier.make(this);
        }

        if (bounds.length == 2 && baseType == null) {
            bounds[1].accept(reifier);
            final TypeReference singleInterface = reifier.getResult();
            assert singleInterface != null;
            return singleInterface;
        }

        final TypeReference[] it = new TypeReference[bounds.length - 1];

        for (int i = 0; i < it.length; i++) {
            bounds[i + 1].accept(reifier);
            it[i] = reifier.getResult();
            assert it[i] != null;
        }

        interfaceTypes = ArrayUtilities.asUnmodifiableList(it);
View Full Code Here

Examples of com.strobel.assembler.metadata.signatures.Reifier

    protected TypeReference makeTypeBound(final FieldTypeSignature... bounds) {
        final TypeReference baseType;
        final List<TypeReference> interfaceTypes;

        Reifier reifier = null;

        if (ArrayUtilities.isNullOrEmpty(bounds)) {
            return null;
        }

        if (bounds[0] != BottomSignature.make()) {
            reifier = Reifier.make(this);
            bounds[0].accept(reifier);
            baseType = reifier.getResult();
            assert baseType != null;
        }
        else {
            baseType = null;
        }

        if (bounds.length == 1) {
            return baseType;
        }

        if (reifier == null) {
            reifier = Reifier.make(this);
        }

        if (bounds.length == 2 && baseType == null) {
            bounds[1].accept(reifier);
            final TypeReference singleInterface = reifier.getResult();
            assert singleInterface != null;
            return singleInterface;
        }

        final TypeReference[] it = new TypeReference[bounds.length - 1];

        for (int i = 0; i < it.length; i++) {
            bounds[i + 1].accept(reifier);
            it[i] = reifier.getResult();
            assert it[i] != null;
        }

        interfaceTypes = ArrayUtilities.asUnmodifiableList(it);
View Full Code Here

Examples of sun.reflect.generics.visitor.Reifier

    private static Class<?> parseSig(String sig, Class container) {
        if (sig.equals("V")) return void.class;
        SignatureParser parser = SignatureParser.make();
        TypeSignature typeSig = parser.parseTypeSig(sig);
        GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
        Reifier reify = Reifier.make(factory);
        typeSig.accept(reify);
        Type result = reify.getResult();
        return toClass(result);
    }
View Full Code Here

Examples of sun.reflect.generics.visitor.Reifier

            // allocate result array; note that
            // keeping ts and bounds separate helps with threads
            Type[] ts = new Type[fts.length];
            // iterate over bound trees, reifying each in turn
            for ( int j = 0; j  < fts.length; j++) {
                Reifier r = getReifier();
                fts[j].accept(r);
                ts[j] = r.getResult();
            }
            // cache result
            bounds = ts;
            // could throw away bound ASTs here; thread safety?
        }
View Full Code Here

Examples of sun.reflect.generics.visitor.Reifier

            // allocate result array; note that
            // keeping ts and bounds separate helps with threads
            Type[] ts = new Type[fts.length];
            // iterate over bound trees, reifying each in turn
            for ( int j = 0; j  < fts.length; j++) {
                Reifier r = getReifier();
                fts[j].accept(r);
                ts[j] = r.getResult();
            }
            // cache result
            upperBounds = ts;
            // could throw away upper bound ASTs here; thread safety?
        }
View Full Code Here

Examples of sun.reflect.generics.visitor.Reifier

            // allocate result array; note that
            // keeping ts and bounds separate helps with threads
            Type[] ts = new Type[fts.length];
            // iterate over bound trees, reifying each in turn
            for ( int j = 0; j  < fts.length; j++) {
                Reifier r = getReifier();
                fts[j].accept(r);
                ts[j] = r.getResult();
            }
            // cache result
            lowerBounds = ts;
            // could throw away lower bound ASTs here; thread safety?
        }
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.