Initialize the taxonomy based on the loaded instance documents
The taxonomy will have been loaded but the text may not have
been assgined to concepts and the presentation hierarchy
@return True if initialized successfully
350549
private function initTaxonomy()
	{
		// Sanity check
		if ( count( $this->instanceDocuments ) === 0 )
		{
			$this->log()->err( "There are no instance documents" );
			return false;
		}
		if ( $this->taxonomy === null ) return false;

		$xsd = pathinfo( $this->schemaFilename, PATHINFO_BASENAME );
		$this->taxonomy = $this->taxonomy->getTaxonomyForXSD( $xsd );

		return true;
	}
719987
private void initialize() {

		domainIds.addAll(getResourceIds("rdfs:domain"));
		rangeIds.addAll(getResourceIds("rdfs:range"));

		allowsInstances     = "true".equals(getValue(getFirstElement(getElement(), "krdf:allowsInstances")));
		multipleOccurrences = "true".equals(getValue(getFirstElement(getElement(), "krdf:multipleOccurrences")));
		isMixedIn           = "true".equals(getValue(getFirstElement(getElement(), "krdf:isMixedIn")));
		oneWay              = "true".equals(getValue(getFirstElement(getElement(), "krdf:oneWay")));
		icon                = getValue(getFirstElement(getElement(), "krdf:icon"));

		final Object isPrimaryValue = getValue(getFirstElement(getElement(), "krdf:primary"));
		if (isPrimaryValue == null || "true".equals(isPrimaryValue)) {

			primary = true;
		}


		final Node node = getFirstElement(getElement(), "owl:inverseOf");
		if (node != null) {

			final String inverse = getResourceId(node);
			if (inverse != null) {

				this.inverseId = URI.create(inverse);
			}
		}

	}
907547
public function initialize()
    {
        $initializationQuery = 'INSERT INTO tx_solr_indexqueue_item (root, item_type, item_uid, indexing_configuration, indexing_priority, changed, errors) '
            . $this->buildSelectStatement() . ',"" '
            . 'FROM ' . $this->type . ' '
            . 'WHERE '
            . $this->buildPagesClause()
            . $this->buildTcaWhereClause()
            . $this->buildUserWhereClause();
        $logData = ['query' => $initializationQuery];

        try {
            $logData['rows'] = $this->queueItemRepository->initializeByNativeSQLStatement($initializationQuery);
        } catch (DBALException $DBALException) {
            $logData['error'] = $DBALException->getCode() . ': ' . $DBALException->getMessage();
        }

        $this->logInitialization($logData);
        return true;
    }
901553
private static void initIfNeeded()
   {
      if (!INITIALIZED)
      {
         synchronized (JCRAPIAspect.class)
         {
            if (!INITIALIZED)
            {
               ExoContainer container = ExoContainerContext.getTopContainer();
               JCRAPIAspectConfig config = null;
               if (container != null)
               {
                  config = (JCRAPIAspectConfig)container.getComponentInstanceOfType(JCRAPIAspectConfig.class);
               }
               if (config == null)
               {
                  TARGET_INTERFACES = new Class<?>[]{};
                  LOG.warn("No interface to monitor could be found");
               }
               else
               {
                  TARGET_INTERFACES = config.getTargetInterfaces();
                  for (Class<?> c : TARGET_INTERFACES)
                  {
                     Statistics global = new Statistics(null, "global");
                     Map<String, Statistics> statistics = new TreeMap<String, Statistics>();
                     Method[] methods = c.getMethods();
                     for (Method m : methods)
                     {
                        String name = getStatisticsName(m);
                        statistics.put(name, new Statistics(global, name));
                     }
                     JCRStatisticsManager.registerStatistics(c.getSimpleName(), global, statistics);
                     ALL_STATISTICS.put(c.getSimpleName(), statistics);
                  }
               }
               INITIALIZED = true;
            }
         }
      }
   }
