Examples of Category


Examples of nz.ac.massey.cs.deploymentpuzzlersurvey.Category

    out.println("\\caption{Question Overview}");
    out.println("\\begin{tabular}{ |lllp{0.9cm}| }");
    out.println("\\hline");
    out.println("category & question id & package name & in short survey\\\\");
    out.println("\\hline");
    Category c = null;
    for (TechnicalQuestion q:questions) {
      if (!q.getId().endsWith("-RECP")) {
        Category c2 = q.getCategory();
        if (c!=null && c!=c2) {
          out.println("\t\\hline");
        }
        c = c2;
        out.print("\t");
View Full Code Here

Examples of opennlp.ccg.synsem.Category

      parser.parse(line);
      int numParses = Math.min(nbestListSize, parser.getResult().size());
      for (int i=0; i < numParses; i++) {
          Sign thisParse = parser.getResult().get(i);
          // convert lf
          Category cat = thisParse.getCategory();
          LF convertedLF = null;
          String predInfo = null;
          if (cat.getLF() != null) {
        // convert LF
        LF flatLF = cat.getLF();
        cat = cat.copy();
        Nominal index = cat.getIndexNominal();
        convertedLF = HyloHelper.compactAndConvertNominals(flatLF, index, thisParse);
        // get pred info
        predInfoMap.clear();
        Testbed.extractPredInfo(flatLF, predInfoMap);
        predInfo = Testbed.getPredInfo(predInfoMap);
View Full Code Here

Examples of org.agoncal.application.petstore.domain.Category

        // Finds all the objects
        int initialNumber = catalogService.findAllCategories().size();

        // Creates an object
        Category category = new Category("Fish", "Any of numerous cold-blooded aquatic vertebrates characteristically having fins, gills, and a streamlined body");

        // Persists the object
        category = catalogService.createCategory(category);
        Long id = category.getId();

        // Finds all the objects and checks there's an extra one
        assertEquals("Should have an extra object", initialNumber + 1, catalogService.findAllCategories().size());

        // Finds the object by primary key
        category = catalogService.findCategory(id);
        assertEquals("Fish", category.getName());

        // Updates the object
        category.setName("Big Fish");
        catalogService.updateCategory(category);

        // Finds the object by primary key
        category = catalogService.findCategory(id);
        assertEquals("Big Fish", category.getName());

        // Deletes the object
        catalogService.removeCategory(category);

        // Checks the object has been deleted
View Full Code Here

Examples of org.apache.abdera.ext.serializer.annotation.Category

                           ObjectContext objectContext,
                           SerializationContext context,
                           Conventions conventions) {

        StreamWriter sw = context.getStreamWriter();
        Category _category = objectContext.getAnnotation(Category.class);

        String scheme = null;
        AccessibleObject accessor = objectContext.getAccessor(Scheme.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            if (value != null)
                scheme = toString(value);
        }
        if (scheme == null) {
            Scheme _scheme = objectContext.getAnnotation(Scheme.class);
            if (_scheme != null && !_scheme.value().equals(DEFAULT)) {
                scheme = _scheme.value();
            }
        }
        if (scheme == null && _category != null && !_category.scheme().equals(DEFAULT)) {
            scheme = _category.scheme();
        }
        if (scheme != null)
            sw.writeAttribute("scheme", scheme);

        String label = null;
        accessor = objectContext.getAccessor(Label.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            if (value != null)
                label = toString(value);
        }
        if (label == null) {
            Label _label = objectContext.getAnnotation(Label.class);
            if (_label != null && !_label.value().equals(DEFAULT)) {
                label = _label.value();
            }
        }
        if (label == null && _category != null && !_category.label().equals(DEFAULT)) {
            label = _category.label();
        }
        if (label != null)
            sw.writeAttribute("label", label);

        String term = null;
View Full Code Here

Examples of org.apache.abdera.model.Category

     //http://feedvalidator.org/testcases/atom/4.2.2.2/category-scheme-rel-iri.xml
     IRI uri = baseURI.resolve("4.2.2.2/category-scheme-rel-iri.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Category cat = entry.getCategories().get(0);
     assertEquals(cat.getScheme(), new IRI("mine"));
   }
View Full Code Here

Examples of org.apache.beehive.netui.tools.testrecorder.shared.config.Category

    private void doDisplayReport( HttpServletRequest request, HttpServletResponse response )
            throws ServletException, IOException {
        String categoryString = request.getParameter( "category" );
        TestRecorderFilter filter = TestRecorderFilter.instance();
        Category category = filter.getTestDefinitions().getCategories().getCategory( categoryString );
        FileReader reader = null;
        try {
            if ( category == null ) {
                String msg = "No category was found for name( " + categoryString + " )";
                forward( request, response, msg, Constants.ERROR_PAGE, true );
                return;
            }
            Writer wrtr = response.getWriter();
            File reportFile = new File( category.getReportDirPath(), "/html/junit-noframes.html" );
            if ( !reportFile.exists() ) {
                String msg = "No JUnit report was found for category( " + category.getName() + " ), file( " +
                        reportFile.getAbsolutePath() + " )";
                forward( request, response, msg, Constants.ERROR_PAGE, true );
                return;
            }
            // output an html page
            char[] buf = new char[1024];
            reader = new FileReader( reportFile );
            int size;
            while ( true ) {
                size = reader.read( buf, 0, 1024 );
                if ( size == -1 ) {
                    break;
                }
                wrtr.write( buf, 0, size );
            }
        }
        catch ( Exception e ) {
            String msg = "ERROR: failed to display JUnit report, exception( " + e.getMessage() +
                    " ), category( " + category.getName() + " )";
            forward( request, response, msg, Constants.ERROR_PAGE, true, e );
        }
        finally {
            if ( reader != null ) {
                reader.close();
View Full Code Here

Examples of org.apache.beehive.samples.petstore.model.Category

    return _catalogDao.getCategoryList();
    }

    public Category getCategory(String key) throws InvalidIdentifierException
    {
    Category cat = new Category();
    cat = _catalogDao.getCategory(key);
    if (cat == null)
      throw new InvalidIdentifierException("Category: " + key + " not found!");
    return cat;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category

        TypeInfo baseTypeInfo = TypeInfoUtils.getTypeInfoFromTypeString(fs.getType());
        return getHowlFieldSchema(fieldName, baseTypeInfo);
    }

    private static HowlFieldSchema getHowlFieldSchema(String fieldName, TypeInfo fieldTypeInfo) throws HowlException {
        Category typeCategory = fieldTypeInfo.getCategory();
        if (Category.PRIMITIVE == typeCategory){
            return new HowlFieldSchema(fieldName,getPrimitiveHType(fieldTypeInfo),null);
        } else if (Category.STRUCT == typeCategory) {
            HowlSchema subSchema = constructHowlSchema((StructTypeInfo)fieldTypeInfo);
            return new HowlFieldSchema(fieldName,HowlFieldSchema.Type.STRUCT,subSchema,null);
View Full Code Here

Examples of org.apache.hcatalog.data.schema.HCatFieldSchema.Category

            i++;
        }
    }
    private void pretty_print(PrintStream pout, HCatFieldSchema hfsch, String prefix) throws HCatException {

        Category tcat = hfsch.getCategory();
        if (Category.STRUCT == tcat){
            pretty_print(pout,hfsch.getStructSubSchema(),prefix);
        }else if (Category.ARRAY == tcat){
            pretty_print(pout,hfsch.getArrayElementSchema(),prefix);
        }else if (Category.MAP == tcat){
View Full Code Here

Examples of org.apache.hive.hcatalog.data.schema.HCatFieldSchema.Category

    }
  }

  private void pretty_print(PrintStream pout, HCatFieldSchema hfsch, String prefix) throws HCatException {

    Category tcat = hfsch.getCategory();
    if (Category.STRUCT == tcat) {
      pretty_print(pout, hfsch.getStructSubSchema(), prefix);
    } else if (Category.ARRAY == tcat) {
      pretty_print(pout, hfsch.getArrayElementSchema(), prefix);
    } else if (Category.MAP == tcat) {
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.