Examples of Schema


Examples of org.pentaho.aggdes.model.Schema

    }
  }

  public boolean saveWorkspace(boolean saveAs) throws XulException {
   
    Schema schema = workspace.getSchema();
   
    // only allow saving if the app is unlocked
    if (!workspace.isApplicationUnlocked()) {
      // display warning
      XulMessageBox msgBox = (XulMessageBox) document.createElement("messagebox");
View Full Code Here

Examples of org.restlet.ext.odata.internal.edm.Schema

            }
        }
        if (metadata.getContainers() != null
                && !metadata.getContainers().isEmpty()) {
            for (EntityContainer entityContainer : metadata.getContainers()) {
                Schema schema = entityContainer.getSchema();
                // Generate Service subclass
                StringBuffer className = new StringBuffer();

                if (serviceClassName != null) {
                    // Try to use the Client preference
                    if (entityContainer.isDefaultEntityContainer()) {
                        className.append(serviceClassName);
                    } else if (metadata.getContainers().size() == 1) {
                        className.append(serviceClassName);
                    } else {
                        className.append(schema.getNamespace()
                                .getNormalizedName().substring(0, 1)
                                .toUpperCase());
                        className.append(schema.getNamespace()
                                .getNormalizedName().substring(1));
                        className.append("Service");
                    }
                } else {
                    className.append(schema.getNamespace().getNormalizedName()
                            .substring(0, 1).toUpperCase());
                    className.append(schema.getNamespace().getNormalizedName()
                            .substring(1));
                    className.append("Service");
                }

                Map<String, Object> dataModel = new HashMap<String, Object>();
View Full Code Here

Examples of org.sgx.yuigwt.yui.dataschema.Schema

      "    </tr>\n"+
      "    </table>");
   
    Node table = Y.one("#simple");
   
    Schema schema = Schema.create().resultListLocator("tr").resultFields(new Field[]{
      Field.create().key("beverage").locator("td[1]"),
      Field.create().key("price").locator("td[2]")
    });
   
    DataSchemaResult ret = Y.DataSchemaXML().apply(schema, table.getDOMNode());
View Full Code Here

Examples of org.springframework.roo.addon.dbre.model.Schema

    public Set<Schema> convertFromText(final String value,
            final Class<?> requiredType, final String optionContext) {
        final Set<Schema> schemas = new HashSet<Schema>();
        for (final String schemaName : StringUtils.split(value, " ")) {
            schemas.add(new Schema(schemaName));
        }
        return schemas;
    }
View Full Code Here

Examples of org.sylfra.idea.plugins.xstructure.config.Schema

  /**
   * {@inheritDoc}
   */
  public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
  {
    Schema schema = new Schema();

    String uri = reader.getAttribute("uri");

    try
    {
      schema.setUriPattern(Pattern.compile(uri));
    }
    catch (PatternSyntaxException e)
    {
      LOGGER.warn("Invalid pattern for schema URI:" + uri, e);
    }
View Full Code Here

Examples of org.teiid.metadata.Schema

        }
       
        //capabilities check is only valid for non-schema scoped functions
        //technically the other functions are scoped to SYS, but that's
        //not formally part of their metadata yet
        Schema schema = function.getFunctionDescriptor().getMethod().getParent();
        if (schema == null) {
            // Find capabilities
            SourceCapabilities caps = getCapabilities(modelID, metadata, capFinder);

            if (!caps.supportsFunction(function.getFunctionDescriptor().getName().toLowerCase())) {
                return false;
            }
        } else if (!schema.getFullName().equalsIgnoreCase(metadata.getFullName(modelID))) {
          return false; //not the right schema
        }
       
        //special check to ensure that special conversions are not pushed down (this can be removed after we support type based function pushdown)           
        if (FunctionLibrary.isConvert(function)) {
View Full Code Here

Examples of org.w3.x2001.xmlSchema.SchemaDocument.Schema

    public static void resolveComplexType(SchemaTypeImpl sImpl)
    {
        ComplexType parseCt = (ComplexType)sImpl.getParseObject();
        StscState state = StscState.get();
        Schema schema = getSchema(parseCt);

        // Set abstract & final flags
        boolean abs = parseCt.isSetAbstract() ? parseCt.getAbstract() : false;
        boolean finalExt = false;
        boolean finalRest = false;
        boolean finalList = false;
        boolean finalUnion = false;

        Object ds = null;
        if (parseCt.isSetFinal())
        {
            ds = parseCt.getFinal();
        }
        // Inspect the final default attribute on the schema
        else if (schema != null && schema.isSetFinalDefault())
        {
            ds = schema.getFinalDefault();
        }

        if (ds != null)
        {
            if (ds instanceof String && ds.equals("#all"))
            {
                // #ALL value
                finalExt = finalRest = finalList = finalUnion = true;
            }
            else if (ds instanceof List)
            {
                if (((List)ds).contains("extension"))
                    finalExt = true;
               
                if (((List)ds).contains("restriction"))
                    finalRest = true;

// Since complex types don't participate in list and unions, these can remain
// false.  Perhaps we should throw an error.

//                if (((List)ds).contains("list"))
//                    finalList = true;
//               
//                if (((List)ds).contains("union"))
//                    finalUnion = true;
            }
        }

        sImpl.setAbstractFinal(abs, finalExt, finalRest, finalList, finalUnion);

        // Set block flags
        boolean blockExt = false;
        boolean blockRest = false;
        Object block = null;

        if (parseCt.isSetBlock())
            block = parseCt.getBlock();
        else if (schema != null && schema.isSetBlockDefault())
            block = schema.getBlockDefault();

        if (block != null)
        {
            if (block instanceof String && block.equals("#all"))
            {
View Full Code Here

Examples of org.wso2.carbon.governance.api.schema.dataobjects.Schema

public class SchemaTest extends BaseTestCase {
    public void testAddSchema() throws Exception {
        SchemaManager schemaManager = new SchemaManager(registry);

        Schema schema = schemaManager.newSchema("http://svn.wso2.org/repos/wso2/trunk/carbon/components/governance/org.wso2.carbon.governance.api/src/test/resources/test-resources/xsd/purchasing.xsd");
        schema.addAttribute("creator", "it is me");
        schema.addAttribute("version", "0.01");
        schemaManager.addSchema(schema);

        Schema newSchema = schemaManager.getSchema(schema.getId());
        assertEquals(schema.getSchemaElement().toString(), newSchema.getSchemaElement().toString());
        assertEquals("it is me", newSchema.getAttribute("creator"));
        assertEquals("0.01", newSchema.getAttribute("version"));

        // change the target namespace and check
        String oldSchemaPath = newSchema.getPath();
        assertEquals(oldSchemaPath, "/schemas/org/bar/purchasing/purchasing.xsd");
        assertTrue(registry.resourceExists("/schemas/org/bar/purchasing/purchasing.xsd"));

        OMElement schemaElement = newSchema.getSchemaElement();
        schemaElement.addAttribute("targetNamespace", "http://ww2.wso2.org/schema-test", null);
        schemaElement.declareNamespace("http://ww2.wso2.org/schema-test", "tns");
        schemaManager.updateSchema(newSchema);

        assertEquals("/schemas/org/wso2/ww2/schema_test/purchasing.xsd", newSchema.getPath());
        assertFalse(registry.resourceExists("/test_schemas/org/bar/purchasing.xsd"));

        // doing an update without changing anything.
        schemaManager.updateSchema(newSchema);

        assertEquals("/schemas/org/wso2/ww2/schema_test/purchasing.xsd", newSchema.getPath());
        assertEquals("0.01", newSchema.getAttribute("version"));

        newSchema = schemaManager.getSchema(schema.getId());
        assertEquals("it is me", newSchema.getAttribute("creator"));
        assertEquals("0.01", newSchema.getAttribute("version"));

        Schema[] schemas = schemaManager.findSchemas(new SchemaFilter() {
            public boolean matches(Schema schema) throws GovernanceException {
                if (schema.getAttribute("version").equals("0.01")) {
                    return true;
                }
                return false;
            }
        });
        assertEquals(1, schemas.length);
        assertEquals(newSchema.getId(), schemas[0].getId());

        // deleting the schema
        schemaManager.removeSchema(newSchema.getId());
        Schema deletedSchema = schemaManager.getSchema(newSchema.getId());
        assertNull(deletedSchema);
    }
View Full Code Here

Examples of pattern.Schema

  protected void buildNode(PMML pmml, Context shared_context, Element node,
      Vertex vertex, DirectedGraph<Vertex, Edge> graph)
      throws PatternException {
    // build a list of parameters from which the predicate will be evaluated

    Schema schema = pmml.getSchema();
    String[] param_names = schema.getParamNames();
    List<String> params = new ArrayList<String>();

    for (int i = 0; i < param_names.length; i++)
      params.add(param_names[i]);
View Full Code Here

Examples of prefuse.data.Schema

    Integer[].class,
    String[].class,
  };

  public static Table copyTable(Table oldTable) {
    Schema oldSchema = oldTable.getSchema();
    Table newTable = oldSchema.instantiate();
   
    for (Iterator rowIt = oldTable.tuples(); rowIt.hasNext();) {
      Tuple row = (Tuple) rowIt.next();     
      newTable.addTuple(row);
    }   
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.