277481
public function addInstanceDocument( $instance_file = null, $taxonomy_file = null )
	{
		$this->log()->info( "$instance_file" );

		if ( $this->hierarchies !== null )
			throw new Exception( "An instance document cannot be added to a report once the report has been prepared" );

		if ( $instance_file === null )
			throw new Exception( "An instance document has not been supplied." );

		if ( isset( $this->instanceDocuments[ $instance_file ] ) )
			throw new Exception( "The instance document has already been loaded" );

		// Load the document
		/**
		 * An instance document instance
		 * @var XBRL_Instance $instance
		 */
		$instance = null;
		if ( ! XBRL_Instance::FromInstanceDocument( $instance_file, $taxonomy_file, $instance ) )
		{
			throw new Exception( $instance->getError() );
		}

		// If no schema file is yet set, record it.  If the name of the taxonomy schema
		// associated with the instance document loaded is different to the schema of
		// a previously loaded instance document then report an error.
		$schemaFilename = $instance->getSchemaFilename();
		if ( $this->schemaFilename === null )
			$this->schemaFilename = $schemaFilename;
		else if ( $this->schemaFilename !== $schemaFilename )
			throw new Exception( "Instance documents being compared must use the the same taxonomy schema." );

		// Record it
		$this->instanceDocuments[ $instance_file ] =& $instance;
		$this->analyzeContexts( $instance );

		// If no taxonomy is set then record it as well.  Only one taxonomy is allowed per report.
		if ( ! isset( $this->taxonomy ) || $this->taxonomy === null )
			$this->taxonomy =& $instance->getInstanceTaxonomy();
	}
309056
public boolean isInitialized() {
    for (int i = 0; i < fields.getNumArrayEntries(); i++) {
      if (!isInitialized(fields.getArrayEntryAt(i))) {
        return false;
      }
    }
    for (final Map.Entry<FieldDescriptorType, Object> entry :
             fields.getOverflowEntries()) {
      if (!isInitialized(entry)) {
        return false;
      }
    }
    return true;
  }
