Examples of Schema


Examples of org.geotools.feature.Schema

                if( value == null ){
                    // not a valid entry.
                    return;
                }
                TableItem tableItem=(TableItem) item;
                Schema schema = new Schema();
                int columnIndex = schema.getIndexOf( feature.getFeatureType(), property );
                tableItem.setText(columnIndex+1, value.toString());
               
                UndoableComposite composite = new UndoableComposite();
                composite.getCommands().add(new SetEditingFlag(true));
               
                composite.getCommands().add(
                        EditCommandFactory.getInstance().createSetAttributeCommand(feature, layer, property, value));
                composite.getFinalizerCommands().add(new SetEditingFlag(false));
                layer.getMap().sendCommandASync(composite);
            }
        };
       
        final SimpleFeatureType schema = notifierLayer.getSchema();
        Filter filter = Filter.INCLUDE;
        final  FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = notifierLayer.getResource(FeatureSource.class, null);
        final List<String> queryAtts = obtainQueryAttributesForFeatureTable(schema);

        //if the filter action is true, filter our results by the AOI service
        if(isAOIFilter()){
            filter = addAOIFilter(filter, schema.getCoordinateReferenceSystem());
        }
        final Query query = new DefaultQuery(schema.getName().getLocalPart(), filter, queryAtts.toArray(new String[0]));
        FeatureCollection<SimpleFeatureType, SimpleFeature>  featuresF = featureSource.getFeatures(query);       
        final FeatureCollection<SimpleFeatureType, SimpleFeature>  features = featuresF;
       
        Display.getDefault().asyncExec(new Runnable(){
            public void run() {
View Full Code Here

Examples of org.geotools.xml.schema.Schema

     *
     *
     * @throws SAXException
     */
    public Schema getSchema() throws SAXException {
        Schema s = schema.compress(uri);

        return s;
    }
View Full Code Here

Examples of org.h2.schema.Schema

            }
            traceSystem = new TraceSystem(null);
            trace = traceSystem.getTrace(Trace.DATABASE);
        }
        systemUser = new User(this, 0, SYSTEM_USER_NAME, true);
        mainSchema = new Schema(this, 0, Constants.SCHEMA_MAIN, systemUser, true);
        infoSchema = new Schema(this, -1, "INFORMATION_SCHEMA", systemUser, true);
        schemas.put(mainSchema.getName(), mainSchema);
        schemas.put(infoSchema.getName(), infoSchema);
        publicRole = new Role(this, 0, Constants.PUBLIC_ROLE_NAME, true);
        roles.put(Constants.PUBLIC_ROLE_NAME, publicRole);
        systemUser.setAdmin(true);
View Full Code Here

Examples of org.hibernate.metamodel.relational.Schema

    final Schema.Name schemaName = Helper.determineDatabaseSchemaName(
        attributeSource.getExplicitSchemaName(),
        attributeSource.getExplicitCatalogName(),
        currentBindingContext
    );
    final Schema schema = metadata.getDatabase().locateSchema( schemaName );

    final String tableName = attributeSource.getExplicitCollectionTableName();
    if ( StringHelper.isNotEmpty( tableName ) ) {
      final Identifier tableIdentifier = Identifier.toIdentifier(
          currentBindingContext.getNamingStrategy().tableName( tableName )
      );
      Table collectionTable = schema.locateTable( tableIdentifier );
      if ( collectionTable == null ) {
        collectionTable = schema.createTable( tableIdentifier );
      }
      pluralAttributeBinding.setCollectionTable( collectionTable );
    }
    else {
      // todo : not sure wel have all the needed info here in all cases, specifically when needing to know the "other side"
      final EntityBinding owner = pluralAttributeBinding.getContainer().seekEntityBinding();
      final String ownerTableLogicalName = Table.class.isInstance( owner.getPrimaryTable() )
          ? Table.class.cast( owner.getPrimaryTable() ).getTableName().getName()
          : null;
      String collectionTableName = currentBindingContext.getNamingStrategy().collectionTableName(
          owner.getEntity().getName(),
          ownerTableLogicalName,
          null,  // todo : here
          null,  // todo : and here
          pluralAttributeBinding.getContainer().getPathBase() + '.' + attributeSource.getName()
      );
      collectionTableName = quoteIdentifier( collectionTableName );
      pluralAttributeBinding.setCollectionTable(
          schema.locateOrCreateTable(
              Identifier.toIdentifier(
                  collectionTableName
              )
          )
      );
View Full Code Here

Examples of org.hivedb.Schema

  public Collection<String> listSchemas() {
    return schemata.keySet();
  }

  public Boolean install(String schemaName, String nodeName) {
    Schema s = schemata.get(schemaName);
    String uri = hive.getNode(nodeName).getUri();
    Schemas.install(s, uri);
    return true;
  }
View Full Code Here

Examples of org.hsqldb.Schema

            return t;
        }

        // Intermediate holders
        Schema[] schemas;
        Schema   schema;
        String   dcsSchema = SqlInvariants.INFORMATION_SCHEMA;
        String   dcsName   = "SQL_TEXT";
        String   sqlPath   = null;
        Grantee  user      = session.getGrantee();
        Object[] row;

        // column number mappings
        final int schema_catalog                = 0;
        final int schema_name                   = 1;
        final int schema_owner                  = 2;
        final int default_character_set_catalog = 3;
        final int default_character_set_schema  = 4;
        final int default_character_set_name    = 5;
        final int sql_path                      = 6;

        // Initialization
        schemas = database.schemaManager.getAllSchemas();

        // Do it.
        for (int i = 0; i < schemas.length; i++) {
            schema = schemas[i];

            if (!user.hasSchemaUpdateOrGrantRights(
                    schema.getName().getNameString())) {
                continue;
            }

            row                 = t.getEmptyRowData();
            row[schema_catalog] = database.getCatalogName().name;
            row[schema_name]    = schema.getName().getNameString();
            row[schema_owner]   = schema.getOwner().getName().getNameString();
            row[default_character_set_catalog] =
                database.getCatalogName().name;
            row[default_character_set_schema] = dcsSchema;
            row[default_character_set_name]   = dcsName;
            row[sql_path]                     = sqlPath;
View Full Code Here

Examples of org.identityconnectors.framework.common.objects.Schema

    @Async
    public Future<Set<String>> getSchema(final ConnectorFacade connector, final boolean showall) {
        final Set<String> resourceSchemaNames = new HashSet<String>();

        try {
            final Schema schema = connector.schema();
            for (ObjectClassInfo info : schema.getObjectClassInfo()) {
                for (AttributeInfo attrInfo : info.getAttributeInfo()) {
                    if (showall || !AttributeUtil.isSpecialName(attrInfo.getName())) {
                        resourceSchemaNames.add(attrInfo.getName());
                    }
                }
View Full Code Here

Examples of org.iso_relax.verifier.Schema

    public boolean isValid( final String application,
                            final String block,
                            final Configuration configuration )
        throws ConfigurationException
    {
        final Schema schema = (Schema)this.m_schemas.get( createKey( application, block ) );
        final Configuration branched = ConfigurationUtil.branch( configuration, "root" );

        if( null == schema )
        {
            final String msg = REZ.getString( "jarv.error.noschema", application, block );

            throw new ConfigurationException( msg );
        }

        if( null != this.m_debugPath )
        {
            writeDebugConfiguration( application, block, branched );
        }

        try
        {
            final Verifier verifier = schema.newVerifier();
            final VerifierHandler handler = verifier.getVerifierHandler();

            verifier.setErrorHandler( new ErrorHandler()
            {
                public void warning( SAXParseException exception )
View Full Code Here

Examples of org.jboss.as.cmp.jdbc2.schema.Schema

    public static final AttachmentKey<Schema> SCHEMA = AttachmentKey.create(Schema.class);

    public Schema getSchema() {
        schema = deploymentUnit.getAttachment(SCHEMA);
        if (schema == null) {
            schema = new Schema(component.getComponentName());
            deploymentUnit.putAttachment(SCHEMA, schema);
        }
        return schema;
    }
View Full Code Here

Examples of org.jboss.dna.common.jdbc.model.api.Schema

        // check
        assertSame("Unable to set catalog", catalog, bean.getCatalog());
    }

    public void testSetSchema() {
        Schema schema = new DefaultModelFactory().createSchema();
        // set
        bean.setSchema(schema);
        // check
        assertSame("Unable to set schema", schema, bean.getSchema());
    }
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.