Examples of Schema


Examples of org.apache.directory.api.ldap.model.schema.registries.Schema

                checkOcSuperior( addContext.getEntry() );

                next( addContext );

                // Update the structures now that the schema element has been added
                Schema schema = schemaManager.getLoadedSchema( schemaName );

                if ( ( schema != null ) && schema.isEnabled() )
                {
                    Attribute oidAT = entry.get( MetaSchemaConstants.M_OID_AT );
                    String ocOid = oidAT.getString();

                    ObjectClass addedOC = schemaManager.lookupObjectClassRegistry( ocOid );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.schema.Schema

     *
     * Returns an MaxValueCountValueEditorRawValueWrapper.
     */
    public Object getRawValue( IConnection connection, Object value )
    {
        Schema schema = null;
        if ( connection != null )
        {
            schema = connection.getSchema();
        }
        if ( schema == null || value == null || !( value instanceof String ) )
View Full Code Here

Examples of org.apache.directory.ldapstudio.schemas.model.Schema

    {
        // Getting the SchemaPool
        SchemaPool pool = SchemaPool.getInstance();

        // Getting the right schema
        Schema schema = pool.getSchema( schemaName );

        // Creating the new attribute type and adding it to the schema
        AttributeTypeLiteral attributeTypeLiteral = new AttributeTypeLiteral( this.page.getOidField() );
        attributeTypeLiteral.setNames( new String[]
            { this.page.getNameField() } );
        AttributeType attributeType = new AttributeType( attributeTypeLiteral, schema );
        schema.addAttributeType( attributeType );

        // Opening the associated editor
        AttributeTypeEditorInput input = new AttributeTypeEditorInput( attributeType );
        String editorId = AttributeTypeEditor.ID;
        try
View Full Code Here

Examples of org.apache.directory.server.schema.bootstrap.Schema

        for ( Schema schema : schemaMap.values() )
        {
            createSchemaAndContainers( schema );
        }

        Schema other = new Schema()
        {
            public String[] getDependencies()
            {
                return OTHER_SCHEMA_DEPENDENCIES;
            }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.schema.registries.Schema


    private void updateSchemas( SchemaObject schemaObject )
    {
        String schemaName = schemaObject.getSchemaName();
        Schema schema = null;

        if ( Strings.isEmpty( schemaName ) || Strings.equals( "null", schemaName ) )
        {
            schemaName = "default";
            schema = schemaMap.get( schemaName );
        }
        else
        {
            schema = schemaMap.get( schemaName );
        }

        if ( schema == null )
        {
            schema = new DefaultSchema( schemaName );

            schemaMap.put( schemaName, schema );
        }

        schema.getContent().add( new SchemaObjectWrapper( schemaObject ) );

    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.registries.Schema

     * @param schemaName The schema we want to check
     * @return true if the schema is loaded and enabled, false otherwise
     */
    protected boolean isSchemaEnabled( String schemaName )
    {
        Schema schema = schemaManager.getLoadedSchema( schemaName );
       
        return ( ( schema != null ) && schema.isEnabled() );
    }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.schema.Schema

        String displayValue = value.getStringValue();

        if ( !showRawValues() && !"".equals( displayValue ) ) //$NON-NLS-1$
        {
            Schema schema = value.getAttribute().getEntry().getBrowserConnection().getSchema();
            ObjectClassDescription ocd = schema.getObjectClassDescription( displayValue );
            switch ( ocd.getKind() )
            {
                case STRUCTURAL:
                    displayValue = displayValue + Messages.getString( "ObjectClassValueEditor.Structural" ); //$NON-NLS-1$
                    break;
View Full Code Here

Examples of org.apache.directory.studio.schemaeditor.model.Schema

                        SchemaFileType schemaFileType = XMLSchemaFileImporter.getSchemaFileType( new FileInputStream(
                            schemaFile ), schemaFile.getAbsolutePath() );
                        switch ( schemaFileType )
                        {
                            case SINGLE:
                                Schema importedSchema = XMLSchemaFileImporter.getSchema( new FileInputStream(
                                    schemaFile ), schemaFile.getAbsolutePath() );
                                importedSchema
                                    .setProject( Activator.getDefault().getProjectsHandler().getOpenProject() );
                                schemaHandler.addSchema( importedSchema );
                                break;
                            case MULTIPLE:
                                Schema[] schemas = XMLSchemaFileImporter.getSchemas( new FileInputStream( schemaFile ),
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.Schema

  /**
   * Get a Schema with fields represented with native Hive types
   */
  public static Schema getSchema(BaseSemanticAnalyzer sem, HiveConf conf) {
    Schema schema = null;

    // If we have a plan, prefer its logical result schema if it's
    // available; otherwise, try digging out a fetch task; failing that,
    // give up.
    if (sem == null) {
      // can't get any info without a plan
    } else if (sem.getResultSchema() != null) {
      List<FieldSchema> lst = sem.getResultSchema();
      schema = new Schema(lst, null);
    } else if (sem.getFetchTask() != null) {
      FetchTask ft = sem.getFetchTask();
      TableDesc td = ft.getTblDesc();
      // partitioned tables don't have tableDesc set on the FetchTask. Instead
      // they have a list of PartitionDesc objects, each with a table desc.
      // Let's
      // try to fetch the desc for the first partition and use it's
      // deserializer.
      if (td == null && ft.getWork() != null && ft.getWork().getPartDesc() != null) {
        if (ft.getWork().getPartDesc().size() > 0) {
          td = ft.getWork().getPartDesc().get(0).getTableDesc();
        }
      }

      if (td == null) {
        LOG.info("No returning schema.");
      } else {
        String tableName = "result";
        List<FieldSchema> lst = null;
        try {
          lst = MetaStoreUtils.getFieldsFromDeserializer(tableName, td.getDeserializer());
        } catch (Exception e) {
          LOG.warn("Error getting schema: "
              + org.apache.hadoop.util.StringUtils.stringifyException(e));
        }
        if (lst != null) {
          schema = new Schema(lst, null);
        }
      }
    }
    if (schema == null) {
      schema = new Schema();
    }
    LOG.info("Returning Hive schema: " + schema);
    return schema;
  }
View Full Code Here

Examples of org.apache.hadoop.zebra.schema.Schema

        this.path = path;
        schemaFile = new SchemaFile(path, deletedCGs, conf);
        metaReader = MetaFile.createReader(new Path(path, BT_META_FILE), conf);
        // create column group readers
        int numCGs = schemaFile.getNumOfPhysicalSchemas();
        Schema schema;
        colGroups = new ColumnGroup.Reader[numCGs];
        cgTuples = new Tuple[numCGs];
        // set default projection that contains everything
        schema = schemaFile.getLogical();
        projection = new Projection(schema);
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.