271650
public void initializePackageContents() {
		if (isInitialized) return;
		isInitialized = true;

		// Initialize package
		setName(eNAME);
		setNsPrefix(eNS_PREFIX);
		setNsURI(eNS_URI);

		// Create type parameters

		// Set bounds for type parameters

		// Add supertypes to classes
		unknsfEClass.getESuperTypes().add(this.getSF());
		sfGrouperEClass.getESuperTypes().add(this.getSF());

		// Initialize classes and features; add operations and parameters
		initEClass(afpEClass, org.afplib.base.AFP.class, "AFP", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEReference(getAFP_StructuredFields(), this.getSF(), null, "structuredFields", null, 0, -1, org.afplib.base.AFP.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		initEClass(sfEClass, org.afplib.base.SF.class, "SF", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getSF_Number(), ecorePackage.getELong(), "number", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSF_Offset(), ecorePackage.getELong(), "offset", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSF_Id(), ecorePackage.getEInt(), "id", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSF_Length(), ecorePackage.getEInt(), "length", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEReference(getSF_Children(), this.getSF(), null, "children", null, 0, -1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSF_RawData(), ecorePackage.getEByteArray(), "rawData", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getSF_Charset(), this.getCharset(), "charset", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		addEOperation(sfEClass, ecorePackage.getEBoolean(), "isBegin", 0, 1, IS_UNIQUE, IS_ORDERED);

		addEOperation(sfEClass, ecorePackage.getEBoolean(), "isEnd", 0, 1, IS_UNIQUE, IS_ORDERED);

		EOperation op = addEOperation(sfEClass, ecorePackage.getEBoolean(), "isDefault", 0, 1, IS_UNIQUE, IS_ORDERED);
		addEParameter(op, ecorePackage.getEString(), "value", 0, 1, IS_UNIQUE, IS_ORDERED);

		initEClass(unknsfEClass, org.afplib.base.UNKNSF.class, "UNKNSF", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(sfGrouperEClass, SFGrouper.class, "SFGrouper", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

		initEClass(tripletEClass, Triplet.class, "Triplet", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
		initEAttribute(getTriplet_Label(), ecorePackage.getEString(), "label", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTriplet_Charset(), this.getCharset(), "charset", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTriplet_FileOffset(), ecorePackage.getELong(), "fileOffset", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTriplet_TripletLength(), ecorePackage.getEInt(), "tripletLength", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTriplet_TripletId(), ecorePackage.getEInt(), "tripletId", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
		initEAttribute(getTriplet_TripletNumber(), ecorePackage.getEInt(), "tripletNumber", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

		// Initialize data types
		initEDataType(modcaStringEDataType, String.class, "ModcaString", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
		initEDataType(modcaString4EDataType, String.class, "ModcaString4", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
		initEDataType(modcaString8EDataType, String.class, "ModcaString8", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
		initEDataType(modcaString32EDataType, String.class, "ModcaString32", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
		initEDataType(charsetEDataType, Charset.class, "Charset", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);

		// Create resource
		createResource(eNS_URI);

		// Create annotations
		// http:///org/eclipse/emf/ecore/util/ExtendedMetaData
		createExtendedMetaDataAnnotations();
	}
760566
public function initialize()
    {
        if ($this->initialized || ! $this->mapping) {
            return;
        }

        $newObjects = array();

        if ($this->isDirty) {
            // Remember any NEW objects added through add()
            $newObjects = $this->coll->toArray();
        }

        $this->coll->clear();
        $this->uow->loadCollection($this);
        $this->takeSnapshot();

        // Reattach any NEW objects added through add()
        if ($newObjects) {
            foreach ($newObjects as $key => $obj) {
                if ($this->mapping['strategy'] === 'set') {
                    $this->coll->set($key, $obj);
                } else {
                    $this->coll->add($obj);
                }
            }

            $this->isDirty = true;
        }

        $this->mongoData = array();
        $this->initialized = true;
    }
200244
protected function initialize()
    {
        $this->id = $this->formatId($this->column);
        $this->group = new Collection();
        $this->name = "{$this->id}-filter-group";

        $this->setupDefaultPresenter();
    }
593769
private function initLeafNames() {
    $index = 0;
    foreach ($this->toplevelNames as $name) {
      if (empty($this->children[$name])) {
        // This is a leaf.
        $this->subtreeLeafMap[$name][$name] = $index;
        $this->leafMap[$name] = $index;
        ++$index;
      }
      else {
        // This is a node with a subtree.
        $this->initSubtreeLeafNames($name, $index);
        $this->leafMap += $this->subtreeLeafMap[$name];
      }
    }
  }
1025675
def load(self):
        
        if self.__loaded:
            return False
        
        self.__loaded = True
        self.setChildIndicatorPolicy(self.DontShowIndicatorWhenChildless)
        
        # loads the children for this widget
        tree = self.treeWidget()
        if tree.groupBy():
            grps = self.childRecords().grouped(tree.groupBy())
            for grp, records in grps.items():
                tree.createGroupItem(grp, records, self)
        else:
            for record in self.childRecords():
                tree.createRecordItem(record, self)
        
        return True
699880
protected function Init()
    {
        $this->article = Article::Schema()->ByCleanTitle(Request::GetData('article'));
        if ($this->article && !$this->CheckPublished()) {
            $this->article = null;
        }
        if ($this->article) {
            $this->category = $this->article->GetCategory();
            $this->archive = $this->category->GetArchive();
            $this->InitMetaTitle();
            $this->InitMetaDescription();
        }
        return parent::Init();
    }
619918
public function registerTaxonomy()
    {
        if (!taxonomy_exists($this->name)) {
            // create options for the Taxonomy
            $options = $this->createOptions();

            // register the Taxonomy with WordPress
            register_taxonomy($this->name, null, $options);
        }
    }
1302038
protected function Init()
    {
        $this->articles = array();
        $this->articleList = ContentArticleList::Schema()->ByContent($this->Content());
        $this->articlesTotal = 0;
        $this->InitArticles();
        return parent::Init();
    }
944395
@PostConstruct
	public void initialize() {
		try {
			Class.forName("org.hl7.fhir.instance.model.QuestionnaireResponse");
			myValidateResponses = true;
		} catch (ClassNotFoundException e) {
			myValidateResponses = Boolean.FALSE;
		}
	}
1133419
protected boolean _load ()
    {
    	java.util.ArrayList newChildren = new java.util.ArrayList();

    	/* @todo make this work */
//    	if (cld.getConnectionDescriptor() != null)
//    	{
//    		newChildren.add(new OjbMetaJdbcConnectionDescriptorNode(
//    			this.getOjbMetaTreeModel().getRepository(),
//    			this.getOjbMetaTreeModel(),
//    			this,
//    			cld.getConnectionDescriptor()));
//    	}
//
    	// Add collection descriptors
    	java.util.Iterator it = cld.getCollectionDescriptors().iterator();
    	while (it.hasNext())
    	{
    		CollectionDescriptor collDesc = (CollectionDescriptor)it.next();
    		newChildren.add(new OjbMetaCollectionDescriptorNode(
    			this.getOjbMetaTreeModel().getRepository(),
    			this.getOjbMetaTreeModel(),
    			this,
    			collDesc));

    	}

    	// Add extent classes Class

        it = cld.getExtentClassNames().iterator();
    	while (it.hasNext())
    	{
    		String extentClassName = (String)it.next();
    		newChildren.add(new OjbMetaExtentClassNode(
    			this.getOjbMetaTreeModel().getRepository(),
    			this.getOjbMetaTreeModel(),
    			this,
    			extentClassName));

    	}

        // Get Field descriptors FieldDescriptor
        if (cld.getFieldDescriptions() != null)
        {
            it = new ArrayIterator(cld.getFieldDescriptions());
            while (it.hasNext())
            {
                FieldDescriptor fieldDesc = (FieldDescriptor)it.next();
                newChildren.add(new OjbMetaFieldDescriptorNode(
                        this.getOjbMetaTreeModel().getRepository(),
                        this.getOjbMetaTreeModel(),
                        this,
                        fieldDesc));
            }
        }
        else
        {
                System.out.println(cld.getClassNameOfObject() + " does not have field descriptors");
        }

        // Get Indices IndexDescriptor
        it = cld.getIndexes().iterator();
    	while (it.hasNext())
    	{
    		IndexDescriptor indexDesc = (IndexDescriptor)it.next();
    		newChildren.add(new OjbMetaIndexDescriptorNode(
    			this.getOjbMetaTreeModel().getRepository(),
    			this.getOjbMetaTreeModel(),
    			this,
    			indexDesc));

    	}

    	// Get references ObjectReferenceDescriptor
    	it = cld.getObjectReferenceDescriptors().iterator();
    	while (it.hasNext())
    	{
    		ObjectReferenceDescriptor objRefDesc = (ObjectReferenceDescriptor)it.next();
    		newChildren.add(new OjbMetaObjectReferenceDescriptorNode(
    			this.getOjbMetaTreeModel().getRepository(),
    			this.getOjbMetaTreeModel(),
    			this,
    			objRefDesc));

    	}
    	// Add
    	this.alChildren = newChildren;
    	this.getOjbMetaTreeModel().nodeStructureChanged(this);
        return true;
    }
1113232
private void initialize() {
		if (selection != null && selection.isEmpty() == false
				&& selection instanceof IStructuredSelection) {
			IStructuredSelection iStructuredSelection = (IStructuredSelection) selection;
			
			if (iStructuredSelection.size() > 0) {
				Object selectedObject = iStructuredSelection.getFirstElement();
				IProject project = null;
				
				if (selectedObject instanceof IJavaProject) {
					project = ((IJavaProject)selectedObject).getProject();
				} else if (selectedObject instanceof IJavaElement) {
					IJavaProject jProject= ((IJavaElement)selectedObject).getJavaProject();
					project = jProject.getProject();
				} else if (selectedObject instanceof IResource) {
					project = ((IResource)selectedObject).getProject();
				} 
				
				if (project != null) {
					projectText.setText(project.getName());
				}
			}
		}
		serviceText.setText("mySample");
	}