Examples of convert()


Examples of org.mindswap.pellet.owlapi.AxiomConverter.convert()

    ATermAppl[] head = new ATermAppl[] { ATermUtils.makeTypeAtom( x, D ) };
    ATermAppl[] body = new ATermAppl[] { ATermUtils.makeTypeAtom( x, C ) };

    ATermAppl rule = ATermUtils.makeRule( head, body );

    OWLAxiom actual = converter.convert( rule );

    Set<SWRLAtom<?>> antecedent = new HashSet<SWRLAtom<?>>();
    Set<SWRLAtom<?>> consequent = new HashSet<SWRLAtom<?>>();

    antecedent.add( classAtom( Class( "C" ), iVariable( "x" ) ) );
View Full Code Here

Examples of org.mitre.medfacts.zoner.CharacterOffsetToLineTokenConverter.convert()

    }

    public void addConceptAnnotation(int startCharOffset, int endCharOffset, String typ, ConceptTypeParam conceptType) {
      CharacterOffsetToLineTokenConverter converter = new CharacterOffsetToLineTokenConverterDefaultImpl(wholeText);

      LineAndTokenPosition startLineAndTokenPosition = converter.convert(startCharOffset);
      LineAndTokenPosition endLineAndTokenPosition = converter.convert(endCharOffset);

      ConceptAnnotation conceptAnnotation = new ConceptAnnotation();

      Location beginLocation = new Location();
View Full Code Here

Examples of org.mitre.medfacts.zoner.CharacterOffsetToLineTokenConverterDefaultImpl.convert()

          AnnotationIndex<Annotation> aIndex = jcas.getAnnotationIndex(assertionType);
          for (Annotation a : aIndex) {
            Assertion ai = (Assertion) a;
            int begin = ai.getBegin();
            int end = ai.getEnd();
            LineAndTokenPosition begPos = converter.convert(begin);
            LineAndTokenPosition endPos = converter.convert(end);
            writer.println("c=\"" + sofaString.substring(begin,end) + "\" " + begPos.getLine() + ":" + begPos.getTokenOffset() +
                " " + endPos.getLine() + ":" + endPos.getTokenOffset() + "||t=\"problem\"||a=\"" + ai.getAssertionType() + "\"");
          }
          writer.close();
View Full Code Here

Examples of org.mitre.medfacts.zoner.LineTokenToCharacterOffsetConverter.convert()

        sentStart.setLine(i+1);
        sentStart.setTokenOffset(0);
        LineAndTokenPosition sentEnd = new LineAndTokenPosition();
        sentEnd.setLine(i+1);
        sentEnd.setTokenOffset(tokenArrays[i].length-1);
        LineTokenToCharacterOffsetConverter.BeginAndEndCharacterOffsetPair sStart = converter.convert(sentStart);
        LineTokenToCharacterOffsetConverter.BeginAndEndCharacterOffsetPair sEnd = converter.convert(sentEnd);
        if ((sStart == null) || (sEnd == null)) {
          sent.setBegin(0);
          sent.setEnd(0);
          sent.setSentenceNumber(sentNum);
View Full Code Here

Examples of org.msgpack.MessagePack.convert()

        MessagePack msgpack = new MessagePack();
        byte[] raw = msgpack.write(new int[] {1,2,3});

        Value v = msgpack.read(raw);

        int[] array = msgpack.convert(v, new int[3]);
        assertArrayEquals(new int[] {1,2,3}, array);

        Value v2 = msgpack.unconvert(array);
        assertEquals(v, v2);
    }
View Full Code Here

Examples of org.mule.api.expression.PropertyConverter.convert()

        for (Iterator iterator = c.iterator(); iterator.hasNext();)
        {
            PropertyConverter converter = (PropertyConverter) iterator.next();
            if (converter.getType().equals(type))
            {
                return converter.convert(prop, muleContext);
            }
        }
        throw new IllegalArgumentException(AnnotationsMessages.noPropertyConverterForType(type).getMessage());
    }
View Full Code Here

Examples of org.nutz.mapl.impl.convert.FilterConvertImpl.convert()

     *            过滤列表
     */
    public static Object includeFilter(Object maplist, List<String> paths) {
        FilterConvertImpl filter = new FilterConvertImpl(paths);
        filter.useIncludeModel();
        return filter.convert(maplist);
    }

    /**
     * 排除MapList过滤器, 详情参见: {@link FilterConvertImpl}
     *
 
View Full Code Here

Examples of org.nutz.mapl.impl.convert.StructureConvert.convert()

     * @param model
     *            转换模板, 一个JSON格式的reader
     */
    public static Object convert(Object maplist, Reader model) {
        StructureConvert convert = new StructureConvert(model);
        return convert.convert(maplist);
    }

    /**
     * 结构转换, 详情参见: {@link StructureConvert}
     *
 
View Full Code Here

Examples of org.nutz.mvc.adaptor.ParamConvertor.convert()

      ObjcetNaviNode onn = entry.getValue();
      Injecting in = mirror.getInjecting(entry.getKey());
      if (onn.isLeaf()) {
        try {
          ParamConvertor pc = Params.makeParamConvertor(mirror.getField(entry.getKey()).getType());
          in.inject(obj, pc.convert(onn.getValue()));
  //        in.inject(obj, onn.getValue());
        } catch (NoSuchFieldException e) {
          continue;
        }
        continue;
View Full Code Here

Examples of org.obolibrary.obo2owl.OWLAPIObo2Owl.convert()

                return parse(source.getDocumentIRI(), null, in);
            }
        }
        // create a translator object and feed it the OBO Document
        OWLAPIObo2Owl bridge = new OWLAPIObo2Owl(in.getOWLOntologyManager());
        OWLOntology ontology = bridge.convert(obodoc, in);
        if (ontology == in) {
            return in;
        }
        return ontology;
    }
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.