Package org.drools.verifier.components

Examples of org.drools.verifier.components.Import


            RulePackage rulePackage = (RulePackage) object;

            packagesByName.put( rulePackage.getName(),
                                rulePackage );
        } else if ( VerifierComponentType.IMPORT.equals( object.getVerifierComponentType() ) ) {
            Import objectImport = (Import) object;
            importsByName.put( objectImport.getName(),
                               objectImport );
        } else if ( VerifierComponentType.OBJECT_TYPE.equals( object.getVerifierComponentType() ) ) {
            ObjectType objectType = (ObjectType) object;
            objectTypesByFullName.put( objectType.getFullName(),
                                       objectType );
View Full Code Here


    public ObjectType getObjectTypeByObjectTypeNameAndPackageName(String factTypeName,
                                                                  String packageName) {

        for ( VerifierComponent verifierComponent : getAll( VerifierComponentType.IMPORT ) ) {
            Import objectImport = (Import) verifierComponent;

            if ( objectImport.getPackageName().equals( packageName ) && objectImport.getShortName().equals( factTypeName ) ) {
                return this.objectTypesByFullName.get( objectImport.getName() );
            }
        }

        return null;
    }
View Full Code Here

            if ( enumField == null ) {

                ObjectType objectType = data.getObjectTypeByFullName( base );

                if ( objectType == null ) {
                    Import objectImport = data.getImportByName( base );

                    if ( objectImport != null ) {
                        objectType = ObjectTypeFactory.createObjectType( objectImport );
                    } else {
                        objectType = ObjectTypeFactory.createObjectType( base );
View Full Code Here

            header.append( "import " );
            header.append( fullPath );
            header.append( "\n" );

            Import objectImport = new Import( rulePackage );
            objectImport.setName( fullPath );
            objectImport.setShortName( name );
            data.add( objectImport );

            ObjectType objectType = this.data.getObjectTypeByFullName( fullPath );

            if ( objectType == null ) {
View Full Code Here

                                      int orderNumber) throws UnknownDescriptionException {

        objectType = data.getObjectTypeByFullName( descr.getObjectType() );

        if ( objectType == null ) {
            Import objectImport = data.getImportByName( descr.getObjectType() );

            if ( objectImport != null ) {
                objectType = ObjectTypeFactory.createObjectType( objectImport );
            } else {
                objectType = ObjectTypeFactory.createObjectType( descr.getObjectType() );
View Full Code Here

        this.data = data;
    }

    public void visit(List<TypeDeclarationDescr> typeDeclarationDescrs) {
        for ( TypeDeclarationDescr typeDeclaration : typeDeclarationDescrs ) {
            Import objectImport = data.getImportByName( typeDeclaration.getTypeName() );
            String objectTypeName;
            if ( objectImport == null ) {
                objectTypeName = typeDeclaration.getTypeName();
            } else {
                objectTypeName = objectImport.getName();
            }

            ObjectType objectType = this.data.getObjectTypeByFullName( objectTypeName );

            if ( objectType == null ) {
View Full Code Here

        this.data = data;
    }

    public void visit(List<TypeDeclarationDescr> typeDeclarationDescrs) {
        for (TypeDeclarationDescr typeDeclaration : typeDeclarationDescrs) {
            Import objectImport = data.getImportByName(typeDeclaration.getTypeName());
            String objectTypeName;
            if (objectImport == null) {
                objectTypeName = typeDeclaration.getTypeName();
            } else {
                objectTypeName = objectImport.getName();
            }

            ObjectType objectType = this.data.getObjectTypeByFullName(objectTypeName);

            if (objectType == null) {
View Full Code Here

                                      int orderNumber) throws UnknownDescriptionException {

        objectType = data.getObjectTypeByFullName(descr.getObjectType());

        if (objectType == null) {
            Import objectImport = data.getImportByName(descr.getObjectType());

            if (objectImport != null) {
                objectType = ObjectTypeFactory.createObjectType(descr, objectImport);
            } else {
                objectType = ObjectTypeFactory.createObjectType(descr, descr.getObjectType());
View Full Code Here

        this.data = data;
    }

    public void visit(List<TypeDeclarationDescr> typeDeclarationDescrs) {
        for (TypeDeclarationDescr typeDeclaration : typeDeclarationDescrs) {
            Import objectImport = data.getImportByName(typeDeclaration.getTypeName());
            String objectTypeName;
            if (objectImport == null) {
                objectTypeName = typeDeclaration.getTypeName();
            } else {
                objectTypeName = objectImport.getName();
            }

            ObjectType objectType = this.data.getObjectTypeByFullName(objectTypeName);

            if (objectType == null) {
View Full Code Here

            String fullName = i.getTarget();
            String name = fullName.substring(fullName.lastIndexOf(".") + 1);

            imports.add(fullName);

            Import objectImport = new Import(i, rulePackage);
            objectImport.setName(fullName);
            objectImport.setShortName(name);
            data.add(objectImport);

            ObjectType objectType = this.data.getObjectTypeByFullName(fullName);

            if (objectType == null) {
View Full Code Here

TOP

Related Classes of org.drools.verifier.components.Import

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.