Package net.java.textilej.parser.markup

Examples of net.java.textilej.parser.markup.Dialect$Group


           ((CanonicalUser)grantee).setDisplayName("TODO");
           grants[i].setGrantee(grantee);
           break;
         
        case SAcl.GRANTEE_ALLUSERS:
           grantee = new Group();
           ((Group)grantee).setURI( "http://acs.amazonaws.com/groups/global/AllUsers" );
           grants[i].setGrantee(grantee);
             break;
            
        case SAcl.GRANTEE_AUTHENTICATED:       
           grantee = new Group();
           ((Group)grantee).setURI( "http://acs.amazonaws.com/groups/global/Authenticated" );
           grants[i].setGrantee(grantee);
           break;
         
        default :
View Full Code Here


          engineGrant.setGrantee(SAcl.GRANTEE_USER);
          engineGrant.setCanonicalUserID(((CanonicalUser)grantee).getID());
        }
        else if (grantee instanceof Group)
        {
           Group temp = (Group)grantee;
           String uri = temp.getURI();
           if ( uri.equalsIgnoreCase( "http://acs.amazonaws.com/groups/global/AllUsers" )) {
              // -> this allows all public unauthenticated access based on permission given
              engineGrant.setGrantee(SAcl.GRANTEE_ALLUSERS);
              engineGrant.setCanonicalUserID( "*" );
           }
View Full Code Here

    return null;
  }

  private Dialect instantiateDialect(String name, Class<? extends Dialect> dialectClass) {
    try {
      Dialect dialect = dialectClass.newInstance();
      dialect.setName(name);
      return dialect;
    } catch (Exception e) {
      log(IStatus.ERROR,String.format("Cannot instantiate dialect '%' (class '%s'): %s",name,dialectClass.getName(),e.getMessage()),e);
    }
    return null;
View Full Code Here

            }
            if (!(dialect instanceof Dialect)) {
              log(IStatus.ERROR,String.format("%s is not a dialect",dialect.getClass().getName()));
              continue;
            }
            Dialect d = (Dialect) dialect;
            {
              Class<? extends Dialect> previous = dialectByName.put(name, d.getClass());
              if (previous != null) {
                log(IStatus.ERROR,String.format(EXTENSION_MARKUP_DIALECT+"/@name '%s' specified by plugin '%s' is ignored: name '%s' is already registered",name,element.getDeclaringExtension().getContributor().getName(),name));
                dialectByName.put(name, previous);
                continue;
              }
            }
            String fileExtensions = element.getAttribute("fileExtensions");
            if (fileExtensions != null) {
              String[] parts = fileExtensions.split("\\s*,\\s*");
              for (String part: parts) {
                if (part.length() != 0) {
                  Class<? extends Dialect> previous = dialectByFileExtension.put(part, d.getClass());
                  if (previous != null) {
                    log(IStatus.ERROR,String.format(EXTENSION_MARKUP_DIALECT+"/@fileExtensions '%s' specified by plugin '%s' is ignored: extension '%s' is already registered",part,element.getDeclaringExtension().getContributor().getName(),part));
                    dialectByFileExtension.put(part, previous);
                    continue;
                  }
View Full Code Here

    Option outputOpt = obuilder.withLongName("output").withRequired(true).withArgument(
      abuilder.withName("output").withMinimum(1).withMaximum(1).create()).withDescription(
      "The output directory").withShortName("o").create();
   
   
    Group group = gbuilder.withName("Options").withOption(helpOpt).withOption(
        inputDirOpt).withOption(outputOpt).create();
   
    //.withOption(gramSizeOpt).withOption(typeOpt)
   
    try {
View Full Code Here

   
    Option modelOpt = obuilder.withLongName("model").withRequired(true).withArgument(
      abuilder.withName("index").withMinimum(1).withMaximum(1).create()).withDescription(
      "The directory containing the index model").withShortName("m").create();

    Group group = gbuilder.withName("Options").withOption(helpOpt)
        .withOption(inputDirOpt).withOption(modelOpt).create();
   
    try {
      Parser parser = new Parser();
     
View Full Code Here

   
    Option typeOpt = obuilder.withLongName("classifierType").withRequired(false).withArgument(
      abuilder.withName("classifierType").withMinimum(1).withMaximum(1).create()).withDescription(
      "Type of classifier: knn|tfidf. Default: bayes").withShortName("type").create();
   
    Group group = gbuilder.withName("Options").withOption(gramSizeOpt).withOption(helpOpt).withOption(
        inputDirOpt).withOption(modelOpt).withOption(typeOpt).withOption(contentFieldOpt)
        .withOption(categoryFieldOpt).withOption(maxResultsOpt)
        .create();
   
    try {
View Full Code Here

   
    Option helpOpt = obuilder.withLongName("help")
      .withDescription("Print out help")
      .withShortName("h").create();
   
    Group group = gbuilder.withName("Options")
      .withOption(inputOpt)
      .withOption(categoryOpt)
      .withOption(outputOpt)
      .withOption(categoryFieldsOpt)
      .withOption(textFieldsOpt)
View Full Code Here

   
    Option testDataSizeOpt = obuilder.withLongName("testDataSize").withRequired(false).withArgument(
        abuilder.withName("testDataSize").withMinimum(1).withMaximum(1).create()).withDescription(
        "The number of questions to extract for training data").withShortName("tes").create();

    Group group = gbuilder.withName("Options").withOption(inputFileOpt).withOption(trainingOutputOpt)
         .withOption(testOutputOpt).withOption(trainingDataSizeOpt).withOption(testDataSizeOpt).create();
   
    try {
      Parser parser = new Parser();
      parser.setGroup(group);
View Full Code Here

   
    Option solrUrlOpt = obuilder.withLongName("solrUrl").withRequired(true).withArgument(
        abuilder.withName("solrUrl").withMinimum(1).withMaximum(1).create()).withDescription(
        "URL of the solr server").withShortName("s").create();
   
    Group group = gbuilder.withName("Options")
      .withOption(inputFileOpt)
      .withOption(countFileOpt)
      .withOption(outputFileOpt)
      .withOption(solrUrlOpt).create();
   
View Full Code Here

TOP

Related Classes of net.java.textilej.parser.markup.Dialect$Group

Copyright © 2018 www.massapicom. 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.