[maven-release-plugin] copy for tag 1.0.0-M32

git-svn-id: https://svn.apache.org/repos/asf/directory/shared/tags/1.0.0-M32@1708634 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ldap/schema/data/README.md b/ldap/schema/data/README.md
index 4fb9223..5965e38 100755
--- a/ldap/schema/data/README.md
+++ b/ldap/schema/data/README.md
@@ -1,299 +1,318 @@
-# Schema Data

-

-## OID Allocation Policy (generated using /src/main/scripts/oid_allocation.pl)

-

-OID values are allocated as follows:

-

-### `ou=syntaxes` and `ou=syntaxCheckers`

-

-- 1.3.6.1.4.1.18060.0.4.1.0.0: Java Byte

-- 1.3.6.1.4.1.18060.0.4.1.0.2: Java Short

-- 1.3.6.1.4.1.18060.0.4.1.0.3: Java Long

-- 1.3.6.1.4.1.18060.0.4.1.0.4: Java Int

-- 1.3.6.1.4.1.18060.0.4.1.0.10: Search Scope

-- 1.3.6.1.4.1.18060.0.4.1.0.11: Deref Alias

-

-### `ou=comparators` and `ou=matchingRules` and `ou=normalizers`

-

-- 1.3.6.1.4.1.18060.0.4.1.1.1: exactDnAsStringMatch

-- 1.3.6.1.4.1.18060.0.4.1.1.2: bigIntegerMatch

-- 1.3.6.1.4.1.18060.0.4.1.1.3: jdbmStringMatch

-

-### `ou=attributeTypes`

-

-

-#### Base Bean

-

-- 1.3.6.1.4.1.18060.0.4.1.2.3: apachePresence

-- 1.3.6.1.4.1.18060.0.4.1.2.4: apacheOneLevel

-- 1.3.6.1.4.1.18060.0.4.1.2.5: apacheOneAlias

-- 1.3.6.1.4.1.18060.0.4.1.2.6: apacheSubAlias

-- 1.3.6.1.4.1.18060.0.4.1.2.7: apacheAlias

-- 1.3.6.1.4.1.18060.0.4.1.2.8: prefNodeName

-- 1.3.6.1.4.1.18060.0.4.1.2.9: apacheSamType

-- 1.3.6.1.4.1.18060.0.4.1.2.10: autonomousAreaSubentry

-- 1.3.6.1.4.1.18060.0.4.1.2.11: accessControlSubentries

-- 1.3.6.1.4.1.18060.0.4.1.2.15: apacheServicePid

-- 1.3.6.1.4.1.18060.0.4.1.2.16: apacheServiceFactoryPid

-- 1.3.6.1.4.1.18060.0.4.1.2.17: apacheCatalogEntryName

-- 1.3.6.1.4.1.18060.0.4.1.2.18: apacheCatalogEntryBaseDn

-- 1.3.6.1.4.1.18060.0.4.1.2.19: windowsFilePath

-- 1.3.6.1.4.1.18060.0.4.1.2.20: unixFilePath

-- 1.3.6.1.4.1.18060.0.4.1.2.21: fullyQualifiedJavaClassName

-- 1.3.6.1.4.1.18060.0.4.1.2.22: javaClassByteCode

-- 1.3.6.1.4.1.18060.0.4.1.2.23: classLoaderDefaultSearchContext

-- 1.3.6.1.4.1.18060.0.4.1.2.25: prescriptiveTriggerSpecification

-- 1.3.6.1.4.1.18060.0.4.1.2.26: entryTriggerSpecification

-- 1.3.6.1.4.1.18060.0.4.1.2.27: triggerExecutionSubentries

-- 1.3.6.1.4.1.18060.0.4.1.2.28: triggerExecutionSubentry

-- 1.3.6.1.4.1.18060.0.4.1.2.31: entryDeleted

-- 1.3.6.1.4.1.18060.0.4.1.2.32: comparators

-- 1.3.6.1.4.1.18060.0.4.1.2.33: normalizers

-- 1.3.6.1.4.1.18060.0.4.1.2.34: syntaxCheckers

-- 1.3.6.1.4.1.18060.0.4.1.2.35: schemaModifyTimestamp

-- 1.3.6.1.4.1.18060.0.4.1.2.36: schemaModifiersName

-- 1.3.6.1.4.1.18060.0.4.1.2.37: subschemaSubentryName

-- 1.3.6.1.4.1.18060.0.4.1.2.38: privateKeyFormat

-- 1.3.6.1.4.1.18060.0.4.1.2.39: keyAlgorithm

-- 1.3.6.1.4.1.18060.0.4.1.2.40: privateKey

-- 1.3.6.1.4.1.18060.0.4.1.2.41: publicKeyFormat

-- 1.3.6.1.4.1.18060.0.4.1.2.42: publicKey

-- 1.3.6.1.4.1.18060.0.4.1.2.43: apacheSubLevel

-- 1.3.6.1.4.1.18060.0.4.1.2.44: revisions

-- 1.3.6.1.4.1.18060.0.4.1.2.45: changeTime

-- 1.3.6.1.4.1.18060.0.4.1.2.46: changeType

-- 1.3.6.1.4.1.18060.0.4.1.2.47: rev

-- 1.3.6.1.4.1.18060.0.4.1.2.48: committer

-- 1.3.6.1.4.1.18060.0.4.1.2.49: changeLogContext

-- 1.3.6.1.4.1.18060.0.4.1.2.50: apacheRdn

-- 1.3.6.1.4.1.18060.0.4.1.2.51: entryParentId

-- 1.3.6.1.4.1.18060.0.4.1.2.61: ads-transportAddress

-- 1.3.6.1.4.1.18060.0.4.1.2.62: ads-transportBacklog

-- 1.3.6.1.4.1.18060.0.4.1.2.63: ads-transportEnableSSL

-- 1.3.6.1.4.1.18060.0.4.1.2.64: ads-transportNbThreads

-- 1.3.6.1.4.1.18060.0.4.1.2.65: ads-needClientAuth

-- 1.3.6.1.4.1.18060.0.4.1.2.66: ads-wantClientAuth

-- 1.3.6.1.4.1.18060.0.4.1.2.67: ads-enabledProtocols

-- 1.3.6.1.4.1.18060.0.4.1.2.68: ads-enabledCiphers

-

-#### Directory Service

-

-- 1.3.6.1.4.1.18060.0.4.1.2.100: ads-directoryServiceId

-- 1.3.6.1.4.1.18060.0.4.1.2.101: ads-dsAccessControlEnabled

-- 1.3.6.1.4.1.18060.0.4.1.2.102: ads-dsAllowAnonymousAccess

-- 1.3.6.1.4.1.18060.0.4.1.2.103: ads-dsDenormalizeOpAttrsEnabled

-- 1.3.6.1.4.1.18060.0.4.1.2.104: ads-dsPasswordHidden

-- 1.3.6.1.4.1.18060.0.4.1.2.110: ads-maxPDUSize

-- 1.3.6.1.4.1.18060.0.4.1.2.111: ads-dsSyncPeriodMillis

-- 1.3.6.1.4.1.18060.0.4.1.2.112: ads-dsReplicaId

-- 1.3.6.1.4.1.18060.0.4.1.2.113: ads-dsTestEntries

-- 1.3.6.1.4.1.18060.0.4.1.2.120: ads-changeLogId

-- 1.3.6.1.4.1.18060.0.4.1.2.121: ads-changeLogExposed

-- 1.3.6.1.4.1.18060.0.4.1.2.130: ads-interceptorId

-- 1.3.6.1.4.1.18060.0.4.1.2.131: ads-interceptorOrder

-- 1.3.6.1.4.1.18060.0.4.1.2.141: ads-journalRotation

-- 1.3.6.1.4.1.18060.0.4.1.2.142: ads-journalWorkingDir

-- 1.3.6.1.4.1.18060.0.4.1.2.143: ads-journalFileName

-- 1.3.6.1.4.1.18060.0.4.1.2.144: ads-journalId

-- 1.3.6.1.4.1.18060.0.4.1.2.150: ads-partitionId

-- 1.3.6.1.4.1.18060.0.4.1.2.151: ads-partitionSuffix

-- 1.3.6.1.4.1.18060.0.4.1.2.153: ads-partitionCacheSize

-- 1.3.6.1.4.1.18060.0.4.1.2.154: ads-contextEntry

-- 1.3.6.1.4.1.18060.0.4.1.2.160: ads-indexAttributeId

-- 1.3.6.1.4.1.18060.0.4.1.2.161: ads-indexFileName

-- 1.3.6.1.4.1.18060.0.4.1.2.162: ads-indexWorkingDir

-- 1.3.6.1.4.1.18060.0.4.1.2.163: ads-indexNumDupLimit

-- 1.3.6.1.4.1.18060.0.4.1.2.164: ads-indexCacheSize

-- 1.3.6.1.4.1.18060.0.4.1.2.165: ads-indexHasReverse

-- 1.3.6.1.4.1.18060.0.4.1.2.200: ads-transportId

-- 1.3.6.1.4.1.18060.0.4.1.2.250: ads-serverId

-- 1.3.6.1.4.1.18060.0.4.1.2.252: ads-Id

-- 1.3.6.1.4.1.18060.0.4.1.2.253: ads-extendedOpId

-

-#### LDAP Server

-

-- 1.3.6.1.4.1.18060.0.4.1.2.300: ads-confidentialityRequired

-- 1.3.6.1.4.1.18060.0.4.1.2.301: ads-allowAnonymousAccess

-- 1.3.6.1.4.1.18060.0.4.1.2.302: ads-maxSizeLimit

-- 1.3.6.1.4.1.18060.0.4.1.2.303: ads-maxTimeLimit

-- 1.3.6.1.4.1.18060.0.4.1.2.304: ads-saslHost

-- 1.3.6.1.4.1.18060.0.4.1.2.305: ads-saslPrincipal

-- 1.3.6.1.4.1.18060.0.4.1.2.306: ads-saslRealms

-- 1.3.6.1.4.1.18060.0.4.1.2.308: ads-keystoreFile

-- 1.3.6.1.4.1.18060.0.4.1.2.309: ads-certificatePassword

-- 1.3.6.1.4.1.18060.0.4.1.2.310: ads-replConsumerImpl

-

-#### Kerberos Server

-

-- 1.3.6.1.4.1.18060.0.4.1.2.400: ads-krbAllowableClockSkew

-- 1.3.6.1.4.1.18060.0.4.1.2.401: ads-krbEncryptionTypes

-- 1.3.6.1.4.1.18060.0.4.1.2.402: ads-krbEmptyAddressesAllowed

-- 1.3.6.1.4.1.18060.0.4.1.2.403: ads-krbForwardableAllowed

-- 1.3.6.1.4.1.18060.0.4.1.2.404: ads-krbPaEncTimestampRequired

-- 1.3.6.1.4.1.18060.0.4.1.2.405: ads-krbPostdatedAllowed

-- 1.3.6.1.4.1.18060.0.4.1.2.406: ads-krbProxiableAllowed

-- 1.3.6.1.4.1.18060.0.4.1.2.407: ads-krbRenewableAllowed

-- 1.3.6.1.4.1.18060.0.4.1.2.408: ads-krbKdcPrincipal

-- 1.3.6.1.4.1.18060.0.4.1.2.409: ads-krbMaximumRenewableLifetime

-- 1.3.6.1.4.1.18060.0.4.1.2.410: ads-krbMaximumTicketLifetime

-- 1.3.6.1.4.1.18060.0.4.1.2.411: ads-krbPrimaryRealm

-- 1.3.6.1.4.1.18060.0.4.1.2.412: ads-krbBodyChecksumVerified

-

-#### ChangePassword Server

-

-- 1.3.6.1.4.1.18060.0.4.1.2.800: ads-chgPwdPolicyCategoryCount

-- 1.3.6.1.4.1.18060.0.4.1.2.801: ads-chgPwdPolicyPasswordLength

-- 1.3.6.1.4.1.18060.0.4.1.2.802: ads-chgPwdPolicyTokenSize

-- 1.3.6.1.4.1.18060.0.4.1.2.803: ads-chgPwdServicePrincipal

-- 1.3.6.1.4.1.18060.0.4.1.2.804: ads-interceptorClassName

-- 1.3.6.1.4.1.18060.0.4.1.2.805: ads-enabled

-- 1.3.6.1.4.1.18060.0.4.1.2.806: ads-partitionSyncOnWrite

-- 1.3.6.1.4.1.18060.0.4.1.2.807: ads-jdbmPartitionOptimizerEnabled

-- 1.3.6.1.4.1.18060.0.4.1.2.808: ads-saslMechName

-- 1.3.6.1.4.1.18060.0.4.1.2.809: ads-ntlmMechProvider

-- 1.3.6.1.4.1.18060.0.4.1.2.810: ads-saslMechClassName

-- 1.3.6.1.4.1.18060.0.4.1.2.811: ads-extendedOpHandlerClass

-- 1.3.6.1.4.1.18060.0.4.1.2.812: ads-systemPort

-- 1.3.6.1.4.1.18060.0.4.1.2.813: ads-httpWarFile

-- 1.3.6.1.4.1.18060.0.4.1.2.814: ads-httpAppCtxPath

-- 1.3.6.1.4.1.18060.0.4.1.2.816: ads-httpConfFile

-- 1.3.6.1.4.1.18060.0.4.1.2.817: ads-replSearchFilter

-- 1.3.6.1.4.1.18060.0.4.1.2.818: ads-replLastSentCsn

-- 1.3.6.1.4.1.18060.0.4.1.2.819: ads-replAliasDerefMode

-- 1.3.6.1.4.1.18060.0.4.1.2.820: ads-searchBaseDN

-- 1.3.6.1.4.1.18060.0.4.1.2.821: ads-replSearchScope

-- 1.3.6.1.4.1.18060.0.4.1.2.822: ads-replRefreshNPersist

-- 1.3.6.1.4.1.18060.0.4.1.2.823: ads-replProvHostName

-- 1.3.6.1.4.1.18060.0.4.1.2.824: ads-replProvPort

-- 1.3.6.1.4.1.18060.0.4.1.2.825: ads-replUserDn

-- 1.3.6.1.4.1.18060.0.4.1.2.826: ads-replUserPassword

-- 1.3.6.1.4.1.18060.0.4.1.2.827: ads-replRefreshInterval

-- 1.3.6.1.4.1.18060.0.4.1.2.828: ads-replAttributes

-- 1.3.6.1.4.1.18060.0.4.1.2.829: ads-replSearchSizeLimit

-- 1.3.6.1.4.1.18060.0.4.1.2.830: ads-replSearchTimeOut

-- 1.3.6.1.4.1.18060.0.4.1.2.831: ads-replCookie

-- 1.3.6.1.4.1.18060.0.4.1.2.832: ads-replReqHandler

-- 1.3.6.1.4.1.18060.0.4.1.2.833: ads-replUseTls

-- 1.3.6.1.4.1.18060.0.4.1.2.834: ads-replStrictCertValidation

-- 1.3.6.1.4.1.18060.0.4.1.2.837: ads-replConsumerId

-- 1.3.6.1.4.1.18060.0.4.1.2.838: ads-replEnabled

-

-#### Password Policy

-

-- 1.3.6.1.4.1.18060.0.4.1.2.900: ads-pwdAttribute

-- 1.3.6.1.4.1.18060.0.4.1.2.901: ads-pwdMinAge

-- 1.3.6.1.4.1.18060.0.4.1.2.902: ads-pwdMaxAge

-- 1.3.6.1.4.1.18060.0.4.1.2.903: ads-pwdInHistory

-- 1.3.6.1.4.1.18060.0.4.1.2.904: ads-pwdCheckQuality

-- 1.3.6.1.4.1.18060.0.4.1.2.905: ads-pwdMinLength

-- 1.3.6.1.4.1.18060.0.4.1.2.906: ads-pwdMaxLength

-- 1.3.6.1.4.1.18060.0.4.1.2.907: ads-pwdExpireWarning

-- 1.3.6.1.4.1.18060.0.4.1.2.908: ads-pwdGraceAuthNLimit

-- 1.3.6.1.4.1.18060.0.4.1.2.909: ads-pwdGraceExpire

-- 1.3.6.1.4.1.18060.0.4.1.2.910: ads-pwdLockout

-- 1.3.6.1.4.1.18060.0.4.1.2.911: ads-pwdLockoutDuration

-- 1.3.6.1.4.1.18060.0.4.1.2.912: ads-pwdMaxFailure

-- 1.3.6.1.4.1.18060.0.4.1.2.913: ads-pwdFailureCountInterval

-- 1.3.6.1.4.1.18060.0.4.1.2.914: ads-pwdMustChange

-- 1.3.6.1.4.1.18060.0.4.1.2.915: ads-pwdAllowUserChange

-- 1.3.6.1.4.1.18060.0.4.1.2.916: ads-pwdSafeModify

-- 1.3.6.1.4.1.18060.0.4.1.2.917: ads-pwdMinDelay

-- 1.3.6.1.4.1.18060.0.4.1.2.918: ads-pwdMaxDelay

-- 1.3.6.1.4.1.18060.0.4.1.2.919: ads-pwdMaxIdle

-- 1.3.6.1.4.1.18060.0.4.1.2.920: ads-replLogMaxIdle

-- 1.3.6.1.4.1.18060.0.4.1.2.921: ads-pwdId

-- 1.3.6.1.4.1.18060.0.4.1.2.922: ads-replLogPurgeThresholdCount

-- 1.3.6.1.4.1.18060.0.4.1.2.923: ads-replPingerSleep

-- 1.3.6.1.4.1.18060.0.4.1.2.925: ads-pwdValidator

-- 1.3.6.1.4.1.18060.0.4.1.2.930: ads-authenticatorId

-- 1.3.6.1.4.1.18060.0.4.1.2.931: ads-delegateHost

-- 1.3.6.1.4.1.18060.0.4.1.2.932: ads-delegatePort

-- 1.3.6.1.4.1.18060.0.4.1.2.933: ads-delegateSsl

-- 1.3.6.1.4.1.18060.0.4.1.2.934: ads-authenticatorClass

-- 1.3.6.1.4.1.18060.0.4.1.2.935: ads-baseDn

-- 1.3.6.1.4.1.18060.0.4.1.2.936: ads-delegateTls

-- 1.3.6.1.4.1.18060.0.4.1.2.937: ads-delegateSslTrustManager

-- 1.3.6.1.4.1.18060.0.4.1.2.938: ads-delegateTlsTrustManager

-

-### `ou=objectClasses`

-

-

-#### Base Bean

-

-- 1.3.6.1.4.1.18060.0.4.1.3.0: ads-base

-- 1.3.6.1.4.1.18060.0.4.1.3.1: prefNode

-- 1.3.6.1.4.1.18060.0.4.1.3.3: apacheServiceConfiguration

-- 1.3.6.1.4.1.18060.0.4.1.3.4: apacheFactoryConfiguration

-- 1.3.6.1.4.1.18060.0.4.1.3.5: apacheCatalogEntry

-- 1.3.6.1.4.1.18060.0.4.1.3.6: windowsFile

-- 1.3.6.1.4.1.18060.0.4.1.3.7: unixFile

-- 1.3.6.1.4.1.18060.0.4.1.3.8: javaClass

-- 1.3.6.1.4.1.18060.0.4.1.3.9: apacheSubschema

-- 1.3.6.1.4.1.18060.0.4.1.3.10: schemaModificationAttributes

-- 1.3.6.1.4.1.18060.0.4.1.3.11: tlsKeyInfo

-- 1.3.6.1.4.1.18060.0.4.1.3.12: changeLogEvent

-- 1.3.6.1.4.1.18060.0.4.1.3.13: tag

-- 1.3.6.1.4.1.18060.0.4.1.3.18: ads-transport

-- 1.3.6.1.4.1.18060.0.4.1.3.19: ads-tcpTransport

-- 1.3.6.1.4.1.18060.0.4.1.3.20: ads-udpTransport

-

-#### Directory Service

-

-- 1.3.6.1.4.1.18060.0.4.1.3.100: ads-directoryService

-- 1.3.6.1.4.1.18060.0.4.1.3.120: ads-changeLog

-- 1.3.6.1.4.1.18060.0.4.1.3.130: ads-interceptor

-- 1.3.6.1.4.1.18060.0.4.1.3.131: ads-authenticationInterceptor

-- 1.3.6.1.4.1.18060.0.4.1.3.140: ads-journal

-- 1.3.6.1.4.1.18060.0.4.1.3.150: ads-partition

-- 1.3.6.1.4.1.18060.0.4.1.3.151: ads-jdbmPartition

-- 1.3.6.1.4.1.18060.0.4.1.3.160: ads-index

-- 1.3.6.1.4.1.18060.0.4.1.3.161: ads-jdbmIndex

-- 1.3.6.1.4.1.18060.0.4.1.3.250: ads-server

-- 1.3.6.1.4.1.18060.0.4.1.3.260: ads-dsBasedServer

-

-#### LDAP Server

-

-- 1.3.6.1.4.1.18060.0.4.1.3.300: ads-ldapServer

-

-#### Kerberos Server

-

-- 1.3.6.1.4.1.18060.0.4.1.3.400: ads-kdcServer

-

-#### DNS Server

-

-- 1.3.6.1.4.1.18060.0.4.1.3.500: ads-dnsServer

-

-#### DHCP Server

-

-- 1.3.6.1.4.1.18060.0.4.1.3.600: ads-dhcpServer

-

-#### NTP Server

-

-- 1.3.6.1.4.1.18060.0.4.1.3.700: ads-ntpServer

-

-#### ChangePassword Server

-

-- 1.3.6.1.4.1.18060.0.4.1.3.800: ads-changePasswordServer

-- 1.3.6.1.4.1.18060.0.4.1.3.801: ads-saslMechHandler

-- 1.3.6.1.4.1.18060.0.4.1.3.802: ads-extendedOpHandler

-- 1.3.6.1.4.1.18060.0.4.1.3.803: ads-httpWebApp

-- 1.3.6.1.4.1.18060.0.4.1.3.804: ads-httpServer

-- 1.3.6.1.4.1.18060.0.4.1.3.805: ads-replEventLog

-- 1.3.6.1.4.1.18060.0.4.1.3.806: ads-replConsumer

-

-#### Password Policy

-

-- 1.3.6.1.4.1.18060.0.4.1.3.900: ads-passwordPolicy

-- 1.3.6.1.4.1.18060.0.4.1.3.901: ads-authenticator

-- 1.3.6.1.4.1.18060.0.4.1.3.902: ads-authenticatorImpl

-- 1.3.6.1.4.1.18060.0.4.1.3.904: ads-delegatingAuthenticator

-- 1.3.6.1.4.1.18060.0.4.1.3.905: ads-mavibotIndex

-- 1.3.6.1.4.1.18060.0.4.1.3.906: ads-mavibotPartition

-- 1.3.6.1.4.1.18060.0.4.1.5.1: storedProcLangId

-- 1.3.6.1.4.1.18060.0.4.1.5.2: storedProcUnitName

-- 1.3.6.1.4.1.18060.0.4.1.5.3: storedProcUnit

-- 1.3.6.1.4.1.18060.0.4.1.5.4: javaByteCode

-- 1.3.6.1.4.1.18060.0.4.1.5.5: javaStoredProcUnit

-- 1.3.6.1.4.1.18060.0.4.1.5.6: javaxScriptLangId

-- 1.3.6.1.4.1.18060.0.4.1.5.7: javaxScriptCode

-- 1.3.6.1.4.1.18060.0.4.1.5.8: javaxScriptStoredProcUnit

+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+
+# Schemma Data
+
+## OID Allocation Policy (generated using /src/main/scripts/oid_allocation.pl)
+
+OID values are allocated as follows:
+
+### `ou=syntaxes` and `ou=syntaxCheckers`
+
+- 1.3.6.1.4.1.18060.0.4.1.0.0: Java Byte
+- 1.3.6.1.4.1.18060.0.4.1.0.2: Java Short
+- 1.3.6.1.4.1.18060.0.4.1.0.3: Java Long
+- 1.3.6.1.4.1.18060.0.4.1.0.4: Java Int
+- 1.3.6.1.4.1.18060.0.4.1.0.10: Search Scope
+- 1.3.6.1.4.1.18060.0.4.1.0.11: Deref Alias
+
+### `ou=comparators` and `ou=matchingRules` and `ou=normalizers`
+
+- 1.3.6.1.4.1.18060.0.4.1.1.1: exactDnAsStringMatch
+- 1.3.6.1.4.1.18060.0.4.1.1.2: bigIntegerMatch
+- 1.3.6.1.4.1.18060.0.4.1.1.3: jdbmStringMatch
+
+### `ou=attributeTypes`
+
+
+#### Base Bean
+
+- 1.3.6.1.4.1.18060.0.4.1.2.3: apachePresence
+- 1.3.6.1.4.1.18060.0.4.1.2.4: apacheOneLevel
+- 1.3.6.1.4.1.18060.0.4.1.2.5: apacheOneAlias
+- 1.3.6.1.4.1.18060.0.4.1.2.6: apacheSubAlias
+- 1.3.6.1.4.1.18060.0.4.1.2.7: apacheAlias
+- 1.3.6.1.4.1.18060.0.4.1.2.8: prefNodeName
+- 1.3.6.1.4.1.18060.0.4.1.2.9: apacheSamType
+- 1.3.6.1.4.1.18060.0.4.1.2.10: autonomousAreaSubentry
+- 1.3.6.1.4.1.18060.0.4.1.2.11: accessControlSubentries
+- 1.3.6.1.4.1.18060.0.4.1.2.15: apacheServicePid
+- 1.3.6.1.4.1.18060.0.4.1.2.16: apacheServiceFactoryPid
+- 1.3.6.1.4.1.18060.0.4.1.2.17: apacheCatalogEntryName
+- 1.3.6.1.4.1.18060.0.4.1.2.18: apacheCatalogEntryBaseDn
+- 1.3.6.1.4.1.18060.0.4.1.2.19: windowsFilePath
+- 1.3.6.1.4.1.18060.0.4.1.2.20: unixFilePath
+- 1.3.6.1.4.1.18060.0.4.1.2.21: fullyQualifiedJavaClassName
+- 1.3.6.1.4.1.18060.0.4.1.2.22: javaClassByteCode
+- 1.3.6.1.4.1.18060.0.4.1.2.23: classLoaderDefaultSearchContext
+- 1.3.6.1.4.1.18060.0.4.1.2.25: prescriptiveTriggerSpecification
+- 1.3.6.1.4.1.18060.0.4.1.2.26: entryTriggerSpecification
+- 1.3.6.1.4.1.18060.0.4.1.2.27: triggerExecutionSubentries
+- 1.3.6.1.4.1.18060.0.4.1.2.28: triggerExecutionSubentry
+- 1.3.6.1.4.1.18060.0.4.1.2.31: entryDeleted
+- 1.3.6.1.4.1.18060.0.4.1.2.32: comparators
+- 1.3.6.1.4.1.18060.0.4.1.2.33: normalizers
+- 1.3.6.1.4.1.18060.0.4.1.2.34: syntaxCheckers
+- 1.3.6.1.4.1.18060.0.4.1.2.35: schemaModifyTimestamp
+- 1.3.6.1.4.1.18060.0.4.1.2.36: schemaModifiersName
+- 1.3.6.1.4.1.18060.0.4.1.2.37: subschemaSubentryName
+- 1.3.6.1.4.1.18060.0.4.1.2.38: privateKeyFormat
+- 1.3.6.1.4.1.18060.0.4.1.2.39: keyAlgorithm
+- 1.3.6.1.4.1.18060.0.4.1.2.40: privateKey
+- 1.3.6.1.4.1.18060.0.4.1.2.41: publicKeyFormat
+- 1.3.6.1.4.1.18060.0.4.1.2.42: publicKey
+- 1.3.6.1.4.1.18060.0.4.1.2.43: apacheSubLevel
+- 1.3.6.1.4.1.18060.0.4.1.2.44: revisions
+- 1.3.6.1.4.1.18060.0.4.1.2.45: changeTime
+- 1.3.6.1.4.1.18060.0.4.1.2.46: changeType
+- 1.3.6.1.4.1.18060.0.4.1.2.47: rev
+- 1.3.6.1.4.1.18060.0.4.1.2.48: committer
+- 1.3.6.1.4.1.18060.0.4.1.2.49: changeLogContext
+- 1.3.6.1.4.1.18060.0.4.1.2.50: apacheRdn
+- 1.3.6.1.4.1.18060.0.4.1.2.51: entryParentId
+- 1.3.6.1.4.1.18060.0.4.1.2.61: ads-transportAddress
+- 1.3.6.1.4.1.18060.0.4.1.2.62: ads-transportBacklog
+- 1.3.6.1.4.1.18060.0.4.1.2.63: ads-transportEnableSSL
+- 1.3.6.1.4.1.18060.0.4.1.2.64: ads-transportNbThreads
+- 1.3.6.1.4.1.18060.0.4.1.2.65: ads-needClientAuth
+- 1.3.6.1.4.1.18060.0.4.1.2.66: ads-wantClientAuth
+- 1.3.6.1.4.1.18060.0.4.1.2.67: ads-enabledProtocols
+- 1.3.6.1.4.1.18060.0.4.1.2.68: ads-enabledCiphers
+
+#### Directory Service
+
+- 1.3.6.1.4.1.18060.0.4.1.2.100: ads-directoryServiceId
+- 1.3.6.1.4.1.18060.0.4.1.2.101: ads-dsAccessControlEnabled
+- 1.3.6.1.4.1.18060.0.4.1.2.102: ads-dsAllowAnonymousAccess
+- 1.3.6.1.4.1.18060.0.4.1.2.103: ads-dsDenormalizeOpAttrsEnabled
+- 1.3.6.1.4.1.18060.0.4.1.2.104: ads-dsPasswordHidden
+- 1.3.6.1.4.1.18060.0.4.1.2.110: ads-maxPDUSize
+- 1.3.6.1.4.1.18060.0.4.1.2.111: ads-dsSyncPeriodMillis
+- 1.3.6.1.4.1.18060.0.4.1.2.112: ads-dsReplicaId
+- 1.3.6.1.4.1.18060.0.4.1.2.113: ads-dsTestEntries
+- 1.3.6.1.4.1.18060.0.4.1.2.120: ads-changeLogId
+- 1.3.6.1.4.1.18060.0.4.1.2.121: ads-changeLogExposed
+- 1.3.6.1.4.1.18060.0.4.1.2.130: ads-interceptorId
+- 1.3.6.1.4.1.18060.0.4.1.2.131: ads-interceptorOrder
+- 1.3.6.1.4.1.18060.0.4.1.2.141: ads-journalRotation
+- 1.3.6.1.4.1.18060.0.4.1.2.142: ads-journalWorkingDir
+- 1.3.6.1.4.1.18060.0.4.1.2.143: ads-journalFileName
+- 1.3.6.1.4.1.18060.0.4.1.2.144: ads-journalId
+- 1.3.6.1.4.1.18060.0.4.1.2.150: ads-partitionId
+- 1.3.6.1.4.1.18060.0.4.1.2.151: ads-partitionSuffix
+- 1.3.6.1.4.1.18060.0.4.1.2.153: ads-partitionCacheSize
+- 1.3.6.1.4.1.18060.0.4.1.2.154: ads-contextEntry
+- 1.3.6.1.4.1.18060.0.4.1.2.160: ads-indexAttributeId
+- 1.3.6.1.4.1.18060.0.4.1.2.161: ads-indexFileName
+- 1.3.6.1.4.1.18060.0.4.1.2.162: ads-indexWorkingDir
+- 1.3.6.1.4.1.18060.0.4.1.2.163: ads-indexNumDupLimit
+- 1.3.6.1.4.1.18060.0.4.1.2.164: ads-indexCacheSize
+- 1.3.6.1.4.1.18060.0.4.1.2.165: ads-indexHasReverse
+- 1.3.6.1.4.1.18060.0.4.1.2.200: ads-transportId
+- 1.3.6.1.4.1.18060.0.4.1.2.250: ads-serverId
+- 1.3.6.1.4.1.18060.0.4.1.2.252: ads-Id
+- 1.3.6.1.4.1.18060.0.4.1.2.253: ads-extendedOpId
+
+#### LDAP Server
+
+- 1.3.6.1.4.1.18060.0.4.1.2.300: ads-confidentialityRequired
+- 1.3.6.1.4.1.18060.0.4.1.2.301: ads-allowAnonymousAccess
+- 1.3.6.1.4.1.18060.0.4.1.2.302: ads-maxSizeLimit
+- 1.3.6.1.4.1.18060.0.4.1.2.303: ads-maxTimeLimit
+- 1.3.6.1.4.1.18060.0.4.1.2.304: ads-saslHost
+- 1.3.6.1.4.1.18060.0.4.1.2.305: ads-saslPrincipal
+- 1.3.6.1.4.1.18060.0.4.1.2.306: ads-saslRealms
+- 1.3.6.1.4.1.18060.0.4.1.2.308: ads-keystoreFile
+- 1.3.6.1.4.1.18060.0.4.1.2.309: ads-certificatePassword
+- 1.3.6.1.4.1.18060.0.4.1.2.310: ads-replConsumerImpl
+
+#### Kerberos Server
+
+- 1.3.6.1.4.1.18060.0.4.1.2.400: ads-krbAllowableClockSkew
+- 1.3.6.1.4.1.18060.0.4.1.2.401: ads-krbEncryptionTypes
+- 1.3.6.1.4.1.18060.0.4.1.2.402: ads-krbEmptyAddressesAllowed
+- 1.3.6.1.4.1.18060.0.4.1.2.403: ads-krbForwardableAllowed
+- 1.3.6.1.4.1.18060.0.4.1.2.404: ads-krbPaEncTimestampRequired
+- 1.3.6.1.4.1.18060.0.4.1.2.405: ads-krbPostdatedAllowed
+- 1.3.6.1.4.1.18060.0.4.1.2.406: ads-krbProxiableAllowed
+- 1.3.6.1.4.1.18060.0.4.1.2.407: ads-krbRenewableAllowed
+- 1.3.6.1.4.1.18060.0.4.1.2.408: ads-krbKdcPrincipal
+- 1.3.6.1.4.1.18060.0.4.1.2.409: ads-krbMaximumRenewableLifetime
+- 1.3.6.1.4.1.18060.0.4.1.2.410: ads-krbMaximumTicketLifetime
+- 1.3.6.1.4.1.18060.0.4.1.2.411: ads-krbPrimaryRealm
+- 1.3.6.1.4.1.18060.0.4.1.2.412: ads-krbBodyChecksumVerified
+
+#### ChangePassword Server
+
+- 1.3.6.1.4.1.18060.0.4.1.2.800: ads-chgPwdPolicyCategoryCount
+- 1.3.6.1.4.1.18060.0.4.1.2.801: ads-chgPwdPolicyPasswordLength
+- 1.3.6.1.4.1.18060.0.4.1.2.802: ads-chgPwdPolicyTokenSize
+- 1.3.6.1.4.1.18060.0.4.1.2.803: ads-chgPwdServicePrincipal
+- 1.3.6.1.4.1.18060.0.4.1.2.804: ads-interceptorClassName
+- 1.3.6.1.4.1.18060.0.4.1.2.805: ads-enabled
+- 1.3.6.1.4.1.18060.0.4.1.2.806: ads-partitionSyncOnWrite
+- 1.3.6.1.4.1.18060.0.4.1.2.807: ads-jdbmPartitionOptimizerEnabled
+- 1.3.6.1.4.1.18060.0.4.1.2.808: ads-saslMechName
+- 1.3.6.1.4.1.18060.0.4.1.2.809: ads-ntlmMechProvider
+- 1.3.6.1.4.1.18060.0.4.1.2.810: ads-saslMechClassName
+- 1.3.6.1.4.1.18060.0.4.1.2.811: ads-extendedOpHandlerClass
+- 1.3.6.1.4.1.18060.0.4.1.2.812: ads-systemPort
+- 1.3.6.1.4.1.18060.0.4.1.2.813: ads-httpWarFile
+- 1.3.6.1.4.1.18060.0.4.1.2.814: ads-httpAppCtxPath
+- 1.3.6.1.4.1.18060.0.4.1.2.816: ads-httpConfFile
+- 1.3.6.1.4.1.18060.0.4.1.2.817: ads-replSearchFilter
+- 1.3.6.1.4.1.18060.0.4.1.2.818: ads-replLastSentCsn
+- 1.3.6.1.4.1.18060.0.4.1.2.819: ads-replAliasDerefMode
+- 1.3.6.1.4.1.18060.0.4.1.2.820: ads-searchBaseDN
+- 1.3.6.1.4.1.18060.0.4.1.2.821: ads-replSearchScope
+- 1.3.6.1.4.1.18060.0.4.1.2.822: ads-replRefreshNPersist
+- 1.3.6.1.4.1.18060.0.4.1.2.823: ads-replProvHostName
+- 1.3.6.1.4.1.18060.0.4.1.2.824: ads-replProvPort
+- 1.3.6.1.4.1.18060.0.4.1.2.825: ads-replUserDn
+- 1.3.6.1.4.1.18060.0.4.1.2.826: ads-replUserPassword
+- 1.3.6.1.4.1.18060.0.4.1.2.827: ads-replRefreshInterval
+- 1.3.6.1.4.1.18060.0.4.1.2.828: ads-replAttributes
+- 1.3.6.1.4.1.18060.0.4.1.2.829: ads-replSearchSizeLimit
+- 1.3.6.1.4.1.18060.0.4.1.2.830: ads-replSearchTimeOut
+- 1.3.6.1.4.1.18060.0.4.1.2.831: ads-replCookie
+- 1.3.6.1.4.1.18060.0.4.1.2.832: ads-replReqHandler
+- 1.3.6.1.4.1.18060.0.4.1.2.833: ads-replUseTls
+- 1.3.6.1.4.1.18060.0.4.1.2.834: ads-replStrictCertValidation
+- 1.3.6.1.4.1.18060.0.4.1.2.837: ads-replConsumerId
+- 1.3.6.1.4.1.18060.0.4.1.2.838: ads-replEnabled
+
+#### Password Policy
+
+- 1.3.6.1.4.1.18060.0.4.1.2.900: ads-pwdAttribute
+- 1.3.6.1.4.1.18060.0.4.1.2.901: ads-pwdMinAge
+- 1.3.6.1.4.1.18060.0.4.1.2.902: ads-pwdMaxAge
+- 1.3.6.1.4.1.18060.0.4.1.2.903: ads-pwdInHistory
+- 1.3.6.1.4.1.18060.0.4.1.2.904: ads-pwdCheckQuality
+- 1.3.6.1.4.1.18060.0.4.1.2.905: ads-pwdMinLength
+- 1.3.6.1.4.1.18060.0.4.1.2.906: ads-pwdMaxLength
+- 1.3.6.1.4.1.18060.0.4.1.2.907: ads-pwdExpireWarning
+- 1.3.6.1.4.1.18060.0.4.1.2.908: ads-pwdGraceAuthNLimit
+- 1.3.6.1.4.1.18060.0.4.1.2.909: ads-pwdGraceExpire
+- 1.3.6.1.4.1.18060.0.4.1.2.910: ads-pwdLockout
+- 1.3.6.1.4.1.18060.0.4.1.2.911: ads-pwdLockoutDuration
+- 1.3.6.1.4.1.18060.0.4.1.2.912: ads-pwdMaxFailure
+- 1.3.6.1.4.1.18060.0.4.1.2.913: ads-pwdFailureCountInterval
+- 1.3.6.1.4.1.18060.0.4.1.2.914: ads-pwdMustChange
+- 1.3.6.1.4.1.18060.0.4.1.2.915: ads-pwdAllowUserChange
+- 1.3.6.1.4.1.18060.0.4.1.2.916: ads-pwdSafeModify
+- 1.3.6.1.4.1.18060.0.4.1.2.917: ads-pwdMinDelay
+- 1.3.6.1.4.1.18060.0.4.1.2.918: ads-pwdMaxDelay
+- 1.3.6.1.4.1.18060.0.4.1.2.919: ads-pwdMaxIdle
+- 1.3.6.1.4.1.18060.0.4.1.2.920: ads-replLogMaxIdle
+- 1.3.6.1.4.1.18060.0.4.1.2.921: ads-pwdId
+- 1.3.6.1.4.1.18060.0.4.1.2.922: ads-replLogPurgeThresholdCount
+- 1.3.6.1.4.1.18060.0.4.1.2.923: ads-replPingerSleep
+- 1.3.6.1.4.1.18060.0.4.1.2.925: ads-pwdValidator
+- 1.3.6.1.4.1.18060.0.4.1.2.930: ads-authenticatorId
+- 1.3.6.1.4.1.18060.0.4.1.2.931: ads-delegateHost
+- 1.3.6.1.4.1.18060.0.4.1.2.932: ads-delegatePort
+- 1.3.6.1.4.1.18060.0.4.1.2.933: ads-delegateSsl
+- 1.3.6.1.4.1.18060.0.4.1.2.934: ads-authenticatorClass
+- 1.3.6.1.4.1.18060.0.4.1.2.935: ads-baseDn
+- 1.3.6.1.4.1.18060.0.4.1.2.936: ads-delegateTls
+- 1.3.6.1.4.1.18060.0.4.1.2.937: ads-delegateSslTrustManager
+- 1.3.6.1.4.1.18060.0.4.1.2.938: ads-delegateTlsTrustManager
+
+### `ou=objectClasses`
+
+
+#### Base Bean
+
+- 1.3.6.1.4.1.18060.0.4.1.3.0: ads-base
+- 1.3.6.1.4.1.18060.0.4.1.3.1: prefNode
+- 1.3.6.1.4.1.18060.0.4.1.3.3: apacheServiceConfiguration
+- 1.3.6.1.4.1.18060.0.4.1.3.4: apacheFactoryConfiguration
+- 1.3.6.1.4.1.18060.0.4.1.3.5: apacheCatalogEntry
+- 1.3.6.1.4.1.18060.0.4.1.3.6: windowsFile
+- 1.3.6.1.4.1.18060.0.4.1.3.7: unixFile
+- 1.3.6.1.4.1.18060.0.4.1.3.8: javaClass
+- 1.3.6.1.4.1.18060.0.4.1.3.9: apacheSubschema
+- 1.3.6.1.4.1.18060.0.4.1.3.10: schemaModificationAttributes
+- 1.3.6.1.4.1.18060.0.4.1.3.11: tlsKeyInfo
+- 1.3.6.1.4.1.18060.0.4.1.3.12: changeLogEvent
+- 1.3.6.1.4.1.18060.0.4.1.3.13: tag
+- 1.3.6.1.4.1.18060.0.4.1.3.18: ads-transport
+- 1.3.6.1.4.1.18060.0.4.1.3.19: ads-tcpTransport
+- 1.3.6.1.4.1.18060.0.4.1.3.20: ads-udpTransport
+
+#### Directory Service
+
+- 1.3.6.1.4.1.18060.0.4.1.3.100: ads-directoryService
+- 1.3.6.1.4.1.18060.0.4.1.3.120: ads-changeLog
+- 1.3.6.1.4.1.18060.0.4.1.3.130: ads-interceptor
+- 1.3.6.1.4.1.18060.0.4.1.3.131: ads-authenticationInterceptor
+- 1.3.6.1.4.1.18060.0.4.1.3.140: ads-journal
+- 1.3.6.1.4.1.18060.0.4.1.3.150: ads-partition
+- 1.3.6.1.4.1.18060.0.4.1.3.151: ads-jdbmPartition
+- 1.3.6.1.4.1.18060.0.4.1.3.160: ads-index
+- 1.3.6.1.4.1.18060.0.4.1.3.161: ads-jdbmIndex
+- 1.3.6.1.4.1.18060.0.4.1.3.250: ads-server
+- 1.3.6.1.4.1.18060.0.4.1.3.260: ads-dsBasedServer
+
+#### LDAP Server
+
+- 1.3.6.1.4.1.18060.0.4.1.3.300: ads-ldapServer
+
+#### Kerberos Server
+
+- 1.3.6.1.4.1.18060.0.4.1.3.400: ads-kdcServer
+
+#### DNS Server
+
+- 1.3.6.1.4.1.18060.0.4.1.3.500: ads-dnsServer
+
+#### DHCP Server
+
+- 1.3.6.1.4.1.18060.0.4.1.3.600: ads-dhcpServer
+
+#### NTP Server
+
+- 1.3.6.1.4.1.18060.0.4.1.3.700: ads-ntpServer
+
+#### ChangePassword Server
+
+- 1.3.6.1.4.1.18060.0.4.1.3.800: ads-changePasswordServer
+- 1.3.6.1.4.1.18060.0.4.1.3.801: ads-saslMechHandler
+- 1.3.6.1.4.1.18060.0.4.1.3.802: ads-extendedOpHandler
+- 1.3.6.1.4.1.18060.0.4.1.3.803: ads-httpWebApp
+- 1.3.6.1.4.1.18060.0.4.1.3.804: ads-httpServer
+- 1.3.6.1.4.1.18060.0.4.1.3.805: ads-replEventLog
+- 1.3.6.1.4.1.18060.0.4.1.3.806: ads-replConsumer
+
+#### Password Policy
+
+- 1.3.6.1.4.1.18060.0.4.1.3.900: ads-passwordPolicy
+- 1.3.6.1.4.1.18060.0.4.1.3.901: ads-authenticator
+- 1.3.6.1.4.1.18060.0.4.1.3.902: ads-authenticatorImpl
+- 1.3.6.1.4.1.18060.0.4.1.3.904: ads-delegatingAuthenticator
+- 1.3.6.1.4.1.18060.0.4.1.3.905: ads-mavibotIndex
+- 1.3.6.1.4.1.18060.0.4.1.3.906: ads-mavibotPartition
+- 1.3.6.1.4.1.18060.0.4.1.5.1: storedProcLangId
+- 1.3.6.1.4.1.18060.0.4.1.5.2: storedProcUnitName
+- 1.3.6.1.4.1.18060.0.4.1.5.3: storedProcUnit
+- 1.3.6.1.4.1.18060.0.4.1.5.4: javaByteCode
+- 1.3.6.1.4.1.18060.0.4.1.5.5: javaStoredProcUnit
+- 1.3.6.1.4.1.18060.0.4.1.5.6: javaxScriptLangId
+- 1.3.6.1.4.1.18060.0.4.1.5.7: javaxScriptCode
+- 1.3.6.1.4.1.18060.0.4.1.5.8: javaxScriptStoredProcUnit
+
diff --git a/ldap/schema/data/src/main/scripts/oid_allocation.pl b/ldap/schema/data/src/main/scripts/oid_allocation.pl
index 5e378c7..820e0e0 100755
--- a/ldap/schema/data/src/main/scripts/oid_allocation.pl
+++ b/ldap/schema/data/src/main/scripts/oid_allocation.pl
@@ -101,6 +101,24 @@
 else {
     # Default markdown format
     require POSIX;
+    print("#\n");
+    print("#  Licensed to the Apache Software Foundation (ASF) under one\n");
+    print("#  or more contributor license agreements.  See the NOTICE file\n");
+    print("#  distributed with this work for additional information\n");
+    print("#  regarding copyright ownership.  The ASF licenses this file\n");
+    print("#  to you under the Apache License, Version 2.0 (the\n");
+    print("#  \"License\"); you may not use this file except in compliance\n");
+    print("#  with the License.  You may obtain a copy of the License at\n");
+    print("#\n");
+    print("#    http://www.apache.org/licenses/LICENSE-2.0\n");
+    print("#\n");
+    print("#  Unless required by applicable law or agreed to in writing,\n");
+    print("#  software distributed under the License is distributed on an\n");
+    print("#  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n");
+    print("#  KIND, either express or implied.  See the License for the\n");
+    print("#  specific language governing permissions and limitations\n");
+    print("#  under the License.\n");
+
     foreach my $oid (sort {versioncmp($a, $b)} keys(%oid_to_metadata)) {
         next unless ($oid =~ /^1\.3\.6\.1\.4\.1\.18060\.0\.4\.1\.(\d+)\.(\d+).*$/);
         my $section = "$1";
diff --git a/trunk/LICENSE b/trunk/LICENSE
deleted file mode 100644
index b6f663f..0000000
--- a/trunk/LICENSE
+++ /dev/null
@@ -1,228 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
-==================================================================================================
-slf4j 1.7.10 license:
---------------------------------------------------------------------------------------------------
-Copyright (c) 2004-2013 QOS.ch
-All rights reserved.
-
-Permission is hereby granted, free  of charge, to any person obtaining
-a  copy  of this  software  and  associated  documentation files  (the
-"Software"), to  deal in  the Software without  restriction, including
-without limitation  the rights to  use, copy, modify,  merge, publish,
-distribute,  sublicense, and/or sell  copies of  the Software,  and to
-permit persons to whom the Software  is furnished to do so, subject to
-the following conditions:
-
-The  above  copyright  notice  and  this permission  notice  shall  be
-included in all copies or substantial portions of the Software.
-
-THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
diff --git a/trunk/NOTICE b/trunk/NOTICE
deleted file mode 100644
index cd94e3c..0000000
--- a/trunk/NOTICE
+++ /dev/null
@@ -1,6 +0,0 @@
-Apache Directory LDAP API
-Copyright 2003-2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
diff --git a/trunk/README.txt b/trunk/README.txt
deleted file mode 100755
index 13378f8..0000000
--- a/trunk/README.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-This distribution includes cryptographic software.  The country in 
-   which you currently reside may have restrictions on the import, 
-   possession, use, and/or re-export to another country, of 
-   encryption software.  BEFORE using any encryption software, please 
-   check your country's laws, regulations and policies concerning the
-   import, possession, or use, and re-export of encryption software, to 
-   see if this is permitted.  See <http://www.wassenaar.org/> for more
-   information.
-
-   The U.S. Government Department of Commerce, Bureau of Industry and
-   Security (BIS), has classified this software as Export Commodity 
-   Control Number (ECCN) 5D002.C.1, which includes information security
-   software using or performing cryptographic functions with asymmetric
-   algorithms.  The form and manner of this Apache Software Foundation
-   distribution makes it eligible for export under the License Exception
-   ENC Technology Software Unrestricted (TSU) exception (see the BIS 
-   Export Administration Regulations, Section 740.13) for both object 
-   code and source code.
-
-   The following provides more details on the included cryptographic
-   software:
-
-   http://www.bouncycastle.org/
diff --git a/trunk/all/pom.xml b/trunk/all/pom.xml
deleted file mode 100644
index 8896e7e..0000000
--- a/trunk/all/pom.xml
+++ /dev/null
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.directory.api</groupId>
-    <artifactId>api-parent</artifactId>
-    <version>1.0.0-M32</version>
-  </parent>
-  
-  <artifactId>api-all</artifactId>
-  <name>Apache Directory API All</name>
-
-  <dependencies>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-asn1-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-asn1-ber</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-dsml-engine</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-dsml-parser</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-i18n</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-client-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-codec-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-codec-standalone</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-extras-aci</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-extras-codec</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-extras-codec-api</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-extras-sp</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-extras-trigger</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-extras-util</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-model</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-net-mina</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-schema-converter</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-schema-data</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-util</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <artifactSet>
-                <includes>
-                  <include>${project.groupId}</include>
-                </includes>
-              </artifactSet>
-              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
-              <createSourcesJar>true</createSourcesJar>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/trunk/all/src/main/appended-resources/META-INF/LICENSE b/trunk/all/src/main/appended-resources/META-INF/LICENSE
deleted file mode 100644
index 857d336..0000000
--- a/trunk/all/src/main/appended-resources/META-INF/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
---------------------------------------------------------------
-                            ANTLR 2 License
-
-ANTLR 2 License
-
-We reserve no legal rights to the ANTLR--it is fully in the public domain. An 
-individual or company may do whatever they wish with source code distributed 
-with ANTLR or the code generated by ANTLR, including the incorporation of 
-ANTLR, or its output, into commerical software.
-
-We encourage users to develop software with ANTLR. However, we do ask that 
-credit is given to us for developing ANTLR. By "credit", we mean that if you 
-use ANTLR or incorporate any source code into one of your programs (commercial 
-product, research project, or otherwise) that you acknowledge this fact 
-somewhere in the documentation, research report, etc... If you like ANTLR 
-and have developed a nice tool with the output, please mention that you 
-developed it using ANTLR. In addition, we ask that the headers remain intact 
-in our source code. As long as these guidelines are kept, we expect to 
-continue enhancing this system and expect to make other tools available as 
-they are completed. 
-
diff --git a/trunk/all/src/main/appended-resources/META-INF/NOTICE b/trunk/all/src/main/appended-resources/META-INF/NOTICE
deleted file mode 100644
index c4d94e5..0000000
--- a/trunk/all/src/main/appended-resources/META-INF/NOTICE
+++ /dev/null
@@ -1,3 +0,0 @@
-
-This software includes code generated by ANTLR 2.
-
diff --git a/trunk/asn1/api/pom.xml b/trunk/asn1/api/pom.xml
deleted file mode 100644
index 405bae4..0000000
--- a/trunk/asn1/api/pom.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.directory.api</groupId>
-    <artifactId>api-asn1-parent</artifactId>
-    <version>1.0.0-M32</version>
-  </parent>
-  
-  <artifactId>api-asn1-api</artifactId>
-  <name>Apache Directory API ASN.1 API</name>
-  <packaging>bundle</packaging>
-
-  <description>ASN.1 API</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.directory.junit</groupId>
-      <artifactId>junit-addons</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-i18n</artifactId>
-    </dependency> 
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
-            <addMavenDescriptor>false</addMavenDescriptor>
-          </archive>
-        </configuration>
-      </plugin>
-      
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <inherited>true</inherited>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>META-INF</manifestLocation>
-          <instructions>
-            <Bundle-SymbolicName>${project.groupId}.asn1.api</Bundle-SymbolicName>
-            <Export-Package>
-              org.apache.directory.api.asn1;version=${project.version};-noimport:=true,
-              org.apache.directory.api.asn1.util;version=${project.version};-noimport:=true
-            </Export-Package>
-            <Import-Package>
-              org.apache.directory.api.i18n;version=${project.version}
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Asn1Object.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Asn1Object.java
deleted file mode 100644
index 39e2205..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Asn1Object.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1;
-
-
-import java.nio.ByteBuffer;
-
-
-/**
- * An abstract class which implements basic TLV operations.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Asn1Object
-{
-    /**
-     * Compute the object length, which is the sum of all inner length.
-     * 
-     * @return The object's computed length
-     */
-    int computeLength();
-
-
-    /**
-     * Encode the object to a PDU.
-     * 
-     * @param buffer The buffer where to put the PDU
-     * @return The encoded PDU.
-     * @throws EncoderException if the buffer can't be encoded
-     */
-    ByteBuffer encode( ByteBuffer buffer ) throws EncoderException;
-}
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Decoder.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Decoder.java
deleted file mode 100755
index fafdd48..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Decoder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-
-package org.apache.directory.api.asn1;
-
-
-/**
- * <p>
- * Provides the highest level of abstraction for Decoders. This is the sister
- * interface of {@link Encoder}. All Decoders implement this common generic
- * interface.
- * </p>
- * <p>
- * Allows a user to pass a generic Object to any Decoder implementation in the
- * codec package.
- * </p>
- * <p>
- * One of the two interfaces at the center of the codec package.
- * </p>
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Decoder
-{
-
-    /**
-     * Decodes an "encoded" Object and returns a "decoded" Object. Note that the
-     * implementation of this interface will try to cast the Object parameter to
-     * the specific type expected by a particular Decoder implementation. If a
-     * {@link java.lang.ClassCastException} occurs this decode method will throw
-     * a DecoderException.
-     * 
-     * @param object an object to "decode"
-     * @return a 'decoded" object
-     * @throws DecoderException a decoder exception can be thrown for any number of reasons.
-     * Some good candidates are that the parameter passed to this method is null, a param 
-     * cannot be cast to the appropriate type for a specific encoder.
-     */
-    Object decode( Object object ) throws DecoderException;
-}
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/DecoderException.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/DecoderException.java
deleted file mode 100755
index da4c932..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/DecoderException.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-
-package org.apache.directory.api.asn1;
-
-
-/**
- * Thrown when a Decoder has encountered a failure condition during a decode.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class DecoderException extends Exception
-{
-    /** Declares the Serial Version Uid */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * Creates a DecoderException
-     * 
-     * @param message A message with meaning to a human
-     */
-    public DecoderException( String message )
-    {
-        super( message );
-    }
-
-
-    /**
-     * Creates a DecoderException
-     * 
-     * @param message A message with meaning to a human
-     * @param cause The Exception which caused the error
-     */
-    public DecoderException( String message, Throwable cause )
-    {
-        super( message, cause );
-    }
-}
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Encoder.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Encoder.java
deleted file mode 100644
index 9ebe90f..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/Encoder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-
-package org.apache.directory.api.asn1;
-
-
-/**
- * <p>
- * Provides the highest level of abstraction for Encoders. This is the sister
- * interface of {@link Decoder}. Every
- * implementation of Encoder provides this common generic interface whic allows
- * a user to pass a generic Object to any Encoder implementation in the codec
- * package.
- * </p>
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Encoder
-{
-    /**
-     * Encodes an "Object" and returns the encoded content as an Object. The
-     * Objects here may just be <code>byte[]</code> or <code>String</code>s
-     * depending on the implementation used.
-     * 
-     * @param object An object to encode
-     * @return An "encoded" Object
-     * @throws EncoderException an encoder exception is thrown if the encoder experiences a
-     * failure condition during the encoding process.
-     */
-    Object encode( Object object ) throws EncoderException;
-}
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/EncoderException.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/EncoderException.java
deleted file mode 100755
index d8bcc39..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/EncoderException.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-
-package org.apache.directory.api.asn1;
-
-
-/**
- * Thrown when there is a failure condition during the encoding process. This
- * exception is thrown when an Encoder encounters a encoding specific exception
- * such as invalid data, inability to calculate a checksum, characters outside
- * of the expected range.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class EncoderException extends Exception
-{
-    /** Declares the Serial Version Uid */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * Creates a new instance of this exception with an useful message.
-     * 
-     * @param message a useful message relating to the encoder specific error.
-     */
-    public EncoderException( String message )
-    {
-        super( message );
-    }
-
-
-    /**
-     * Creates a new instance of this exception with an useful message.
-     * 
-     * @param message a useful message relating to the encoder specific error.
-     * @param cause The parent exception
-     */
-    public EncoderException( String message, Exception cause )
-    {
-        super( message, cause );
-    }
-}
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/package.html b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/package.html
deleted file mode 100644
index f153128..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/package.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<head>
-<!--
- *   Copyright 2004 The Apache Software Foundation
- *
- *   Licensed under the Apache License, Version 2.0 (the "License");
- *   you may not use this file except in compliance with the License.
- *   You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing, software
- *   distributed under the License is distributed on an "AS IS" BASIS,
- *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *   See the License for the specific language governing permissions and
- *   limitations under the License.
--->
-</head>
-<body bgcolor="white">
-
-Provides the fundamental stateful codec interfaces.
-
-
-<h2>Package Specification</h2>
-
-<ul>
-  <li><a href="codec/stateful">##### REFER TO ANY SPECIFICATIONS HERE #####</a></li>
-</ul>
-
-<h2>Related Documentation</h2>
-
-For overviews, tutorials, examples, guides, and tool documentation, please see:
-<ul>
-  <li><a href="http://directory.apache.org/subprojects/asn1/index.html">ASN.1 Project</a></li>
-  <li><a href="http://directory.apache.org/subprojects/asn1/codec-stateful/index.html">Stateful Codecs</a></li>
-  <li><a href="http://directory.apache.org/subprojects/asn1/ber-codec/index.html">ASN.1 BER Codecs</a></li>
-</ul>
-
-<!-- Put @see and @since tags down here. -->
-
-</body>
-</html>
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Asn1StringUtils.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Asn1StringUtils.java
deleted file mode 100644
index 6757a79..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Asn1StringUtils.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.util;
-
-
-import java.io.UnsupportedEncodingException;
-
-
-/**
- * Little helper class for the asn1 package.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class Asn1StringUtils
-{
-    /** Hex chars */
-    private static final byte[] HEX_CHAR = new byte[]
-        { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-
-    /**
-     * The empty byte[]
-     */
-    public static final byte[] EMPTY_BYTES = new byte[]
-        {};
-
-
-    private Asn1StringUtils()
-    {
-    }
-
-    /**
-     * Helper function that dump a byte in hex form
-     *
-     * @param octet The byte to dump
-     * @return A string representation of the byte
-     */
-    public static String dumpByte( byte octet )
-    {
-        try
-        {
-            return new String( new byte[]
-                { '0', 'x', HEX_CHAR[( octet & 0x00F0 ) >> 4], HEX_CHAR[octet & 0x000F] }, "UTF-8" );
-        }
-        catch ( UnsupportedEncodingException e )
-        {
-            // Can't happen
-            return "";
-        }
-    }
-
-
-    /**
-     * Helper function that dump an array of bytes in hex form
-     *
-     * @param buffer The bytes array to dump
-     * @return A string representation of the array of bytes
-     */
-    public static String dumpBytes( byte[] buffer )
-    {
-        if ( buffer == null )
-        {
-            return "";
-        }
-
-        StringBuffer sb = new StringBuffer();
-
-        for ( byte b : buffer )
-        {
-            sb.append( "0x" ).append( ( char ) ( HEX_CHAR[( b & 0x00F0 ) >> 4] ) ).append(
-                ( char ) ( HEX_CHAR[b & 0x000F] ) ).append( " " );
-        }
-
-        return sb.toString();
-    }
-
-
-    /**
-     * Return UTF-8 encoded byte[] representation of a String
-     *
-     * @param string The string to be transformed to a byte array
-     * @return The transformed byte array
-     */
-    public static byte[] getBytesUtf8( String string )
-    {
-        if ( string == null )
-        {
-            return new byte[0];
-        }
-
-        try
-        {
-            return string.getBytes( "UTF-8" );
-        }
-        catch ( UnsupportedEncodingException uee )
-        {
-            return EMPTY_BYTES;
-        }
-    }
-
-
-    /**
-     * Transform a string to an array of ASCII bytes, where the byte array will contain
-     * only values in [0, 127].
-     *
-     * @param string The byte array to transform
-     * @return The resulting string
-     */
-    public static byte[] asciiStringToByte( String string )
-    {
-        if ( ( string == null ) || ( string.length() == 0 ) )
-        {
-            return EMPTY_BYTES;
-        }
-
-        byte[] result = new byte[string.length()];
-
-        for ( int i = 0; i < result.length; i++ )
-        {
-            result[i] = ( byte ) string.charAt( i );
-        }
-
-        return result;
-    }
-}
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/BitString.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/BitString.java
deleted file mode 100644
index 0143b90..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/BitString.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.util;
-
-
-import org.apache.directory.api.i18n.I18n;
-
-
-/**
- * Implement the Bit String primitive type. A BitString is internally stored as
- * an array of byte.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class BitString
-{
-    /** A null MutableString */
-    public static final BitString EMPTY_STRING = new BitString( 1 );
-
-    /** The number of unused bits in the last byte */
-    private int nbUnusedBits;
-
-    /** The string is stored in a byte array */
-    private byte[] bytes;
-
-    /** Actual length of the byte array */
-    private int nbBytes;
-
-    /** Actual length of the bit string */
-    private int nbBits;
-
-
-    /**
-     * Creates a BitString with a specific length (length is the number of
-     * bits).
-     *
-     * @param length The BitString length (it's a number of bits)
-     */
-    public BitString( int length )
-    {
-        if ( length <= 0 )
-        {
-            // This is not allowed
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00029_NULL_OR_NEG_LENGTH_NOT_ALLOWED ) );
-        }
-
-        nbBits = length;
-
-        // As we store values in bytes, we must divide the length by 8
-        nbBytes = ( length / 8 );
-
-        if ( ( length % 8 ) != 0 )
-        {
-            nbBytes += 1;
-        }
-
-        nbUnusedBits = ( 8 - ( length % 8 ) ) & 0x07;
-
-        bytes = new byte[nbBytes];
-    }
-
-
-    /**
-     * Creates a BitString from a byte[]. As the first byte is the number of unused bits
-     * in the last byte, we have to ignore it.
-     *
-     * @param bytes The value to store. The first byte contains the number of
-     * unused bits
-     */
-    public BitString( byte[] bytes )
-    {
-        if ( ( bytes == null ) || ( bytes.length == 0 ) )
-        {
-            nbBits = -1;
-            return;
-        }
-
-        setData( bytes );
-    }
-
-
-    /**
-     * Set a new BitString in the BitString. It will replace the old BitString,
-     * and reset the current length with the new one.
-     *
-     * @param data The string to store
-     */
-    public void setData( byte[] data )
-    {
-        if ( ( data == null ) || ( data.length == 0 ) )
-        {
-            nbBits = -1;
-            return;
-        }
-
-        // The first byte contains the number of unused bits
-        nbUnusedBits = data[0] & 0x07;
-        nbBytes = data.length - 1;
-        nbBits = ( nbBytes * 8 ) - nbUnusedBits;
-        this.bytes = new byte[nbBytes];
-
-        // We have to transfer the data
-        for ( int i = 0; i < nbBytes; i++ )
-        {
-            this.bytes[i] = data[i + 1];
-        }
-    }
-
-
-    /**
-     * Get the representation of a BitString. A first byte containing the number
-     * of unused bits is added
-     *
-     * @return A byte array which represent the BitString
-     */
-    public byte[] getData()
-    {
-        byte[] copy = new byte[bytes.length + 1];
-
-        System.arraycopy( bytes, 0, copy, 1, bytes.length );
-        copy[0] = ( byte ) nbUnusedBits;
-
-        return copy;
-    }
-
-
-    /**
-     * Get the number of unused bits
-     *
-     * @return A byte which represent the number of unused bits
-     */
-    public byte getUnusedBits()
-    {
-        return ( byte ) nbUnusedBits;
-    }
-
-
-    /**
-     * Set a bit at a specified position.
-     * The bits are stored from left to right.
-     * For instance, if we have 10 bits, then they are coded as b0 b1 b2 b3 b4 b5 b6 b7 - b8 b9 x x x x x x
-     *
-     * @param pos The bit to set
-     */
-    public void setBit( int pos )
-    {
-        if ( ( pos < 0 ) || ( pos > nbBits ) )
-        {
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00030_BIT_NUMBER_OUT_OF_BOUND ) );
-        }
-
-        int posBytes = pos >>> 3;
-        int bitNumber = 7 - pos % 8;
-        byte mask = ( byte ) ( 1 << bitNumber );
-
-        bytes[posBytes] |= mask;
-    }
-
-
-    /**
-     * Clear a bit at a specified position.
-     * The bits are stored from left to right.
-     * For instance, if we have 10 bits, then they are coded
-     * as b0 b1 b2 b3 b4 b5 b6 b7 - b8 b9 x x x x x x
-     *
-     * @param pos The bit to clear
-     */
-    public void clearBit( int pos )
-    {
-        if ( ( pos < 0 ) || ( pos > nbBits ) )
-        {
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00030_BIT_NUMBER_OUT_OF_BOUND ) );
-        }
-
-        int posBytes = pos >>> 3;
-        int bitNumber = 7 - pos % 8;
-        byte mask = ( byte ) ( 1 << bitNumber );
-
-        bytes[posBytes] &= ~mask;
-    }
-
-
-    /**
-     * Get the bit stored into the BitString at a specific position.
-     * The bits are stored from left to right, the LSB on the left and the
-     * MSB on the right.<br/>
-     * For instance, if we have 10 bits, then they are coded as
-     * b0 b1 b2 b3 - b4 b5 b6 b7 - b8 b9 x x - x x x x
-     * <pre>
-     * With '1001 000x', where x is an unused bit,
-     *       ^ ^    ^
-     *       | |    |
-     *       | |    |
-     *       | |    +----- getBit(6) = 0
-     *       | +---------- getBit(2) = 0
-     *       +------------ getBit(0) = 1
-     * </pre>
-     * @param pos The position of the requested bit.
-     *
-     * @return <code>true</code> if the bit is set, <code>false</code> otherwise
-     */
-    public boolean getBit( int pos )
-    {
-        if ( pos > nbBits )
-        {
-            throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_00031_CANNOT_FIND_BIT, pos, nbBits ) );
-        }
-
-        int posBytes = pos >>> 3;
-        int bitNumber = 7 - pos % 8;
-        byte mask = ( byte ) ( 1 << bitNumber );
-
-        int res = bytes[posBytes] & mask;
-
-        return res != 0;
-    }
-
-
-    /**
-     * @return The number of bits stored in this BitString
-     */
-    public int size()
-    {
-        return nbBits;
-    }
-
-
-    /**
-     * Return a native String representation of the BitString.
-     *
-     * @return A String representing the BitString
-     */
-    @Override
-    public String toString()
-    {
-        StringBuilder sb = new StringBuilder();
-
-        for ( int i = 0; i < nbBits; i++ )
-        {
-            if ( getBit( i ) )
-            {
-                sb.append( '1' );
-            }
-            else
-            {
-                sb.append( '0' );
-            }
-        }
-
-        return sb.toString();
-    }
-}
diff --git a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Oid.java b/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Oid.java
deleted file mode 100644
index f8b7fbd..0000000
--- a/trunk/asn1/api/src/main/java/org/apache/directory/api/asn1/util/Oid.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1.util;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.Queue;
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.i18n.I18n;
-
-
-/**
- * An immutable representation of an object identifier that provides conversion 
- * between their <code>String</code>, and encoded <code>byte[]</code> 
- * representations.
- * 
- * <p> The encoding of OID values is performed according to 
- * <a href='http://www.itu.int/rec/T-REC-X.690/en'>itu X.690</a> section 8.19.
- * Specifically:</p>
- * 
- * <p><b>8.19.2</b> The contents octets shall be an (ordered) list of encodings
- * of subidentifiers (see 8.19.3 and 8.19.4) concatenated together. Each 
- * subidentifier is represented as a series of (one or more) octets. Bit 8 of 
- * each octet indicates whether it is the last in the series: bit 8 of the last 
- * octet is zero; bit 8 of each preceding octet is one. Bits 7 to 1 of the 
- * octets in the series collectively encode the subidentifier. Conceptually, 
- * these groups of bits are concatenated to form an unsigned binary number whose 
- * most significant bit is bit 7 of the first octet and whose least significant 
- * bit is bit 1 of the last octet. The subidentifier shall be encoded in the 
- * fewest possible octets, that is, the leading octet of the subidentifier shall 
- * not have the value 0x80. </p>
- * 
- * <p><b>8.19.3</b> The number of subidentifiers (N) shall be one less than the 
- * number of object identifier components in the object identifier value being 
- * encoded.</p>
- * 
- * <p><b>8.19.4</b> The numerical value of the first subidentifier is derived 
- * from the values of the first two object identifier components in the object 
- * identifier value being encoded, using the formula:
- * <br /><code>(X*40) + Y</code><br /> 
- * where X is the value of the first object identifier component and Y is the 
- * value of the second object identifier component. <i>NOTE – This packing of 
- * the first two object identifier components recognizes that only three values 
- * are allocated from the root node, and at most 39 subsequent values from nodes 
- * reached by X = 0 and X = 1.</i></p>
- * 
- * <p>For example, the OID "2.123456.7" would be turned into a list of 2 values:
- * <code>[((2*80)+123456), 7]</code>.  The first of which, 
- * <code>123536</code>, would be encoded as the bytes 
- * <code>[0x87, 0xC5, 0x10]</code>, the second would be <code>[0x07]</code>,
- * giving the final encoding <code>[0x87, 0xC5, 0x10, 0x07]</code>.</p>
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class Oid
-{
-    /** A byte[] representation of an OID */
-    private byte[] oidBytes;
-    
-    /** The OID as a String */
-    private String oidString;
-
-
-    /**
-     * Creates a new instance of Oid.
-     *
-     * @param oidString The OID as a String
-     * @param oidBytes The OID as a byte[]
-     */
-    private Oid( String oidString, byte[] oidBytes )
-    {
-        this.oidString = oidString;
-        this.oidBytes = new byte[oidBytes.length];
-        System.arraycopy( oidBytes, 0, this.oidBytes, 0, oidBytes.length );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public boolean equals( Object other )
-    {
-        return ( other instanceof Oid )
-            && oidString.equals( ( ( Oid ) other ).oidString );
-    }
-
-
-    /**
-     * Decodes an OID from a <code>byte[]</code>.
-     * 
-     * @param oidBytes The encoded<code>byte[]</code>
-     * @return A new Oid
-     * @throws DecoderException When the OID is not valid
-     */
-    public static Oid fromBytes( byte[] oidBytes ) throws DecoderException
-    {
-        if ( oidBytes == null || oidBytes.length < 1 )
-        {
-            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, Arrays.toString( oidBytes ) ) );
-        }
-
-        StringBuilder builder = null;
-        long value = 0;
-
-        for ( int i = 0; i < oidBytes.length; i++ )
-        {
-            value |= oidBytes[i] & 0x7F;
-
-            if ( oidBytes[i] < 0 )
-            {
-                // leading 1, so value continues
-                value = value << 7;
-            }
-            else
-            {
-                // value completed
-                if ( builder == null )
-                {
-                    builder = new StringBuilder();
-
-                    // first value special processing
-                    if ( value >= 80 )
-                    {
-                        // starts with 2
-                        builder.append( 2 );
-                        value = value - 80;
-                    }
-                    else
-                    {
-                        // starts with 0 or 1
-                        long one = value / 40;
-                        long two = value % 40;
-
-                        if ( ( one < 0 ) || ( one > 2 ) || ( two < 0 ) || ( ( one < 2 ) && ( two > 39 ) ) )
-                        {
-                            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID,
-                                Arrays.toString( oidBytes ) ) );
-                        }
-
-                        if ( one < 2 )
-                        {
-                            builder.append( one );
-                            value = two;
-                        }
-                    }
-                }
-
-                // normal processing
-                builder.append( '.' ).append( value );
-                value = 0;
-            }
-        }
-
-        if ( builder == null )
-        {
-            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, Arrays.toString( oidBytes ) ) );
-        }
-
-        return new Oid( builder.toString(), oidBytes );
-    }
-
-
-    /**
-     * Returns an OID object representing <code>oidString</code>.  
-     *  
-     * @param oidString The string representation of the OID
-     * @return A new Oid
-     * @throws DecoderException  When the OID is not valid
-     */
-    public static Oid fromString( String oidString ) throws DecoderException
-    {
-        if ( ( oidString == null ) || oidString.isEmpty() )
-        {
-            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, "" ) );
-        }
-
-        Queue<Long> segments = new LinkedList<Long>();
-
-        for ( String segment : oidString.split( "\\.", -1 ) )
-        {
-            try
-            {
-                segments.add( Long.parseLong( segment ) );
-            }
-            catch ( NumberFormatException nfe )
-            {
-                throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oidString ), nfe );
-            }
-        }
-
-        // first segment special case
-        ByteBuffer buffer = new ByteBuffer();
-        Long segmentOne = segments.poll();
-
-        if ( ( segmentOne == null ) || ( segmentOne < 0 ) || ( segmentOne > 2 ) )
-        {
-            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oidString ) );
-        }
-
-        // second segment special case
-        Long segment = segments.poll();
-
-        if ( ( segment == null ) || ( segment < 0 ) || ( ( segmentOne < 2 ) && ( segment > 39 ) ) )
-        {
-            throw new DecoderException( I18n.err( I18n.ERR_00033_INVALID_OID, oidString ) );
-        }
-
-        buffer.append( ( segmentOne * 40 ) + segment );
-
-        // the rest
-        while ( ( segment = segments.poll() ) != null )
-        {
-            buffer.append( segment );
-        }
-
-        return new Oid( oidString, buffer.toByteArray() );
-    }
-
-
-    /**
-     * Returns the length of the encoded <code>byte[]</code> representation.
-     * 
-     * @return The length of the byte[]
-     */
-    public int getEncodedLength()
-    {
-        return oidBytes.length;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public int hashCode()
-    {
-        return oidString.hashCode();
-    }
-
-
-    /**
-     * Returns true if <code>oidString</code> is a valid string representation
-     * of an OID.  This method simply calls {@link #fromString(String)} and 
-     * returns true if no exception was thrown.  As such, it should not be used 
-     * in an attempt to check if a string is a valid OID before calling 
-     * {@link #fromString(String)}.
-     * 
-     * @param oidString The string to test
-     * @return True, if <code>oidString</code> is valid
-     */
-    public static boolean isOid( String oidString )
-    {
-        try
-        {
-            Oid.fromString( oidString );
-
-            return true;
-        }
-        catch ( DecoderException e )
-        {
-            return false;
-        }
-    }
-
-
-    /**
-     * Returns the <code>byte[]</code> representation of the OID. The 
-     * <code>byte[]</code> that is returned is <i>copied</i> from the internal
-     * value so as to preserve the immutability of an OID object.  If the 
-     * output of a call to this method is intended to be written to a stream,
-     * the {@link #writeBytesTo(OutputStream)} should be used instead as it will
-     * avoid creating this copy. 
-     * 
-     * @return The encoded <code>byte[]</code> representation of the OID.
-     */
-    public byte[] toBytes()
-    {
-        return Arrays.copyOf( oidBytes, oidBytes.length );
-    }
-
-
-    /**
-     * Returns the string representation of the OID.
-     * 
-     * @return The string representation of the OID
-     */
-    @Override
-    public String toString()
-    {
-        return oidString;
-    }
-
-
-    /**
-     * Writes the bytes respresenting this OID to the provided buffer.  This 
-     * should be used in preference to the {@link #toBytes()} method in order
-     * to prevent the creation of copies of the actual <code>byte[]</code>.
-     * 
-     * @param buffer The buffer to write the bytes into
-     * @throws IOException If we can't inject the OID into a ByteBuffer 
-     */
-    public void writeBytesTo( java.nio.ByteBuffer buffer )
-    {
-        buffer.put( oidBytes );
-    }
-
-
-    /**
-     * Writes the bytes respresenting this OID to the provided stream.  This 
-     * should be used in preference to the {@link #toBytes()} method in order
-     * to prevent the creation of copies of the actual <code>byte[]</code>.
-     * 
-     * @param outputStream The stream to write the bytes to
-     * @throws IOException When we can't write the OID into a Stream
-     */
-    public void writeBytesTo( OutputStream outputStream ) throws IOException
-    {
-        outputStream.write( oidBytes );
-    }
-
-    /**
-     * 
-     * Internal helper class for converting a long value to a properly encoded byte[]
-     */
-    private static final class ByteBuffer
-    {
-        /** The Buffer the OID will be written in */
-        private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
-
-
-        /**
-         * Writes a Long into a ByteBuffer
-         * 
-         * @param value The long value to write
-         * @return A ByteBufffer containing the converted Long
-         */
-        public ByteBuffer append( long value )
-        {
-            write( value, false );
-            
-            return this;
-        }
-
-
-        /**
-         * Write a long into the buffe, and a flag indicating that there are more 
-         * to write
-         *
-         * @param value The value to write
-         * @param hasMore The flag indicati,ng there is more to write into the buffer
-         */
-        private void write( long value, boolean hasMore )
-        {
-            long remaining = value >> 7;
-        
-            if ( remaining > 0 )
-            {
-                write( remaining, true );
-            }
-            
-            buffer.write( hasMore
-                ? ( byte ) ( ( 0x7F & value ) | 0x80 )
-                : ( byte ) ( 0x7F & value ) );
-        }
-
-
-        /**
-         * Convert the Buffer to a byte[]
-         * 
-         * @return The byte[] containing the Long
-         */
-        public byte[] toByteArray()
-        {
-            return buffer.toByteArray();
-        }
-    }
-}
diff --git a/trunk/asn1/api/src/site/site.xml b/trunk/asn1/api/src/site/site.xml
deleted file mode 100644
index 8f27351..0000000
--- a/trunk/asn1/api/src/site/site.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!--
-  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-<project name="${project.name}">
-  <body>
-    <menu ref="parent" />
-    <menu ref="reports" />
-  </body>
-</project>
diff --git a/trunk/asn1/api/src/test/java/org/apache/directory/api/asn1/util/BitStringTest.java b/trunk/asn1/api/src/test/java/org/apache/directory/api/asn1/util/BitStringTest.java
deleted file mode 100644
index c49fc4e..0000000
--- a/trunk/asn1/api/src/test/java/org/apache/directory/api/asn1/util/BitStringTest.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1.util;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
-
-
-/**
- * Test the Bit String primitive
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-@RunWith(ConcurrentJunitRunner.class)
-@Concurrency()
-public class BitStringTest
-{
-    /**
-     * Test a null BitString
-     */
-    @Test
-    public void testBitStringNull()
-    {
-
-        BitString bitString = new BitString( 1 );
-
-        bitString.setData( null );
-
-        try
-        {
-            bitString.getBit( 0 );
-            fail( "Should not reach this point ..." );
-        }
-        catch ( IndexOutOfBoundsException ioobe )
-        {
-            assertTrue( true );
-        }
-    }
-
-
-    /**
-     * Test an empty BitString
-     */
-    @Test
-    public void testBitStringEmpty()
-    {
-
-        BitString bitString = new BitString( 1 );
-
-        bitString.setData( new byte[]
-            {} );
-
-        try
-        {
-            bitString.getBit( 0 );
-            fail( "Should not reach this point ..." );
-        }
-        catch ( IndexOutOfBoundsException ioobe )
-        {
-            assertTrue( true );
-        }
-    }
-
-
-    /**
-     * Test a single bit BitString
-     */
-    @Test
-    public void testSingleBitBitString() throws DecoderException
-    {
-
-        BitString bitString = new BitString( new byte[]
-            { 0x07, ( byte ) 0x80 } );
-
-        assertEquals( true, bitString.getBit( 0 ) );
-    }
-
-
-    /**
-     * Test a 32 bits BitString
-     */
-    @Test
-    public void test32BitsBitString() throws DecoderException
-    {
-
-        BitString bitString = new BitString( 32 );
-
-        bitString.setData( new byte[]
-            { 0x00, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );
-
-        for ( int i = 0; i < 32; i++ )
-        {
-            assertEquals( true, bitString.getBit( i ) );
-        }
-    }
-
-
-    /**
-     * Test a 33 bits BitString
-     */
-    @Test
-    public void test33BitsBitString() throws DecoderException
-    {
-
-        BitString bitString = new BitString( 33 );
-
-        bitString.setData( new byte[]
-            { 0x07, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0x80 } );
-
-        for ( int i = 0; i < 33; i++ )
-        {
-            assertEquals( true, bitString.getBit( i ) );
-        }
-
-        assertEquals( true, bitString.getBit( 32 ) );
-    }
-
-
-    /**
-     * Test all bits from 0 to 128 BitString
-     */
-    @Test
-    public void test0to128BitString() throws DecoderException
-    {
-
-        // bit number 14
-        BitString bitString14 = new BitString( 14 );
-
-        bitString14.setData( new byte[]
-            { 0x02, ( byte ) 0xFF, ( byte ) 0xFC } );
-
-        for ( int i = 0; i < 14; i++ )
-        {
-            assertEquals( true, bitString14.getBit( i ) );
-        }
-
-        // bit number 31
-        BitString bitString31 = new BitString( 31 );
-
-        bitString31.setData( new byte[]
-            { 0x01, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFE } );
-
-        for ( int i = 0; i < 31; i++ )
-        {
-            assertEquals( true, bitString31.getBit( i ) );
-        }
-
-        // bit number 128
-        BitString bitString128 = new BitString( 128 );
-
-        bitString128.setData( new byte[]
-            { 0x00, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,
-                ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,
-                ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );
-
-        for ( int i = 0; i < 128; i++ )
-        {
-            assertEquals( true, bitString128.getBit( i ) );
-        }
-    }
-
-
-    @Test
-    public void testBitStringSet()
-    {
-        BitString bitString = new BitString( 32 );
-
-        byte[] bytes = new byte[]
-            { 0x00, ( byte ) 0xAA, 0x11, ( byte ) 0x88, ( byte ) 0xFE };
-
-        int[] bits = new int[]
-            {
-                1, 0, 1, 0, 1, 0, 1, 0,
-                0, 0, 0, 1, 0, 0, 0, 1,
-                1, 0, 0, 0, 1, 0, 0, 0,
-                1, 1, 1, 1, 1, 1, 1, 0
-        };
-
-        for ( int i = 0; i < bits.length; i++ )
-        {
-            if ( bits[i] == 1 )
-            {
-                bitString.setBit( i );
-            }
-        }
-
-        assertEquals( Asn1StringUtils.dumpBytes( bytes ), Asn1StringUtils.dumpBytes( bitString.getData() ) );
-    }
-
-
-    @Test
-    public void testBitStringSetBit()
-    {
-        BitString bitString = new BitString( 32 );
-
-        int[] bits = new int[]
-            {
-                1, 0, 1, 0, 1, 0, 1, 0,
-                0, 0, 0, 1, 0, 0, 0, 1,
-                1, 0, 0, 0, 1, 0, 0, 0, // After modification, will become 8A
-                1,
-                1,
-                1,
-                1,
-                1,
-                1,
-                1,
-                0
-        };
-
-        for ( int i = 0; i < bits.length; i++ )
-        {
-            if ( bits[i] == 1 )
-            {
-                bitString.setBit( i );
-            }
-        }
-
-        bitString.setBit( 9 );
-        byte[] bytesModified = new byte[]
-            { 0x00, ( byte ) 0xAA, 0x51, ( byte ) 0x88, ( byte ) 0xFE };
-
-        assertEquals( Asn1StringUtils.dumpBytes( bytesModified ), Asn1StringUtils.dumpBytes( bitString.getData() ) );
-    }
-
-
-    @Test
-    public void testBitStringClearBit()
-    {
-        BitString bitString = new BitString( 32 );
-
-        int[] bits = new int[]
-            {
-                1, 0, 1, 0, 1, 0, 1, 0,
-                0, 0, 0, 1, 0, 0, 0, 1,
-                1, 0, 0, 0, 1, 0, 0, 0,
-                1, 1, 1, 1, 1, 1, 1, 0
-        };
-
-        for ( int i = 0; i < bits.length; i++ )
-        {
-            if ( bits[i] == 1 )
-            {
-                bitString.setBit( i );
-            }
-        }
-
-        bitString.clearBit( 11 );
-        byte[] bytesModified = new byte[]
-            { 0x00, ( byte ) 0xAA, 0x01, ( byte ) 0x88, ( byte ) 0xFE };
-
-        assertEquals( Asn1StringUtils.dumpBytes( bytesModified ), Asn1StringUtils.dumpBytes( bitString.getData() ) );
-    }
-}
diff --git a/trunk/asn1/api/src/test/java/org/apache/directory/api/asn1/util/OidTest.java b/trunk/asn1/api/src/test/java/org/apache/directory/api/asn1/util/OidTest.java
deleted file mode 100644
index c2fca70..0000000
--- a/trunk/asn1/api/src/test/java/org/apache/directory/api/asn1/util/OidTest.java
+++ /dev/null
@@ -1,465 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1.util;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Arrays;
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-public class OidTest
-{
-    private static final Logger LOGGER = LoggerFactory.getLogger( OidTest.class );
-
-
-    @Test
-    public void speed()
-    {
-        byte[] bytes = new byte[]
-            { 0x2A, ( byte ) 0x86, 0x48, ( byte ) 0x86, ( byte ) 0xF7, 0x12, 0x01, 0x02, 0x02 };
-        String string = new String( "1.2.840.113554.1.2.2" );
-
-        long start = System.nanoTime();
-        for ( int i = 0; i < 1000; i++ )
-        {
-            Arrays.equals( bytes, bytes );
-        }
-        LOGGER.debug( "byte[]: {}", ( System.nanoTime() - start ) );
-
-        start = System.nanoTime();
-        for ( int i = 0; i < 1000; i++ )
-        {
-            string.equals( string );
-        }
-        LOGGER.debug( "String: {}", ( System.nanoTime() - start ) );
-    }
-
-
-    @Test
-    public void fromBytes() throws DecoderException
-    {
-        // first byte
-        for ( int i = 0; i < 2; i++ )
-        { // [0..2]
-            for ( int j = 0; j < 40; j++ )
-            { // [0..39]
-                assertEquals( i + "." + j,
-                    Oid.fromBytes( new byte[]
-                        { ( byte ) ( i * 40 + j ) } )
-                        .toString() );
-            }
-        }
-
-        assertEquals( "1.2.840.113554.1.2.2",
-            Oid.fromBytes( new byte[]
-                {
-                    0x2A, ( byte ) 0x86, 0x48, ( byte ) 0x86, ( byte ) 0xF7, 0x12, 0x01, 0x02, 0x02
-            } ).toString() );
-
-        assertEquals( "2.123456",
-            Oid.fromBytes( new byte[]
-                { ( byte ) 0x87, ( byte ) 0xC5, 0x10 } ).toString() );
-
-    }
-
-
-    @Test
-    public void test2dot123456() throws DecoderException
-    {
-        String expectedString = "2.123456";
-        byte[] expectedBytes = new byte[]
-            { ( byte ) 0x87, ( byte ) 0xC5, 0x10 };
-
-        LOGGER.debug( "b_to_b: " + Arrays.toString( Oid.fromBytes( expectedBytes ).toBytes() ) );
-        assertTrue( Arrays.equals( expectedBytes, Oid.fromBytes( expectedBytes ).toBytes() ) );
-
-        LOGGER.debug( "s_to_b: " + Arrays.toString( Oid.fromString( expectedString ).toBytes() ) );
-        assertTrue( Arrays.equals( expectedBytes, Oid.fromString( expectedString ).toBytes() ) );
-
-        LOGGER.debug( "b_to_s: " + Oid.fromBytes( expectedBytes ).toString() );
-        assertEquals( expectedString, Oid.fromBytes( expectedBytes ).toString() );
-
-        LOGGER.debug( "s_to_s: " + Oid.fromString( expectedString ).toString() );
-        assertEquals( expectedString, Oid.fromString( expectedString ).toString() );
-    }
-
-
-    @Test
-    public void fromString() throws DecoderException
-    {
-        // first byte
-        for ( int i = 0; i < 2; i++ )
-        { // [0..2]
-            for ( int j = 0; j < 40; j++ )
-            { // [0..39]
-                assertTrue( Arrays.equals( new byte[]
-                    { ( byte ) ( i * 40 + j ) },
-                    Oid.fromString( i + "." + j ).toBytes() ) );
-            }
-        }
-
-        assertTrue( Arrays.equals(
-            new byte[]
-                { 0x2A, ( byte ) 0x86, 0x48, ( byte ) 0x86, ( byte ) 0xF7, 0x12, 0x01, 0x02, 0x02 },
-            Oid.fromString( "1.2.840.113554.1.2.2" ).toBytes() ) );
-    }
-
-
-    /**
-     * Test a null NewOid
-     */
-    @Test
-    public void testNewOidNull()
-    {
-        try
-        {
-            Oid.fromBytes( ( byte[] ) null );
-            fail( "Should not reach this point ..." );
-        }
-        catch ( DecoderException de )
-        {
-            assertTrue( true );
-        }
-    }
-
-
-    /**
-     * Test an empty NewOid
-     */
-    @Test
-    public void testNewOidEmpty()
-    {
-        try
-        {
-            Oid.fromBytes( new byte[]
-                {} );
-            fail( "Should not reach this point ..." );
-        }
-        catch ( DecoderException de )
-        {
-            assertTrue( true );
-        }
-    }
-
-
-    /**
-     * Test itu-t NewOid tree
-     */
-    @Test
-    public void testNewOidItuT()
-    {
-        try
-        {
-            Oid oid = null;
-
-            // itu-t(0), recommendation(0), series a-z (0..26)
-            for ( int i = 1; i < 27; i++ )
-            {
-                oid = Oid.fromBytes( new byte[]
-                    { 0x00, ( byte ) i } );
-                assertEquals( "0.0." + i, oid.toString() );
-            }
-
-            // itu-t(0), question(1)
-            oid = Oid.fromBytes( new byte[]
-                { 0x01 } );
-            assertEquals( "0.1", oid.toString() );
-
-            // itu-t(0), administration(2), country(202 .. 748)
-            for ( int i = 202; i < 748; i++ )
-            {
-                oid = Oid.fromBytes( new byte[]
-                    { 0x02, ( byte ) ( ( i / 128 ) | 0x0080 ), ( byte ) ( i % 128 ) } );
-                assertEquals( "0.2." + i, oid.toString() );
-            }
-
-            // itu-t(0), network-operator(3), operator(2023 .. 41363)
-            for ( int i = 2023; i < 41363; i++ )
-            {
-                if ( i < ( 128 * 128 ) )
-                {
-                    oid = Oid.fromBytes( new byte[]
-                        { 0x03, ( byte ) ( ( i / 128 ) | 0x0080 ), ( byte ) ( i % 128 ) } );
-                    assertEquals( "0.3." + i, oid.toString() );
-                }
-                else
-                {
-                    oid = Oid.fromBytes( new byte[]
-                        { 0x03, ( byte ) ( ( i / ( 128 * 128 ) ) | 0x0080 ),
-                            ( byte ) ( ( ( i / 128 ) % 128 ) | 0x0080 ), ( byte ) ( i % 128 ) } );
-                    assertEquals( "0.3." + i, oid.toString() );
-                }
-            }
-        }
-        catch ( DecoderException de )
-        {
-            fail();
-        }
-    }
-
-
-    /**
-     * Test iso NewOid tree
-     */
-    @Test
-    public void testNewOidIso()
-    {
-
-        Oid oid = null;
-
-        try
-        {
-            // iso(1), standard(0)
-            oid = Oid.fromBytes( new byte[]
-                { 40 + 0 } );
-            assertEquals( "1.0", oid.toString() );
-
-            // iso(1), registration-authority(1)
-            oid = Oid.fromBytes( new byte[]
-                { 40 + 1 } );
-            assertEquals( "1.1", oid.toString() );
-
-            // iso(1), member-body(2)
-            oid = Oid.fromBytes( new byte[]
-                { 40 + 2 } );
-            assertEquals( "1.2", oid.toString() );
-
-            // iso(1), identified-organization(3) | org(3) | organization(3)
-            oid = Oid.fromBytes( new byte[]
-                { 40 + 3 } );
-            assertEquals( "1.3", oid.toString() );
-        }
-        catch ( DecoderException de )
-        {
-            fail();
-        }
-    }
-
-
-    /**
-     * Test joint-iso-itu-t NewOid tree
-     */
-    @Test
-    public void testNewOidJointIsoItuT()
-    {
-        Oid oid = null;
-
-        try
-        {
-            // joint-iso-itu-t(2), presentation(0)
-            oid = Oid.fromBytes( new byte[]
-                { 80 + 0 } );
-            assertEquals( "2.0", oid.toString() );
-
-            // joint-iso-itu-t(2), asn1(1)
-            oid = Oid.fromBytes( new byte[]
-                { 80 + 1 } );
-            assertEquals( "2.1", oid.toString() );
-
-            // joint-iso-itu-t(2), association-control(2)
-            oid = Oid.fromBytes( new byte[]
-                { 80 + 2 } );
-            assertEquals( "2.2", oid.toString() );
-
-            // joint-iso-itu-t(2), reliable-transfer(3)
-            oid = Oid.fromBytes( new byte[]
-                { 80 + 3 } );
-            assertEquals( "2.3", oid.toString() );
-
-            // ...
-            // joint-iso-itu-t(2), upu(40)
-            oid = Oid.fromBytes( new byte[]
-                { 80 + 40 } );
-            assertEquals( "2.40", oid.toString() );
-
-            // ...
-            // joint-iso-itu-t(2), xxx(100)
-            oid = Oid.fromBytes( new byte[]
-                { ( byte ) ( 0x81 ), 0x34 } );
-            assertEquals( "2.100", oid.toString() );
-        }
-        catch ( DecoderException de )
-        {
-            fail();
-        }
-    }
-
-
-    /**
-     * Test valid String NewOids
-     */
-    @Test
-    public void testNewOidStringGood()
-    {
-        Oid oid = null;
-
-        try
-        {
-            oid = Oid.fromString( "0.0" );
-            assertEquals( "0.0", oid.toString() );
-
-            oid = Oid.fromString( "0.0.0.0.0" );
-            assertEquals( "0.0.0.0.0", oid.toString() );
-
-            oid = Oid.fromString( "0.1.2.3.4" );
-            assertEquals( "0.1.2.3.4", oid.toString() );
-
-            oid = Oid.fromString( "2.123456" );
-            assertEquals( "2.123456", oid.toString() );
-
-            oid = Oid.fromString( "1.2.840.113554.1.2.2" );
-            assertEquals( "1.2.840.113554.1.2.2", oid.toString() );
-        }
-        catch ( DecoderException de )
-        {
-            fail();
-        }
-    }
-
-
-    /**
-     * Test invalid String NewOids
-     */
-    @Test
-    public void testNewOidStringBad()
-    {
-        assertFalse( Oid.isOid( "0" ) );
-        assertFalse( Oid.isOid( "0." ) );
-        assertFalse( Oid.isOid( "." ) );
-        assertFalse( Oid.isOid( "0.1.2." ) );
-        assertFalse( Oid.isOid( "3.1" ) );
-        assertFalse( Oid.isOid( "0..1" ) );
-        assertFalse( Oid.isOid( "0..12" ) );
-        assertFalse( Oid.isOid( "0.a.2" ) );
-        assertFalse( Oid.isOid( "0.123456" ) );
-        assertFalse( Oid.isOid( "1.123456" ) );
-    }
-
-
-    /**
-     * Test Spnego NewOid
-     */
-    @Test
-    public void testNewOidSpnego()
-    {
-        Oid oid = null;
-
-        try
-        {
-            oid = Oid.fromBytes( new byte[]
-                { 0x2b, 0x06, 0x01, 0x05, 0x05, 0x02 } );
-            assertEquals( "1.3.6.1.5.5.2", oid.toString() );
-        }
-        catch ( DecoderException de )
-        {
-            fail();
-        }
-    }
-
-
-    /**
-     * Test Kerberos V5 NewOid
-     */
-    @Test
-    public void testNewOidKerberosV5()
-    {
-        Oid oid = null;
-
-        try
-        {
-            oid = Oid.fromBytes( new byte[]
-                { 0x2a, ( byte ) 0x86, 0x48, ( byte ) 0x86, ( byte ) 0xf7, 0x12, 0x01, 0x02, 0x02 } );
-            assertEquals( "1.2.840.113554.1.2.2", oid.toString() );
-        }
-        catch ( DecoderException de )
-        {
-            fail();
-        }
-    }
-
-
-    /**
-     * Test NewOids bytes
-     */
-    @Test
-    public void testNewOidBytes()
-    {
-        Oid oid = null;
-        Oid oid2 = null;
-
-        try
-        {
-            oid = Oid.fromString( "0.0" );
-            oid2 = Oid.fromBytes( oid.toBytes() );
-            assertEquals( oid.toString(), oid2.toString() );
-
-            oid = Oid.fromString( "0.0.0.0.0" );
-            oid2 = Oid.fromBytes( oid.toBytes() );
-            assertEquals( oid.toString(), oid2.toString() );
-
-            oid = Oid.fromString( "0.1.2.3.4" );
-            assertTrue( Arrays.equals( new byte[]
-                { 0x01, 0x02, 0x03, 0x04 }, oid.toBytes() ) );
-            oid2 = Oid.fromBytes( oid.toBytes() );
-            assertEquals( oid.toString(), oid2.toString() );
-
-            oid = Oid.fromString( "2.123456" );
-            oid2 = Oid.fromBytes( oid.toBytes() );
-            assertEquals( oid.toString(), oid2.toString() );
-
-            oid = Oid.fromString( "1.2.840.113554.1.2.2" );
-            oid2 = Oid.fromBytes( oid.toBytes() );
-            assertEquals( oid.toString(), oid2.toString() );
-        }
-        catch ( DecoderException de )
-        {
-            fail();
-        }
-    }
-
-
-    /**
-     * Test NewOid Equals
-     */
-    @Test
-    public void testNewOidEqualsPerf() throws DecoderException
-    {
-        String s1 = "1.2.840.113554.1.2.2.1.2.840.113554.1.2.2.1.2.840.113554.1.2.2";
-        String s2 = "1.2.840.113554.1.2.2.1.2.840.113554.1.2.2.1.2.840.113554.1.2.2";
-        String s3 = "1.3.6.1.5.5.2";
-
-        Oid oid1 = Oid.fromString( s1 );
-        Oid oid2 = Oid.fromString( s2 );
-        Oid oid3 = Oid.fromString( s3 );
-
-        assertTrue( oid1.equals( oid2 ) );
-        assertFalse( oid1.equals( oid3 ) );
-        assertFalse( oid2.equals( oid3 ) );
-    }
-}
diff --git a/trunk/asn1/api/src/test/resources/log4j.properties b/trunk/asn1/api/src/test/resources/log4j.properties
deleted file mode 100755
index f337ec7..0000000
--- a/trunk/asn1/api/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-#############################################################################
-#    Licensed to the Apache Software Foundation (ASF) under one or more
-#    contributor license agreements.  See the NOTICE file distributed with
-#    this work for additional information regarding copyright ownership.
-#    The ASF licenses this file to You under the Apache License, Version 2.0
-#    (the "License"); you may not use this file except in compliance with
-#    the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#############################################################################
-log4j.rootCategory=OFF, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
-
-log4j.logger.org.apache.directory.api.asn1.util=DEBUG
\ No newline at end of file
diff --git a/trunk/asn1/ber/pom.xml b/trunk/asn1/ber/pom.xml
deleted file mode 100644
index 3c3c8f3..0000000
--- a/trunk/asn1/ber/pom.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.directory.api</groupId>
-    <artifactId>api-asn1-parent</artifactId>
-    <version>1.0.0-M32</version>
-  </parent>
-  
-  <artifactId>api-asn1-ber</artifactId>
-  <name>Apache Directory API ASN.1 BER</name>
-  <packaging>bundle</packaging>
-
-  <description>A BER Codec Implementation for ASN.1</description>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.directory.junit</groupId>
-      <artifactId>junit-addons</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-i18n</artifactId>
-    </dependency> 
-    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-asn1-api</artifactId>
-    </dependency> 
-    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-util</artifactId>
-    </dependency> 
-    
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>findbugs</groupId>
-      <artifactId>annotations</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
-            <addMavenDescriptor>false</addMavenDescriptor>
-          </archive>
-        </configuration>
-      </plugin>
-      
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <inherited>true</inherited>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>META-INF</manifestLocation>
-          <instructions>
-            <Bundle-SymbolicName>${project.groupId}.asn1.ber</Bundle-SymbolicName>
-            <Export-Package>
-              org.apache.directory.api.asn1.actions;version=${project.version};-noimport:=true,
-              org.apache.directory.api.asn1.ber;version=${project.version};-noimport:=true,
-              org.apache.directory.api.asn1.ber.grammar;version=${project.version};-noimport:=true,
-              org.apache.directory.api.asn1.ber.tlv;version=${project.version};-noimport:=true
-            </Export-Package>
-            <Import-Package>
-              org.apache.directory.api.asn1;version=${project.version},
-              org.apache.directory.api.asn1.util;version=${project.version},
-              org.apache.directory.api.i18n;version=${project.version},
-              org.apache.directory.api.util;version=${project.version},
-              org.slf4j;version=${slf4j.api.bundleversion}
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadBitString.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadBitString.java
deleted file mode 100644
index 4a0fd8d..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadBitString.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.actions;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.Asn1Container;
-import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
-import org.apache.directory.api.asn1.ber.tlv.TLV;
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.util.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * The action used read a BITSTRING from a TLV
- * 
- * @param C The container type
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractReadBitString<C extends Asn1Container> extends GrammarAction<C>
-{
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadBitString.class );
-
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-
-    /**
-     * Instantiates a new AbstractReadByteArray action.
-     * 
-     * @param name the action's name
-     */
-    public AbstractReadBitString( String name )
-    {
-        super( name );
-    }
-
-
-    /**
-     * Gives a byte array to be set to the appropriate field of the ASN.1 object
-     * present in the container
-     *
-     * @param data the data of the read TLV present in byte array format
-     * @param container the container holding the ASN.1 object
-     */
-    protected abstract void setBitString( byte[] data, C container );
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void action( C container ) throws DecoderException
-    {
-        TLV tlv = container.getCurrentTLV();
-
-        // The Length should not be null, and should be 5
-        if ( tlv.getLength() != 5 )
-        {
-            LOG.error( I18n.err( I18n.ERR_04066 ) );
-
-            // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
-        }
-
-        byte[] data = tlv.getValue().getData();
-        setBitString( data, container );
-
-        if ( IS_DEBUG )
-        {
-            LOG.debug( "BITSTRING value : {}", Strings.dumpBytes( data ) );
-        }
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadInteger.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadInteger.java
deleted file mode 100644
index 38cf791..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadInteger.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.actions;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.Asn1Container;
-import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
-import org.apache.directory.api.asn1.ber.tlv.BerValue;
-import org.apache.directory.api.asn1.ber.tlv.IntegerDecoder;
-import org.apache.directory.api.asn1.ber.tlv.IntegerDecoderException;
-import org.apache.directory.api.asn1.ber.tlv.TLV;
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.util.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * The action used to read an integer value
- *
- * @param C The container type
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractReadInteger<E extends Asn1Container> extends GrammarAction<E>
-{
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadInteger.class );
-
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-    /** the acceptable minimum value for the expected value to be parsed */
-    private int minValue = 0;
-
-    /** the acceptable maximum value for the expected value to be parsed */
-    private int maxValue = Integer.MAX_VALUE;
-
-
-    /**
-     * Instantiates a new AbstractReadInteger action.
-     * 
-     * @param name the action's name
-     */
-    public AbstractReadInteger( String name )
-    {
-        super( name );
-    }
-
-
-    /**
-     *
-     * Creates a new instance of AbstractReadInteger.
-     *
-     * @param name the action's name
-     * @param minValue the acceptable minimum value for the expected value to be read
-     * @param maxValue the acceptable maximum value for the value to be read
-     */
-    public AbstractReadInteger( String name, int minValue, int maxValue )
-    {
-        super( name );
-
-        this.minValue = minValue;
-        this.maxValue = maxValue;
-    }
-
-
-    /**
-     *
-     * set the integer value to the appropriate field of ASN.1 object present in the container
-     *
-     * @param value the integer value
-     * @param container the ASN.1 object's container
-     */
-    protected abstract void setIntegerValue( int value, E container );
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void action( E container ) throws DecoderException
-    {
-        TLV tlv = container.getCurrentTLV();
-
-        // The Length should not be null
-        if ( tlv.getLength() == 0 )
-        {
-            LOG.error( I18n.err( I18n.ERR_04066 ) );
-
-            // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
-        }
-
-        BerValue value = tlv.getValue();
-
-        try
-        {
-            int number = IntegerDecoder.parse( value, minValue, maxValue );
-
-            if ( IS_DEBUG )
-            {
-                LOG.debug( "read integer value : {}", number );
-            }
-
-            setIntegerValue( number, container );
-        }
-        catch ( IntegerDecoderException ide )
-        {
-            LOG.error( I18n.err( I18n.ERR_04070, Strings.dumpBytes( value.getData() ), ide
-                .getLocalizedMessage() ) );
-
-            // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( ide.getMessage(), ide );
-        }
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadOctetString.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadOctetString.java
deleted file mode 100644
index 2a18807..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/AbstractReadOctetString.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.actions;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.Asn1Container;
-import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
-import org.apache.directory.api.asn1.ber.tlv.BerValue;
-import org.apache.directory.api.asn1.ber.tlv.TLV;
-import org.apache.directory.api.i18n.I18n;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * The action used to read an OCTET STRING value
- *
- * @param C The container type
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractReadOctetString<C extends Asn1Container> extends GrammarAction<C>
-{
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( AbstractReadOctetString.class );
-
-    /** the acceptable maximum value for the expected value to be parsed */
-    private boolean canBeNull = Boolean.FALSE;
-
-
-    /**
-     * Instantiates a new AbstractReadInteger action.
-     * 
-     * @param name the action's name
-     */
-    public AbstractReadOctetString( String name )
-    {
-        super( name );
-    }
-
-
-    /**
-     * Instantiates a new AbstractReadInteger action.
-     *
-     * @param name the action's name
-     * @param canBeNull Tells if the byte array can be null or not
-     */
-    public AbstractReadOctetString( String name, boolean canBeNull )
-    {
-        super( name );
-
-        this.canBeNull = canBeNull;
-    }
-
-
-    /**
-     * Sets the OCTET STRING value to the appropriate field of ASN.1 object present in the container
-     *
-     * @param value the OCTET STRING value
-     * @param container the ASN.1 object's container
-     */
-    protected abstract void setOctetString( byte[] value, C container );
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public final void action( C container ) throws DecoderException
-    {
-        TLV tlv = container.getCurrentTLV();
-
-        // The Length should not be null
-        if ( ( tlv.getLength() == 0 ) && ( !canBeNull ) )
-        {
-            LOG.error( I18n.err( I18n.ERR_04066 ) );
-
-            // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
-        }
-
-        BerValue value = tlv.getValue();
-
-        // The data should not be null
-        if ( ( value.getData() == null ) && ( !canBeNull ) )
-        {
-            LOG.error( I18n.err( I18n.ERR_04066 ) );
-
-            // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
-        }
-
-        setOctetString( value.getData(), container );
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/CheckNotNullLength.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/CheckNotNullLength.java
deleted file mode 100644
index 3287378..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/actions/CheckNotNullLength.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.actions;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.Asn1Container;
-import org.apache.directory.api.asn1.ber.grammar.GrammarAction;
-import org.apache.directory.api.asn1.ber.tlv.TLV;
-import org.apache.directory.api.i18n.I18n;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * An action that checks the length is not null
- *
- * @param C The container type
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class CheckNotNullLength<C extends Asn1Container> extends GrammarAction<C>
-{
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( CheckNotNullLength.class );
-
-
-    /**
-     * Instantiates the action.
-     */
-    public CheckNotNullLength()
-    {
-        super( "Check that the length is not null" );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void action( C container ) throws DecoderException
-    {
-        TLV tlv = container.getCurrentTLV();
-
-        // The Length should not be null
-        if ( tlv.getLength() == 0 )
-        {
-            LOG.error( I18n.err( I18n.ERR_04066 ) );
-
-            // This will generate a PROTOCOL_ERROR
-            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
-        }
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/AbstractContainer.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/AbstractContainer.java
deleted file mode 100644
index a8f961c..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/AbstractContainer.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.api.asn1.ber.grammar.Grammar;
-import org.apache.directory.api.asn1.ber.grammar.States;
-import org.apache.directory.api.asn1.ber.tlv.TLV;
-import org.apache.directory.api.asn1.ber.tlv.TLVStateEnum;
-
-
-/**
- * This class is the abstract container used to store the current state of a PDU
- * being decoded. It also stores the grammars used to decode the PDU, and all
- * the informations needed to decode a PDU.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractContainer implements Asn1Container
-{
-    /** All the possible grammars */
-    private Grammar<?> grammar;
-
-    /** The current state of the decoding */
-    private TLVStateEnum state;
-
-    /** The current transition */
-    private Enum<?> transition;
-
-    /** The current TLV */
-    private TLV tlv;
-
-    /** The parent TLV */
-    private TLV parentTLV;
-
-    /** The grammar end transition flag */
-    private boolean grammarEndAllowed;
-
-    /** A counter for the decoded bytes */
-    private int decodedBytes;
-
-    /** The maximum allowed size for a PDU. Default to MAX int value */
-    private int maxPDUSize = Integer.MAX_VALUE;
-
-    /** The incremental id used to tag TLVs */
-    private int id = 0;
-
-    /** The Stream being decoded */
-    private ByteBuffer stream;
-
-    /** A flag telling if the Value should be accumulated before being decoded
-     * for constructed types */
-    private boolean gathering = false;
-
-
-    /**
-     * Creates a new instance of AbstractContainer with a starting state.
-     *
-     */
-    protected AbstractContainer()
-    {
-        state = TLVStateEnum.TAG_STATE_START;
-    }
-
-
-    /**
-     * Creates a new instance of AbstractContainer with a starting state.
-     *
-     * @param stream the buffer containing the data to decode
-     */
-    protected AbstractContainer( ByteBuffer stream )
-    {
-        state = TLVStateEnum.TAG_STATE_START;
-        this.stream = stream;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Grammar<?> getGrammar()
-    {
-        return grammar;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setGrammar( Grammar<?> grammar )
-    {
-        this.grammar = grammar;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public TLVStateEnum getState()
-    {
-        return state;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setState( TLVStateEnum state )
-    {
-        this.state = state;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isGrammarEndAllowed()
-    {
-        return grammarEndAllowed;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setGrammarEndAllowed( boolean grammarEndAllowed )
-    {
-        this.grammarEndAllowed = grammarEndAllowed;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Enum<?> getTransition()
-    {
-        return transition;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setTransition( Enum<?> transition )
-    {
-        this.transition = transition;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setCurrentTLV( TLV currentTLV )
-    {
-        this.tlv = currentTLV;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public TLV getCurrentTLV()
-    {
-        return this.tlv;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public TLV getParentTLV()
-    {
-        return parentTLV;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setParentTLV( TLV parentTLV )
-    {
-        this.parentTLV = parentTLV;
-    }
-
-
-    /**
-     * Clean the container for the next usage.
-     */
-    public void clean()
-    {
-        tlv = null;
-        parentTLV = null;
-        transition = ( ( States ) transition ).getStartState();
-        state = TLVStateEnum.TAG_STATE_START;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getNewTlvId()
-    {
-        return id++;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getTlvId()
-    {
-        return tlv.getId();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getDecodedBytes()
-    {
-        return decodedBytes;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setDecodedBytes( int decodedBytes )
-    {
-        this.decodedBytes = decodedBytes;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void incrementDecodedBytes( int nb )
-    {
-        decodedBytes += nb;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getMaxPDUSize()
-    {
-        return maxPDUSize;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setMaxPDUSize( int maxPDUSize )
-    {
-        if ( maxPDUSize > 0 )
-        {
-            this.maxPDUSize = maxPDUSize;
-        }
-        else
-        {
-            this.maxPDUSize = Integer.MAX_VALUE;
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public ByteBuffer getStream()
-    {
-        return stream;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setStream( ByteBuffer stream )
-    {
-        this.stream = stream;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void rewind()
-    {
-
-        int start = stream.position() - 1 - tlv.getLengthNbBytes();
-        stream.position( start );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void updateParent()
-    {
-        TLV parentTlv = tlv.getParent();
-
-        while ( ( parentTlv != null ) && ( parentTlv.getExpectedLength() == 0 ) )
-        {
-            parentTlv = parentTlv.getParent();
-        }
-
-        this.parentTLV = parentTlv;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isGathering()
-    {
-        return gathering;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setGathering( boolean gathering )
-    {
-        this.gathering = gathering;
-    }
-
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Container.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Container.java
deleted file mode 100644
index 207df47..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Container.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.api.asn1.ber.grammar.Grammar;
-import org.apache.directory.api.asn1.ber.tlv.TLV;
-import org.apache.directory.api.asn1.ber.tlv.TLVStateEnum;
-
-
-/**
- * Every ASN1 container must implement this interface.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Asn1Container
-{
-    /**
-     * Gets the current stream containing the bytes to decode
-     *
-     * @return The current stream
-     */
-    ByteBuffer getStream();
-
-
-    /**
-     * Stores the Stream being decoded
-     *
-     * @param stream The stream being decoded
-     */
-    void setStream( ByteBuffer stream );
-
-
-    /**
-     * Gets the current grammar state
-     *
-     * @return Returns the current grammar state
-     */
-    TLVStateEnum getState();
-
-
-    /**
-     * Sets the new current state
-     *
-     * @param state The new state
-     */
-    void setState( TLVStateEnum state );
-
-
-    /**
-     * Gets the currentTLV
-     *
-     * @return Returns the current TLV being decoded
-     */
-    TLV getCurrentTLV();
-
-
-    /**
-     * Sets the current TLV
-     *
-     * @param tlv The current TLV
-     */
-    void setCurrentTLV( TLV tlv );
-
-
-    /**
-     * Gets the grammar
-     *
-     * @return Returns the grammar used to decode a LdapMessage.
-     */
-    @SuppressWarnings("rawtypes")
-    Grammar getGrammar();
-
-
-    /**
-     * Sets the grammar
-     *
-     * @param grammar The grammar to set
-     */
-    void setGrammar( Grammar<?> grammar );
-
-
-    /**
-     * Gets the transition
-     *
-     * @return Returns the transition from the previous state to the new state
-     */
-    Enum<?> getTransition();
-
-
-    /**
-     * Updates the transition from a state to another
-     *
-     * @param transition The transition to set
-     */
-    void setTransition( Enum<?> transition );
-
-
-    /**
-     * @return The parent TLV.
-     */
-    TLV getParentTLV();
-
-
-    /**
-     * Sets the parent TLV
-     *
-     * @param parentTLV The new parent TLV
-     */
-    void setParentTLV( TLV parentTLV );
-
-
-    /**
-     * Checks that we can have a end state after this transition
-     *
-     * @return true if this can be the last transition
-     */
-    boolean isGrammarEndAllowed();
-
-
-    /**
-     * Sets the flag to allow a end transition
-     *
-     * @param grammarEndAllowed true or false, depending on the next transition
-     * being an end or not.
-     */
-    void setGrammarEndAllowed( boolean grammarEndAllowed );
-
-
-    /**
-     * Gets a new TLV id
-     * @return a unique value representing the current TLV id
-     */
-    int getNewTlvId();
-
-
-    /**
-     * Gets the current TLV id
-     * @return a unique value representing the current TLV id
-     */
-    int getTlvId();
-
-
-    /**
-     * @return The number of decoded bytes for this message. This is used
-     * to control the PDU size and avoid PDU exceeding the maximum allowed
-     * size to break the server.
-     */
-    int getDecodedBytes();
-
-
-    /**
-     * @param decodedBytes The number of decoded bytes for this message.
-     */
-    void setDecodedBytes( int decodeBytes );
-
-
-    /**
-     * Increment the decodedBytes by the latest received buffer's size.
-     * @param nb The buffer size.
-     */
-    void incrementDecodedBytes( int nb );
-
-
-    /**
-     * @return The maximum PDU size.
-     */
-    int getMaxPDUSize();
-
-
-    /**
-     * Set the maximum PDU size.
-     * @param maxPDUSize The maximum PDU size (if negative or null, will be
-     * replaced by the max integer value)
-     */
-    void setMaxPDUSize( int maxPDUSize );
-
-
-    /**
-     * Move backward in the stream to the first byte for a given TLV. This is useful when we have
-     * read some Tag and Length in order to define the next transition, and if this transition
-     * do a grammar switch.
-     * @param tlv The TLV to roll-back
-     */
-    void rewind();
-
-
-    /**
-     * Update the parent's length
-     */
-    void updateParent();
-
-
-    /**
-     * @return true if the container should gather the value into itself, false
-     * if the decoding of the Value part should be done immediately for
-     * constructed types.
-     */
-    boolean isGathering();
-
-
-    /**
-     * Set the isGathering flag
-     * @param isGathering true to ask the Asn1Decoder to gather the data
-     * into the container. If not set, the default value is 'false'
-     */
-    void setGathering( boolean isGathering );
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Decoder.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Decoder.java
deleted file mode 100644
index 3972a55..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/Asn1Decoder.java
+++ /dev/null
@@ -1,856 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1.ber;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.tlv.BerValue;
-import org.apache.directory.api.asn1.ber.tlv.TLV;
-import org.apache.directory.api.asn1.ber.tlv.TLVBerDecoderMBean;
-import org.apache.directory.api.asn1.ber.tlv.TLVStateEnum;
-import org.apache.directory.api.asn1.util.Asn1StringUtils;
-import org.apache.directory.api.i18n.I18n;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * A BER TLV Tag component decoder. This decoder instantiate a Tag. The tag
- * won't be implementations should not copy the handle to the Tag object
- * delivered but should copy the data if they need it over the long term.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
-*/
-public class Asn1Decoder implements TLVBerDecoderMBean
-{
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( Asn1Decoder.class );
-
-    /** A speedup for logger */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-    /** This flag is used to indicate that there are more bytes in the stream */
-    private static final boolean MORE = true;
-
-    /** This flag is used to indicate that there are no more bytes in the stream */
-    private static final boolean END = false;
-
-    /** Flag that is used to allow/disallow the indefinite form of Length */
-    private boolean indefiniteLengthAllowed;
-
-    /** The maximum number of bytes that could be used to encode the Length */
-    private int maxLengthLength;
-
-    /** The maximum number of bytes that could be used to encode the Tag */
-    private int maxTagLength;
-
-
-    /**
-     * A public constructor of an Asn1 Decoder.
-     */
-    public Asn1Decoder()
-    {
-        indefiniteLengthAllowed = false;
-        maxLengthLength = 1;
-        maxTagLength = 1;
-    }
-
-
-    /**
-     * Treat the start of a TLV. It reads the tag and get its value.
-     * 
-     * @param stream The ByteBuffer containing the PDU to decode
-     * @param container The container that stores the current state,
-     * the result and other informations.
-     * @return <code>true</code> if there are more bytes to read, <code>false
-     * </code> otherwise
-     */
-    private boolean treatTagStartState( ByteBuffer stream, Asn1Container container )
-    {
-        if ( stream.hasRemaining() )
-        {
-            byte octet = stream.get();
-
-            TLV tlv = new TLV( container.getNewTlvId() );
-            tlv.setTag( octet );
-
-            // Store the current TLV in the container.
-            container.setCurrentTLV( tlv );
-
-            // Create a link between the current TLV with its parent
-            tlv.setParent( container.getParentTLV() );
-
-            // Switch to the next state, which is the Length decoding
-            container.setState( TLVStateEnum.LENGTH_STATE_START );
-
-            if ( IS_DEBUG )
-            {
-                byte tag = container.getCurrentTLV().getTag();
-                LOG.debug( "Tag {} has been decoded", Asn1StringUtils.dumpByte( tag ) );
-            }
-
-            return MORE;
-        }
-        else
-        {
-            // The stream has been exhausted
-            return END;
-        }
-    }
-
-
-    /**
-     * Dump the current TLV tree
-     * 
-     * @param container The container
-     */
-    private void dumpTLVTree( Asn1Container container )
-    {
-        StringBuffer sb = new StringBuffer();
-        TLV current = container.getCurrentTLV();
-
-        sb.append( "TLV" ).append( Asn1StringUtils.dumpByte( current.getTag() ) ).append( "(" ).append(
-            current.getExpectedLength() ).append( ")" );
-
-        current = current.getParent();
-
-        while ( current != null )
-        {
-            sb.append( "-TLV" ).append( Asn1StringUtils.dumpByte( current.getTag() ) ).append( "(" ).append(
-                current.getExpectedLength() ).append( ")" );
-            current = current.getParent();
-        }
-
-        if ( IS_DEBUG )
-        {
-            LOG.debug( "TLV Tree : {}", sb.toString() );
-        }
-    }
-
-
-    /**
-     * Check if the TLV tree is fully decoded
-     * 
-     * @param container The container
-     * @return <code>true</code> if the TLV has been decoded
-     */
-    private boolean isTLVDecoded( Asn1Container container )
-    {
-        TLV current = container.getCurrentTLV();
-        TLV parent = current.getParent();
-
-        while ( parent != null )
-        {
-            if ( parent.getExpectedLength() != 0 )
-            {
-                return false;
-            }
-
-            parent = parent.getParent();
-        }
-
-        BerValue value = current.getValue();
-
-        if ( ( value != null ) && ( value.getData() != null ) )
-        {
-            return ( current.getExpectedLength() == value.getData().length );
-        }
-        else
-        {
-            return current.getExpectedLength() == 0;
-        }
-    }
-
-
-    /**
-     * Treat the Length start. The tag has been decoded, so we have to deal with
-     * the LENGTH, which can be multi-bytes.
-     * 
-     * @param stream  The ByteBuffer containing the PDU to decode
-     * @param container The container that stores the current state,
-     * the result and other informations.
-     * @return <code>true</code> if there are more bytes to read, <code>false
-     * </code> otherwise
-     * @throws DecoderException Thrown if anything went wrong
-     */
-    private boolean treatLengthStartState( ByteBuffer stream, Asn1Container container ) throws DecoderException
-    {
-        if ( stream.hasRemaining() )
-        {
-            byte octet = stream.get();
-            TLV tlv = container.getCurrentTLV();
-
-            if ( ( octet & TLV.LENGTH_LONG_FORM ) == 0 )
-            {
-                // We don't have a long form. The Length of the Value part is
-                // given by this byte.
-                tlv.setLength( octet );
-                tlv.setLengthNbBytes( 1 );
-
-                container.setState( TLVStateEnum.LENGTH_STATE_END );
-            }
-            else if ( ( octet & TLV.LENGTH_EXTENSION_RESERVED ) != TLV.LENGTH_EXTENSION_RESERVED )
-            {
-                int expectedLength = octet & TLV.LENGTH_SHORT_MASK;
-
-                if ( expectedLength > 4 )
-                {
-                    String msg = I18n.err( I18n.ERR_00005_LENGTH_OVERFLOW );
-                    LOG.error( msg );
-                    throw new DecoderException( msg );
-                }
-
-                tlv.setLength( 0 );
-                tlv.setLengthNbBytes( 1 + expectedLength );
-                tlv.setLengthBytesRead( 1 );
-                container.setState( TLVStateEnum.LENGTH_STATE_PENDING );
-            }
-            else
-            {
-                String msg = I18n.err( I18n.ERR_00006_LENGTH_EXTENSION_RESERVED );
-                LOG.error( msg );
-                throw new DecoderException( msg );
-            }
-
-            return MORE;
-        }
-        else
-        {
-            return END;
-        }
-    }
-
-
-    /**
-     * This function is called when a Length is in the process of being decoded,
-     * but the lack of bytes in the buffer stopped the process.
-     * 
-     * @param stream The ByteBuffer containing the PDU to decode
-     * @param container The container that stores the current state,
-     * the result and other informations.
-     * @return <code>true</code> if there are more bytes to read, <code>false
-     * </code> otherwise
-     */
-    private boolean treatLengthPendingState( ByteBuffer stream, Asn1Container container )
-    {
-        if ( stream.hasRemaining() )
-        {
-            TLV tlv = container.getCurrentTLV();
-            int length = tlv.getLength();
-
-            while ( tlv.getLengthBytesRead() < tlv.getLengthNbBytes() )
-            {
-                byte octet = stream.get();
-
-                if ( IS_DEBUG )
-                {
-                    LOG.debug( "  current byte : {}", Asn1StringUtils.dumpByte( octet ) );
-                }
-
-                tlv.incLengthBytesRead();
-                length = ( length << 8 ) | ( octet & 0x00FF );
-
-                if ( !stream.hasRemaining() )
-                {
-                    tlv.setLength( length );
-
-                    if ( tlv.getLengthBytesRead() < tlv.getLengthNbBytes() )
-                    {
-                        container.setState( TLVStateEnum.LENGTH_STATE_PENDING );
-                        return END;
-                    }
-                    else
-                    {
-                        container.setState( TLVStateEnum.LENGTH_STATE_END );
-                        return MORE;
-                    }
-                }
-            }
-
-            tlv.setLength( length );
-            container.setState( TLVStateEnum.LENGTH_STATE_END );
-
-            return MORE;
-        }
-        else
-        {
-
-            return END;
-        }
-    }
-
-
-    /**
-     * A debug function used to dump the expected length stack.
-     * 
-     * @param tlv The current TLV.
-     * @return A string which represent the expected length stack.
-     */
-    private String getParentLength( TLV tlv )
-    {
-        StringBuffer buffer = new StringBuffer();
-
-        buffer.append( "TLV expected length stack : " );
-
-        while ( true )
-        {
-            if ( tlv == null )
-            {
-                buffer.append( " - null" );
-                break;
-            }
-            else
-            {
-                buffer.append( " - " ).append( tlv.getExpectedLength() );
-            }
-
-            tlv = tlv.getParent();
-        }
-
-        return buffer.toString();
-    }
-
-
-    /**
-     * The Length is fully decoded. We have to call an action to check the size.
-     * 
-     * @param container The container that stores the current state,
-     * the result and other informations.
-     * @throws DecoderException Thrown if anything went wrong
-     */
-    private void treatLengthEndState( Asn1Container container ) throws DecoderException
-    {
-        TLV tlv = container.getCurrentTLV();
-
-        if ( tlv == null )
-        {
-            String msg = I18n.err( I18n.ERR_00007_TLV_NULL );
-            LOG.error( msg );
-            throw new DecoderException( msg );
-        }
-
-        int length = tlv.getLength();
-
-        // We will check the length here. What we must control is
-        // that the enclosing constructed TLV expected length is not
-        // exceeded by the current TLV.
-        TLV parentTLV = container.getParentTLV();
-
-        if ( IS_DEBUG )
-        {
-            LOG.debug( "Parent length : {}", getParentLength( parentTLV ) );
-        }
-
-        if ( parentTLV == null )
-        {
-            // This is the first TLV, so we can't check anything. We will
-            // just store this TLV as the root of the PDU
-            tlv.setExpectedLength( length );
-            container.setParentTLV( tlv );
-
-            if ( IS_DEBUG )
-            {
-                LOG.debug( "Root TLV[{}]", Integer.valueOf( length ) );
-            }
-        }
-        else
-        {
-            // We have a parent, so we will check that its expected length is
-            // not exceeded.
-            int expectedLength = parentTLV.getExpectedLength();
-            int currentLength = tlv.getSize();
-
-            if ( expectedLength < currentLength )
-            {
-                // The expected length is lower than the Value length of the
-                // current TLV. This is an error...
-                LOG.debug( "tlv[{}, {}]", Integer.valueOf( expectedLength ), Integer.valueOf( currentLength ) );
-                throw new DecoderException( I18n.err( I18n.ERR_00008_VALUE_LENGTH_ABOVE_EXPECTED_LENGTH, Integer
-                    .valueOf( currentLength ), Integer.valueOf( expectedLength ) ) );
-            }
-
-            // deal with the particular case where expected length equal
-            // the current length, which means that the parentTLV has been
-            // completed.
-            if ( expectedLength == currentLength )
-            {
-                parentTLV.setExpectedLength( 0 );
-
-                // We also have to check that the current TLV is a constructed
-                // one.
-                // In this case, we have to switch from this parent TLV
-                // to the parent's parent TLV.
-                if ( tlv.isConstructed() )
-                {
-                    // here, we also have another special case : a
-                    // zero length TLV. We must then unstack all
-                    // the parents which length is null.
-                    if ( length == 0 )
-                    {
-                        // We will set the parent to the first parentTLV which
-                        // expectedLength
-                        // is not null, and it will become the new parent TLV
-                        while ( parentTLV != null )
-                        {
-                            if ( parentTLV.getExpectedLength() != 0 )
-                            {
-                                // ok, we have an incomplete parent. we will
-                                // stop the recursion right here
-                                break;
-                            }
-                            else
-                            {
-                                parentTLV = parentTLV.getParent();
-                            }
-                        }
-
-                        container.setParentTLV( parentTLV );
-                    }
-                    else
-                    {
-                        // The new Parent TLV is this Constructed TLV
-                        container.setParentTLV( tlv );
-                    }
-
-                    tlv.setParent( parentTLV );
-                    tlv.setExpectedLength( length );
-                }
-                else
-                {
-                    tlv.setExpectedLength( length );
-
-                    // It's over, the parent TLV has been completed.
-                    // Go back to the parent's parent TLV until we find
-                    // a tlv which is not complete.
-                    while ( parentTLV != null )
-                    {
-                        if ( parentTLV.getExpectedLength() != 0 )
-                        {
-                            // ok, we have an incomplete parent. we will
-                            // stop the recursion right here
-                            break;
-                        }
-                        else
-                        {
-                            parentTLV = parentTLV.getParent();
-                        }
-                    }
-
-                    container.setParentTLV( parentTLV );
-                }
-            }
-            else
-            {
-                // Renew the expected Length.
-                parentTLV.setExpectedLength( expectedLength - currentLength );
-                tlv.setExpectedLength( length );
-
-                if ( tlv.isConstructed() )
-                {
-                    // We have a constructed tag, so we must switch the
-                    // parentTLV
-                    tlv.setParent( parentTLV );
-                    container.setParentTLV( tlv );
-                }
-            }
-
-        }
-
-        if ( IS_DEBUG )
-        {
-            LOG.debug( "Length {} has been decoded", Integer.valueOf( length ) );
-        }
-
-        if ( length == 0 )
-        {
-            // The length is 0, so we can't expect a value.
-            container.setState( TLVStateEnum.TLV_STATE_DONE );
-        }
-        else
-        {
-            // Go ahead and decode the value part
-            container.setState( TLVStateEnum.VALUE_STATE_START );
-        }
-    }
-
-
-    /**
-     * Treat the Value part. We will distinguish two cases : - if the Tag is a
-     * Primitive one, we will get the value. - if the Tag is a Constructed one,
-     * nothing will be done.
-     * 
-     * @param stream The ByteBuffer containing the PDU to decode
-     * @param container The container that stores the current state,
-     * the result and other informations.
-     * @return <code>true</code> if there are more bytes to read, <code>false
-     * </code> otherwise
-     */
-    private boolean treatValueStartState( ByteBuffer stream, Asn1Container container )
-    {
-        TLV currentTlv = container.getCurrentTLV();
-
-        if ( TLV.isConstructed( currentTlv.getTag() ) && !container.isGathering() )
-        {
-            container.setState( TLVStateEnum.TLV_STATE_DONE );
-
-            return MORE;
-        }
-        else
-        {
-            int length = currentTlv.getLength();
-            int nbBytes = stream.remaining();
-
-            if ( nbBytes < length )
-            {
-                currentTlv.getValue().init( length );
-                currentTlv.getValue().setData( stream );
-                container.setState( TLVStateEnum.VALUE_STATE_PENDING );
-
-                return END;
-            }
-            else
-            {
-                currentTlv.getValue().init( length );
-                stream.get( currentTlv.getValue().getData(), 0, length );
-                container.setState( TLVStateEnum.TLV_STATE_DONE );
-
-                return MORE;
-            }
-        }
-    }
-
-
-    /**
-     * Treat a pending Value when we get more bytes in the buffer.
-     * 
-     * @param stream The ByteBuffer containing the PDU to decode
-     * @param container The container that stores the current state,
-     * the result and other informations.
-     * @return <code>MORE</code> if some bytes remain in the buffer when the
-     * value has been decoded, <code>END</code> if whe still need to get some
-     * more bytes.
-     */
-    private boolean treatValuePendingState( ByteBuffer stream, Asn1Container container )
-    {
-        TLV currentTlv = container.getCurrentTLV();
-
-        int length = currentTlv.getLength();
-        int currentLength = currentTlv.getValue().getCurrentLength();
-        int nbBytes = stream.remaining();
-
-        if ( ( currentLength + nbBytes ) < length )
-        {
-            currentTlv.getValue().addData( stream );
-            container.setState( TLVStateEnum.VALUE_STATE_PENDING );
-
-            return END;
-        }
-        else
-        {
-            int remaining = length - currentLength;
-            byte[] data = new byte[remaining];
-            stream.get( data, 0, remaining );
-            currentTlv.getValue().addData( data );
-            container.setState( TLVStateEnum.TLV_STATE_DONE );
-
-            return MORE;
-        }
-    }
-
-
-    /**
-     * When the TLV has been fully decoded, we have to execute the associated
-     * action and switch to the next TLV, which will start with a Tag.
-     * 
-     * @param stream The ByteBuffer containing the PDU to decode
-     * @param container The container that stores the current state,
-     * the result and other informations.
-     * @return <code>true</code> if there are more bytes to read, <code>false
-     * </code> otherwise
-     * @throws DecoderException Thrown if anything went wrong
-     */
-    @SuppressWarnings("unchecked")
-    private boolean treatTLVDoneState( ByteBuffer stream, Asn1Container container ) throws DecoderException
-    {
-        if ( IS_DEBUG )
-        {
-            dumpTLVTree( container );
-        }
-
-        // First, we have to execute the associated action
-        container.getGrammar().executeAction( container );
-
-        // Check if the PDU has been fully decoded.
-        if ( isTLVDecoded( container ) )
-        {
-            if ( container.getState() == TLVStateEnum.GRAMMAR_END )
-            {
-                // Change the state to DECODED
-                container.setState( TLVStateEnum.PDU_DECODED );
-            }
-            else
-            {
-                if ( container.isGrammarEndAllowed() )
-                {
-                    // Change the state to DECODED
-                    container.setState( TLVStateEnum.PDU_DECODED );
-                }
-                else
-                {
-                    LOG.error( I18n.err( I18n.ERR_00009_MORE_TLV_EXPECTED ) );
-                    throw new DecoderException( I18n.err( I18n.ERR_00010_TRUNCATED_PDU ) );
-                }
-            }
-        }
-        else
-        {
-            // Then we switch to the Start tag state and free the current TLV
-            container.setState( TLVStateEnum.TAG_STATE_START );
-        }
-
-        return stream.hasRemaining();
-    }
-
-
-    /**
-     * The decoder main function. This is where we read bytes from the stream
-     * and go through the automaton. It's an inifnite loop which stop when no
-     * more bytes are to be read. It can occurs if the ByteBuffer is exhausted
-     * or if the PDU has been fully decoded.
-     * 
-     * @param stream The ByteBuffer containing the PDU to decode
-     * @param container The container that store the state, the result
-     * and other elements.
-     * @throws DecoderException Thrown if anything went wrong!
-     */
-    public void decode( ByteBuffer stream, Asn1Container container ) throws DecoderException
-    {
-        /*
-         * We have to deal with the current state. This is an infinite loop,
-         * which will stop for any of these reasons :
-         * - STATE_END has been reached (hopefully, the most frequent case)
-         * - buffer is empty (it could happen)
-         * - STATE_OVERFLOW : bad situation ! The PDU may be a
-         * malevolous hand crafted ones, that try to "kill" our decoder. We
-         * must log it with all information to track back this case, and punish
-         * the guilty !
-         */
-        boolean hasRemaining = stream.hasRemaining();
-
-        // Increment the PDU size counter.
-        container.incrementDecodedBytes( stream.remaining() );
-
-        if ( container.getDecodedBytes() > container.getMaxPDUSize() )
-        {
-            String message = I18n.err( I18n.ERR_00042_PDU_SIZE_TOO_LONG, container.getDecodedBytes(), container
-                .getMaxPDUSize() );
-            LOG.error( message );
-            throw new DecoderException( message );
-        }
-
-        if ( IS_DEBUG )
-        {
-            LOG.debug( ">>>==========================================" );
-            LOG.debug( "--> Decoding a PDU" );
-            LOG.debug( ">>>------------------------------------------" );
-        }
-
-        while ( hasRemaining )
-        {
-            if ( IS_DEBUG )
-            {
-                LOG.debug( "--- State = {} ---", container.getState() );
-
-                if ( stream.hasRemaining() )
-                {
-                    byte octet = stream.get( stream.position() );
-
-                    LOG.debug( "  current byte : {}", Asn1StringUtils.dumpByte( octet ) );
-                }
-                else
-                {
-                    LOG.debug( "  no more byte to decode in the stream" );
-                }
-            }
-
-            switch ( container.getState() )
-            {
-                case TAG_STATE_START:
-                    // Reset the GrammarEnd flag first
-                    container.setGrammarEndAllowed( false );
-                    hasRemaining = treatTagStartState( stream, container );
-
-                    break;
-
-                case LENGTH_STATE_START:
-                    hasRemaining = treatLengthStartState( stream, container );
-
-                    break;
-
-                case LENGTH_STATE_PENDING:
-                    hasRemaining = treatLengthPendingState( stream, container );
-
-                    break;
-
-                case LENGTH_STATE_END:
-                    treatLengthEndState( container );
-
-                    break;
-
-                case VALUE_STATE_START:
-                    hasRemaining = treatValueStartState( stream, container );
-
-                    break;
-
-                case VALUE_STATE_PENDING:
-                    hasRemaining = treatValuePendingState( stream, container );
-
-                    break;
-
-                case VALUE_STATE_END:
-                    hasRemaining = stream.hasRemaining();
-
-                    // Nothing to do. We will never reach this state
-                    break;
-
-                case TLV_STATE_DONE:
-                    hasRemaining = treatTLVDoneState( stream, container );
-
-                    break;
-
-                case PDU_DECODED:
-                    // We have to deal with the case where there are
-                    // more bytes in the buffer, but the PDU has been decoded.
-                    if ( LOG.isDebugEnabled() )
-                    {
-                        LOG.debug( I18n.err( I18n.ERR_00043_REMAINING_BYTES_FOR_DECODED_PDU ) );
-                    }
-
-                    hasRemaining = false;
-
-                    break;
-
-                default:
-                    break;
-            }
-        }
-
-        if ( IS_DEBUG )
-        {
-            LOG.debug( "<<<------------------------------------------" );
-
-            if ( container.getState() == TLVStateEnum.PDU_DECODED )
-            {
-                if ( container.getCurrentTLV() != null )
-                {
-                    LOG.debug( "<-- Stop decoding : {}", container.getCurrentTLV().toString() );
-                }
-                else
-                {
-                    LOG.debug( "<-- Stop decoding : null current TLV" );
-                }
-            }
-            else
-            {
-                if ( container.getCurrentTLV() != null )
-                {
-                    LOG.debug( "<-- End decoding : {}", container.getCurrentTLV().toString() );
-                }
-                else
-                {
-                    LOG.debug( "<-- End decoding : null current TLV" );
-                }
-            }
-
-            LOG.debug( "<<<==========================================" );
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getMaxLengthLength()
-    {
-        return maxLengthLength;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getMaxTagLength()
-    {
-        return maxTagLength;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void disallowIndefiniteLength()
-    {
-        this.indefiniteLengthAllowed = false;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void allowIndefiniteLength()
-    {
-        this.indefiniteLengthAllowed = true;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isIndefiniteLengthAllowed()
-    {
-
-        return indefiniteLengthAllowed;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setMaxLengthLength( int maxLengthLength ) throws DecoderException
-    {
-        if ( ( this.indefiniteLengthAllowed ) && ( maxLengthLength > 126 ) )
-        {
-            throw new DecoderException( I18n.err( I18n.ERR_00011_LENGTH_TOO_LONG_FOR_DEFINITE_FORM ) );
-        }
-
-        this.maxLengthLength = maxLengthLength;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setMaxTagLength( int maxTagLength )
-    {
-        this.maxTagLength = maxTagLength;
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/AbstractGrammar.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/AbstractGrammar.java
deleted file mode 100644
index ee04c27..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/AbstractGrammar.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber.grammar;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.Asn1Container;
-import org.apache.directory.api.asn1.util.Asn1StringUtils;
-import org.apache.directory.api.i18n.I18n;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * The abstract Grammar which is the Mother of all the grammars. It contains
- * the transitions table.
- *
- * @param C The container type
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractGrammar<C extends Asn1Container> implements Grammar<C>
-{
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( AbstractGrammar.class );
-
-    /** Speedup for logs */
-    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
-
-    /**
-     * Table of transitions. It's a two dimension array, the first dimension
-     * indices the states, the second dimension indices the Tag value, so it is
-     * 256 wide.
-     */
-    protected GrammarTransition<C>[][] transitions;
-
-    /** The grammar name */
-    private String name;
-
-
-    /** Default constructor */
-    public AbstractGrammar()
-    {
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getName()
-    {
-        return name;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-
-    /**
-     * Get the transition associated with the state and tag
-     *
-     * @param state The current state
-     * @param tag The current tag
-     * @return A valid transition if any, or null.
-     */
-    public GrammarTransition<C> getTransition( Enum<?> state, int tag )
-    {
-        return transitions[state.ordinal()][tag & 0x00FF];
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void executeAction( C container ) throws DecoderException
-    {
-
-        Enum<?> currentState = container.getTransition();
-        // We have to deal with the special case of a GRAMMAR_END state
-        if ( ( ( States ) currentState ).isEndState() )
-        {
-            return;
-        }
-
-        byte tagByte = container.getCurrentTLV().getTag();
-
-        // We will loop until no more actions are to be executed
-        @SuppressWarnings("unchecked")
-        GrammarTransition<C> transition = ( ( AbstractGrammar<C> ) container.getGrammar() ).getTransition(
-            currentState,
-            tagByte );
-
-        if ( transition == null )
-        {
-            String errorMessage = I18n.err( I18n.ERR_00001_BAD_TRANSITION_FROM_STATE, currentState,
-                Asn1StringUtils.dumpByte( tagByte ) );
-
-            LOG.error( errorMessage );
-
-            // If we have no more grammar on the stack, then this is an
-            // error
-            throw new DecoderException( errorMessage );
-        }
-
-        if ( IS_DEBUG )
-        {
-            LOG.debug( transition.toString() );
-        }
-
-        if ( transition.hasAction() )
-        {
-            Action<C> action = transition.getAction();
-            action.action( container );
-        }
-
-        container.setTransition( transition.getCurrentState() );
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/Action.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/Action.java
deleted file mode 100644
index 0e6bf95..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/Action.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1.ber.grammar;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.Asn1Container;
-
-
-/**
- * Action interface just contains the method 'action' which must be implemented
- * in all the implementing classes.
- * 
- * @param C The container type
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Action<C extends Asn1Container>
-{
-    /**
-     * The action to be executed.
-     * 
-     * @param container The container which stores the current data
-     * @throws DecoderException Thrown if something went wrong.
-     */
-    void action( C container ) throws DecoderException;
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/Grammar.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/Grammar.java
deleted file mode 100644
index b2157dd..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/Grammar.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber.grammar;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.ber.Asn1Container;
-
-
-/**
- * The interface which expose common behavior of a Grammar implementer.
- *
- * @param C The container type
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Grammar<C extends Asn1Container>
-{
-    /**
-     * This method, when called, execute an action on the current data stored in
-     * the container.
-     *
-     * @param asn1Container Store the data being processed.
-     * @throws DecoderException Thrown when an unrecoverable error occurs.
-     */
-    void executeAction( C asn1Container ) throws DecoderException;
-
-
-    /**
-     * Get the grammar name
-     *
-     * @return Return the grammar's name
-     */
-    String getName();
-
-
-    /**
-     * Set the grammar's name
-     *
-     * @param name The grammar name
-     */
-    void setName( String name );
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/GrammarAction.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/GrammarAction.java
deleted file mode 100644
index a0e9044..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/GrammarAction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1.ber.grammar;
-
-
-import org.apache.directory.api.asn1.ber.Asn1Container;
-
-
-/**
- * A top level grammar class that store meta informations about the actions.
- * Those informations are not mandatory, but they can be useful for debugging.
- * 
- * @param C The container type
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class GrammarAction<C extends Asn1Container> implements Action<C>
-{
-    /** The action's name */
-    protected String name;
-
-
-    /** A default constructor */
-    public GrammarAction()
-    {
-    }
-
-
-    /**
-     * Creates a new GrammarAction object.
-     * 
-     * @param name The name of the grammar action
-     */
-    public GrammarAction( String name )
-    {
-        this.name = name;
-    }
-
-
-    /**
-     * Prints the action's name
-     * 
-     * @return The action's name
-     */
-    public String toString()
-    {
-        return name;
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/GrammarTransition.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/GrammarTransition.java
deleted file mode 100644
index 848ae23..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/GrammarTransition.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber.grammar;
-
-
-import org.apache.directory.api.asn1.ber.Asn1Container;
-import org.apache.directory.api.asn1.ber.tlv.UniversalTag;
-import org.apache.directory.api.asn1.util.Asn1StringUtils;
-
-
-/**
- * Define a transition between two states of a grammar. It stores the next
- * state, and the action to execute while executing the transition.
- * 
- * @param C The container type
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class GrammarTransition<C extends Asn1Container>
-{
-    /** The action associated to the transition */
-    private Action<C> action;
-
-    /** The previous state */
-    private Enum<?> previousState;
-
-    /** The current state */
-    private Enum<?> currentState;
-
-    /** The current tag */
-    private int currentTag;
-
-
-    /**
-     * Creates a new GrammarTransition object.
-     *
-     * @param previousState the previous state
-     * @param currentState The current state
-     * @param currentTag the current TLV's tag
-     * @param action The action to execute. It could be null.
-     */
-    public GrammarTransition( Enum<?> previousState, Enum<?> currentState, int currentTag, Action<C> action )
-    {
-        this.previousState = previousState;
-        this.currentState = currentState;
-        this.action = action;
-        this.currentTag = currentTag;
-    }
-
-
-    /**
-     * Creates a new GrammarTransition object.
-     *
-     * @param previousState the previous state
-     * @param currentState The current state
-     * @param currentTag the current TLV's tag
-     */
-    public GrammarTransition( Enum<?> previousState, Enum<?> currentState, int currentTag )
-    {
-        this.previousState = previousState;
-        this.currentState = currentState;
-        this.currentTag = currentTag;
-    }
-
-
-    /**
-     * Creates a new GrammarTransition object.
-     *
-     * @param previousState the previous state
-     * @param currentState The current state
-     * @param currentTag the current TLV's tag
-     * @param action The action to execute. It could be null.
-     */
-    public GrammarTransition( Enum<?> previousState, Enum<?> currentState, UniversalTag currentTag, Action<C> action )
-    {
-        this.previousState = previousState;
-        this.currentState = currentState;
-        this.action = action;
-        this.currentTag = currentTag.getValue();
-    }
-
-
-    /**
-     * Creates a new GrammarTransition object.
-     *
-     * @param previousState the previous state
-     * @param currentState The current state
-     * @param currentTag the current TLV's tag
-     */
-    public GrammarTransition( Enum<?> previousState, Enum<?> currentState, UniversalTag currentTag )
-    {
-        this.previousState = previousState;
-        this.currentState = currentState;
-        this.currentTag = currentTag.getValue();
-    }
-
-
-    /**
-     * Tells if the transition has an associated action.
-     *
-     * @return <code>true</code> if an action has been associated to the transition
-     */
-    public boolean hasAction()
-    {
-        return action != null;
-    }
-
-
-    /**
-     * @return Returns the action associated with the transition
-     */
-    public Action<C> getAction()
-    {
-        return action;
-    }
-
-
-    /**
-     * @return The current state
-     */
-    public Enum<?> getCurrentState()
-    {
-        return currentState;
-    }
-
-
-    /**
-     * @return The previous state
-     */
-    public Enum<?> getPreviousState()
-    {
-        return previousState;
-    }
-
-
-    /**
-     * @return A representation of the transition as a string.
-     */
-    @Override
-    public String toString()
-    {
-        StringBuilder sb = new StringBuilder();
-
-        sb.append( "Transition from state <" ).append( previousState ).append( "> " );
-        sb.append( "to state <" ).append( currentState ).append( ">, " );
-        sb.append( "tag <" ).append( Asn1StringUtils.dumpByte( ( byte ) currentTag ) ).append( ">, " );
-        sb.append( "action : " );
-
-        if ( action == null )
-        {
-            sb.append( "no action" );
-        }
-        else
-        {
-            sb.append( action );
-        }
-
-        return sb.toString();
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/States.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/States.java
deleted file mode 100644
index 2fdd0fd..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/grammar/States.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.asn1.ber.grammar;
-
-
-/**
- * Interface to get custom function from enum when casting.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface States
-{
-    /**
-     * @return True if this is the END_STATE
-     */
-    boolean isEndState();
-
-
-    /**
-     * @return The START_STATE of the enum
-     */
-    Enum<?> getStartState();
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BerValue.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BerValue.java
deleted file mode 100644
index aefbe82..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BerValue.java
+++ /dev/null
@@ -1,936 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-
-import org.apache.directory.api.asn1.EncoderException;
-import org.apache.directory.api.asn1.util.Asn1StringUtils;
-import org.apache.directory.api.asn1.util.BitString;
-import org.apache.directory.api.asn1.util.Oid;
-import org.apache.directory.api.i18n.I18n;
-
-
-/**
- * This class stores the data decoded from a TLV.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class BerValue
-{
-    /** The data buffer. */
-    private byte[] data;
-
-    /** The current position of the last byte in the data buffer */
-    private int currentPos;
-
-    /** The encoded byte for a TRUE value */
-    public static final byte TRUE_VALUE = ( byte ) 0xFF;
-
-    /** The encoded byte for a FALSE value */
-    public static final byte FALSE_VALUE = ( byte ) 0x00;
-
-    /** Pre-encoded PDUs for a TRUE TLV */
-    private static final byte[] ENCODED_TRUE = new byte[]
-        { 0x01, 0x01, TRUE_VALUE };
-
-    /** Pre-encoded PDUs for a FALSE TLV */
-    private static final byte[] ENCODED_FALSE = new byte[]
-        { 0x01, 0x01, FALSE_VALUE };
-
-    /** Integer limits for encoding : 0x7F */
-    private static final int ONE_BYTE_MAX = ( 1 << 7 ) - 1;
-
-    /** Integer limits for encoding : -0x7F */
-    private static final int ONE_BYTE_MIN = -( 1 << 7 );
-
-    /** Integer limits for encoding : 0x7FFF */
-    private static final int TWO_BYTE_MAX = ( 1 << 15 ) - 1;
-
-    /** Integer limits for encoding : -0x7FFF */
-    private static final int TWO_BYTE_MIN = -( 1 << 15 );
-
-    /** Integer limits for encoding : 0x7FFFFF */
-    private static final int THREE_BYTE_MAX = ( 1 << 23 ) - 1;
-
-    /** Integer limits for encoding : -0x7FFFFF */
-    private static final int THREE_BYTE_MIN = -( 1 << 23 );
-
-    /** Integer limits for encoding : 0x7FFFFFFF */
-    private static final long FOUR_BYTE_MAX = ( 1L << 31 ) - 1L;
-
-    /** Integer limits for encoding : -0x7FFFFFFF */
-    private static final long FOUR_BYTE_MIN = -( 1L << 31 );
-
-    /** Integer limits for encoding : 0x7FFFFFFFFF */
-    private static final long FIVE_BYTE_MAX = ( 1L << 39 ) - 1L;
-
-    /** Integer limits for encoding : -0x7FFFFFFFFF */
-    private static final long FIVE_BYTE_MIN = -( 1L << 39 );
-
-    /** Integer limits for encoding : 0x7FFFFFFFFFFF */
-    private static final long SIX_BYTE_MAX = ( 1L << 47 ) - 1L;
-
-    /** Integer limits for encoding : -0x7FFFFFFFFFFF */
-    private static final long SIX_BYTE_MIN = -( 1L << 47 );
-
-    /** Integer limits for encoding : 0x7FFFFFFFFFFF */
-    private static final long SEVEN_BYTE_MAX = ( 1L << 55 ) - 1L;
-
-    /** Integer limits for encoding : -0x7FFFFFFFFFFF */
-    private static final long SEVEN_BYTE_MIN = -( 1L << 55 );
-
-
-    /**
-     * Creates a new Value from a byte[]
-     *
-     * @param value the associated value
-     */
-    public BerValue( byte[] value )
-    {
-        // Do a copy of the byte array
-        data = new byte[value.length];
-        System.arraycopy( value, 0, data, 0, value.length );
-        currentPos = 0;
-    }
-
-
-    /**
-     * The default constructor.
-     */
-    public BerValue()
-    {
-        data = null;
-        currentPos = 0;
-    }
-
-
-    /**
-     * Initialize the Value
-     *
-     * @param size The data size to allocate.
-     */
-    public void init( int size )
-    {
-        data = new byte[size];
-        currentPos = 0;
-    }
-
-
-    /**
-     * Reset the Value so that it can be reused
-     */
-    public void reset()
-    {
-        data = null;
-        currentPos = 0;
-    }
-
-
-    /**
-     * Get the Values'data
-     *
-     * @return Returns the data.
-     */
-    public byte[] getData()
-    {
-        return data;
-    }
-
-
-    /**
-     * Set a block of bytes in the Value
-     *
-     * @param data The data to set.
-     */
-    public void setData( ByteBuffer data )
-    {
-        int length = data.remaining();
-        data.get( this.data, 0, length );
-        currentPos = length;
-    }
-
-
-    /**
-     * Append some bytes to the data buffer.
-     *
-     * @param buffer The data to append.
-     */
-    public void addData( ByteBuffer buffer )
-    {
-        int length = buffer.remaining();
-        buffer.get( data, currentPos, length );
-        currentPos += length;
-    }
-
-
-    /**
-     * Set a block of bytes in the Value
-     *
-     * @param data The data to set.
-     */
-    public void setData( byte[] data )
-    {
-        System.arraycopy( data, 0, this.data, 0, data.length );
-        currentPos = data.length;
-    }
-
-
-    /**
-     * Append some bytes to the data buffer.
-     *
-     * @param array The data to append.
-     */
-    public void addData( byte[] array )
-    {
-        System.arraycopy( array, 0, this.data, currentPos, array.length );
-        currentPos = array.length;
-    }
-
-
-    /**
-     * @return The number of bytes actually stored
-     */
-    public int getCurrentLength()
-    {
-        return currentPos;
-    }
-
-
-    /**
-     * Utility function that return the number of bytes necessary to store an
-     * integer value. Note that this value must be in [Integer.MIN_VALUE,
-     * Integer.MAX_VALUE].
-     *
-     * @param value The value to store in a byte array
-     * @return The number of bytes necessary to store the value.
-     */
-    public static int getNbBytes( int value )
-    {
-        if ( ( value >= ONE_BYTE_MIN ) && ( value <= ONE_BYTE_MAX ) )
-        {
-            return 1;
-        }
-        else if ( ( value >= TWO_BYTE_MIN ) && ( value <= TWO_BYTE_MAX ) )
-        {
-            return 2;
-        }
-        else if ( ( value >= THREE_BYTE_MIN ) && ( value <= THREE_BYTE_MAX ) )
-        {
-            return 3;
-        }
-        else
-        {
-            return 4;
-        }
-    }
-
-
-    /**
-     * Utility function that return the number of bytes necessary to store a
-     * long value. Note that this value must be in [Long.MIN_VALUE,
-     * Long.MAX_VALUE].
-     *
-     * @param value The value to store in a byte array
-     * @return The number of bytes necessary to store the value.
-     */
-    public static int getNbBytes( long value )
-    {
-        if ( ( value >= ONE_BYTE_MIN ) && ( value <= ONE_BYTE_MAX ) )
-        {
-            return 1;
-        }
-        else if ( ( value >= TWO_BYTE_MIN ) && ( value <= TWO_BYTE_MAX ) )
-        {
-            return 2;
-        }
-        else if ( ( value >= THREE_BYTE_MIN ) && ( value <= THREE_BYTE_MAX ) )
-        {
-            return 3;
-        }
-        else if ( ( value >= FOUR_BYTE_MIN ) && ( value <= FOUR_BYTE_MAX ) )
-        {
-            return 4;
-        }
-        else if ( ( value >= FIVE_BYTE_MIN ) && ( value <= FIVE_BYTE_MAX ) )
-        {
-            return 5;
-        }
-        else if ( ( value >= SIX_BYTE_MIN ) && ( value <= SIX_BYTE_MAX ) )
-        {
-            return 6;
-        }
-        else if ( ( value >= SEVEN_BYTE_MIN ) && ( value <= SEVEN_BYTE_MAX ) )
-        {
-            return 7;
-        }
-        else
-        {
-            return 8;
-        }
-    }
-
-
-    /**
-     * Utility function that return a byte array representing the Value We must
-     * respect the ASN.1 BER encoding scheme :
-     * <pre>
-     * 1) positive integer
-     * - [0 - 0x7F] : 0xVV
-     * - [0x80 - 0xFF] : 0x00 0xVV
-     * - [0x0100 - 0x7FFF] : 0xVV 0xVV
-     * - [0x8000 - 0xFFFF] : 0x00 0xVV 0xVV
-     * - [0x010000 - 0x7FFFFF] : 0xVV 0xVV 0xVV
-     * - [0x800000 - 0xFFFFFF] : 0x00 0xVV 0xVV 0xVV
-     * - [0x01000000 - 0x7FFFFFFF] : 0xVV 0xVV 0xVV 0xVV
-     * 2) Negative number - (~value) + 1
-     * </pre>
-     *
-     * @param value The value to store in a byte array
-     * @return The byte array representing the value.
-     */
-    public static byte[] getBytes( int value )
-    {
-        byte[] bytes = null;
-
-        if ( value >= 0 )
-        {
-            if ( ( value >= 0 ) && ( value <= ONE_BYTE_MAX ) )
-            {
-                bytes = new byte[1];
-                bytes[0] = ( byte ) value;
-            }
-            else if ( ( value > ONE_BYTE_MAX ) && ( value <= TWO_BYTE_MAX ) )
-            {
-                bytes = new byte[2];
-                bytes[1] = ( byte ) value;
-                bytes[0] = ( byte ) ( value >> 8 );
-            }
-            else if ( ( value > TWO_BYTE_MAX ) && ( value <= THREE_BYTE_MAX ) )
-            {
-                bytes = new byte[3];
-                bytes[2] = ( byte ) value;
-                bytes[1] = ( byte ) ( value >> 8 );
-                bytes[0] = ( byte ) ( value >> 16 );
-            }
-            else
-            {
-                bytes = new byte[4];
-                bytes[3] = ( byte ) value;
-                bytes[2] = ( byte ) ( value >> 8 );
-                bytes[1] = ( byte ) ( value >> 16 );
-                bytes[0] = ( byte ) ( value >> 24 );
-            }
-        }
-        else
-        {
-            // On special case : 0x80000000
-            if ( value == 0x80000000 )
-            {
-                bytes = new byte[4];
-                bytes[3] = ( byte ) value;
-                bytes[2] = ( byte ) ( value >> 8 );
-                bytes[1] = ( byte ) ( value >> 16 );
-                bytes[0] = ( byte ) ( value >> 24 );
-            }
-            else
-            {
-                // We have to compute the complement, and add 1
-                //value = ( ~value ) + 1;
-
-                if ( value >= 0xFFFFFF80 )
-                {
-                    bytes = new byte[1];
-                    bytes[0] = ( byte ) value;
-                }
-                else if ( value >= 0xFFFF8000 )
-                {
-                    bytes = new byte[2];
-                    bytes[1] = ( byte ) ( value );
-                    bytes[0] = ( byte ) ( value >> 8 );
-                }
-                else if ( value >= 0xFF800000 )
-                {
-                    bytes = new byte[3];
-                    bytes[2] = ( byte ) value;
-                    bytes[1] = ( byte ) ( value >> 8 );
-                    bytes[0] = ( byte ) ( value >> 16 );
-                }
-                else
-                {
-                    bytes = new byte[4];
-                    bytes[3] = ( byte ) value;
-                    bytes[2] = ( byte ) ( value >> 8 );
-                    bytes[1] = ( byte ) ( value >> 16 );
-                    bytes[0] = ( byte ) ( value >> 24 );
-                }
-            }
-        }
-
-        return bytes;
-    }
-
-
-    /**
-     * Utility function that return a byte array representing the Value.
-     * We must respect the ASN.1 BER encoding scheme : <br>
-     * <pre>
-     * 1) positive integer
-     * - [0 - 0x7F] : 0xVV
-     * - [0x80 - 0xFF] : 0x00 0xVV
-     * - [0x0100 - 0x7FFF] : 0xVV 0xVV
-     * - [0x8000 - 0xFFFF] : 0x00 0xVV 0xVV
-     * - [0x010000 - 0x7FFFFF] : 0xVV 0xVV 0xVV
-     * - [0x800000 - 0xFFFFFF] : 0x00 0xVV 0xVV 0xVV
-     * - [0x01000000 - 0x7FFFFFFF] : 0xVV 0xVV 0xVV 0xVV
-     * 2) Negative number - (~value) + 1
-     * <pre>
-     * They are encoded following the table (the <br>
-     * encode bytes are those enclosed by squared braquets) :<br>
-     * <br>
-     * <pre>
-     *   -1                      -> FF FF FF FF FF FF FF [FF]
-     *   -127                    -> FF FF FF FF FF FF FF [81]
-     *   -128                    -> FF FF FF FF FF FF FF [80]
-     *   -129                    -> FF FF FF FF FF FF [FF 7F]
-     *   -255                    -> FF FF FF FF FF FF [FF 01]
-     *   -256                    -> FF FF FF FF FF FF [FF 00]
-     *   -257                    -> FF FF FF FF FF FF [FE FF]
-     *   -32767                  -> FF FF FF FF FF FF [80 01]
-     *   -32768                  -> FF FF FF FF FF FF [80 00]
-     *   -32769                  -> FF FF FF FF FF [FF 7F FF]
-     *   -65535                  -> FF FF FF FF FF [FF 00 01]
-     *   -65536                  -> FF FF FF FF FF [FF 00 00]
-     *   -65537                  -> FF FF FF FF FF [FE FF FF]
-     *   -8388607                -> FF FF FF FF FF [80 00 01]
-     *   -8388608                -> FF FF FF FF FF [80 00 00]
-     *   -8388609                -> FF FF FF FF [FF 7F FF FF]
-     *   -16777215               -> FF FF FF FF [FF 00 00 01]
-     *   -16777216               -> FF FF FF FF [FF 00 00 00]
-     *   -16777217               -> FF FF FF FF [FE FF FF FF]
-     *   -2147483647             -> FF FF FF FF [80 00 00 01]
-     *   -2147483648             -> FF FF FF FF [80 00 00 00]
-     *   -2147483649             -> FF FF FF [FF 7F FF FF FF]
-     *   -4294967295             -> FF FF FF [FF 00 00 00 01]
-     *   -4294967296             -> FF FF FF [FF 00 00 00 00]
-     *   -4294967297             -> FF FF FF [FE FF FF FF FF]
-     *   -549755813887           -> FF FF FF [80 00 00 00 01]
-     *   -549755813888           -> FF FF FF [80 00 00 00 00]
-     *   -549755813889           -> FF FF [FF 7F FF FF FF FF]
-     *   -1099511627775          -> FF FF [FF 00 00 00 00 01]
-     *   -1099511627776          -> FF FF [FF 00 00 00 00 00]
-     *   -1099511627777          -> FF FF [FE FF FF FF FF FF]
-     *   -140737488355327        -> FF FF [80 00 00 00 00 01]
-     *   -140737488355328        -> FF FF [80 00 00 00 00 00]
-     *   -140737488355329        -> FF [FF 7F FF FF FF FF FF]
-     *   -281474976710655        -> FF [FF 00 00 00 00 00 01]
-     *   -281474976710656        -> FF [FF 00 00 00 00 00 00]
-     *   -281474976710657        -> FF [FE FF FF FF FF FF FF]
-     *   -36028797018963967      -> FF [80 00 00 00 00 00 01]
-     *   -36028797018963968      -> FF [80 00 00 00 00 00 00]
-     *   -36028797018963969      -> [FF 7F FF FF FF FF FF FF]
-     *   -72057594037927936      -> [FF 00 00 00 00 00 00 00]
-     *   -72057594037927937      -> [FE FF FF FF FF FF FF FF]
-     *   -9223372036854775807    -> [80 00 00 00 00 00 00 01]
-     *   -9223372036854775808    -> [80 00 00 00 00 00 00 00]
-     * </pre>
-     * @param value The value to store in a byte array
-     * @return The byte array representing the value.
-     */
-    public static byte[] getBytes( long value )
-    {
-        byte[] bytes = null;
-
-        if ( value >= 0 )
-        {
-            if ( ( value >= 0 ) && ( value <= ONE_BYTE_MAX ) )
-            {
-                bytes = new byte[1];
-                bytes[0] = ( byte ) value;
-            }
-            else if ( ( value > ONE_BYTE_MAX ) && ( value <= TWO_BYTE_MAX ) )
-            {
-                bytes = new byte[2];
-                bytes[1] = ( byte ) value;
-                bytes[0] = ( byte ) ( value >> 8 );
-            }
-            else if ( ( value > TWO_BYTE_MAX ) && ( value <= THREE_BYTE_MAX ) )
-            {
-                bytes = new byte[3];
-                bytes[2] = ( byte ) value;
-                bytes[1] = ( byte ) ( value >> 8 );
-                bytes[0] = ( byte ) ( value >> 16 );
-            }
-            else if ( ( value > THREE_BYTE_MAX ) && ( value <= FOUR_BYTE_MAX ) )
-            {
-                bytes = new byte[4];
-                bytes[3] = ( byte ) value;
-                bytes[2] = ( byte ) ( value >> 8 );
-                bytes[1] = ( byte ) ( value >> 16 );
-                bytes[0] = ( byte ) ( value >> 24 );
-            }
-            else if ( ( value > FOUR_BYTE_MAX ) && ( value <= FIVE_BYTE_MAX ) )
-            {
-                bytes = new byte[5];
-                bytes[4] = ( byte ) value;
-                bytes[3] = ( byte ) ( value >> 8 );
-                bytes[2] = ( byte ) ( value >> 16 );
-                bytes[1] = ( byte ) ( value >> 24 );
-                bytes[0] = ( byte ) ( value >> 32 );
-            }
-            else if ( ( value > FIVE_BYTE_MAX ) && ( value <= SIX_BYTE_MAX ) )
-            {
-                bytes = new byte[6];
-                bytes[5] = ( byte ) value;
-                bytes[4] = ( byte ) ( value >> 8 );
-                bytes[3] = ( byte ) ( value >> 16 );
-                bytes[2] = ( byte ) ( value >> 24 );
-                bytes[1] = ( byte ) ( value >> 32 );
-                bytes[0] = ( byte ) ( value >> 40 );
-            }
-            else if ( ( value > SIX_BYTE_MAX ) && ( value <= SEVEN_BYTE_MAX ) )
-            {
-                bytes = new byte[7];
-                bytes[6] = ( byte ) value;
-                bytes[5] = ( byte ) ( value >> 8 );
-                bytes[4] = ( byte ) ( value >> 16 );
-                bytes[3] = ( byte ) ( value >> 24 );
-                bytes[2] = ( byte ) ( value >> 32 );
-                bytes[1] = ( byte ) ( value >> 40 );
-                bytes[0] = ( byte ) ( value >> 48 );
-            }
-            else
-            {
-                bytes = new byte[8];
-                bytes[7] = ( byte ) value;
-                bytes[6] = ( byte ) ( value >> 8 );
-                bytes[5] = ( byte ) ( value >> 16 );
-                bytes[4] = ( byte ) ( value >> 24 );
-                bytes[3] = ( byte ) ( value >> 32 );
-                bytes[2] = ( byte ) ( value >> 40 );
-                bytes[1] = ( byte ) ( value >> 48 );
-                bytes[0] = ( byte ) ( value >> 56 );
-            }
-        }
-        else
-        {
-            // On special case : 0x80000000
-            if ( value == 0x8000000000000000L )
-            {
-                bytes = new byte[8];
-                bytes[7] = ( byte ) 0x00;
-                bytes[6] = ( byte ) 0x00;
-                bytes[5] = ( byte ) 0x00;
-                bytes[4] = ( byte ) 0x00;
-                bytes[3] = ( byte ) 0x00;
-                bytes[2] = ( byte ) 0x00;
-                bytes[1] = ( byte ) 0x00;
-                bytes[0] = ( byte ) 0x80;
-            }
-            else
-            {
-                // We have to compute the complement, and add 1
-                // value = ( ~value ) + 1;
-
-                if ( value >= 0xFFFFFFFFFFFFFF80L )
-                {
-                    bytes = new byte[1];
-                    bytes[0] = ( byte ) value;
-                }
-                else if ( value >= 0xFFFFFFFFFFFF8000L )
-                {
-                    bytes = new byte[2];
-                    bytes[1] = ( byte ) ( value );
-                    bytes[0] = ( byte ) ( value >> 8 );
-                }
-                else if ( value >= 0xFFFFFFFFFF800000L )
-                {
-                    bytes = new byte[3];
-                    bytes[2] = ( byte ) value;
-                    bytes[1] = ( byte ) ( value >> 8 );
-                    bytes[0] = ( byte ) ( value >> 16 );
-                }
-                else if ( value >= 0xFFFFFFFF80000000L )
-                {
-                    bytes = new byte[4];
-                    bytes[3] = ( byte ) value;
-                    bytes[2] = ( byte ) ( value >> 8 );
-                    bytes[1] = ( byte ) ( value >> 16 );
-                    bytes[0] = ( byte ) ( value >> 24 );
-                }
-                else if ( value >= 0xFFFFFF8000000000L )
-                {
-                    bytes = new byte[5];
-                    bytes[4] = ( byte ) value;
-                    bytes[3] = ( byte ) ( value >> 8 );
-                    bytes[2] = ( byte ) ( value >> 16 );
-                    bytes[1] = ( byte ) ( value >> 24 );
-                    bytes[0] = ( byte ) ( value >> 32 );
-                }
-                else if ( value >= 0xFFFF800000000000L )
-                {
-                    bytes = new byte[6];
-                    bytes[5] = ( byte ) value;
-                    bytes[4] = ( byte ) ( value >> 8 );
-                    bytes[3] = ( byte ) ( value >> 16 );
-                    bytes[2] = ( byte ) ( value >> 24 );
-                    bytes[1] = ( byte ) ( value >> 32 );
-                    bytes[0] = ( byte ) ( value >> 40 );
-                }
-                else if ( value >= 0xFF80000000000000L )
-                {
-                    bytes = new byte[7];
-                    bytes[6] = ( byte ) value;
-                    bytes[5] = ( byte ) ( value >> 8 );
-                    bytes[4] = ( byte ) ( value >> 16 );
-                    bytes[3] = ( byte ) ( value >> 24 );
-                    bytes[2] = ( byte ) ( value >> 32 );
-                    bytes[1] = ( byte ) ( value >> 40 );
-                    bytes[0] = ( byte ) ( value >> 48 );
-                }
-                else
-                {
-                    bytes = new byte[8];
-                    bytes[7] = ( byte ) value;
-                    bytes[6] = ( byte ) ( value >> 8 );
-                    bytes[5] = ( byte ) ( value >> 16 );
-                    bytes[4] = ( byte ) ( value >> 24 );
-                    bytes[3] = ( byte ) ( value >> 32 );
-                    bytes[2] = ( byte ) ( value >> 40 );
-                    bytes[1] = ( byte ) ( value >> 48 );
-                    bytes[0] = ( byte ) ( value >> 56 );
-                }
-            }
-        }
-
-        return bytes;
-    }
-
-
-    /**
-     * Encode a String value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param string The String to be encoded. It is supposed to be UTF-8
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, String string ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( UniversalTag.OCTET_STRING.getValue() );
-
-            byte[] value = Asn1StringUtils.getBytesUtf8( string );
-
-            buffer.put( TLV.getBytes( value.length ) );
-
-            if ( value.length != 0 )
-            {
-                buffer.put( value );
-            }
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode a BIT STRING value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param bitString The BitString to be encoded.
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, BitString bitString ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( UniversalTag.BIT_STRING.getValue() );
-
-            // The BitString length. We add one byte for the unused number
-            // of bits
-            byte[] bytes = bitString.getData();
-            int length = bytes.length;
-
-            buffer.put( TLV.getBytes( length ) );
-            buffer.put( bytes );
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode an OctetString value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param bytes The bytes to be encoded
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, byte[] bytes ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( UniversalTag.OCTET_STRING.getValue() );
-
-            if ( ( bytes == null ) || ( bytes.length == 0 ) )
-            {
-                buffer.put( ( byte ) 0 );
-            }
-            else
-            {
-                buffer.put( TLV.getBytes( bytes.length ) );
-                buffer.put( bytes );
-            }
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode an OID value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param oid The OID to be encoded
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, Oid oid ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( UniversalTag.OCTET_STRING.getValue() );
-            buffer.put( TLV.getBytes( oid.getEncodedLength() ) );
-
-            if ( oid.getEncodedLength() != 0 )
-            {
-                oid.writeBytesTo( buffer );
-            }
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode an integer value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param value The integer to be encoded
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, int value ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( UniversalTag.INTEGER.getValue() );
-            buffer.put( ( byte ) getNbBytes( value ) );
-            buffer.put( getBytes( value ) );
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode a long value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param value The long to be encoded
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, long value ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( UniversalTag.INTEGER.getValue() );
-            buffer.put( ( byte ) getNbBytes( value ) );
-            buffer.put( getBytes( value ) );
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode an integer value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param tag The tag if it's not an UNIVERSAL one
-     * @param value The integer to be encoded
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, byte tag, int value ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( tag );
-            buffer.put( ( byte ) getNbBytes( value ) );
-            buffer.put( getBytes( value ) );
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode an enumerated value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param value The integer to be encoded
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encodeEnumerated( ByteBuffer buffer, int value ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            buffer.put( UniversalTag.ENUMERATED.getValue() );
-            buffer.put( TLV.getBytes( getNbBytes( value ) ) );
-            buffer.put( getBytes( value ) );
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Encode a boolean value
-     *
-     * @param buffer The PDU in which the value will be put
-     * @param bool The boolean to be encoded
-     * @throws EncoderException if the PDU in which the value should be encoded is
-     * two small
-     */
-    public static void encode( ByteBuffer buffer, boolean bool ) throws EncoderException
-    {
-        if ( buffer == null )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00003_CANNOT_PUT_PDU_IN_NULL_BUFFER ) );
-        }
-
-        try
-        {
-            if ( bool )
-            {
-                buffer.put( ENCODED_TRUE );
-            }
-            else
-            {
-                buffer.put( ENCODED_FALSE );
-            }
-        }
-        catch ( BufferOverflowException boe )
-        {
-            throw new EncoderException( I18n.err( I18n.ERR_00004_PDU_BUFFER_SIZE_TOO_SMALL ), boe );
-        }
-    }
-
-
-    /**
-     * Return a string representing the Value
-     *
-     * @return A string representing the value
-     */
-    @Override
-    public String toString()
-    {
-        StringBuilder sb = new StringBuilder();
-        sb.append( "DATA" );
-
-        if ( data != null )
-        {
-            sb.append( '[' );
-            sb.append( Asn1StringUtils.dumpBytes( data ) );
-            sb.append( ']' );
-        }
-        else
-        {
-            return "[]";
-        }
-
-        return sb.toString();
-    }
-}
\ No newline at end of file
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoder.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoder.java
deleted file mode 100644
index 2ee8890..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoder.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.util.Strings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Parse and decode a Boolean value.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class BooleanDecoder
-{
-    /** The logger */
-    private static final Logger LOG = LoggerFactory.getLogger( BooleanDecoder.class );
-
-
-    private BooleanDecoder()
-    {
-    }
-
-    /**
-     * Parse a Value containing a byte[] and send back a boolean.
-     *
-     * @param value The Value to parse
-     * @return A boolean.
-     * @throws BooleanDecoderException Thrown if the Value does not contains a boolean
-     */
-    public static boolean parse( BerValue value ) throws BooleanDecoderException
-    {
-        byte[] bytes = value.getData();
-
-        if ( Strings.isEmpty( bytes ) )
-        {
-            throw new BooleanDecoderException( I18n.err( I18n.ERR_00034_0_BYTES_LONG_BOOLEAN ) );
-        }
-
-        if ( bytes.length != 1 )
-        {
-            throw new BooleanDecoderException( I18n.err( I18n.ERR_00035_N_BYTES_LONG_BOOLEAN ) );
-        }
-
-        if ( ( bytes[0] != 0 ) && ( bytes[0] != ( byte ) 0xFF ) )
-        {
-            LOG.warn( "A boolean must be encoded with a 0x00 or a 0xFF value" );
-        }
-
-        return bytes[0] != 0;
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoderException.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoderException.java
deleted file mode 100644
index b761fbd..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/BooleanDecoderException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-/**
- * Thrown when a BooleanDecoder has encountered a failure condition
- * during a decode.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class BooleanDecoderException extends Exception
-{
-    /** Declares the Serial Version Uid */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * Creates a BooleanDecoderException
-     * 
-     * @param message A message with meaning to a human
-     */
-    public BooleanDecoderException( String message )
-    {
-        super( message );
-    }
-
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoder.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoder.java
deleted file mode 100644
index 153d4e5..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoder.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.util.Strings;
-
-
-/**
- * Parse and decode an Integer value.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class IntegerDecoder
-{
-    /** A mask used to get only the necessary bytes */
-    private static final int[] MASK = new int[]
-        { 0x000000FF, 0x0000FFFF, 0x00FFFFFF, 0xFFFFFFFF };
-
-
-    private IntegerDecoder()
-    {
-    }
-
-
-    /**
-     * Parse a byte buffer and send back an integer, controlling that this number
-     * is in a specified interval.
-     *
-     * @param value The Value containing the byte[] to parse
-     * @param min Lowest value allowed, included
-     * @param max Highest value allowed, included
-     * @return An integer
-     * @throws IntegerDecoderException Thrown if the byte[] does not contains an integer
-     */
-    public static int parse( BerValue value, int min, int max ) throws IntegerDecoderException
-    {
-        int result = parseInt( value );
-
-        if ( ( result >= min ) && ( result <= max ) )
-        {
-            return result;
-        }
-        else
-        {
-            throw new IntegerDecoderException( I18n.err( I18n.ERR_00038_VALUE_NOT_IN_RANGE, min, max ) );
-        }
-    }
-
-
-    /**
-     * Parse a byte buffer and send back an integer
-     *
-     * @param value The byte buffer to parse
-     * @return An integer
-     * @throws IntegerDecoderException Thrown if the byte stream does not contains an integer
-     */
-    public static int parse( BerValue value ) throws IntegerDecoderException
-    {
-        return parseInt( value );
-    }
-
-
-    /**
-     * Helper method used to parse the integer. We don't check any minimal or maximal
-     * bound.
-     * An BER encoded int can be either positive or negative. It uses the minimum
-     * number of byts necessary to encode the value. The high order bit gives the
-     * sign of the integer : if it's 1, then it's a negative value, otherwise it's
-     * a positive value. Integer with a high order bit set to 1 but prefixed by a 0x00
-     * are positive. If the integer is negative, then the 2 complement value is
-     * stored<br/>
-     * Here are a few samples :
-     * <ul>
-     * <li>0x02 0x01 0x00 : integer 0</li>
-     * <li>0x02 0x01 0x01 : integer 1</li>
-     * <li>0x02 0x01 0x7F : integer 127</li>
-     * <li>0x02 0x01 0x80 : integer -128</li>
-     * <li>0x02 0x01 0x81 : integer -127</li>
-     * <li>0x02 0x01 0xFF : integer -1</li>
-     * <li>0x02 0x02 0x00 0x80 : integer 128</li>
-     * <li>0x02 0x02 0x00 0x81 : integer 129</li>
-     * <li>0x02 0x02 0x00 0xFF : integer 255</li>
-     * </ul>
-     * and so on...
-     */
-    private static int parseInt( BerValue value ) throws IntegerDecoderException
-    {
-        int result = 0;
-
-        byte[] bytes = value.getData();
-
-        if ( Strings.isEmpty( bytes ) )
-        {
-            throw new IntegerDecoderException( I18n.err( I18n.ERR_00036_0_BYTES_LONG_INTEGER ) );
-        }
-
-        boolean positive = true;
-
-        switch ( bytes.length )
-        {
-            case 5:
-                if ( bytes[0] == 0x00 )
-                {
-                    if ( ( bytes[1] & ( byte ) 0x80 ) != ( byte ) 0x80 )
-                    {
-                        throw new IntegerDecoderException( I18n.err( I18n.ERR_00036_0_BYTES_LONG_INTEGER ) );
-                    }
-
-                    result = bytes[1] & 0x00FF;
-                    result = ( result << 8 ) | ( bytes[2] & 0x00FF );
-                    result = ( result << 8 ) | ( bytes[3] & 0x00FF );
-                    result = ( result << 8 ) | ( bytes[4] & 0x00FF );
-                }
-                else
-                {
-                    throw new IntegerDecoderException( I18n.err( I18n.ERR_00036_0_BYTES_LONG_INTEGER ) );
-                }
-
-                break;
-
-            case 4:
-                if ( bytes[0] == 0x00 )
-                {
-                    result = bytes[1] & 0x00FF;
-                }
-                else
-                {
-                    result = bytes[0] & 0x00FF;
-
-                    if ( ( bytes[0] & ( byte ) 0x80 ) == ( byte ) 0x80 )
-                    {
-                        positive = false;
-                    }
-
-                    result = ( result << 8 ) | ( bytes[1] & 0x00FF );
-                }
-
-                result = ( result << 8 ) | ( bytes[2] & 0x00FF );
-                result = ( result << 8 ) | ( bytes[3] & 0x00FF );
-
-                break;
-
-            case 3:
-                if ( bytes[0] == 0x00 )
-                {
-                    result = bytes[1] & 0x00FF;
-                }
-                else
-                {
-                    result = bytes[0] & 0x00FF;
-
-                    if ( ( bytes[0] & ( byte ) 0x80 ) == ( byte ) 0x80 )
-                    {
-                        positive = false;
-                    }
-
-                    result = ( result << 8 ) | ( bytes[1] & 0x00FF );
-                }
-
-                result = ( result << 8 ) | ( bytes[2] & 0x00FF );
-
-                break;
-
-            case 2:
-                if ( bytes[0] == 0x00 )
-                {
-                    result = bytes[1] & 0x00FF;
-                }
-                else
-                {
-                    result = bytes[0] & 0x00FF;
-
-                    if ( ( bytes[0] & ( byte ) 0x80 ) == ( byte ) 0x80 )
-                    {
-                        positive = false;
-                    }
-
-                    result = ( result << 8 ) | ( bytes[1] & 0x00FF );
-                }
-
-                break;
-
-            case 1:
-                result = ( result << 8 ) | ( bytes[0] & 0x00FF );
-
-                if ( ( bytes[0] & ( byte ) 0x80 ) == ( byte ) 0x80 )
-                {
-                    positive = false;
-                }
-
-                break;
-
-            default:
-                throw new IntegerDecoderException( I18n.err( I18n.ERR_00037_ABOVE_4_BYTES_INTEGER ) );
-        }
-
-        if ( !positive )
-        {
-            result = -( ( ( ~result ) + 1 ) & MASK[bytes.length - 1] );
-        }
-
-        return result;
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoderException.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoderException.java
deleted file mode 100755
index 0b70264..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/IntegerDecoderException.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-/**
- * Thrown when a IntegerDecoder has encountered a failure condition during a
- * decode.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class IntegerDecoderException extends Exception
-{
-    /** Declares the Serial Version Uid */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * Creates a IntegerDecoderException
-     * 
-     * @param message A message with meaning to a human
-     */
-    public IntegerDecoderException( String message )
-    {
-        super( message );
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/LongDecoder.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/LongDecoder.java
deleted file mode 100644
index b2929c4..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/LongDecoder.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import org.apache.directory.api.i18n.I18n;
-
-
-/**
- * Parse and decode a Long value.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class LongDecoder
-{
-    /** A mask used to get only the necessary bytes */
-    private static final long[] MASK = new long[]
-        { 0x00000000000000FFL, 0x000000000000FFFFL, 0x0000000000FFFFFFL, 0x00000000FFFFFFFFL, 0x000000FFFFFFFFFFL,
-            0x0000FFFFFFFFFFFFL, 0x00FFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFL };
-
-
-    private LongDecoder()
-    {
-    }
-
-
-    /**
-     * Parse a byte buffer and send back an long, controlling that this number
-     * is in a specified interval.
-     *
-     * @param value The byte buffer to parse
-     * @param min Lowest value allowed, included
-     * @param max Highest value allowed, included
-     * @return An integer
-     * @throws LongDecoderException Thrown if the byte stream does not contains an integer
-     */
-    public static long parse( BerValue value, long min, long max ) throws LongDecoderException
-    {
-        long result = parseLong( value );
-
-        if ( ( result >= min ) && ( result <= max ) )
-        {
-            return result;
-        }
-        else
-        {
-            throw new LongDecoderException( I18n.err( I18n.ERR_00038_VALUE_NOT_IN_RANGE, min, max ) );
-        }
-    }
-
-
-    /**
-     * Parse a byte buffer and send back an integer
-     *
-     * @param value The byte buffer to parse
-     * @return An integer
-     * @throws LongDecoderException Thrown if the byte stream does not contains an integer
-     */
-    public static long parse( BerValue value ) throws LongDecoderException
-    {
-        return parseLong( value );
-    }
-    
-    
-    /**
-     * Helper method used to parse the long. We don't check any minimal or maximal
-     * bound.
-     */
-    public static long parseLong( BerValue value ) throws LongDecoderException
-    {
-        long result = 0;
-
-        byte[] bytes = value.getData();
-
-        if ( ( bytes == null ) || ( bytes.length == 0 ) )
-        {
-            throw new LongDecoderException( I18n.err( I18n.ERR_00039_0_BYTES_LONG_LONG ) );
-        }
-
-        if ( bytes.length > 8 )
-        {
-            throw new LongDecoderException( I18n.err( I18n.ERR_00039_0_BYTES_LONG_LONG ) );
-        }
-
-        for ( int i = 0; ( i < bytes.length ) && ( i < 9 ); i++ )
-        {
-            result = ( result << 8 ) | ( bytes[i] & 0x00FF );
-        }
-
-        if ( ( bytes[0] & 0x80 ) == 0x80 )
-        {
-            result = -( ( ( ~result ) + 1 ) & MASK[bytes.length - 1] );
-        }
-        
-        return result;
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/LongDecoderException.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/LongDecoderException.java
deleted file mode 100644
index b448a06..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/LongDecoderException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-/**
- * Thrown when a LongDecoder has encountered a failure condition during a
- * decode.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class LongDecoderException extends Exception
-{
-
-    /** Declares the Serial Version Uid */
-    private static final long serialVersionUID = 1L;
-
-
-    /**
-     * Creates a LongDecoderException
-     * 
-     * @param message A message with meaning to a human
-     */
-    public LongDecoderException( String message )
-    {
-        super( message );
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLV.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLV.java
deleted file mode 100644
index 28f350b..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLV.java
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import org.apache.directory.api.asn1.util.Asn1StringUtils;
-
-
-/**
- * This class is used to store Tags, Lengths and Values decoded from a PDU.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class TLV
-{
-    /** The current Tag being processed */
-    private byte tag;
-
-    /** The current Length being processed */
-    private int length;
-
-    /** The number of byte to store the Length being processed */
-    private int lengthNbBytes;
-
-    /** The number of length's bytes currently read */
-    private int lengthBytesRead;
-
-    /** The current Value being processed */
-    private BerValue value;
-
-    /** An identity for the TLV. It store the TLV hashCode */
-    private int id;
-
-    /**
-     * Reference the TLV which contains the current TLV, if any. As the
-     * enclosing TLV of a PDU does not have parent, it can be null in this case.
-     * Otherwise, it must point to a constructed TLV
-     */
-    private TLV parent;
-
-    /**
-     * The expected length of the TLV's elements, if the current TLV is a
-     * constructed TLV.
-     */
-    private int expectedLength;
-
-    /** tag flag for the primitive/constructed bit - 0010 0000 - 0x20 */
-    public static final byte CONSTRUCTED_FLAG = 0x20;
-
-    /** mask to get the type class value */
-    public static final byte TYPE_CLASS_MASK = ( byte ) 0xC0;
-
-    /** value for the universal type class */
-    public static final byte TYPE_CLASS_UNIVERSAL = 0x00;
-
-    /** tag mask for the short tag format - 0001 1111 - 0x1F */
-    public static final int SHORT_MASK = 0x1F;
-
-    /** A mask to get the Length form */
-    public static final int LENGTH_LONG_FORM = 0x0080;
-
-    /** Value of the reserved extension */
-    public static final int LENGTH_EXTENSION_RESERVED = 0x7F;
-
-    /** A mask to get the long form value */
-    public static final int LENGTH_SHORT_MASK = 0x007F;
-
-    /** A speedup for single bytes length */
-    private static final byte[][] ONE_BYTE = new byte[128][];
-
-    // Initialize an array of byte[] used for encoding lengths below 128
-    static
-    {
-        for ( int i = 0; i < 128; i++ )
-        {
-            ONE_BYTE[i] = new byte[1];
-            ONE_BYTE[i][0] = ( byte ) i;
-        }
-    }
-
-
-    /**
-     * Creates a new TLV object.
-     * 
-     * @param id the TLV's id
-     */
-    public TLV( int id )
-    {
-        tag = 0;
-        length = 0;
-        lengthNbBytes = 0;
-        value = new BerValue();
-        this.id = id;
-
-        expectedLength = 0;
-    }
-
-
-    /**
-     * Checks to see if the tag is constructed.
-     * 
-     * @param tag the TLV's tag
-     * @return true if constructed, false if primitive
-     */
-    public static boolean isConstructed( byte tag )
-    {
-        return ( tag & CONSTRUCTED_FLAG ) != 0;
-    }
-
-
-    /**
-     * Checks to see if the current tlv's tag is constructed.
-     * 
-     * @return true if constructed, false if primitive
-     */
-    public boolean isConstructed()
-    {
-        return ( tag & CONSTRUCTED_FLAG ) != 0;
-    }
-
-
-    /**
-     * Checks to see if the tag represented by this Tag is primitive or
-     * constructed.
-     * 
-     * @param tag the tag to be checked
-     * @return true if it is primitive, false if it is constructed
-     */
-    public static boolean isPrimitive( byte tag )
-    {
-        return ( tag & CONSTRUCTED_FLAG ) == 0;
-    }
-
-
-    /**
-     * Tells if the tag is Universal or not
-     * 
-     * @param tag the tag to be checked
-     * @return true if it is primitive, false if it is constructed
-     */
-    public static boolean isUniversal( byte tag )
-    {
-        return ( tag & TYPE_CLASS_MASK ) == TYPE_CLASS_UNIVERSAL;
-    }
-
-
-    /**
-     * Reset the TLV, so it can be reused for the next PDU decoding.
-     */
-    public void reset()
-    {
-        tag = 0;
-        length = 0;
-        lengthNbBytes = 0;
-        value.reset();
-
-        expectedLength = 0;
-    }
-
-
-    /**
-     * @return Returns the tag.
-     */
-    public byte getTag()
-    {
-        return tag;
-    }
-
-
-    /**
-     * Set a tag value for this TLV.
-     * 
-     * @param tag the tag field for this TLV.
-     */
-    public void setTag( byte tag )
-    {
-        this.tag = tag;
-    }
-
-
-    /**
-     * @return Returns the value.
-     */
-    public BerValue getValue()
-    {
-        return value;
-    }
-
-
-    /**
-     * The TLV size is calculated by adding the Tag's size, the Length's size
-     * and the Value's length, if any.
-     * 
-     * @return Returns the size of the TLV.
-     */
-    public int getSize()
-    {
-        return 1 + lengthNbBytes + length;
-    }
-
-
-    /**
-     * Utility function that return the number of bytes necessary to store the
-     * length
-     * 
-     * @param length The length to store in a byte array
-     * @return The number of bytes necessary to store the length.
-     * @see <a href="http://en.wikipedia.org/wiki/X.690#Length_Octets">X.690</a>
-     */
-    public static int getNbBytes( int length )
-    {
-        if ( length >= 0 )
-        {
-            if ( length < 128 )
-            {
-                return 1;
-            }
-            else if ( length < 256 )
-            {
-                return 2;
-            }
-            else if ( length < 65536 )
-            {
-                return 3;
-            }
-            else if ( length < 16777216 )
-            {
-                return 4;
-            }
-            else
-            {
-                return 5;
-            }
-        }
-        else
-        {
-            return 5;
-        }
-    }
-
-
-    /**
-     * Utility function that return a byte array representing the length
-     * 
-     * @param length The length to store in a byte array
-     * @return The byte array representing the length.
-     */
-    public static byte[] getBytes( int length )
-    {
-        if ( length >= 0 )
-        {
-            if ( length < 128 )
-            {
-                return ONE_BYTE[length];
-            }
-            else
-            {
-                byte[] bytes = new byte[getNbBytes( length )];
-
-                if ( length < 256 )
-                {
-                    bytes[0] = ( byte ) 0x81;
-                    bytes[1] = ( byte ) length;
-                }
-                else if ( length < 65536 )
-                {
-                    bytes[0] = ( byte ) 0x82;
-                    bytes[1] = ( byte ) ( length >> 8 );
-                    bytes[2] = ( byte ) ( length & 0x00FF );
-                }
-                else if ( length < 16777216 )
-                {
-                    bytes[0] = ( byte ) 0x83;
-                    bytes[1] = ( byte ) ( length >> 16 );
-                    bytes[2] = ( byte ) ( ( length >> 8 ) & 0x00FF );
-                    bytes[3] = ( byte ) ( length & 0x00FF );
-                }
-                else
-                {
-                    bytes[0] = ( byte ) 0x84;
-                    bytes[1] = ( byte ) ( length >> 24 );
-                    bytes[2] = ( byte ) ( ( length >> 16 ) & 0x00FF );
-                    bytes[3] = ( byte ) ( ( length >> 8 ) & 0x00FF );
-                    bytes[4] = ( byte ) ( length & 0x00FF );
-                }
-
-                return bytes;
-            }
-        }
-        else
-        {
-            byte[] bytes = new byte[getNbBytes( length )];
-
-            bytes[0] = ( byte ) 0x84;
-            bytes[1] = ( byte ) ( length >> 24 );
-            bytes[2] = ( byte ) ( ( length >> 16 ) & 0x00FF );
-            bytes[3] = ( byte ) ( ( length >> 8 ) & 0x00FF );
-            bytes[4] = ( byte ) ( length & 0x00FF );
-
-            return bytes;
-        }
-    }
-
-
-    /**
-     * @return The parent.
-     */
-    public TLV getParent()
-    {
-        return parent;
-    }
-
-
-    /**
-     * @param parent The parent to set.
-     */
-    public void setParent( TLV parent )
-    {
-        this.parent = parent;
-    }
-
-
-    /**
-     * Get the TLV expected length.
-     * 
-     * @return The expectedLength.
-     */
-    public int getExpectedLength()
-    {
-        return expectedLength;
-    }
-
-
-    /**
-     * Set the new expected length of the current TLV.
-     * 
-     * @param expectedLength The expectedLength to set.
-     */
-    public void setExpectedLength( int expectedLength )
-    {
-        this.expectedLength = expectedLength;
-    }
-
-
-    /**
-     * @return The number of bytes necessary to store the TLV's length
-     */
-    public int getLengthNbBytes()
-    {
-        return lengthNbBytes;
-    }
-
-
-    /**
-     * Set the number of bytes we should use to store the TLV's length.
-     * 
-     * @param lengthNbBytes The number of bytes necessary to store the TLV's length
-     */
-    public void setLengthNbBytes( int lengthNbBytes )
-    {
-        this.lengthNbBytes = lengthNbBytes;
-    }
-
-
-    /**
-     * @return the TLV's length
-     */
-    public int getLength()
-    {
-        return length;
-    }
-
-
-    /**
-     * Set the TLV's length
-     *
-     * @param length the TLV's length
-     */
-    public void setLength( int length )
-    {
-        this.length = length;
-    }
-
-
-    /**
-     * @return The currently read TLV's length bytes
-     */
-    public int getLengthBytesRead()
-    {
-        return lengthBytesRead;
-    }
-
-
-    /**
-     * Set the currently read TLV's length bytes.
-     * 
-     * @param lengthBytesRead the currently read TLV's length bytes
-     */
-    public void setLengthBytesRead( int lengthBytesRead )
-    {
-        this.lengthBytesRead = lengthBytesRead;
-    }
-
-
-    /**
-     * Increment the number of bytes read for this TLV
-     *
-     */
-    public void incLengthBytesRead()
-    {
-        lengthBytesRead++;
-    }
-
-
-    /**
-     * @return The TLV's ID
-     */
-    public int getId()
-    {
-        return id;
-    }
-
-
-    /**
-     * Get a String representation of the TLV
-     * 
-     * @return A String
-     */
-    public String toString()
-    {
-
-        StringBuilder sb = new StringBuilder();
-
-        sb.append( "TLV[ " );
-        sb.append( Asn1StringUtils.dumpByte( tag ) ).append( ", " );
-        sb.append( length ).append( ", " );
-        sb.append( value.toString() );
-        sb.append( "]" );
-
-        return sb.toString();
-    }
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLVBerDecoderMBean.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLVBerDecoderMBean.java
deleted file mode 100644
index ce39c42..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLVBerDecoderMBean.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import org.apache.directory.api.asn1.DecoderException;
-
-
-/**
- * A MBean used to get stats on the decoding process.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface TLVBerDecoderMBean
-{
-    /**
-     * Set the number of bytes that can be used to encode the Value length,
-     * including the first byte. Max is 127 if the Length use a definite form,
-     * default is 1
-     * 
-     * @param length the number of byte to use
-     * @throws DecoderException Thrown if the indefinite length is 
-     * allowed or if the length's Length is above 126 bytes
-     */
-    void setMaxLengthLength( int length ) throws DecoderException;
-
-
-    /**
-     * Set the maximum number of bytes that should be used to encode a Tag
-     * label, including the first byte. Default is 1, no maximum
-     * 
-     * @param length The length to use
-     */
-    void setMaxTagLength( int length );
-
-
-    /** Allow indefinite length. */
-    void allowIndefiniteLength();
-
-
-    /** Disallow indefinite length. */
-    void disallowIndefiniteLength();
-
-
-    /**
-     * Get the actual maximum number of bytes that can be used to encode the
-     * Length
-     * 
-     * @return The maximum bytes of the Length
-     */
-    int getMaxLengthLength();
-
-
-    /**
-     * Get the actual maximum number of bytes that can be used to encode the Tag
-     * 
-     * @return The maximum length of the Tag
-     */
-    int getMaxTagLength();
-
-
-    /**
-     * Tell if indefinite length form could be used for Length
-     * 
-     * @return <code>true</code> if the Indefinite form is allowed
-     */
-    boolean isIndefiniteLengthAllowed();
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLVStateEnum.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLVStateEnum.java
deleted file mode 100644
index f1254af..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/TLVStateEnum.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-/**
- * Stores the different states of a PDU parsing.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public enum TLVStateEnum
-{
-    /** Start means that the deconding hasn't read the first byte */
-    TAG_STATE_START,
-
-    /** Pending means that the Type Tag is contained in more that one byte */
-    TAG_STATE_PENDING,
-
-    /** End means that the Type is totally read */
-    TAG_STATE_END,
-
-    /**
-     * Overflow could have two meaning : either there are more than 5 bytes to
-     * encode the value (5 bytes = 5bits + 4*7 bits = 33 bits) or the value that
-     * is represented by those bytes is over MAX_INTEGER
-     */
-    TAG_STATE_OVERFLOW,
-
-    /** Start means that the decoding hasn't read the first byte */
-    LENGTH_STATE_START,
-
-    /** Pending means that the Type length is contained in more that one byte */
-    LENGTH_STATE_PENDING,
-
-    /** End means that the Length is totally read */
-    LENGTH_STATE_END,
-
-    /** Start means that the decoding hasn't read the first byte */
-    VALUE_STATE_START,
-
-    /** Pending means that the Type Value is contained in more that one byte */
-    VALUE_STATE_PENDING,
-
-    /** End means that the Value is totally read */
-    VALUE_STATE_END,
-
-    /** The decoding of a TLV is done */
-    TLV_STATE_DONE,
-
-    /** The decoding of a PDU is done */
-    PDU_DECODED,
-
-    /** The ending state */
-    GRAMMAR_END
-}
diff --git a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/UniversalTag.java b/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/UniversalTag.java
deleted file mode 100644
index ba0d8d1..0000000
--- a/trunk/asn1/ber/src/main/java/org/apache/directory/api/asn1/ber/tlv/UniversalTag.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-/**
- * Enum for ASN.1 UNIVERSAL class tags. The tags values are constructed using
- * the SNACC representation for tags without the primitive/constructed bit. This
- * is done because several bit, octet and character string types can be encoded
- * as primitives or as constructed types to chunk the value out.
- * <p>
- * These tags can have one of the following values:
- * </p>
- * <p>
- * </p>
- * <table border="1" cellspacing="1" width="60%">
- * <tr>
- * <th>Id</th>
- * <th>Usage</th>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 0]</td>
- * <td>reserved for BER</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 1]</td>
- * <td>BOOLEAN</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 2]</td>
- * <td>INTEGER</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 3]</td>
- * <td>BIT STRING</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 4]</td>
- * <td>OCTET STRING</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 5]</td>
- * <td>NULL</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 6]</td>
- * <td>OBJECT IDENTIFIER</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 7]</td>
- * <td>ObjectDescriptor</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 8]</td>
- * <td>EXTERNAL, INSTANCE OF</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 9]</td>
- * <td>REAL</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 10]</td>
- * <td>ENUMERATED</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 11]</td>
- * <td>EMBEDDED PDV</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 12]</td>
- * <td>UTF8String</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 13]</td>
- * <td>RELATIVE-OID</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 14]</td>
- * <td>reserved for future use</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 15]</td>
- * <td>reserved for future use</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 16]</td>
- * <td>SEQUENCE, SEQUENCE OF</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 17]</td>
- * <td>SET, SET OF</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 18]</td>
- * <td>NumericString</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 19]</td>
- * <td>PrintableString</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 20]</td>
- * <td>TeletexString, T61String</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 21]</td>
- * <td>VideotexString</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 22]</td>
- * <td>IA5String</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 23]</td>
- * <td>UTCTime</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 24]</td>
- * <td>GeneralizedTime</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 25]</td>
- * <td>GraphicString</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 26]</td>
- * <td>VisibleString, ISO646String</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 27]</td>
- * <td>GeneralString</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 28]</td>
- * <td>UniversalString</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 29]</td>
- * <td>CHARACTER STRING</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 30]</td>
- * <td>BMPString</td>
- * </tr>
- * <tr>
- * <td>[UNIVERSAL 31]</td>
- * <td>reserved for future use</td>
- * </tr>
- * </table>
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public enum UniversalTag
-{
-    /** value for the tag */
-    RESERVED_0(( byte ) 0),
-
-    /** value for the tag */
-    BOOLEAN(( byte ) 1),
-
-    /** value for the tag */
-    INTEGER(( byte ) 2),
-
-    /** value for the tag */
-    BIT_STRING(( byte ) 3),
-
-    /** value for the tag */
-    OCTET_STRING(( byte ) 4),
-
-    /** value for the tag */
-    NULL(( byte ) 5),
-
-    /** value for the tag */
-    OBJECT_IDENTIFIER(( byte ) 6),
-
-    /** value for the tag */
-    OBJECT_DESCRIPTOR(( byte ) 7),
-
-    /** value for the tag */
-    EXTERNAL_INSTANCE_OF(( byte ) 8),
-
-    /** value for the tag */
-    REAL(( byte ) 9),
-
-    /** value for the tag */
-    ENUMERATED(( byte ) 0x0A),
-
-    /** value for the tag */
-    EMBEDDED_PDV(( byte ) 0x0B),
-
-    /** value for the tag */
-    UTF8_STRING(( byte ) 0x0C),
-
-    /** value for the tag */
-    RELATIVE_OID(( byte ) 0x0D),
-
-    /** value for the tag */
-    RESERVED_14(( byte ) 0x0E),
-
-    /** value for the tag */
-    RESERVED_15(( byte ) 0x0F),
-
-    /** value for the tag */
-    SEQUENCE_SEQUENCE_OF(( byte ) 0x10),
-
-    /** value for the tag */
-    SET_SET_OF(( byte ) 0x11),
-
-    /** value for the tag */
-    NUMERIC_STRING(( byte ) 0x12),
-
-    /** value for the tag */
-    PRINTABLE_STRING(( byte ) 0x13),
-
-    /** value for the tag */
-    TELETEX_STRING(( byte ) 0x14),
-
-    /** value for the tag */
-    VIDEOTEX_STRING(( byte ) 0x15),
-
-    /** value for the tag */
-    IA5_STRING(( byte ) 0x16),
-
-    /** value for the tag */
-    UTC_TIME(( byte ) 0x17),
-
-    /** value for the tag */
-    GENERALIZED_TIME(( byte ) 0x18),
-
-    /** value for the tag */
-    GRAPHIC_STRING(( byte ) 0x19),
-
-    /** value for the tag */
-    VISIBLE_STRING(( byte ) 0x1A),
-
-    /** value for the tag */
-    GENERAL_STRING(( byte ) 0x1B),
-
-    /** value for the tag */
-    UNIVERSAL_STRING(( byte ) 0x1C),
-
-    /** value for the tag */
-    CHARACTER_STRING(( byte ) 0x1D),
-
-    /** value for the tag */
-    BMP_STRING(( byte ) 0x1E),
-
-    /** value for the tag */
-    RESERVED_31(( byte ) 0x1F),
-
-    /** SEQUENCE TAG */
-    SEQUENCE(( byte ) 0x30),
-
-    /** SET TAG */
-    SET(( byte ) 0x31);
-
-    /** The internal value */
-    private byte value;
-
-
-    /**
-     * Creates a new instance of UniversalTag.
-     *
-     * @param value The tag value
-     */
-    private UniversalTag( byte value )
-    {
-        this.value = value;
-    }
-
-
-    /**
-     * @return The UniversalTag value
-     */
-    public byte getValue()
-    {
-        return value;
-    }
-}
diff --git a/trunk/asn1/ber/src/site/site.xml b/trunk/asn1/ber/src/site/site.xml
deleted file mode 100644
index 8f27351..0000000
--- a/trunk/asn1/ber/src/site/site.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!--
-  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-<project name="${project.name}">
-  <body>
-    <menu ref="parent" />
-    <menu ref="reports" />
-  </body>
-</project>
diff --git a/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/LengthTest.java b/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/LengthTest.java
deleted file mode 100644
index 320b0e6..0000000
--- a/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/LengthTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Arrays;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
-
-
-/**
- * This class is used to test the Length class
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-@RunWith(ConcurrentJunitRunner.class)
-@Concurrency()
-public class LengthTest
-{
-
-    /**
-     * Test the getNbBytes method
-     */
-    @Test
-    public void testLengthGetNbBytes()
-    {
-        assertEquals( "1 expected", 1, TLV.getNbBytes( 0 ) );
-        assertEquals( "1 expected", 1, TLV.getNbBytes( 1 ) );
-        assertEquals( "1 expected", 1, TLV.getNbBytes( 127 ) );
-        assertEquals( "2 expected", 2, TLV.getNbBytes( 128 ) );
-        assertEquals( "2 expected", 2, TLV.getNbBytes( 255 ) );
-        assertEquals( "3 expected", 3, TLV.getNbBytes( 256 ) );
-        assertEquals( "3 expected", 3, TLV.getNbBytes( 65535 ) );
-        assertEquals( "4 expected", 4, TLV.getNbBytes( 65536 ) );
-        assertEquals( "4 expected", 4, TLV.getNbBytes( 16777215 ) );
-        assertEquals( "5 expected", 5, TLV.getNbBytes( 16777216 ) );
-        assertEquals( "5 expected", 5, TLV.getNbBytes( 0xFFFFFFFF ) );
-    }
-
-
-    /**
-     * Test the getBytes method
-     */
-    @Test
-    public void testLengthGetBytes()
-    {
-        assertTrue( Arrays.equals( new byte[]
-            { 0x01 }, TLV.getBytes( 1 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { 0x7F }, TLV.getBytes( 127 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { ( byte ) 0x81, ( byte ) 0x80 }, TLV.getBytes( 128 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { ( byte ) 0x81, ( byte ) 0xFF }, TLV.getBytes( 255 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { ( byte ) 0x82, 0x01, 0x00 }, TLV.getBytes( 256 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { ( byte ) 0x82, ( byte ) 0xFF, ( byte ) 0xFF }, TLV.getBytes( 65535 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { ( byte ) 0x83, 0x01, 0x00, 0x00 }, TLV.getBytes( 65536 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { ( byte ) 0x83, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF }, TLV.getBytes( 16777215 ) ) );
-        assertTrue( Arrays.equals( new byte[]
-            { ( byte ) 0x84, 0x01, 0x00, 0x00, 0x00 }, TLV.getBytes( 16777216 ) ) );
-        assertTrue( Arrays
-            .equals( new byte[]
-                { ( byte ) 0x84, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF }, TLV
-                .getBytes( 0xFFFFFFFF ) ) );
-    }
-}
diff --git a/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/PrimitivesTest.java b/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/PrimitivesTest.java
deleted file mode 100644
index c515439..0000000
--- a/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/PrimitivesTest.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
-
-
-/**
- * Test the Primitives
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-@RunWith(ConcurrentJunitRunner.class)
-@Concurrency()
-public class PrimitivesTest
-{
-    /**
-     * Test the Integer Primitive
-     */
-    @Test
-    public void testIntegerPrimitive() throws IntegerDecoderException
-    {
-        BerValue value = new BerValue();
-
-        value.init( 1 );
-        value.setData( new byte[]
-            { 0x00 } ); // res = 0
-        assertEquals( 0, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 1 );
-        value.setData( new byte[]
-            { 0x01 } ); // res = 1
-        assertEquals( 1, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 1 );
-        value.setData( new byte[]
-            { ( byte ) 0xFF } ); // res = 255
-        assertEquals( -1, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { ( byte ) 0x00, ( byte ) 0xFF } ); // res = 255
-        assertEquals( 255, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { 0x00, 0x01 } ); // res = 1
-        assertEquals( 1, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { 0x01, 0x00 } ); // res = 256
-        assertEquals( 256, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { 0x01, 0x01 } ); // res = 257
-        assertEquals( 257, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { 0x01, ( byte ) 0xFF } ); // res = 511
-        assertEquals( 511, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { 0x02, 0x00 } ); // res = 512
-        assertEquals( 512, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { 0x7F, ( byte ) 0xFF } ); // res = 32767
-        assertEquals( 32767, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { ( byte ) 0x80, 0x00 } ); // res = -32768
-        assertEquals( -32768, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 2 );
-        value.setData( new byte[]
-            { ( byte ) 0xFF, ( byte ) 0xFF } ); // res = -65535
-        assertEquals( -1, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 3 );
-        value.setData( new byte[]
-            { 0x00, ( byte ) 0xFF, ( byte ) 0xFF } ); // res = 65535
-        assertEquals( 65535, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 3 );
-        // res = 65536
-        value.setData( new byte[]
-            { 0x01, 0x00, 0x00 } );
-        assertEquals( 65536, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 3 );
-        // res = 8388607
-        value.setData( new byte[]
-            { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF } );
-        assertEquals( 8388607, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 3 );
-        // res = -8388608
-        value.setData( new byte[]
-            { ( byte ) 0x80, ( byte ) 0x00, ( byte ) 0x00 } );
-        assertEquals( -8388608, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 3 );
-        // res = -1
-        value.setData( new byte[]
-            { ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );
-        assertEquals( -1, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 4 );
-        // res = 16777215
-        value.setData( new byte[]
-            { 0x00, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );
-        assertEquals( 16777215, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 4 );
-        // res = 2^31 - 1 = MaxInt
-        value.setData( new byte[]
-            { ( byte ) 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );
-        assertEquals( Integer.MAX_VALUE, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 4 );
-        // res = 2^31 = MinInt
-        value.setData( new byte[]
-            { ( byte ) 0x80, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00 } );
-        assertEquals( Integer.MIN_VALUE, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 4 );
-        // res = -1
-        value.setData( new byte[]
-            { ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );
-        assertEquals( -1, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 5 );
-        // res = 2^31 = MinInt
-        value.setData( new byte[]
-            { 0x00, ( byte ) 0x80, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00 } );
-        assertEquals( Integer.MIN_VALUE, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        value.init( 5 );
-        // res = 2^31 = MinInt
-        value.setData( new byte[]
-            { 0x00, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF } );
-        assertEquals( -1, IntegerDecoder.parse( value ) );
-        value.reset();
-
-        try
-        {
-            value.init( 5 );
-            // res = 2^31 = MinInt
-            value.setData( new byte[]
-                { 0x00, ( byte ) 0x7F, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00 } ); // res
-            IntegerDecoder.parse( value );
-            fail();
-        }
-        catch ( IntegerDecoderException ide )
-        {
-            // Expected
-        }
-    }
-} // end class TLVTagDecoderTest
diff --git a/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/ValueTest.java b/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/ValueTest.java
deleted file mode 100644
index 7b860e5..0000000
--- a/trunk/asn1/ber/src/test/java/org/apache/directory/api/asn1/ber/tlv/ValueTest.java
+++ /dev/null
@@ -1,793 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.asn1.ber.tlv;
-
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.math.BigInteger;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-
-import org.apache.directory.api.asn1.EncoderException;
-import org.apache.directory.api.asn1.util.Asn1StringUtils;
-import org.apache.directory.api.asn1.util.BitString;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
-
-
-
-/**
- * This class is used to test the Value class
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-@RunWith(ConcurrentJunitRunner.class)
-@Concurrency()
-public class ValueTest
-{
-
-    /**
-     * Test the getNbBytes method for an int value
-     */
-    @Test
-    public void testValueIntGetNbBytes()
-    {
-        assertEquals( 1, BerValue.getNbBytes( 0x00000000 ) );
-        assertEquals( 1, BerValue.getNbBytes( 0x00000001 ) );
-        assertEquals( 2, BerValue.getNbBytes( 0x000000FF ) );
-        assertEquals( 2, BerValue.getNbBytes( 0x00000100 ) );
-        assertEquals( 3, BerValue.getNbBytes( 0x0000FFFF ) );
-        assertEquals( 3, BerValue.getNbBytes( 0x00010000 ) );
-        assertEquals( 4, BerValue.getNbBytes( 0x00FFFFFF ) );
-        assertEquals( 4, BerValue.getNbBytes( 0x01000000 ) );
-        assertEquals( 1, BerValue.getNbBytes( -1 ) );
-        assertEquals( 4, BerValue.getNbBytes( 0x7FFFFFFF ) );
-        assertEquals( 1, BerValue.getNbBytes( 0xFFFFFFFF ) );
-    }
-
-
-    /**
-     * Test the getNbBytes method for a long value
-     */
-    @Test
-    public void testValueLongGetNbBytes()
-    {
-        assertEquals( 1, BerValue.getNbBytes( 0x0000000000000000L ) );
-        assertEquals( 1, BerValue.getNbBytes( 0x0000000000000001L ) );
-        assertEquals( 2, BerValue.getNbBytes( 0x00000000000000FFL ) );
-        assertEquals( 2, BerValue.getNbBytes( 0x0000000000000100L ) );
-        assertEquals( 3, BerValue.getNbBytes( 0x000000000000FFFFL ) );
-        assertEquals( 3, BerValue.getNbBytes( 0x0000000000010000L ) );
-        assertEquals( 4, BerValue.getNbBytes( 0x0000000000FFFFFFL ) );
-        assertEquals( 4, BerValue.getNbBytes( 0x0000000001000000L ) );
-        assertEquals( 5, BerValue.getNbBytes( 0x00000000FFFFFFFFL ) );
-        assertEquals( 5, BerValue.getNbBytes( 0x0000000100000000L ) );
-        assertEquals( 6, BerValue.getNbBytes( 0x000000FFFFFFFFFFL ) );
-        assertEquals( 6, BerValue.getNbBytes( 0x0000010000000000L ) );
-        assertEquals( 7, BerValue.getNbBytes( 0x0000FFFFFFFFFFFFL ) );
-        assertEquals( 7, BerValue.getNbBytes( 0x0001000000000000L ) );
-        assertEquals( 8, BerValue.getNbBytes( 0x00FFFFFFFFFFFFFFL ) );
-        assertEquals( 8, BerValue.getNbBytes( 0x0100000000000000L ) );
-        assertEquals( 1, BerValue.getNbBytes( -1L ) );
-        assertEquals( 8, BerValue.getNbBytes( 0x7FFFFFFFFFFFFFFFL ) );
-        assertEquals( 1, BerValue.getNbBytes( 0xFFFFFFFFFFFFFFFFL ) );
-    }
-
-
-    /**
-     * Test the generation of an Integer Value
-     *
-     */
-    @Test
-    public void testGetBytesInt()
-    {
-        int[] positiveValues = new int[]
-             {
-                 0x00, 0x01, 0x7F,
-                 0x0080, 0x0081, 0x7FFF,
-                 0x008000, 0x008001, 0x7FFFFF,
-                 0x00800000, 0x00800001, 0x7FFFFFFF
-             };
-
-         byte[][] expectedPositiveBytes = new byte[][]
-             {
-                 // 1 byte
-                 { 0x00 }, 
-                 { 0x01 }, 
-                 { 0x7F },
-                 
-                 // 2 bytes
-                { 0x00, ( byte ) 0x80 },
-                { 0x00, ( byte ) 0x81 },
-                { 0x7F, ( byte ) 0xFF },
-
-                 // 3 bytes
-                { 0x00, ( byte ) 0x80, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF },
-
-                 // 4 bytes
-                { 0x00, ( byte ) 0x80, 0x00, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x00, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF }
-             };
-
-         int[] negativeValues = new int[]
-             {
-                 // 1 byte
-                 -1, -127, -128,  
-                             
-                 // 2 bytes
-                 -129, -255, -256, -257, -32767, -32768,
-
-                 // 3 bytes
-                 -32769, -65535, -65536, -65537, -8388607, -8388608,
-
-                 // 4 bytes
-                 -8388609, -16777215, -16777216, -16777217, -2147483647, -2147483648,
-             };
-
-         byte[][] expectedNegativeBytes = new byte[][]
-             {
-                 // 1 byte
-                { ( byte ) 0xFF },
-                { ( byte ) 0x81 },
-                { ( byte ) 0x80 },
-     
-                 // 2 bytes
-                { ( byte ) 0xFF, 0x7F },
-                { ( byte ) 0xFF, 0x01 },
-                { ( byte ) 0xFF, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x01 },
-                { ( byte ) 0x80, 0x00 },
-     
-                 // 3 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00 },
-     
-                 // 4 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00 }
-             };
-
-         int i = 0;
-         
-         for ( int value:positiveValues )
-         {
-             byte[] bb = BerValue.getBytes( value );
-             assertEquals( expectedPositiveBytes[i].length, bb.length );
-             assertTrue( Arrays.equals( expectedPositiveBytes[i], bb ) );
-             i++;
-         }
-         
-        i = 0;
-         
-         for ( int value:negativeValues )
-         {
-             byte[] bb = BerValue.getBytes( value );
-             assertEquals( expectedNegativeBytes[i].length, bb.length );
-             assertTrue( Arrays.equals( expectedNegativeBytes[i], bb ) );
-             i++;
-         }
-
-        byte[] bb = BerValue.getBytes( 0x00000000 );
-        assertEquals( 1, bb.length );
-        assertEquals( 0, bb[0] );
-
-        bb = BerValue.getBytes( 0x00000001 );
-        assertEquals( 1, bb.length );
-        assertEquals( 1, bb[0] );
-
-        bb = BerValue.getBytes( 0x0000007F );
-        assertEquals( 1, bb.length );
-        assertEquals( 0x7F, bb[0] );
-
-        bb = BerValue.getBytes( 0x00000080 );
-        assertEquals( 2, bb.length );
-        assertEquals( 0x00, bb[0] );
-        assertEquals( ( byte ) 0x80, bb[1] );
-
-        bb = BerValue.getBytes( 0x000000FF );
-        assertEquals( 2, bb.length );
-        assertEquals( 0x00, bb[0] );
-        assertEquals( ( byte ) 0xFF, bb[1] );
-
-        bb = BerValue.getBytes( 0x00007FFF );
-        assertEquals( 2, bb.length );
-        assertEquals( 0x7F, bb[0] );
-        assertEquals( ( byte ) 0xFF, bb[1] );
-
-        bb = BerValue.getBytes( 0x00008000 );
-        assertEquals( 3, bb.length );
-        assertEquals( 0x00, bb[0] );
-        assertEquals( ( byte ) 0x80, bb[1] );
-        assertEquals( 0x00, bb[2] );
-
-        bb = BerValue.getBytes( 0x0000FFFF );
-        assertEquals( 3, bb.length );
-        assertEquals( 0x00, bb[0] );
-        assertEquals( ( byte ) 0xFF, bb[1] );
-        assertEquals( ( byte ) 0xFF, bb[2] );
-
-        bb = BerValue.getBytes( 0x00010000 );
-        assertEquals( 3, bb.length );
-        assertEquals( 0x01, bb[0] );
-        assertEquals( 0x00, bb[1] );
-        assertEquals( 0x00, bb[2] );
-
-        bb = BerValue.getBytes( 0x007FFFFF );
-        assertEquals( 3, bb.length );
-        assertEquals( 0x7F, bb[0] );
-        assertEquals( ( byte ) 0xFF, bb[1] );
-        assertEquals( ( byte ) 0xFF, bb[2] );
-
-        bb = BerValue.getBytes( 0x00800000 );
-        assertEquals( 4, bb.length );
-        assertEquals( 0x00, bb[0] );
-        assertEquals( ( byte ) 0x80, bb[1] );
-        assertEquals( 0x00, bb[2] );
-        assertEquals( 0x00, bb[3] );
-
-        bb = BerValue.getBytes( 0x00FFFFFF );
-        assertEquals( 4, bb.length );
-        assertEquals( 0x00, bb[0] );
-        assertEquals( ( byte ) 0xFF, bb[1] );
-        assertEquals( ( byte ) 0xFF, bb[2] );
-        assertEquals( ( byte ) 0xFF, bb[3] );
-
-        bb = BerValue.getBytes( 0x01000000 );
-        assertEquals( 4, bb.length );
-        assertEquals( 0x01, bb[0] );
-        assertEquals( 0x00, bb[1] );
-        assertEquals( 0x00, bb[2] );
-        assertEquals( 0x00, bb[3] );
-
-        bb = BerValue.getBytes( 0x7FFFFFFF );
-        assertEquals( 4, bb.length );
-        assertEquals( 0x7F, bb[0] );
-        assertEquals( ( byte ) 0xFF, bb[1] );
-        assertEquals( ( byte ) 0xFF, bb[2] );
-        assertEquals( ( byte ) 0xFF, bb[3] );
-
-        bb = BerValue.getBytes( 0x80000000 );
-        assertEquals( 4, bb.length );
-        assertEquals( ( byte ) 0x80, bb[0] );
-        assertEquals( ( byte ) 0x00, bb[1] );
-        assertEquals( ( byte ) 0x00, bb[2] );
-        assertEquals( ( byte ) 0x00, bb[3] );
-        
-        bb = BerValue.getBytes( 0xFFFFFFFF );
-        assertEquals( 1, bb.length );
-        assertEquals( ( byte ) 0xFF, bb[0] );
-        
-        bb = BerValue.getBytes( 0xFFFFFF80 );
-        assertEquals( 1, bb.length );
-        assertEquals( ( byte ) 0x80, bb[0] );
-
-        bb = BerValue.getBytes( 0xFFFFFF7F );
-        assertEquals( 2, bb.length );
-        assertEquals( ( byte ) 0xFF, bb[0] );
-        assertEquals( 0x7F, bb[1] );
-
-        bb = BerValue.getBytes( 0xFFFFFF00 );
-        assertEquals( 2, bb.length );
-        assertEquals( ( byte ) 0xFF, bb[0] );
-        assertEquals( 0x00, bb[1] );
-
-        bb = BerValue.getBytes( 0xFFFF8000 );
-        assertEquals( 2, bb.length );
-        assertEquals( ( byte ) 0x80, bb[0] );
-        assertEquals( 0x00, bb[1] );
-
-        bb = BerValue.getBytes( 0xFFFF7FFF );
-        assertEquals( 3, bb.length );
-        assertEquals( ( byte ) 0xFF, bb[0] );
-        assertEquals( 0x7F, bb[1] );
-        assertEquals( ( byte ) 0xFF, bb[2] );
-
-        bb = BerValue.getBytes( 0xFFFF0000 );
-        assertEquals( 3, bb.length );
-        assertEquals( ( byte ) 0xFF, bb[0] );
-        assertEquals( 0x00, bb[1] );
-        assertEquals( 0x00, bb[2] );
-
-        bb = BerValue.getBytes( 0xFF800000 );
-        assertEquals( 3, bb.length );
-        assertEquals( ( byte ) 0x80, bb[0] );
-        assertEquals( 0x00, bb[1] );
-        assertEquals( 0x00, bb[2] );
-
-        bb = BerValue.getBytes( 0xFF7FFFFF );
-        assertEquals( 4, bb.length );
-        assertEquals( ( byte ) 0xFF, bb[0] );
-        assertEquals( 0x7F, bb[1] );
-        assertEquals( ( byte ) 0xFF, bb[2] );
-        assertEquals( ( byte ) 0xFF, bb[3] );
-
-        bb = BerValue.getBytes( 0xFF000000 );
-        assertEquals( 4, bb.length );
-        assertEquals( ( byte ) 0xFF, bb[0] );
-        assertEquals( 0x00, bb[1] );
-        assertEquals( 0x00, bb[2] );
-        assertEquals( 0x00, bb[3] );
-
-        bb = BerValue.getBytes( 0x80000000 );
-        assertEquals( 4, bb.length );
-        assertEquals( ( byte ) 0x80, bb[0] );
-        assertEquals( 0x00, bb[1] );
-        assertEquals( 0x00, bb[2] );
-        assertEquals( 0x00, bb[3] );
-    }
-
-
-    /**
-     * Test the generation of a Long Value
-     *
-     */
-    @Test
-    public void testGetBytesLong()
-    {
-        long[] positiveValues = new long[]
-            {
-                0x00L, 0x01L, 0x7FL,
-                0x0080L, 0x0081L, 0x7FFFL,
-                0x008000L, 0x008001L, 0x7FFFFFL,
-                0x00800000L, 0x00800001L, 0x7FFFFFFFL,
-                0x0080000000L, 0x0080000001L, 0x7FFFFFFFFFL,
-                0x008000000000L, 0x008000000001L, 0x7FFFFFFFFFFFL,
-                0x00800000000000L, 0x00800000000001L, 0x7FFFFFFFFFFFFFL,
-                0x0080000000000000L, 0x0080000000000001L, 0x7FFFFFFFFFFFFFFFL
-            };
-        
-        byte[][] expectedPositiveBytes = new byte[][]
-            {
-                // 1 byte
-                { 0x00 }, 
-                { 0x01 }, 
-                { 0x7F },
-                
-                // 2 bytes
-                { 0x00, ( byte ) 0x80 },
-                { 0x00, ( byte ) 0x81 },
-                { 0x7F, ( byte ) 0xFF },
-
-                // 3 bytes
-                { 0x00, ( byte ) 0x80, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF },
-
-                // 4 bytes
-                { 0x00, ( byte ) 0x80, 0x00, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x00, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-
-                // 5 bytes
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-
-                // 6 bytes
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x00, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-
-                // 7 bytes
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-
-                // 8 bytes
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-                { 0x00, ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,
-                    ( byte ) 0xFF }
-            };
-
-        long[] negativeValues = new long[]
-            {
-                // 1 byte
-                -1L, -127L, -128L,  
-                            
-                // 2 bytes
-                -129L, -255L, -256L, -257L, -32767L, -32768L,
-
-                // 3 bytes
-                -32769L, -65535L, -65536L, -65537L, -8388607L, -8388608L,
-
-                // 4 bytes
-                -8388609L, -16777215L, -16777216L, -16777217L, -2147483647L, -2147483648L,
-
-                // 5 bytes
-                -2147483649L, -4294967295L, -4294967296L, -4294967297L, -549755813887L, -549755813888L,
-
-                // 6 bytes
-                -549755813889L, -1099511627775L, -1099511627776L, 
-                -1099511627777L, -140737488355327L, -140737488355328L,
-
-                // 7 bytes
-                -140737488355329L, -281474976710655L, -281474976710656L,
-                -281474976710657L, -36028797018963967L, -36028797018963968L,
-                
-                // 8 bytes
-                -36028797018963969L, -72057594037927935L, -72057594037927936L,
-                -72057594037927937L, -9223372036854775807L, -9223372036854775808L
-            };
-        
-        byte[][] expectedNegativeBytes = new byte[][]
-            {
-                // 1 byte
-                { ( byte ) 0xFF },
-                { ( byte ) 0x81 },
-                { ( byte ) 0x80 },
-    
-                // 2 bytes
-                { ( byte ) 0xFF, 0x7F },
-                { ( byte ) 0xFF, 0x01 },
-                { ( byte ) 0xFF, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x01 },
-                { ( byte ) 0x80, 0x00 },
-    
-                // 3 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00 },
-    
-                // 4 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00 },
-    
-                // 5 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00 },
-    
-                // 6 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 },
-    
-                // 7 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,
-                    ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-    
-                // 8 bytes
-                { ( byte ) 0xFF, 0x7F, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,
-                    ( byte ) 0xFF },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-                { ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,
-                    ( byte ) 0xFF, ( byte ) 0xFF },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 },
-                { ( byte ) 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
-            };
-
-        int i = 0;
-        
-        for ( long value:positiveValues )
-        {
-            byte[] bb = BerValue.getBytes( value );
-            assertEquals( expectedPositiveBytes[i].length, bb.length );
-            assertTrue( Arrays.equals( expectedPositiveBytes[i], bb ) );
-            i++;
-        }
-        
-        i = 0;
-        
-        for ( long value:negativeValues )
-        {
-            byte[] bb = BerValue.getBytes( value );
-            assertEquals( expectedNegativeBytes[i].length, bb.length );
-            assertTrue( Arrays.equals( expectedNegativeBytes[i], bb ) );
-            i++;
-        }
-    }
-
-
-    @Test
-    public void testEncodeInt2Bytes()
-    {
-        byte[] encoded = BerValue.getBytes( 128 );
-
-        assertEquals( 0x00, encoded[0] );
-        assertEquals( ( byte ) 0x80, encoded[1] );
-
-        encoded = BerValue.getBytes( -27066 );
-
-        assertEquals( ( byte ) 0x96, encoded[0] );
-        assertEquals( 0x46, encoded[1] );
-
-    }
-
-
-    @Test
-    public void testEncodeInt3Bytes()
-    {
-
-        byte[] encoded = BerValue.getBytes( 32787 );
-
-        assertEquals( 0x00, encoded[0] );
-        assertEquals( ( byte ) 0x80, encoded[1] );
-        assertEquals( ( byte ) 0x13, encoded[2] );
-    }
-
-
-    @Test
-    public void testEncodeInt()
-    {
-        byte[] encoded = null;
-        int[] testedInt = new int[]
-            { 
-                Integer.MIN_VALUE, 
-                -2147483647, 
-                -16777216, 
-                -16777215, 
-                -8388608, 
-                -8388607, 
-                -65536, 
-                -65535, 
-                -32768, 
-                -32767,
-                -256, 
-                -255, 
-                -128, 
-                -127, 
-                -1, 
-                0, 
-                1, 
-                127, 
-                128, 
-                255, 
-                256, 
-                32767, 
-                32768, 
-                65535, 
-                65536, 
-                8388607, 
-                8388608,
-                16777215, 
-                16777216, 
-                Integer.MAX_VALUE };
-
-        for ( int i:testedInt )
-        {
-            encoded = BerValue.getBytes( i );
-
-            int value = new BigInteger( encoded ).intValue();
-
-            assertEquals( i, value );
-        }
-    }
-
-
-    /**
-     * Test the decoding of integer values
-     */
-    @Test
-    public void testDecodeInt() throws Exception
-    {
-        byte[] encoded = null;
-        int[] testedInt = new int[]
-            { 
-                Integer.MIN_VALUE, 
-                -2147483647, 
-                -16777216, 
-                -16777215, 
-                -8388608, 
-                -8388607, 
-                -65536, 
-                -65535, 
-                -32768, 
-                -32767,
-                -256, 
-                -255, 
-                -128, 
-                -127, 
-                -1, 0, 
-                1, 
-                127, 
-                128, 
-                255, 
-                256, 
-                32767, 
-                32768, 
-                65535, 
-                65536, 
-                8388607, 
-                8388608,
-                16777215, 
-                16777216, 
-                Integer.MAX_VALUE };
-
-        for ( int i:testedInt )
-        {
-            encoded = new BigInteger( Integer.toString( i ) ).toByteArray();
-
-            int value = IntegerDecoder.parse( new BerValue( encoded ) );
-
-            assertEquals( i, value );
-        }
-    }
-    
-
-
-    /**
-     * Test the decoding of long values
-     */
-    @Test
-    public void testDecodeLong() throws Exception
-    {
-        byte[] encoded = null;
-        long[] testedLong = new long[]
-            { 
-                Long.MIN_VALUE, 
-                -9223372036854775808L,
-                -9223372036854775807L,
-                -72057594037927937L,
-                -72057594037927936L,
-                -72057594037927935L,
-                -36028797018963969L,
-                -36028797018963968L,
-                -36028797018963967L,
-                -281474976710657L,
-                -281474976710656L,
-                -281474976710655L,
-                -140737488355329L,
-                -140737488355328L,
-                -140737488355327L,
-                -1099511627777L,
-                -1099511627776L,
-                -1099511627775L,
-                -549755813889L,
-                -549755813888L,
-                -549755813887L,
-                -4294967297L,
-                -4294967296L,
-                -4294967295L,
-                -2147483649L,
-                -2147483648L,
-                -2147483647L, 
-                -16777216L, 
-                -16777215L, 
-                -8388608L, 
-                -8388607L, 
-                -65536L, 
-                -65535L, 
-                -32769L,
-                -32768L, 
-                -32767L,
-                -257L,
-                -256L, 
-                -255L, 
-                -129L,
-                -128L, 
-                -127L, 
-                -1L, 
-                0L, 
-                1L, 
-                127L, 
-                128L, 
-                255L, 
-                256L, 
-                32767L, 
-                32768L, 
-                32769L, 
-                65535L, 
-                65536L, 
-                8388607L, 
-                8388608L,
-                8388609L,
-                2147483647L,
-                2147483648L,
-                2147483649L,
-                549755813887L,
-                549755813888L,
-                549755813889L,
-                140737488355327L,
-                140737488355328L,
-                140737488355329L,
-                36028797018963967L,
-                36028797018963967L,
-                36028797018963967L,
-                Long.MAX_VALUE };
-
-        for ( long i:testedLong )
-        {
-            encoded = new BigInteger( Long.toString( i ) ).toByteArray();
-
-            long value = LongDecoder.parse( new BerValue( encoded ) );
-
-            assertEquals( i, value );
-        }
-    }
-    
-
-
-    @Test
-    public void testNewByteArrayValue()
-    {
-        byte[] bb = new byte[]
-            { 0x01, ( byte ) 0xFF };
-
-        BerValue v = new BerValue( bb );
-        byte[] vv = v.getData();
-
-        assertEquals( 0x01, vv[0] );
-        assertEquals( ( byte ) 0xFF, vv[1] );
-
-        bb[0] = 0x00;
-        assertEquals( 0x01, vv[0] );
-    }
-
-    
-    @Test
-    public void testEncodeBitString()
-    {
-        BitString bs = new BitString( 10 );
-        bs.setBit( 9 );
-        
-        ByteBuffer buffer = ByteBuffer.allocate( 5 );
-        
-        try
-        {
-            BerValue.encode( buffer, bs );
-        }
-        catch ( EncoderException ee )
-        {
-            fail();
-        }
-        
-        assertEquals( "0x03 0x03 0x06 0x00 0x40 ", Asn1StringUtils.dumpBytes( buffer.array() )  );
-    }
-}
-
diff --git a/trunk/asn1/pom.xml b/trunk/asn1/pom.xml
deleted file mode 100644
index 440e995..0000000
--- a/trunk/asn1/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!-- $Rev:  $ $Date:  $ -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.directory.api</groupId>
-    <artifactId>api-parent</artifactId>
-    <version>1.0.0-M32</version>
-  </parent>
-  
-  <artifactId>api-asn1-parent</artifactId>
-  <name>Apache Directory API ASN.1 Parent</name>
-  <inceptionYear>2003</inceptionYear>
-  <packaging>pom</packaging>
-
-  <modules>
-    <module>api</module>
-    <module>ber</module>
-  </modules>
-</project>
diff --git a/trunk/asn1/src/site/site.xml b/trunk/asn1/src/site/site.xml
deleted file mode 100644
index b6ec180..0000000
--- a/trunk/asn1/src/site/site.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!--
-  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-<project name="${project.name}">
-  <body>
-    <menu ref="parent" />
-    <menu ref="modules" />
-    <menu ref="reports" />
-  </body>
-</project>
diff --git a/trunk/distribution/pom.xml b/trunk/distribution/pom.xml
deleted file mode 100644
index a9378c8..0000000
--- a/trunk/distribution/pom.xml
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.directory.api</groupId>
-    <artifactId>api-parent</artifactId>
-    <version>1.0.0-M32</version>
-  </parent>
-  
-  <artifactId>apache-ldap-api</artifactId>
-  <name>Apache Directory LDAP API Distribution</name>
-  <packaging>pom</packaging>
-
-  <dependencies>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-asn1-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-i18n</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-client-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-extras-aci</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-model</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-schema-converter</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-schema-data</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-util</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-all</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>antlr</groupId>
-      <artifactId>antlr</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-collections</groupId>
-      <artifactId>commons-collections</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-    </dependency>
-  </dependencies>
-
-
-  <profiles>
-    <profile>
-      <id>apache-release</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-install-plugin</artifactId>
-            <configuration>
-              <createChecksum>true</createChecksum>
-            </configuration>
-          </plugin> 
-
-          <plugin>
-            <artifactId>maven-dependency-plugin</artifactId>
-            <executions>
-              <!-- Package additional jars that are no runtime dependencies -->
-              <execution>
-                <id>additional-jars</id>
-                <phase>package</phase>
-                <goals>
-                  <goal>copy</goal>
-                </goals>
-                <configuration>
-                  <outputDirectory>${project.build.directory}/additional-jars</outputDirectory>
-                  <artifactItems>
-                    <artifactItem>
-                      <groupId>org.slf4j</groupId>
-                      <artifactId>slf4j-log4j12</artifactId>
-                    </artifactItem>
-                    
-                    <artifactItem>
-                      <groupId>org.slf4j</groupId>
-                      <artifactId>slf4j-api</artifactId>
-                    </artifactItem>
-                    
-                    <artifactItem>
-                      <groupId>antlr</groupId>
-                      <artifactId>antlr</artifactId>
-                    </artifactItem>
-                    
-                    <artifactItem>
-                      <groupId>commons-collections</groupId>
-                      <artifactId>commons-collections</artifactId>
-                    </artifactItem>
-                    
-                    <artifactItem>
-                      <groupId>log4j</groupId>
-                      <artifactId>log4j</artifactId>
-                    </artifactItem>
-                  </artifactItems>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-
-          <plugin>
-            <artifactId>maven-assembly-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>package</id>
-                <phase>package</phase>
-                <configuration>
-                  <tarLongFileMode>gnu</tarLongFileMode>
-                  <descriptors>
-                    <descriptor>src/main/assembly/bin.xml</descriptor>
-                    <descriptor>src/main/assembly/src.xml</descriptor>
-                  </descriptors>
-                </configuration>
-                <goals>
-                  <goal>single</goal>
-                </goals>
-              </execution>
-
-              <execution>
-                <id>anon</id>
-                <phase>package</phase>
-                <configuration>
-                  <tarLongFileMode>gnu</tarLongFileMode>
-                  <descriptors>
-                    <descriptor>src/main/assembly/anon.xml</descriptor>
-                  </descriptors>
-                  <archive>
-                    <manifest>
-                      <mainClass>org.apache.directory.ldap.client.api.LdifAnonymizer</mainClass>
-                    </manifest>
-                  </archive>
-                  <finalName>anon-${project.version}.jar</finalName>
-                </configuration>
-                <goals>
-                  <goal>single</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-
-          <plugin>
-            <groupId>org.apache.geronimo.genesis.plugins</groupId>
-            <artifactId>tools-maven-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>verify-legal-files</id>
-                <phase>verify</phase>
-                <goals>
-                  <goal>verify-legal-files</goal>
-                </goals>
-                <configuration>
-                  <!-- avoid false positive, as we add a '-bin' or '-src' to the base directory -->
-                  <strict>false</strict>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-gpg-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>sign-artifacts</id>
-                <phase>verify</phase>
-                <goals>
-                  <goal>sign</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-</project>
diff --git a/trunk/distribution/src/main/assembly/anon.xml b/trunk/distribution/src/main/assembly/anon.xml
deleted file mode 100644
index 17ef68d..0000000
--- a/trunk/distribution/src/main/assembly/anon.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!-- $Rev:  $ $Date:  $ -->
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>anon</id>
-
-  <formats>
-    <format>jar</format>
-  </formats>
-
-  <baseDirectory>anon-${project-version}.jar</baseDirectory>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <!-- The LDAP API dependencies -->
-        <include>org.apache.directory.api:api-asn1-api:jar:${project.version}</include>
-        <include>org.apache.directory.api:api-i18n:jar:${project.version}</include>
-        <include>org.apache.directory.api:api-ldap-client-api:jar:${project.version}</include>
-        <include>org.apache.directory.api:api-ldap-extras-aci:jar:${project.version}</include>
-        <include>org.apache.directory.api:api-ldap-model:jar:${project.version}</include>
-        <include>org.apache.directory.api:api-ldap-schema-converter:jar:${project.version}</include>
-        <include>org.apache.directory.api:api-ldap-schema-data:jar:${project.version}</include>
-        <include>org.apache.directory.api:api-util:jar:${project.version}</include>
-
-        <!-- The external dependencies -->
-        <include>antlr:antlr:jar:${antlr.version}</include>
-        <include>commons-collections:commons-collections:jar:${commons.collections.version}</include>
-        <include>log4j:log4j:jar:${log4j.version}</include>
-        <include>org.slf4j:slf4j-api:jar:${slf4j.api.version}</include>
-        <include>org.slf4j:slf4j-log4j12:jar:${slf4j.log4j12.version}</include>
-      </includes>
-      <unpack>true</unpack>
-    </dependencySet>
-  </dependencySets>
-</assembly>
diff --git a/trunk/distribution/src/main/assembly/bin.xml b/trunk/distribution/src/main/assembly/bin.xml
deleted file mode 100644
index 62113bd..0000000
--- a/trunk/distribution/src/main/assembly/bin.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!-- $Rev:  $ $Date:  $ -->
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
-    <id>bin</id>
-    <formats>
-        <format>zip</format>
-        <format>tar.gz</format>
-    </formats>
-    <baseDirectory>${project.build.finalName}-bin</baseDirectory>
-    <fileSets>
-        <fileSet>
-            <directory>src/main/release</directory>
-            <outputDirectory>/</outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-        <fileSet>
-            <directory>target/additional-jars</directory>
-            <outputDirectory>/lib</outputDirectory>
-        </fileSet>
-    </fileSets>
-    <dependencySets>
-        <dependencySet>
-            <outputDirectory>/lib</outputDirectory>
-            <unpack>false</unpack>
-            <scope>runtime</scope>
-        </dependencySet>
-    </dependencySets>
-</assembly>
diff --git a/trunk/distribution/src/main/assembly/src.xml b/trunk/distribution/src/main/assembly/src.xml
deleted file mode 100644
index 4daa8b9..0000000
--- a/trunk/distribution/src/main/assembly/src.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<!-- $Rev:  $ $Date:  $ -->
-<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
-    <id>src</id>
-    <formats>
-        <format>zip</format>
-        <format>tar.gz</format>
-    </formats>
-    <baseDirectory>${project.build.finalName}-src</baseDirectory>
-    <fileSets>
-        <fileSet>
-            <directory>${project.basedir}/..</directory>
-            <outputDirectory>/</outputDirectory>
-            <useDefaultExcludes>true</useDefaultExcludes>
-            <excludes>
-                <exclude>/</exclude>
-                <exclude>LICENSE</exclude>
-                <exclude>NOTICE</exclude>
-                <exclude>**/.*/**</exclude>
-                <exclude>**/*.log</exclude>
-                <exclude>**/${project.build.directory}/**</exclude>
-            </excludes>
-        </fileSet>
-        <fileSet>
-            <directory>src/main/release</directory>
-            <outputDirectory>/</outputDirectory>
-            <includes>
-                <include>**</include>
-            </includes>
-        </fileSet>
-    </fileSets>
-</assembly>
diff --git a/trunk/distribution/src/main/release/LICENSE b/trunk/distribution/src/main/release/LICENSE
deleted file mode 100644
index 6b0b127..0000000
--- a/trunk/distribution/src/main/release/LICENSE
+++ /dev/null
@@ -1,203 +0,0 @@
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-
diff --git a/trunk/distribution/src/main/release/NOTICE b/trunk/distribution/src/main/release/NOTICE
deleted file mode 100644
index 6dd29ad..0000000
--- a/trunk/distribution/src/main/release/NOTICE
+++ /dev/null
@@ -1,33 +0,0 @@
-Apache Directory LDAP API Distribution
-Copyright 2003-2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-Additional copyright notices and license terms applicable are
-present in the 'licenses' directory.
-
-This product uses Apache Ant (http://ant.apache.org/).
-
-This product includes/uses Apache Commons (http://commons.apache.org/).
-
-This product includes/uses Apache Loggin Services (http://logging.apache.org/).
-
-This product includes/uses Apache Felix (http://felix.apache.org/).
-
-This product uses Apache Maven (http://maven.apache.org/).
-
-This product includes/uses Apache Mina (http://mina.apache.org/).
-
-This product includes/uses software, AntLR Parser Generator (http://www.antlr.org/).
-
-This product uses software, JUnit (http://junit.org),
-developed by JUnit (http://www.junit.org)
-
-This product includes/uses software, dom4j (http://dom4j.org),
-developed by MetaStuff Ltd.  (http://sourceforge.net/projects/dom4j).
-
-This product includes/uses software, SLF4J API Module (http://www.slf4j.org),
-developed by QOS.ch  (http://www.qos.ch)
-
-This product includes/uses software, XMLPullParser 3 - xpp3:xpp3:jar:1.1.3.4.O (http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/)
diff --git a/trunk/distribution/src/main/release/licenses/antlr-LICENSE.txt b/trunk/distribution/src/main/release/licenses/antlr-LICENSE.txt
deleted file mode 100644
index afe00dc..0000000
--- a/trunk/distribution/src/main/release/licenses/antlr-LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-ANTLR 2 (http://www.antlr2.org/license.html) :
-
-ANTLR 2 License
-
-We reserve no legal rights to the ANTLR--it is fully in the public domain. An 
-individual or company may do whatever they wish with source code distributed 
-with ANTLR or the code generated by ANTLR, including the incorporation of ANTLR, 
-or its output, into commerical software.
-
-We encourage users to develop software with ANTLR. However, we do ask that 
-credit is given to us for developing ANTLR. By "credit", we mean that if you 
-use ANTLR or incorporate any source code into one of your programs (commercial 
-product, research project, or otherwise) that you acknowledge this fact 
-somewhere in the documentation, research report, etc... If you like ANTLR and 
-have developed a nice tool with the output, please mention that you developed it 
-using ANTLR. In addition, we ask that the headers remain intact in our source 
-code. As long as these guidelines are kept, we expect to continue enhancing this 
-system and expect to make other tools available as they are completed. 
-
diff --git a/trunk/distribution/src/main/release/licenses/dom4j-LICENSE.txt b/trunk/distribution/src/main/release/licenses/dom4j-LICENSE.txt
deleted file mode 100644
index 9438437..0000000
--- a/trunk/distribution/src/main/release/licenses/dom4j-LICENSE.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-dom4j 1.6.1 (http://dom4j.sourceforge.net/dom4j-1.6.1/license.html) :
-
-Redistribution and use of this software and associated documentation 
-("Software"), with or without modification, are permitted provided that the 
-following conditions are met:
-
-   1. Redistributions of source code must retain copyright statements and 
-notices. Redistributions must also contain a copy of this document.
-   2. Redistributions in binary form must reproduce the above copyright notice, 
-this list of conditions and the following disclaimer in the documentation and/or 
-other materials provided with the distribution.
-   3. The name "DOM4J" must not be used to endorse or promote products derived 
-from this Software without prior written permission of MetaStuff, Ltd. For 
-written permission, please contact dom4j-info@metastuff.com.
-   4. Products derived from this Software may not be called "DOM4J" nor may 
-"DOM4J" appear in their names without prior written permission of MetaStuff, Ltd. 
-DOM4J is a registered trademark of MetaStuff, Ltd.
-   5. Due credit should be given to the DOM4J Project - 
-http://dom4j.sourceforge.net
-
-THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND ANY 
-EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
-IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
-
diff --git a/trunk/distribution/src/main/release/licenses/slf4j-LICENSE.txt b/trunk/distribution/src/main/release/licenses/slf4j-LICENSE.txt
deleted file mode 100644
index 4c349fd..0000000
--- a/trunk/distribution/src/main/release/licenses/slf4j-LICENSE.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-SLF4J (http://www.slf4j.org/license.html)
-
- Copyright (c) 2004-2008 QOS.ch
- All rights reserved.
-
- Permission is hereby granted, free  of charge, to any person obtaining
- a  copy  of this  software  and  associated  documentation files  (the
- "Software"), to  deal in  the Software without  restriction, including
- without limitation  the rights to  use, copy, modify,  merge, publish,
- distribute,  sublicense, and/or sell  copies of  the Software,  and to
- permit persons to whom the Software  is furnished to do so, subject to
- the following conditions:
- 
- The  above  copyright  notice  and  this permission  notice  shall  be
- included in all copies or substantial portions of the Software.
- 
- THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
- EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
- MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
diff --git a/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.dom-documentation.txt b/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.dom-documentation.txt
deleted file mode 100644
index 5438a3e..0000000
--- a/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.dom-documentation.txt
+++ /dev/null
@@ -1,86 +0,0 @@
-xml-commons/java/external/LICENSE.dom-documentation.txt $Id: LICENSE.dom-documentation.txt,v 1.1 2002/01/31 23:13:42 curcuru Exp $

-

-

-This license came from: http://www.w3.org/Consortium/Legal/copyright-documents-19990405

-

-

-W3C® DOCUMENT NOTICE AND LICENSE

-Copyright © 1994-2001 World

-Wide Web Consortium, <a href="http://www.w3.org/">World

-Wide Web Consortium</a>, (<a href=

-"http://www.lcs.mit.edu/">Massachusetts Institute of

-Technology</a>, <a href="http://www.inria.fr/">Institut National de

-Recherche en Informatique et en Automatique</a>, <a href=

-"http://www.keio.ac.jp/">Keio University</a>). All Rights Reserved.

-http://www.w3.org/Consortium/Legal/

-

-Public documents on the W3C site are provided by the copyright

-holders under the following license. The software or Document Type 

-Definitions (DTDs) associated with W3C specifications are governed

-by the Software Notice. By using and/or copying this document, or the

-W3C document from which this statement is linked, you (the

-licensee) agree that you have read, understood, and will comply

-with the following terms and conditions:

-

-Permission to use, copy, and distribute the contents of this

-document, or the W3C document from which this statement is linked,

-in any medium for any purpose and without fee or royalty is hereby

-granted, provided that you include the following on ALL

-copies of the document, or portions thereof, that you use:

-

-A link or URL to the original W3C document.

-

-The pre-existing copyright notice of the original author, or if

-it doesn't exist, a notice of the form: "Copyright © [$date-of-document] World Wide Web

-Consortium, (Massachusetts

-Institute of Technology, Institut National de Recherche en Informatique et en

-Automatique, Keio

-University). All Rights Reserved.

-http://www.w3.org/Consortium/Legal/" (Hypertext is preferred, but a

-textual representation is permitted.)

-

-If it exists, the STATUS of the W3C document.

-

-When space permits, inclusion of the full text of this NOTICE 

-should be provided. We request that authorship

-attribution be provided in any software, documents, or other items

-or products that you create pursuant to the implementation of the

-contents of this document, or any portion thereof.

-

-No right to create modifications or derivatives of W3C documents

-is granted pursuant to this license. However, if additional 

-requirements (documented in the Copyright

-FAQ) are satisfied, the right to create modifications or

-derivatives is sometimes granted by the W3C to individuals

-complying with those requirements.

-

-THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO

-REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT

-NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A

-PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS

-OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE

-IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY

-PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,

-SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE

-DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS

-THEREOF.

-

-The name and trademarks of copyright holders may NOT be used in

-advertising or publicity pertaining to this document or its

-contents without specific, written prior permission. Title to

-copyright in this document will at all times remain with copyright

-holders.

-

-----------------------------------------------------------------------------

-This formulation of W3C's notice and license became active on

-April 05 1999 so as to account for the treatment of DTDs, schema's and 

-bindings. See the older formulation for the policy prior to this date. 

-Please see

-our Copyright FAQ for common questions

-about using materials from our site, including specific terms and

-conditions for packages like libwww, Amaya, and Jigsaw. 

-Other questions about this notice can be directed to site-policy@w3.org.

-

-webmaster

-(last updated by reagle on 1999/04/99.)
\ No newline at end of file
diff --git a/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.dom-software.txt b/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.dom-software.txt
deleted file mode 100644
index 0546e6f..0000000
--- a/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.dom-software.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-xml-commons/java/external/LICENSE.dom-software.txt $Id: LICENSE.dom-software.txt,v 1.1 2002/01/31 23:13:42 curcuru Exp $

-

-

-This license came from: http://www.w3.org/Consortium/Legal/copyright-software-19980720

-

-

-W3C® SOFTWARE NOTICE AND LICENSE

-Copyright © 1994-2001 World

-Wide Web Consortium, <a href="http://www.w3.org/">World

-Wide Web Consortium</a>, (<a href=

-"http://www.lcs.mit.edu/">Massachusetts Institute of

-Technology</a>, <a href="http://www.inria.fr/">Institut National de

-Recherche en Informatique et en Automatique</a>, <a href=

-"http://www.keio.ac.jp/">Keio University</a>). All Rights Reserved.

-http://www.w3.org/Consortium/Legal/

-

-This W3C work (including software, documents, or other related

-items) is being provided by the copyright holders under the

-following license. By obtaining, using and/or copying this work,

-you (the licensee) agree that you have read, understood, and will

-comply with the following terms and conditions:

-Permission to use, copy, modify, and distribute this software

-and its documentation, with or without modification,  for any

-purpose and without fee or royalty is hereby granted, provided that

-you include the following on ALL copies of the software and

-documentation or portions thereof, including modifications, that

-you make:

-

-The full text of this NOTICE in a location viewable to users of

-the redistributed or derivative work.

-

-Any pre-existing intellectual property disclaimers, notices, or

-terms and conditions. If none exist, a short notice of the

-following form (hypertext is preferred, text is permitted) should

-be used within the body of any redistributed or derivative code:

-"Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of

-Technology, Institut National de

-Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.

-http://www.w3.org/Consortium/Legal/"

-

-Notice of any changes or modifications to the W3C files,

-including the date changes were made. (We recommend you provide 

-URIs to the location from which the code is derived.)

-

-THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND

-COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR

-IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF

-MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE

-USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD

-PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

-COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,

-SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE

-SOFTWARE OR DOCUMENTATION.

-

-The name and trademarks of copyright holders may NOT be used in

-advertising or publicity pertaining to the software without

-specific, written prior permission. Title to copyright in this

-software and any associated documentation will at all times remain

-with copyright holders.

-____________________________________

-This formulation of W3C's notice and license became active on

-August 14 1998 so as to improve compatibility with GPL. This

-version ensures that W3C software licensing terms are no more

-restrictive than GPL and consequently W3C software may be

-distributed in GPL packages. See the older formulation for the

-policy prior to this date. Please see our Copyright FAQ for common 

-questions about using materials from

-our site, including specific terms and conditions for packages like

-libwww, Amaya, and Jigsaw. 

-Other questions about this notice can be

-directed to site-policy@w3.org.

-

-webmaster

-(last updated $Date: 2002/01/31 23:13:42 $)
\ No newline at end of file
diff --git a/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.sax.txt b/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.sax.txt
deleted file mode 100644
index 86bc63c..0000000
--- a/trunk/distribution/src/main/release/licenses/xml-apis-LICENSE.sax.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-xml-commons/java/external/LICENSE.sax.txt $Id: LICENSE.sax.txt,v 1.1 2002/01/31 23:26:48 curcuru Exp $

-

-

-This license came from: http://www.megginson.com/SAX/copying.html

-  However please note future versions of SAX may be covered 

-  under http://saxproject.org/?selected=pd

-

-

-This page is now out of date -- see the new SAX site at 

-http://www.saxproject.org/ for more up-to-date

-releases and other information. Please change your bookmarks.

-

-

-SAX2 is Free!

-

-I hereby abandon any property rights to SAX 2.0 (the Simple API for

-XML), and release all of the SAX 2.0 source code, compiled code, and

-documentation contained in this distribution into the Public Domain.

-SAX comes with NO WARRANTY or guarantee of fitness for any

-purpose.

-

-David Megginson, david@megginson.com

-2000-05-05
\ No newline at end of file
diff --git a/trunk/distribution/src/main/release/licenses/xml-apis-README.dom.txt b/trunk/distribution/src/main/release/licenses/xml-apis-README.dom.txt
deleted file mode 100644
index 92ab7f6..0000000
--- a/trunk/distribution/src/main/release/licenses/xml-apis-README.dom.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-xml-commons/java/external/README.dom.txt $Id: README.dom.txt,v 1.1 2002/01/31 23:13:42 curcuru Exp $

-

-

-HEAR YE, HEAR YE!

-

-

-All of the .java software and associated documentation about 

-the DOM in this repository are distributed under the license 

-from the W3C, which is provided herein.

-

-

-LICENSE.dom-software.txt covers all software from the W3C 

-including the following items in the xml-commons project:

-

-    xml-commons/java/external/src/org/w3c

-      and all subdirectories

-

-LICENSE.dom-documentation.txt covers all documentation from the W3C 

-including the following items in the xml-commons project:

-

-    xml-commons/java/external/xdocs/dom

-      and all subdirectories

-

-The actual DOM Java Language Binding classes in xml-commons came from: 

-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.html

-	The original versions are tagged 'DOM_LEVEL_2'

-

-The specification of DOM Level 2's various parts is at:

-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/

-    http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113/

-	http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/

-	http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/

-	http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/
\ No newline at end of file
diff --git a/trunk/distribution/src/main/release/licenses/xml-apis-README.sax.txt b/trunk/distribution/src/main/release/licenses/xml-apis-README.sax.txt
deleted file mode 100644
index 1bee542..0000000
--- a/trunk/distribution/src/main/release/licenses/xml-apis-README.sax.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-xml-commons/java/external/README.sax.txt $Id: README.sax.txt,v 1.1 2002/01/31 23:26:48 curcuru Exp $

-

-

-HEAR YE, HEAR YE!

-

-

-All of the .java software and associated documentation about 

-SAX in this repository are distributed freely in the 

-public domain.

-

-

-LICENSE.sax.txt covers all software and documentation from the 

-megginson.com including the following in the xml-commons project:

-

-    xml-commons/java/external/src/org/xml/sax

-      and all subdirectories

-    xml-commons/java/external/xdocs/sax

-      and all subdirectories

-

-

-The actual SAX classes in xml-commons came from: 

-    http://www.megginson.com/Software/index.html

-	The original versions are tagged 'SAX-2_0-r2-prerelease'

-

diff --git a/trunk/distribution/src/main/release/licenses/xml-apis-README.txt b/trunk/distribution/src/main/release/licenses/xml-apis-README.txt
deleted file mode 100644
index 02bab9b..0000000
--- a/trunk/distribution/src/main/release/licenses/xml-apis-README.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-xml-commons/README.txt $Id: README.txt,v 1.1 2002/01/31 23:42:49 curcuru Exp $

-

-

-HEAR YE, HEAR YE!

-

-

-Software and documentation in this repository are covered under 

-a number of different licenses.

-

-

-Most files under xml-commons/java/external/ are covered 

-under their respective LICENSE.*.txt files; see the matching 

-README.*.txt files for descriptions.

-

-Note that xml-commons/java/external/build.xml and 

-xml-commons/java/external/src/manifest.commons are 

-both covered under the Apache Software License.

-

-

-All files not otherwise noted are covered under the 

-Apache Software License in LICENSE.txt including all 

-files under xml-commons/java/src

diff --git a/trunk/distribution/src/main/release/licenses/xpp3-LICENSE.txt b/trunk/distribution/src/main/release/licenses/xpp3-LICENSE.txt
deleted file mode 100644
index f1dc36c..0000000
--- a/trunk/distribution/src/main/release/licenses/xpp3-LICENSE.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-XPP3 (http://caldersphere.rubyforge.org/jrexml/files/lib/xpp3_LICENSE_txt.html) :
-
-Indiana University Extreme! Lab Software License
-
-Version 1.1.1
-
-Copyright (c) 2002 Extreme! Lab, Indiana University. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, 
-are permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice, 
-this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright notice, 
-this list of conditions and the following disclaimer in the documentation 
-and/or other materials provided with the distribution.
-   3. The end-user documentation included with the redistribution, if any, must 
-include the following acknowledgment:
-
-  "This product includes software developed by the Indiana University
-  Extreme! Lab (http://www.extreme.indiana.edu/)."
-
-Alternately, this acknowledgment may appear in the software itself, if and 
-wherever such third-party acknowledgments normally appear.
-
-   1. The names "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab"
-
-must not be used to endorse or promote products derived from this software 
-without prior written permission. For written permission, please contact 
-www.extreme.indiana.edu/.
-
-   1. Products derived from this software may not use "Indiana Univeristy"
-
-name nor may "Indiana Univeristy" appear in their name, without prior written 
-permission of the Indiana University.
-
-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, 
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS, 
-COPYRIGHT HOLDERS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/trunk/dsml/engine/pom.xml b/trunk/dsml/engine/pom.xml
deleted file mode 100644
index 4cf44d8..0000000
--- a/trunk/dsml/engine/pom.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.directory.api</groupId>
-    <artifactId>api-dsml-parent</artifactId>
-    <version>1.0.0-M32</version>
-  </parent>
-
-  <artifactId>api-dsml-engine</artifactId>
-  <name>Apache Directory LDAP API DSML Engine</name>
-  <packaging>bundle</packaging>
-
-  <dependencies>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-i18n</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-dsml-parser</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-client-api</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.xpp3</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
-            <addMavenDescriptor>false</addMavenDescriptor>
-          </archive>
-        </configuration>
-      </plugin>
-      
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <inherited>true</inherited>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>META-INF</manifestLocation>
-          <instructions>
-            <Bundle-SymbolicName>${project.groupId}.dsmlv2.engine</Bundle-SymbolicName>
-            <Export-Package>
-              org.apache.directory.api.dsmlv2.engine;version=${project.version};-noimport:=true
-            </Export-Package>
-            <Import-Package>
-              org.apache.directory.api.asn1;version=${project.version},
-              org.apache.directory.api.dsmlv2;version=${project.version},
-              org.apache.directory.api.dsmlv2.response;version=${project.version},
-              org.apache.directory.api.dsmlv2.request;version=${project.version},
-              org.apache.directory.api.i18n;version=${project.version},
-              org.apache.directory.api.ldap.model.cursor;version=${project.version},
-              org.apache.directory.api.ldap.model.exception;version=${project.version},
-              org.apache.directory.api.ldap.model.message;version=${project.version},
-              org.apache.directory.api.util;version=${project.version},
-              org.apache.directory.ldap.client.api;version=${project.version},
-              org.dom4j;version=${dom4j.version},
-              org.slf4j;version=${slf4j.api.bundleversion},
-              org.xmlpull.v1;version=${xpp3.version}
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/trunk/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java b/trunk/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
deleted file mode 100644
index fc41fd2..0000000
--- a/trunk/dsml/engine/src/main/java/org/apache/directory/api/dsmlv2/engine/Dsmlv2Engine.java
+++ /dev/null
@@ -1,814 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-
-package org.apache.directory.api.dsmlv2.engine;
-
-
-import java.io.BufferedWriter;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-import org.apache.directory.api.asn1.DecoderException;
-import org.apache.directory.api.asn1.EncoderException;
-import org.apache.directory.api.dsmlv2.DsmlDecorator;
-import org.apache.directory.api.dsmlv2.Dsmlv2Parser;
-import org.apache.directory.api.dsmlv2.ParserUtils;
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml;
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.OnError;
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.Processing;
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.ResponseOrder;
-import org.apache.directory.api.dsmlv2.request.Dsmlv2Grammar;
-import org.apache.directory.api.dsmlv2.response.AddResponseDsml;
-import org.apache.directory.api.dsmlv2.response.BatchResponseDsml;
-import org.apache.directory.api.dsmlv2.response.BindResponseDsml;
-import org.apache.directory.api.dsmlv2.response.CompareResponseDsml;
-import org.apache.directory.api.dsmlv2.response.DelResponseDsml;
-import org.apache.directory.api.dsmlv2.response.ErrorResponse;
-import org.apache.directory.api.dsmlv2.response.ErrorResponse.ErrorResponseType;
-import org.apache.directory.api.dsmlv2.response.ExtendedResponseDsml;
-import org.apache.directory.api.dsmlv2.response.ModDNResponseDsml;
-import org.apache.directory.api.dsmlv2.response.ModifyResponseDsml;
-import org.apache.directory.api.dsmlv2.response.SearchResponseDsml;
-import org.apache.directory.api.dsmlv2.response.SearchResultDoneDsml;
-import org.apache.directory.api.dsmlv2.response.SearchResultEntryDsml;
-import org.apache.directory.api.dsmlv2.response.SearchResultReferenceDsml;
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.ldap.model.cursor.SearchCursor;
-import org.apache.directory.api.ldap.model.exception.LdapException;
-import org.apache.directory.api.ldap.model.message.AbandonRequest;
-import org.apache.directory.api.ldap.model.message.AddRequest;
-import org.apache.directory.api.ldap.model.message.AddResponse;
-import org.apache.directory.api.ldap.model.message.BindRequest;
-import org.apache.directory.api.ldap.model.message.BindRequestImpl;
-import org.apache.directory.api.ldap.model.message.BindResponse;
-import org.apache.directory.api.ldap.model.message.CompareRequest;
-import org.apache.directory.api.ldap.model.message.CompareResponse;
-import org.apache.directory.api.ldap.model.message.DeleteRequest;
-import org.apache.directory.api.ldap.model.message.DeleteResponse;
-import org.apache.directory.api.ldap.model.message.ExtendedRequest;
-import org.apache.directory.api.ldap.model.message.ExtendedResponse;
-import org.apache.directory.api.ldap.model.message.MessageTypeEnum;
-import org.apache.directory.api.ldap.model.message.ModifyDnRequest;
-import org.apache.directory.api.ldap.model.message.ModifyDnResponse;
-import org.apache.directory.api.ldap.model.message.ModifyRequest;
-import org.apache.directory.api.ldap.model.message.ModifyResponse;
-import org.apache.directory.api.ldap.model.message.Request;
-import org.apache.directory.api.ldap.model.message.Response;
-import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
-import org.apache.directory.api.ldap.model.message.SearchRequest;
-import org.apache.directory.api.ldap.model.message.SearchResultDone;
-import org.apache.directory.api.ldap.model.message.SearchResultEntry;
-import org.apache.directory.api.ldap.model.message.SearchResultReference;
-import org.apache.directory.api.util.Strings;
-import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.ldap.client.api.LdapNetworkConnection;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.XmlPullParserException;
-
-
-/**
- * This is the DSMLv2Engine. It can be use to execute operations on a LDAP Server and get the results of these operations.
- * The format used for request and responses is the DSMLv2 format.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class Dsmlv2Engine
-{
-    /** The user. */
-    protected String user;
-
-    /** The password. */
-    protected String password;
-
-    /** The LDAP connection */
-    protected LdapConnection connection;
-
-    /** The DSVMv2 parser. */
-    protected Dsmlv2Parser parser;
-
-    /** The continue on error flag. */
-    protected boolean continueOnError;
-
-    /** The exit flag. */
-    protected boolean exit = false;
-
-    /** The batch request. */
-    protected BatchRequestDsml batchRequest;
-
-    /** The batch response. */
-    protected BatchResponseDsml batchResponse = new BatchResponseDsml();
-
-    protected Dsmlv2Grammar grammar = new Dsmlv2Grammar();
-
-    /** flag to indicate to generate the response in a SOAP envelope */
-    protected boolean generateSoapResp = false;
-
-    /** A logger for this class */
-    private static final Logger LOG = LoggerFactory.getLogger( Dsmlv2Engine.class );
-    
-    private static final String BODY_ENVELOPE = "</Body></Envelope>";
-
-
-    /**
-     * Creates a new instance of Dsmlv2Engine.
-     * 
-     * @param host the server host
-     * @param port the server port
-     * @param user the server admin Dn
-     * @param password the server admin's password
-     */
-    public Dsmlv2Engine( String host, int port, String user, String password )
-    {
-        this.user = user;
-        this.password = password;
-
-        connection = new LdapNetworkConnection( host, port );
-    }
-
-
-    /**
-     * Creates a new instance of Dsmlv2Engine.
-     *
-     * @param connection an unbound active connection
-     * @param user the user name to be used to bind this connection to the server
-     * @param password user's credentials
-     */
-    public Dsmlv2Engine( LdapConnection connection, String user, String password )
-    {
-        this.user = user;
-        this.password = password;
-
-        this.connection = connection;
-    }
-
-
-    /**
-     * Processes the file given and return the result of the operations
-     * 
-     * @param dsmlInput the DSMLv2 formatted request input
-     * @return the XML response in DSMLv2 Format
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public String processDSML( String dsmlInput ) throws XmlPullParserException
-    {
-        parser = new Dsmlv2Parser( grammar );
-        parser.setInput( dsmlInput );
-
-        return processDSML();
-    }
-
-
-    /**
-     * Processes the file given and return the result of the operations
-     * 
-     * @param fileName the path to the file
-     * @return the XML response in DSMLv2 Format
-     * @throws XmlPullParserException if an error occurs in the parser
-     * @throws FileNotFoundException if the file does not exist
-     */
-    public String processDSMLFile( String fileName ) throws XmlPullParserException, FileNotFoundException
-    {
-        parser = new Dsmlv2Parser( grammar );
-        parser.setInputFile( fileName );
-
-        return processDSML();
-    }
-
-
-    /**
-     * Process the given file and optionally writing the output to the
-     * output stream(if not null)
-     *
-     * @param file the DSML file
-     * @param respStream the output stream to which response will be written, skipped if null
-     * @throws Exception If the processing fails
-     */
-    public void processDSMLFile( File file, OutputStream respStream ) throws Exception
-    {
-        parser = new Dsmlv2Parser( grammar );
-        parser.setInputFile( file.getAbsolutePath() );
-
-        processDSML( respStream );
-    }
-
-
-    /**
-     * Uses the default UTF-8 encoding for processing the DSML
-     * 
-     * @see #processDSML(InputStream, String, OutputStream)
-     */
-    public void processDSML( InputStream inputStream, OutputStream out ) throws Exception
-    {
-        processDSML( inputStream, "UTF-8", out );
-    }
-
-
-    /**
-     * Processes the DSML request(s) from the given input stream with the specified encoding
-     * and writes the response to the output stream
-     * 
-     * @param inputStream the input stream for DSML batch request
-     * @param inputEncoding encoding to be used while reading the DSML request data
-     * @param out the output stream to which DSML response will be written
-     * @throws Exception If the processing fails
-     */
-    public void processDSML( InputStream inputStream, String inputEncoding, OutputStream out ) throws Exception
-    {
-        parser = new Dsmlv2Parser( grammar );
-        parser.setInput( inputStream, inputEncoding );
-        processDSML( out );
-    }
-
-
-    /**
-     * Processes the Request document
-     * 
-     * @return the XML response in DSMLv2 Format
-     */
-    private String processDSML()
-    {
-        try
-        {
-            ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
-            processDSML( byteOut );
-            return new String( byteOut.toByteArray(), "UTF-8" );
-        }
-        catch ( IOException e )
-        {
-            LOG.error( "Failed to process the DSML", e );
-        }
-
-        return null;
-    }
-
-
-    /**
-     * Processes the DSML batch request and writes the response of each operation will be
-     * written to the given response stream if it is not null
-     *
-     * @param outStream the stream to which the responses will be written, can be null
-     * @throws IOException If we had an issue while reading or writing the data
-     */
-    protected void processDSML( OutputStream outStream ) throws IOException
-    {
-        BufferedWriter respWriter = null;
-
-        if ( outStream != null )
-        {
-            respWriter = new BufferedWriter( new OutputStreamWriter( outStream ) );
-
-            if ( generateSoapResp )
-            {
-                respWriter.write( "<Envelope " );
-
-                Namespace soapNs = new Namespace( null, "http://www.w3.org/2001/12/soap-envelope" );
-                soapNs.write( respWriter );
-
-                respWriter.write( "><Body>" );
-            }
-        }
-
-        // Binding to LDAP Server
-        try
-        {
-            bind( 1 );
-        }
-        catch ( Exception e )
-        {
-            LOG.warn( "Failed to bind", e );
-
-            // Unable to connect to server
-            // We create a new ErrorResponse and return the XML response.
-            ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.COULD_NOT_CONNECT, e
-                .getLocalizedMessage() );
-
-            batchResponse.addResponse( errorResponse );
-
-            if ( respWriter != null )
-            {
-                respWriter.write( batchResponse.toDsml() );
-                if ( generateSoapResp )
-                {
-                    respWriter.write( BODY_ENVELOPE );
-                }
-
-                respWriter.flush();
-            }
-
-            return;
-        }
-
-        // Processing BatchRequest:
-        //    - Parsing and Getting BatchRequest
-        //    - Getting and registering options from BatchRequest
-        try
-        {
-            processBatchRequest();
-        }
-        catch ( XmlPullParserException e )
-        {
-            // We create a new ErrorResponse and return the XML response.
-            ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST, I18n.err(
-                I18n.ERR_03001, e.getLocalizedMessage(), e.getLineNumber(), e.getColumnNumber() ) );
-
-            batchResponse.addResponse( errorResponse );
-
-            if ( respWriter != null )
-            {
-                respWriter.write( batchResponse.toDsml() );
-                if ( generateSoapResp )
-                {
-                    respWriter.write( BODY_ENVELOPE );
-                }
-
-                respWriter.flush();
-            }
-
-            return;
-        }
-
-        if ( respWriter != null )
-        {
-            StringBuilder sb = new StringBuilder();
-
-            sb.append( "<batchResponse " );
-
-            sb.append( ParserUtils.DSML_NAMESPACE.asXML() );
-
-            // a space to separate the namespace declarations
-            sb.append( " " );
-
-            sb.append( ParserUtils.XSD_NAMESPACE.asXML() );
-
-            // a space to separate the namespace declarations
-            sb.append( " " );
-
-            sb.append( ParserUtils.XSI_NAMESPACE.asXML() );
-
-            sb.append( " requestID=\"" );
-            sb.append( batchRequest.getRequestID() );
-            sb.append( "\">" );
-
-            respWriter.write( sb.toString() );
-        }
-
-        // Processing each request:
-        //    - Getting a new request
-        //    - Checking if the request is well formed
-        //    - Sending the request to the server
-        //    - Getting and converting reponse(s) as XML
-        //    - Looping until last request
-        DsmlDecorator<? extends Request> request = null;
-
-        try
-        {
-            request = parser.getNextRequest();
-        }
-        catch ( XmlPullParserException e )
-        {
-            LOG.warn( "Failed while getting next request", e );
-
-            int reqId = 0;
-
-            // We create a new ErrorResponse and return the XML response.
-            ErrorResponse errorResponse = new ErrorResponse( reqId, ErrorResponseType.MALFORMED_REQUEST, I18n.err(
-                I18n.ERR_03001, e.getLocalizedMessage(), e.getLineNumber(), e.getColumnNumber() ) );
-
-            batchResponse.addResponse( errorResponse );
-
-            if ( respWriter != null )
-            {
-                respWriter.write( batchResponse.toDsml() );
-
-                if ( generateSoapResp )
-                {
-                    respWriter.write( BODY_ENVELOPE );
-                }
-
-                respWriter.flush();
-            }
-
-            return;
-        }
-
-        // (Request == null when there's no more request to process)
-        while ( request != null )
-        {
-            // Checking the request has a requestID attribute if Processing = Parallel and ResponseOrder = Unordered
-            if ( ( batchRequest.getProcessing().equals( Processing.PARALLEL ) )
-                && ( batchRequest.getResponseOrder().equals( ResponseOrder.UNORDERED ) )
-                && ( request.getDecorated().getMessageId() <= 0 ) )
-            {
-                // Then we have to send an errorResponse
-                ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST, I18n
-                    .err( I18n.ERR_03002 ) );
-
-                if ( respWriter != null )
-                {
-                    writeResponse( respWriter, errorResponse );
-                }
-                else
-                {
-                    batchResponse.addResponse( errorResponse );
-                }
-
-                break;
-            }
-
-            try
-            {
-                processRequest( request, respWriter );
-            }
-            catch ( Exception e )
-            {
-                LOG.warn( "Failed to process request", e );
-
-                // We create a new ErrorResponse and return the XML response.
-                ErrorResponse errorResponse = new ErrorResponse( request.getDecorated().getMessageId(),
-                    ErrorResponseType.GATEWAY_INTERNAL_ERROR, I18n.err(
-                        I18n.ERR_03003, e.getMessage() ) );
-
-                if ( respWriter != null )
-                {
-                    writeResponse( respWriter, errorResponse );
-                }
-                else
-                {
-                    batchResponse.addResponse( errorResponse );
-                }
-
-                break;
-            }
-
-            // Checking if we need to exit processing (if an error has occurred if onError == Exit)
-            if ( exit )
-            {
-                break;
-            }
-
-            // Getting next request
-            try
-            {
-                request = parser.getNextRequest();
-            }
-            catch ( XmlPullParserException e )
-            {
-                // We create a new ErrorResponse and return the XML response.
-                ErrorResponse errorResponse = new ErrorResponse( 0, ErrorResponseType.MALFORMED_REQUEST, I18n.err(
-                    I18n.ERR_03001, e.getLocalizedMessage(), e.getLineNumber(), e.getColumnNumber() ) );
-
-                if ( respWriter != null )
-                {
-                    writeResponse( respWriter, errorResponse );
-                }
-                else
-                {
-                    batchResponse.addResponse( errorResponse );
-                }
-
-                break;
-            }
-        }
-
-        if ( respWriter != null )
-        {
-            respWriter.write( "</batchResponse>" );
-
-            if ( generateSoapResp )
-            {
-                respWriter.write( BODY_ENVELOPE );
-            }
-
-            respWriter.flush();
-        }
-    }
-
-
-    /**
-     * Writes the response to the writer of the underlying output stream
-     * 
-     * @param respWriter The writer used to write the response
-     * @param respDsml The decorator containing the response
-     * @throws IOException If we had an error while writing the DSML response
-     */
-    protected void writeResponse( BufferedWriter respWriter, DsmlDecorator<?> respDsml ) throws IOException
-    {
-        if ( respWriter != null )
-        {
-            Element xml = respDsml.toDsml( null );
-            xml.write( respWriter );
-        }
-    }
-
-
-    /**
-     * @return the generateSoapResp
-     */
-    public boolean isGenerateSoapResp()
-    {
-        return generateSoapResp;
-    }
-
-
-    /**
-     * @param generateSoapResp the generateSoapResp to set
-     */
-    public void setGenerateSoapResp( boolean generateSoapResp )
-    {
-        this.generateSoapResp = generateSoapResp;
-    }
-
-
-    /**
-     * @return the batchResponse
-     */
-    public BatchResponseDsml getBatchResponse()
-    {
-        return batchResponse;
-    }
-
-
-    /**
-     * @return the connection
-     */
-    public LdapConnection getConnection()
-    {
-        return connection;
-    }
-
-
-    /**
-     * Processes a single request
-     * 
-     * @param request the request to process
-     * @param respWriter The writer used to store the DSML response
-     * @exception Exception If we had an error while processing the request
-     */
-    protected void processRequest( DsmlDecorator<? extends Request> request, BufferedWriter respWriter )
-        throws Exception
-    {
-        ResultCodeEnum resultCode = null;
-
-        switch ( request.getDecorated().getType() )
-        {
-            case ABANDON_REQUEST:
-                connection.abandon( ( AbandonRequest ) request );
-                return;
-
-            case ADD_REQUEST:
-                AddResponse response = connection.add( ( AddRequest ) request );
-                resultCode = response.getLdapResult().getResultCode();
-                AddResponseDsml addResponseDsml = new AddResponseDsml( connection.getCodecService(), response );
-                writeResponse( respWriter, addResponseDsml );
-
-                break;
-
-            case BIND_REQUEST:
-                BindResponse bindResponse = connection.bind( ( BindRequest ) request );
-                resultCode = bindResponse.getLdapResult().getResultCode();
-                BindResponseDsml authResponseDsml = new BindResponseDsml( connection.getCodecService(), bindResponse );
-                writeResponse( respWriter, authResponseDsml );
-
-                break;
-
-            case COMPARE_REQUEST:
-                CompareResponse compareResponse = connection.compare( ( CompareRequest ) request );
-                resultCode = compareResponse.getLdapResult().getResultCode();
-                CompareResponseDsml compareResponseDsml = new CompareResponseDsml( connection.getCodecService(),
-                    compareResponse );
-                writeResponse( respWriter, compareResponseDsml );
-
-                break;
-
-            case DEL_REQUEST:
-                DeleteResponse delResponse = connection.delete( ( DeleteRequest ) request );
-                resultCode = delResponse.getLdapResult().getResultCode();
-                DelResponseDsml delResponseDsml = new DelResponseDsml( connection.getCodecService(), delResponse );
-                writeResponse( respWriter, delResponseDsml );
-
-                break;
-
-            case EXTENDED_REQUEST:
-                ExtendedResponse extendedResponse = connection.extended( ( ExtendedRequest ) request );
-                resultCode = extendedResponse.getLdapResult().getResultCode();
-                ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( connection.getCodecService(),
-                    extendedResponse );
-                writeResponse( respWriter, extendedResponseDsml );
-
-                break;
-
-            case MODIFY_REQUEST:
-                ModifyResponse modifyResponse = connection.modify( ( ModifyRequest ) request );
-                resultCode = modifyResponse.getLdapResult().getResultCode();
-                ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( connection.getCodecService(),
-                    modifyResponse );
-                writeResponse( respWriter, modifyResponseDsml );
-
-                break;
-
-            case MODIFYDN_REQUEST:
-                ModifyDnResponse modifyDnResponse = connection.modifyDn( ( ModifyDnRequest ) request );
-                resultCode = modifyDnResponse.getLdapResult().getResultCode();
-                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( connection.getCodecService(),
-                    modifyDnResponse );
-                writeResponse( respWriter, modDNResponseDsml );
-
-                break;
-
-            case SEARCH_REQUEST:
-                SearchCursor searchResponses = connection.search( ( SearchRequest ) request );
-
-                SearchResponseDsml searchResponseDsml = new SearchResponseDsml( connection.getCodecService() );
-
-                if ( respWriter != null )
-                {
-                    StringBuilder sb = new StringBuilder();
-                    sb.append( "<searchResponse" );
-
-                    if ( request.getDecorated().getMessageId() > 0 )
-                    {
-                        sb.append( " requestID=\"" );
-                        sb.append( request.getDecorated().getMessageId() );
-                        sb.append( '"' );
-                    }
-
-                    sb.append( '>' );
-
-                    respWriter.write( sb.toString() );
-                }
-
-                while ( searchResponses.next() )
-                {
-                    Response searchResponse = searchResponses.get();
-
-                    if ( searchResponse.getType() == MessageTypeEnum.SEARCH_RESULT_ENTRY )
-                    {
-                        SearchResultEntry searchResultEntry = ( SearchResultEntry ) searchResponse;
-
-                        SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml(
-                            connection.getCodecService(), searchResultEntry );
-                        searchResponseDsml = new SearchResponseDsml( connection.getCodecService(),
-                            searchResultEntryDsml );
-
-                        if ( respWriter != null )
-                        {
-                            writeResponse( respWriter, searchResultEntryDsml );
-                        }
-                        else
-                        {
-                            searchResponseDsml.addResponse( searchResultEntryDsml );
-                        }
-                    }
-                    else if ( searchResponse.getType() == MessageTypeEnum.SEARCH_RESULT_REFERENCE )
-                    {
-                        SearchResultReference searchResultReference = ( SearchResultReference ) searchResponse;
-
-                        SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml(
-                            connection.getCodecService(), searchResultReference );
-                        searchResponseDsml = new SearchResponseDsml( connection.getCodecService(),
-                            searchResultReferenceDsml );
-
-                        if ( respWriter != null )
-                        {
-                            writeResponse( respWriter, searchResultReferenceDsml );
-                        }
-                        else
-                        {
-                            searchResponseDsml.addResponse( searchResultReferenceDsml );
-                        }
-                    }
-                }
-
-                SearchResultDone srDone = searchResponses.getSearchResultDone();
-
-                if ( srDone != null )
-                {
-                    resultCode = srDone.getLdapResult().getResultCode();
-
-                    SearchResultDoneDsml srdDsml = new SearchResultDoneDsml( connection.getCodecService(), srDone );
-
-                    if ( respWriter != null )
-                    {
-                        writeResponse( respWriter, srdDsml );
-                        respWriter.write( "</searchResponse>" );
-                    }
-                    else
-                    {
-                        searchResponseDsml.addResponse( srdDsml );
-                        batchResponse.addResponse( searchResponseDsml );
-                    }
-                }
-
-                break;
-
-            case UNBIND_REQUEST:
-                connection.unBind();
-                break;
-
-            default:
-                throw new IllegalStateException( "Unexpected request tpye " + request.getDecorated().getType() );
-        }
-
-        if ( ( !continueOnError ) && ( resultCode != null ) && ( resultCode != ResultCodeEnum.SUCCESS )
-            && ( resultCode != ResultCodeEnum.COMPARE_TRUE ) && ( resultCode != ResultCodeEnum.COMPARE_FALSE )
-            && ( resultCode != ResultCodeEnum.REFERRAL ) )
-        {
-            // Turning on Exit flag
-            exit = true;
-        }
-    }
-
-
-    /**
-     * Processes the BatchRequest
-     * <ul>
-     *     <li>Parsing and Getting BatchRequest</li>
-     *     <li>Getting and registering options from BatchRequest</li>
-     * </ul>
-     * 
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    protected void processBatchRequest() throws XmlPullParserException
-    {
-        // Parsing BatchRequest
-        parser.parseBatchRequest();
-
-        // Getting BatchRequest
-        batchRequest = parser.getBatchRequest();
-
-        if ( OnError.RESUME.equals( batchRequest.getOnError() ) )
-        {
-            continueOnError = true;
-        }
-        else if ( OnError.EXIT.equals( batchRequest.getOnError() ) )
-        {
-            continueOnError = false;
-        }
-
-        if ( ( batchRequest.getRequestID() != 0 ) && ( batchResponse != null ) )
-        {
-            batchResponse.setRequestID( batchRequest.getRequestID() );
-        }
-    }
-
-
-    /**
-     * Binds to the ldap server
-     * 
-     * @param messageId the message Id
-     * @throws EncoderException If we had an issue while encoding the request
-     * @throws DecoderException If we had an issue while decoding the request
-     * @throws IOException If we had an issue while transmitting the request or re ceiving the response
-     */
-    protected void bind( int messageId ) throws LdapException, EncoderException, DecoderException, IOException
-    {
-        if ( ( connection != null ) && connection.isAuthenticated() )
-        {
-            return;
-        }
-
-        if ( connection == null )
-        {
-            throw new IOException( I18n.err( I18n.ERR_03101_MISSING_CONNECTION_TO ) );
-        }
-
-        BindRequest bindRequest = new BindRequestImpl();
-        bindRequest.setSimple( true );
-        bindRequest.setCredentials( Strings.getBytesUtf8( password ) );
-        bindRequest.setName( user );
-        bindRequest.setVersion3( true );
-        bindRequest.setMessageId( messageId );
-
-        BindResponse bindResponse = connection.bind( bindRequest );
-
-        if ( bindResponse.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
-        {
-            LOG.warn( "Error : {}", bindResponse.getLdapResult().getDiagnosticMessage() );
-        }
-    }
-}
diff --git a/trunk/dsml/engine/src/site/site.xml b/trunk/dsml/engine/src/site/site.xml
deleted file mode 100644
index 8f27351..0000000
--- a/trunk/dsml/engine/src/site/site.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!--
-  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
--->
-<project name="${project.name}">
-  <body>
-    <menu ref="parent" />
-    <menu ref="reports" />
-  </body>
-</project>
diff --git a/trunk/dsml/parser/pom.xml b/trunk/dsml/parser/pom.xml
deleted file mode 100644
index be14365..0000000
--- a/trunk/dsml/parser/pom.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.directory.api</groupId>
-    <artifactId>api-dsml-parent</artifactId>
-    <version>1.0.0-M32</version>
-  </parent>
-
-  <artifactId>api-dsml-parser</artifactId>
-  <name>Apache Directory LDAP API DSML Parser</name>
-  <packaging>bundle</packaging>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.directory.junit</groupId>
-      <artifactId>junit-addons</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-codec-standalone</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-codec-core</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>api-ldap-model</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.servicemix.bundles</groupId>
-      <artifactId>org.apache.servicemix.bundles.xpp3</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>findbugs</groupId>
-      <artifactId>annotations</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <groupId>org.apache.maven.plugins</groupId>
-        <configuration>
-          <systemPropertyVariables>
-            <workingDirectory>${basedir}/target</workingDirectory>
-            <felix.cache.rootdir>
-              ${project.build.directory}
-            </felix.cache.rootdir>
-            <felix.cache.locking>
-              false
-            </felix.cache.locking>
-            <org.osgi.framework.storage>
-              osgi-cache
-            </org.osgi.framework.storage>
-          </systemPropertyVariables>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <configuration>
-          <archive>
-            <manifestFile>META-INF/MANIFEST.MF</manifestFile>
-            <addMavenDescriptor>false</addMavenDescriptor>
-          </archive>
-        </configuration>
-      </plugin>
-      
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <inherited>true</inherited>
-        <extensions>true</extensions>
-        <configuration>
-          <manifestLocation>META-INF</manifestLocation>
-          <instructions>
-            <Bundle-SymbolicName>${project.groupId}.dsmlv2.parser</Bundle-SymbolicName>
-            <Export-Package>
-              org.apache.directory.api.dsmlv2;version=${project.version};-noimport:=true,
-              org.apache.directory.api.dsmlv2.response;version=${project.version};-noimport:=true,
-              org.apache.directory.api.dsmlv2.request;version=${project.version};-noimport:=true
-            </Export-Package>
-            <Import-Package>
-              org.apache.directory.api.asn1;version=${project.version},
-              org.apache.directory.api.asn1.util;version=${project.version},
-              org.apache.directory.api.i18n;version=${project.version},
-              org.apache.directory.api.ldap.codec.api;version=${project.version},
-              org.apache.directory.api.ldap.model.entry;version=${project.version},
-              org.apache.directory.api.ldap.model.exception;version=${project.version},
-              org.apache.directory.api.ldap.model.filter;version=${project.version},
-              org.apache.directory.api.ldap.model.ldif;version=${project.version},
-              org.apache.directory.api.ldap.model.message;version=${project.version},
-              org.apache.directory.api.ldap.model.message.controls;version=${project.version},
-              org.apache.directory.api.ldap.model.name;version=${project.version},
-              org.apache.directory.api.ldap.model.url;version=${project.version},
-              org.apache.directory.api.util;version=${project.version},
-              org.dom4j;version=${dom4j.version},
-              org.dom4j.io;version=${dom4j.version},
-              org.dom4j.tree;version=${dom4j.version},
-              org.slf4j;version=${slf4j.api.bundleversion},
-              org.xmlpull.v1;version=${xpp3.version},
-              javax.xml.transform,
-              javax.xml.transform.stream
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/trunk/dsml/parser/src/checkstyle/suppressions.xml b/trunk/dsml/parser/src/checkstyle/suppressions.xml
deleted file mode 100644
index 2d4cb41..0000000
--- a/trunk/dsml/parser/src/checkstyle/suppressions.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-  
-  http://www.apache.org/licenses/LICENSE-2.0
-  
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<!DOCTYPE suppressions PUBLIC
-    "-//Puppy Crawl//DTD Suppressions 1.1//EN"
-    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
-
-<suppressions>
-    <suppress files="org.apache.directory.api.dsmlv2.request.Dsmlv2Grammar" checks="FileLength" />
-    <suppress files="org.apache.directory.api.dsmlv2.response.Dsmlv2ResponseGrammar" checks="FileLength" />
-    <suppress files="org.apache.directory.api.dsmlv2.searchRequest.SearchRequestTest" checks="FileLength" />
-</suppressions>
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractDsmlMessageDecorator.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractDsmlMessageDecorator.java
deleted file mode 100644
index 9ce15de..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractDsmlMessageDecorator.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.message.Control;
-import org.apache.directory.api.ldap.model.message.Message;
-import org.apache.directory.api.ldap.model.message.MessageTypeEnum;
-
-
-/**
- * An abstract DSML Message decorator base class.
- *
- * @param <M> The message to decorate
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractDsmlMessageDecorator<M extends Message>
-    implements DsmlDecorator<M>, Message
-{
-    /** The LDAP message codec */
-    private final LdapApiService codec;
-
-    /** The LDAP message */
-    private final M message;
-
-    /** Map of message controls using OID Strings for keys and Control values */
-    private final Map<String, Control> controls;
-
-    /** The current control */
-    private DsmlControl<? extends Control> currentControl;
-
-
-    /**
-     * Create a new instance of AbstractDsmlMessageDecorator
-     * 
-     * @param codec The codec to use
-     * @param message The message to decorate
-     */
-    public AbstractDsmlMessageDecorator( LdapApiService codec, M message )
-    {
-        this.codec = codec;
-        this.message = message;
-        controls = new HashMap<String, Control>();
-    }
-
-
-    /**
-     * Get the current Control Object
-     * 
-     * @return The current Control Object
-     */
-    public DsmlControl<? extends Control> getCurrentControl()
-    {
-        return currentControl;
-    }
-
-
-    /**
-     * @return The codec to use to encode or decode this message
-     */
-    public LdapApiService getCodecService()
-    {
-        return codec;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessageTypeEnum getType()
-    {
-        return message.getType();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Map<String, Control> getControls()
-    {
-        return controls;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Control getControl( String oid )
-    {
-        return controls.get( oid );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean hasControl( String oid )
-    {
-        return controls.containsKey( oid );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message addControl( Control control )
-    {
-        Control decorated;
-        DsmlControl<? extends Control> decorator;
-
-        if ( control instanceof DsmlControl )
-        {
-            decorator = ( DsmlControl<?> ) control;
-            decorated = decorator.getDecorated();
-        }
-        else
-        {
-            decorator = new DsmlControl<Control>( codec, codec.newControl( control ) );
-            decorated = control;
-        }
-
-        message.addControl( decorated );
-        controls.put( control.getOid(), decorator );
-        currentControl = decorator;
-
-        return this;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message addAllControls( Control[] controlsToAdd )
-    {
-        for ( Control control : controlsToAdd )
-        {
-            addControl( control );
-        }
-
-        return this;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message removeControl( Control control )
-    {
-        controls.remove( control.getOid() );
-        message.removeControl( control );
-
-        return this;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getMessageId()
-    {
-        return message.getMessageId();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object get( Object key )
-    {
-        return message.get( key );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Object put( Object key, Object value )
-    {
-        return message.put( key, value );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Message setMessageId( int messageId )
-    {
-        message.setMessageId( messageId );
-
-        return this;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public M getDecorated()
-    {
-        return message;
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
deleted file mode 100644
index a58c949..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/AbstractGrammar.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import java.io.IOException;
-import java.util.HashMap;
-
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.util.Strings;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-
-/**
- * The abstract Grammar which is the Mother of all the grammars. It contains
- * the transitions table.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractGrammar implements Grammar
-{
-    /**
-     * Table of transitions. It's a two dimension array, the first dimension
-     * indexes the states, the second dimension indexes the Tag value, so it is
-     * 256 wide.
-     */
-    protected HashMap<Tag, GrammarTransition>[] transitions;
-
-    /** The grammar name */
-    protected String name;
-
-
-    /**
-     * Returns the grammar's name
-     * 
-     * @return The grammar name
-     */
-    public String getName()
-    {
-        return name;
-    }
-
-
-    /**
-     * Sets the grammar's name
-     * 
-     * @param name the name to set
-     */
-    public void setName( String name )
-    {
-        this.name = name;
-    }
-
-
-    /**
-     * Gets the transition associated with the state and tag
-     * 
-     * @param state The current state
-     * @param tag The current tag
-     * @return A valid transition if any, or null.
-     */
-    public GrammarTransition getTransition( Enum<Dsmlv2StatesEnum> state, Tag tag )
-    {
-        return transitions[state.ordinal()].get( tag );
-    }
-
-
-    /**
-     * Gets the states of the current grammar
-     * 
-     * @return Returns the statesEnum.
-     */
-    public Enum<Dsmlv2StatesEnum>[] getStatesEnum()
-    {
-        return Dsmlv2StatesEnum.values();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void executeAction( Dsmlv2Container container ) throws XmlPullParserException, IOException
-    {
-        XmlPullParser xpp = container.getParser();
-
-        int eventType = xpp.getEventType();
-
-        do
-        {
-            switch ( eventType )
-            {
-                case XmlPullParser.START_DOCUMENT:
-                    container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
-                    break;
-
-                case XmlPullParser.END_DOCUMENT:
-                    container.setState( Dsmlv2StatesEnum.GRAMMAR_END );
-                    break;
-
-                case XmlPullParser.START_TAG:
-                    processTag( container, Tag.START );
-                    break;
-
-                case XmlPullParser.END_TAG:
-                    processTag( container, Tag.END );
-                    break;
-
-                default:
-                    break;
-            }
-
-            eventType = xpp.next();
-        }
-        while ( eventType != XmlPullParser.END_DOCUMENT );
-    }
-
-
-    /**
-     * Processes the task required in the grammar to the given tag type
-     *
-     * @param container the DSML container
-     * @param tagType the tag type
-     * @throws XmlPullParserException when an error occurs during the parsing
-     */
-    private void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
-    {
-        XmlPullParser xpp = container.getParser();
-
-        String tagName = Strings.toLowerCase( xpp.getName() );
-
-        GrammarTransition transition = getTransition( container.getState(), new Tag( tagName, tagType ) );
-
-        if ( transition != null )
-        {
-            container.setState( transition.getNextState() );
-
-            if ( transition.hasAction() )
-            {
-                GrammarAction action = transition.getAction();
-                action.action( container );
-            }
-        }
-        else
-        {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03036, new Tag( tagName, tagType ) ), xpp, null );
-        }
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Action.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Action.java
deleted file mode 100644
index 42d1ef5..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Action.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import org.xmlpull.v1.XmlPullParserException;
-
-
-/**
- * IAction interface just contains the method 'action' which must be implemented
- * in all the implementation classes.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Action
-{
-    /**
-     * The action to be executed.
-     * 
-     * @param container the container which stores the current data
-     * @throws XmlPullParserException thrown if something went wrong.
-     */
-    void action( Dsmlv2Container container ) throws XmlPullParserException;
-}
\ No newline at end of file
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Container.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Container.java
deleted file mode 100644
index 69d3781..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Container.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-/**
- * This interface represents a container that can be used by the parser to store parsed information
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Container
-{
-    /**
-     * Gets the current grammar state
-     * 
-     * @return Returns the current grammar state
-     */
-    Enum<Dsmlv2StatesEnum> getState();
-
-
-    /**
-     * Sets the new current state
-     * 
-     * @param state The new state
-     */
-    void setState( Enum<Dsmlv2StatesEnum> state );
-
-
-    /**
-     * Gets the transition
-     * 
-     * @return Returns the transition from the previous state to the new state
-     */
-    Enum<Dsmlv2StatesEnum> getTransition();
-
-
-    /**
-     * Updates the transition from a state to another
-     * 
-     * @param transition The transition to set
-     */
-    void setTransition( Enum<Dsmlv2StatesEnum> transition );
-
-
-    /**
-     * @return Returns the states.
-     */
-    Enum<Dsmlv2StatesEnum>[] getStates();
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/DsmlControl.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/DsmlControl.java
deleted file mode 100644
index 796a01c..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/DsmlControl.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- *   Licensed to the Apache Software Foundation (ASF) under one
- *   or more contributor license agreements.  See the NOTICE file
- *   distributed with this work for additional information
- *   regarding copyright ownership.  The ASF licenses this file
- *   to you under the Apache License, Version 2.0 (the
- *   "License"); you may not use this file except in compliance
- *   with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- *   Unless required by applicable law or agreed to in writing,
- *   software distributed under the License is distributed on an
- *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *   KIND, either express or implied.  See the License for the
- *   specific language governing permissions and limitations
- *   under the License.
- *
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.message.Control;
-import org.dom4j.Element;
-
-
-/**
- * A DSML decorator for a {@link Control}.
- *
- * @param <C> The decorated Control
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class DsmlControl<C extends Control> implements Control, DsmlDecorator<C>
-{
-    /** The decorated Control */
-    private C decorated;
-
-    /** The encoded value of the control. */
-    protected byte[] value;
-
-    /** The codec service responsible for encoding decoding this object */
-    private LdapApiService codec;
-
-
-    /**
-     * Creates a new instance of DsmlControl
-     * @param codec The Codec used to encode/decode the Control
-     * @param decorated The decorated control
-     */
-    public DsmlControl( LdapApiService codec, C decorated )
-    {
-        this.codec = codec;
-        this.decorated = decorated;
-    }
-
-
-    /**
-     * @return The LDAP codec service.
-     */
-    public LdapApiService getCodecService()
-    {
-        return codec;
-    }
-
-
-    /**
-     * Checks to see if this DSML control decorator has a value.
-     *
-     * @return true if the DSML control has a value, false otherwise.
-     */
-    public boolean hasValue()
-    {
-        return value != null;
-    }
-
-
-    /**
-     * Gets the control value
-     * 
-     * @return The control value
-     */
-    public byte[] getValue()
-    {
-        return value;
-    }
-
-
-    /**
-     * Sets the encoded control value
-     * 
-     * @param value The encoded control value to store
-     */
-    public void setValue( byte[] value )
-    {
-        if ( value != null )
-        {
-            byte[] copy = new byte[value.length];
-            System.arraycopy( value, 0, copy, 0, value.length );
-            this.value = copy;
-        }
-        else
-        {
-            this.value = null;
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public String getOid()
-    {
-        return decorated.getOid();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isCritical()
-    {
-        return decorated.isCritical();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void setCritical( boolean isCritical )
-    {
-        decorated.setCritical( isCritical );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Element toDsml( Element root )
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public C getDecorated()
-    {
-        return decorated;
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/DsmlDecorator.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/DsmlDecorator.java
deleted file mode 100644
index b27c243..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/DsmlDecorator.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import org.dom4j.Element;
-
-
-/**
- * This interface defines the methods that must be implemented to define a DSML Decorator
- * 
- * @param <M> The message to decorate
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface DsmlDecorator<M>
-{
-    /**
-     * Converts the request/reponse to its XML representation in the DSMLv2 format
-     * 
-     * @param root the root dom4j Element
-     * @return the dom4j Element corresponding to the entry.
-     */
-    Element toDsml( Element root );
-
-
-    /**
-     * Gets the Message this DsmlDecorator decorates.
-     * 
-     * @return The decorated Message instance
-     */
-    M getDecorated();
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Container.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Container.java
deleted file mode 100644
index 1e840ad..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Container.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml;
-import org.apache.directory.api.dsmlv2.response.BatchResponseDsml;
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.xmlpull.v1.XmlPullParser;
-
-
-/**
- * This class represents the DSML Container.
- * It used by the DSML Parser to store information.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class Dsmlv2Container implements Container
-{
-    /** The current state of the decoding */
-    private Enum<Dsmlv2StatesEnum> state;
-
-    /** The current transition */
-    private Enum<Dsmlv2StatesEnum> transition;
-
-    /** Store the different states for debug purpose */
-    private Enum<Dsmlv2StatesEnum>[] states;
-
-    /** The pool parser */
-    private XmlPullParser parser;
-
-    /** The BatchRequest of the parsing */
-    private BatchRequestDsml batchRequest;
-
-    /** The BatchResponse of the parsing */
-    private BatchResponseDsml batchResponse;
-
-    /**  The associated grammar */
-    private AbstractGrammar grammar;
-
-    /** The codec service */
-    private final LdapApiService codec;
-
-
-    /**
-     * Creates a new LdapMessageContainer object.
-     * 
-     * @param codec the Codec used to encode/decode the messages
-     */
-    public Dsmlv2Container( LdapApiService codec )
-    {
-        this.codec = codec;
-    }
-
-
-    /**
-     * Gets the {@link LdapApiService} associated with this Container.
-     *
-     * @return The codec used to encode/decode the messages
-     */
-    public LdapApiService getLdapCodecService()
-    {
-        return codec;
-    }
-
-
-    /**
-     * Gets the DSML Batch Request
-     * 
-     * @return Returns the Batch Request
-     */
-    public BatchRequestDsml getBatchRequest()
-    {
-        return batchRequest;
-    }
-
-
-    /**
-     * Sets the DSML Batch Request
-     * 
-     * @param batchRequest the Batch Request to set
-     */
-    public void setBatchRequest( BatchRequestDsml batchRequest )
-    {
-        this.batchRequest = batchRequest;
-    }
-
-
-    /**
-     * Gets the DSML Batch Response
-     * 
-     * @return Returns the Batch Response
-     */
-    public BatchResponseDsml getBatchResponse()
-    {
-        return batchResponse;
-    }
-
-
-    /**
-     * Sets the DSML Batch Request
-     * 
-     * @param batchResponse the Batch Response to set
-     */
-    public void setBatchResponse( BatchResponseDsml batchResponse )
-    {
-        this.batchResponse = batchResponse;
-    }
-
-
-    /**
-     * Gets the parser
-     * 
-     * @return the parser
-     */
-    public XmlPullParser getParser()
-    {
-        return parser;
-    }
-
-
-    /**
-     * Sets the parser
-     * 
-     * @param parser the parser to set
-     */
-    public void setParser( XmlPullParser parser )
-    {
-        this.parser = parser;
-    }
-
-
-    /**
-     * Get the current grammar state
-     * 
-     * @return the current grammar state
-     */
-    public Enum<Dsmlv2StatesEnum> getState()
-    {
-        return state;
-    }
-
-
-    /**
-     * Set the new current state
-     * 
-     * @param state the new state
-     */
-    public void setState( Enum<Dsmlv2StatesEnum> state )
-    {
-        this.state = state;
-    }
-
-
-    /**
-     * Get the transition
-     * 
-     * @return the transition from the previous state to the new state
-     */
-    public Enum<Dsmlv2StatesEnum> getTransition()
-    {
-        return transition;
-    }
-
-
-    /**
-     * Update the transition from a state to another
-     * 
-     * @param transition the transition to set
-     */
-    public void setTransition( Enum<Dsmlv2StatesEnum> transition )
-    {
-        this.transition = transition;
-    }
-
-
-    /**
-     * Get the states for this container's grammars
-     * 
-     * @return the states.
-     */
-    public Enum<Dsmlv2StatesEnum>[] getStates()
-    {
-        return states;
-    }
-
-
-    /**
-     * Gets the grammar
-     *
-     * @return the grammar
-     */
-    public AbstractGrammar getGrammar()
-    {
-        return grammar;
-    }
-
-
-    /**
-     * Sets the Grammar
-     * 
-     * @param grammar the grammar to set
-     */
-    public void setGrammar( AbstractGrammar grammar )
-    {
-        this.grammar = grammar;
-    }
-
-
-    /**
-     * Get the transition associated with the state and tag
-     * 
-     * @param currentState the current state
-     * @param currentTag the current tag
-     * @return a valid transition if any, or null.
-     */
-    public GrammarTransition getTransition( Enum<Dsmlv2StatesEnum> currentState, Tag currentTag )
-    {
-        return grammar.getTransition( currentState, currentTag );
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Parser.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Parser.java
deleted file mode 100644
index f3cb763..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2Parser.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml;
-import org.apache.directory.api.dsmlv2.request.Dsmlv2Grammar;
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.ldap.model.message.Request;
-import org.apache.directory.api.util.Strings;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlPullParserFactory;
-
-
-/**
- * This class represents the DSMLv2 Parser.
- * It can be used to parse a plain DSMLv2 Request input document or the one inside a SOAP envelop.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class Dsmlv2Parser
-{
-    /** The associated DSMLv2 container */
-    private Dsmlv2Container container;
-
-    /**
-     * flag to indicate if the batch request should maintain a list of all the
-     * operation request objects present in the DSML document. Default is true
-     */
-    private boolean storeMsgInBatchReq = true;
-
-    /** The thread safe DSMLv2 Grammar */
-    private Dsmlv2Grammar grammar;
-
-
-    /**
-     * Creates a new instance of Dsmlv2Parser.
-     *
-     * @throws XmlPullParserException if an error occurs during the initialization of the parser
-     */
-    public Dsmlv2Parser() throws XmlPullParserException
-    {
-        this( true );
-    }
-
-
-    /**
-     * Creates a new instance of Dsmlv2Parser.
-     *
-     * @param storeMsgInBatchReq flag to set if the parsed requests should b stored
-     * @throws XmlPullParserException if an error occurs during the initialization of the parser
-     */
-    public Dsmlv2Parser( boolean storeMsgInBatchReq ) throws XmlPullParserException
-    {
-        this.storeMsgInBatchReq = storeMsgInBatchReq;
-
-        this.grammar = new Dsmlv2Grammar();
-        this.container = new Dsmlv2Container( grammar.getLdapCodecService() );
-
-        this.container.setGrammar( grammar );
-
-        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
-        factory.setNamespaceAware( true );
-        XmlPullParser xpp = factory.newPullParser();
-
-        container.setParser( xpp );
-    }
-
-
-    /**
-     * Creates a new instance of Dsmlv2Parser.
-     *
-     * @throws XmlPullParserException if an error occurs during the initialization of the parser
-     */
-    public Dsmlv2Parser( Dsmlv2Grammar grammar ) throws XmlPullParserException
-    {
-        this.container = new Dsmlv2Container( grammar.getLdapCodecService() );
-        this.container.setGrammar( grammar );
-        this.grammar = grammar;
-
-        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
-        factory.setNamespaceAware( true );
-        XmlPullParser xpp = factory.newPullParser();
-
-        container.setParser( xpp );
-    }
-
-
-    /**
-     * Sets the input file the parser is going to parse
-     *
-     * @param fileName the name of the file
-     * @throws FileNotFoundException if the file does not exist
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void setInputFile( String fileName ) throws FileNotFoundException, XmlPullParserException
-    {
-        Reader reader = new FileReader( fileName );
-        container.getParser().setInput( reader );
-    }
-
-
-    /**
-     * Sets the input stream the parser is going to process
-     *
-     * @param inputStream contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
-     * @param inputEncoding if not null it MUST be used as encoding for inputStream
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
-    {
-        container.getParser().setInput( inputStream, inputEncoding );
-    }
-
-
-    /**
-     * Sets the input string the parser is going to parse
-     *
-     * @param str the string the parser is going to parse
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void setInput( String str ) throws XmlPullParserException
-    {
-        container.getParser().setInput( new StringReader( str ) );
-    }
-
-
-    /**
-     * Launches the parsing on the input
-     * This method will parse the whole DSML document, without considering the flag {@link #storeMsgInBatchReq}
-     * @throws XmlPullParserException when an unrecoverable error occurs
-     * @throws IOException when an IO execption occurs
-     */
-    public void parse() throws XmlPullParserException, IOException
-    {
-        grammar.executeAction( container );
-    }
-
-
-    /**
-     * Launches the parsing of the Batch Request only
-     *
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void parseBatchRequest() throws XmlPullParserException
-    {
-        XmlPullParser xpp = container.getParser();
-
-        int eventType = xpp.getEventType();
-
-        do
-        {
-            switch ( eventType )
-            {
-                case XmlPullParser.START_DOCUMENT:
-                    container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
-                    break;
-
-                case XmlPullParser.END_DOCUMENT:
-                    container.setState( Dsmlv2StatesEnum.GRAMMAR_END );
-                    break;
-
-                case XmlPullParser.START_TAG:
-                    processTag( container, Tag.START );
-                    break;
-
-                case XmlPullParser.END_TAG:
-                    processTag( container, Tag.END );
-                    break;
-
-                default:
-                    break;
-            }
-
-            try
-            {
-                eventType = xpp.next();
-            }
-            catch ( IOException ioe )
-            {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
-            }
-        }
-        while ( container.getState() != Dsmlv2StatesEnum.BATCHREQUEST_START_TAG );
-
-        BatchRequestDsml br = container.getBatchRequest();
-
-        if ( br != null )
-        {
-            br.setStoreReq( storeMsgInBatchReq );
-        }
-    }
-
-
-    /**
-     * Processes the task required in the grammar to the given tag type
-     *
-     * @param container the DSML container
-     * @param tagType the tag type
-     * @throws XmlPullParserException when an error occurs during the parsing
-     */
-    private static void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
-    {
-        XmlPullParser xpp = container.getParser();
-
-        String tagName = Strings.toLowerCase( xpp.getName() );
-
-        GrammarTransition transition = container.getTransition( container.getState(), new Tag( tagName, tagType ) );
-
-        if ( transition != null )
-        {
-            container.setState( transition.getNextState() );
-
-            if ( transition.hasAction() )
-            {
-                transition.getAction().action( container );
-            }
-        }
-        else
-        {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03036, new Tag( tagName, tagType ) ), xpp, null );
-        }
-    }
-
-
-    /**
-     * Gets the Batch Request or null if the it has not been parsed yet
-     *
-     * @return the Batch Request or null if the it has not been parsed yet
-     */
-    public BatchRequestDsml getBatchRequest()
-    {
-        return container.getBatchRequest();
-    }
-
-
-    /**
-     * Gets the next Request or null if there's no more request
-     * @return the next Request or null if there's no more request
-     * @throws XmlPullParserException when an error occurs during the parsing
-     */
-    public DsmlDecorator<? extends Request> getNextRequest() throws XmlPullParserException
-    {
-        if ( container.getBatchRequest() == null )
-        {
-            parseBatchRequest();
-        }
-
-        XmlPullParser xpp = container.getParser();
-
-        int eventType = xpp.getEventType();
-        do
-        {
-            while ( eventType == XmlPullParser.TEXT )
-            {
-                try
-                {
-                    xpp.next();
-                }
-                catch ( IOException ioe )
-                {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
-                }
-                eventType = xpp.getEventType();
-            }
-
-            switch ( eventType )
-            {
-                case XmlPullParser.START_DOCUMENT:
-                    container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
-                    break;
-
-                case XmlPullParser.END_DOCUMENT:
-                    container.setState( Dsmlv2StatesEnum.GRAMMAR_END );
-                    return null;
-
-                case XmlPullParser.START_TAG:
-                    processTag( container, Tag.START );
-                    break;
-
-                case XmlPullParser.END_TAG:
-                    processTag( container, Tag.END );
-                    break;
-
-                default:
-                    break;
-            }
-
-            try
-            {
-                eventType = xpp.next();
-            }
-            catch ( IOException ioe )
-            {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
-            }
-        }
-        while ( container.getState() != Dsmlv2StatesEnum.BATCHREQUEST_LOOP );
-
-        return container.getBatchRequest().getCurrentRequest();
-    }
-
-
-    /**
-     * Parses all the requests
-     *
-     * @throws XmlPullParserException when an error occurs during the parsing
-     */
-    public void parseAllRequests() throws XmlPullParserException
-    {
-        while ( getNextRequest() != null )
-        {
-            continue;
-        }
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2ResponseParser.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2ResponseParser.java
deleted file mode 100644
index e6f78fd..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2ResponseParser.java
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-
-import org.apache.directory.api.dsmlv2.response.BatchResponseDsml;
-import org.apache.directory.api.dsmlv2.response.Dsmlv2ResponseGrammar;
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.message.Response;
-import org.apache.directory.api.util.Strings;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-import org.xmlpull.v1.XmlPullParserFactory;
-
-
-/**
- * This class represents the DSMLv2 Parser.
- * It can be used to parse a DSMLv2 Response input.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class Dsmlv2ResponseParser
-{
-    /** The associated DSMLv2 container */
-    private Dsmlv2Container container;
-
-
-    /**
-     * Creates a new instance of Dsmlv2ResponseParser.
-     *
-     * @throws XmlPullParserException if an error occurs while the initialization of the parser
-     */
-    public Dsmlv2ResponseParser( LdapApiService codec ) throws XmlPullParserException
-    {
-        this.container = new Dsmlv2Container( codec );
-
-        this.container.setGrammar( Dsmlv2ResponseGrammar.getInstance() );
-
-        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
-        factory.setNamespaceAware( true );
-        XmlPullParser xpp = factory.newPullParser();
-
-        container.setParser( xpp );
-    }
-
-
-    /**
-     * Sets the input string the parser is going to parse
-     *
-     * @param str the string the parser is going to parse
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void setInput( String str ) throws XmlPullParserException
-    {
-        container.getParser().setInput( new StringReader( str ) );
-    }
-
-
-    /**
-     * Sets the input file the parser is going to parse
-     *
-     * @param fileName the name of the file
-     * @throws FileNotFoundException if the file does not exist
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void setInputFile( String fileName ) throws FileNotFoundException, XmlPullParserException
-    {
-        Reader reader = new FileReader( fileName );
-        container.getParser().setInput( reader );
-    }
-
-
-    /**
-     * Sets the input stream the parser is going to process
-     *
-     * @param inputStream contains a raw byte input stream of possibly unknown encoding (when inputEncoding is null)
-     * @param inputEncoding if not null it MUST be used as encoding for inputStream
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void setInput( InputStream inputStream, String inputEncoding ) throws XmlPullParserException
-    {
-        container.getParser().setInput( inputStream, inputEncoding );
-    }
-
-
-    /**
-     * Launches the parsing on the input
-     * 
-     * @throws XmlPullParserException when an unrecoverable error occurs
-     * @throws IOException when an IO exception occurs
-     */
-    public void parse() throws XmlPullParserException, IOException
-    {
-        Dsmlv2ResponseGrammar grammar = Dsmlv2ResponseGrammar.getInstance();
-
-        grammar.executeAction( container );
-    }
-
-
-    /**
-     * Launches the parsing of the Batch Response only
-     *
-     * @throws XmlPullParserException if an error occurs in the parser
-     */
-    public void parseBatchResponse() throws XmlPullParserException
-    {
-        XmlPullParser xpp = container.getParser();
-
-        int eventType = xpp.getEventType();
-        
-        do
-        {
-            switch ( eventType )
-            {
-                case XmlPullParser.START_DOCUMENT :
-                    container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
-                    break;
-
-                case XmlPullParser.END_DOCUMENT :
-                    container.setState( Dsmlv2StatesEnum.GRAMMAR_END );
-                    break;
-
-                case XmlPullParser.START_TAG :
-                    processTag( container, Tag.START );
-                    break;
-
-                case XmlPullParser.END_TAG :
-                    processTag( container, Tag.END );
-                    break;
-
-                default:
-                    break;
-            }
-            
-            try
-            {
-                eventType = xpp.next();
-            }
-            catch ( IOException ioe )
-            {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
-            }
-        }
-        while ( container.getState() != Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP );
-    }
-
-
-    /**
-     * Processes the task required in the grammar to the given tag type
-     *
-     * @param container the DSML container
-     * @param tagType the tag type
-     * @throws XmlPullParserException when an error occurs during the parsing
-     */
-    private static void processTag( Dsmlv2Container container, int tagType ) throws XmlPullParserException
-    {
-        XmlPullParser xpp = container.getParser();
-
-        String tagName = Strings.toLowerCase( xpp.getName() );
-
-        GrammarTransition transition = container.getTransition( container.getState(), new Tag( tagName, tagType ) );
-
-        if ( transition != null )
-        {
-            container.setState( transition.getNextState() );
-
-            if ( transition.hasAction() )
-            {
-                transition.getAction().action( container );
-            }
-        }
-        else
-        {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03036, new Tag( tagName, tagType ) ), xpp, null );
-        }
-    }
-
-
-    /**
-     * Gets the Batch Response or null if the it has not been parsed yet
-     *
-     * @return the Batch Response or null if the it has not been parsed yet
-     */
-    public BatchResponseDsml getBatchResponse()
-    {
-        return container.getBatchResponse();
-    }
-
-
-    /**
-     * Returns the next Request or null if there's no more request
-     * @return the next Request or null if there's no more request
-     * @throws XmlPullParserException when an error occurs during the parsing
-     */
-    public DsmlDecorator<? extends Response> getNextResponse() throws XmlPullParserException
-    {
-        if ( container.getBatchResponse() == null )
-        {
-            parseBatchResponse();
-        }
-
-        XmlPullParser xpp = container.getParser();
-
-        int eventType = xpp.getEventType();
-        do
-        {
-            while ( eventType == XmlPullParser.TEXT )
-            {
-                try
-                {
-                    xpp.next();
-                }
-                catch ( IOException ioe )
-                {
-                    throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
-                }
-                eventType = xpp.getEventType();
-            }
-
-            switch ( eventType )
-            {
-                case XmlPullParser.START_DOCUMENT :
-                    container.setState( Dsmlv2StatesEnum.INIT_GRAMMAR_STATE );
-                    break;
-
-                case XmlPullParser.END_DOCUMENT :
-                    container.setState( Dsmlv2StatesEnum.GRAMMAR_END );
-                    return null;
-
-                case XmlPullParser.START_TAG :
-                    processTag( container, Tag.START );
-                    break;
-
-                case XmlPullParser.END_TAG :
-                    processTag( container, Tag.END );
-                    break;
-
-                default:
-                    break;
-            }
-            
-            try
-            {
-                eventType = xpp.next();
-            }
-            catch ( IOException ioe )
-            {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03037, ioe.getLocalizedMessage() ), xpp, ioe );
-            }
-        }
-        while ( container.getState() != Dsmlv2StatesEnum.BATCH_RESPONSE_LOOP );
-
-        return container.getBatchResponse().getCurrentResponse();
-    }
-
-
-    /**
-     * Parses all the responses
-     *
-     * @throws XmlPullParserException when an error occurs during the parsing
-     */
-    public void parseAllResponses() throws XmlPullParserException
-    {
-        while ( getNextResponse() != null )
-        {
-            continue;
-        }
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2StatesEnum.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2StatesEnum.java
deleted file mode 100644
index 501c715..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Dsmlv2StatesEnum.java
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.dsmlv2;
-
-
-/**
- * This class store the Dsml grammar's constants. It is also used for debugging
- * purpose.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public enum Dsmlv2StatesEnum
-{
-    /** The initial state of every grammar */
-    INIT_GRAMMAR_STATE,
-
-    /** The ending state for every grammars */
-    GRAMMAR_END,
-
-    //====================================================
-    //  <batchRequest> ... </batchRequest>
-    //====================================================
-    /** The &lt;batchRequest&gt; tag */
-    BATCHREQUEST_START_TAG,
-
-    BATCHREQUEST_LOOP,
-
-    /** The &lt;/batchRequest&gt; tag */
-    BATCHREQUEST_END_TAG,
-
-    //====================================================
-    //  <abandonRequest> ... </abandonRequest>
-    //====================================================
-    /** The &lt;abandonRequest&gt; tag */
-    ABANDON_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    ABANDON_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    ABANDON_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    ABANDON_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    ABANDON_REQUEST_CONTROLVALUE_END_TAG,
-
-    //====================================================
-    //  <addRequest> ... </addRequest>
-    //====================================================
-    /** The &lt;addRequest&gt; tag */
-    ADD_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    ADD_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    ADD_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    ADD_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    ADD_REQUEST_CONTROLVALUE_END_TAG,
-
-    /** The &lt;attr&gt; tag */
-    ADD_REQUEST_ATTR_START_TAG,
-
-    /** The &lt;/attr&gt; tag */
-    ADD_REQUEST_ATTR_END_TAG,
-
-    /** The &lt;value&gt; tag */
-    ADD_REQUEST_VALUE_START_TAG,
-
-    /** The &lt;/value&gt; tag */
-    ADD_REQUEST_VALUE_END_TAG,
-
-    //====================================================
-    //  <authRequest> ... </authRequest>
-    //====================================================
-    /** The &lt;authRequest&gt; tag */
-    AUTH_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    AUTH_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    AUTH_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    AUTH_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    AUTH_REQUEST_CONTROLVALUE_END_TAG,
-
-    //====================================================
-    //  <compareRequest> ... </compareRequest>
-    //====================================================
-    /** The &lt;compareRequest&gt; tag */
-    COMPARE_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    COMPARE_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    COMPARE_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    COMPARE_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    COMPARE_REQUEST_CONTROLVALUE_END_TAG,
-
-    /** The &lt;assertion&gt; tag */
-    COMPARE_REQUEST_ASSERTION_START_TAG,
-
-    /** The &lt;/assertion&gt; tag */
-    COMPARE_REQUEST_ASSERTION_END_TAG,
-
-    /** The &lt;value&gt; tag */
-    COMPARE_REQUEST_VALUE_START_TAG,
-
-    /** The &lt;/value&gt; tag */
-    COMPARE_REQUEST_VALUE_END_TAG,
-
-    //====================================================
-    //  <delRequest> ... </delRequest>
-    //====================================================
-    /** The &lt;delRequest&gt; tag */
-    DEL_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    DEL_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    DEL_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    DEL_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    DEL_REQUEST_CONTROLVALUE_END_TAG,
-
-    //====================================================
-    //  <extendedRequest> ... </extendedRequest>
-    //====================================================
-    /** The &lt;extendedRequest&gt; tag */
-    EXTENDED_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    EXTENDED_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    EXTENDED_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    EXTENDED_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    EXTENDED_REQUEST_CONTROLVALUE_END_TAG,
-
-    /** The &lt;requestName&gt; tag */
-    EXTENDED_REQUEST_REQUESTNAME_START_TAG,
-
-    /** The &lt;/requestName&gt; tag */
-    EXTENDED_REQUEST_REQUESTNAME_END_TAG,
-
-    /** The &lt;requestValue&gt; tag */
-    EXTENDED_REQUEST_REQUESTVALUE_START_TAG,
-
-    /** The &lt;/requestValue&gt; tag */
-    EXTENDED_REQUEST_REQUESTVALUE_END_TAG,
-
-    //====================================================
-    //  <modDNRequest> ... </modDNRequest>
-    //====================================================
-    /** The &lt;modDNRequest&gt; tag */
-    MODIFY_DN_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    MODIFY_DN_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    MODIFY_DN_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    MODIFY_DN_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    MODIFY_DN_REQUEST_CONTROLVALUE_END_TAG,
-
-    //====================================================
-    //  <modifyRequest> ... </modifyRequest>
-    //====================================================
-    /** The &lt;modifyRequest&gt; tag */
-    MODIFY_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    MODIFY_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    MODIFY_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    MODIFY_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    MODIFY_REQUEST_CONTROLVALUE_END_TAG,
-
-    /** The &lt;modification&gt; tag */
-    MODIFY_REQUEST_MODIFICATION_START_TAG,
-
-    /** The &lt;/modification&gt; tag */
-    MODIFY_REQUEST_MODIFICATION_END_TAG,
-
-    /** The &lt;value&gt; tag */
-    MODIFY_REQUEST_VALUE_START_TAG,
-
-    /** The &lt;/value&gt; tag */
-    MODIFY_REQUEST_VALUE_END_TAG,
-
-    //====================================================
-    //  <searchRequest> ... </searchRequest>
-    //====================================================
-    /** The &lt;searchRequest&gt; tag */
-    SEARCH_REQUEST_START_TAG,
-
-    /** The &lt;control&gt; tag */
-    SEARCH_REQUEST_CONTROL_START_TAG,
-
-    /** The &lt;/control&gt; tag */
-    SEARCH_REQUEST_CONTROL_END_TAG,
-
-    /** The &lt;controlValue&gt; tag */
-    SEARCH_REQUEST_CONTROLVALUE_START_TAG,
-
-    /** The &lt;/controlValue&gt; tag */
-    SEARCH_REQUEST_CONTROLVALUE_END_TAG,
-
-    /** The &lt;filter&gt; tag */
-    SEARCH_REQUEST_FILTER_START_TAG,
-
-    /** The &lt;/filter&gt; tag */
-    SEARCH_REQUEST_FILTER_END_TAG,
-
-    /** The &lt;attributes&gt; tag */
-    SEARCH_REQUEST_ATTRIBUTES_START_TAG,
-
-    /** The &lt;/attributes&gt; tag */
-    SEARCH_REQUEST_ATTRIBUTES_END_TAG,
-
-    /** The &lt;attribute&gt; tag */
-    SEARCH_REQUEST_ATTRIBUTE_START_TAG,
-
-    /** The &lt;/attribute&gt; tag */
-    SEARCH_REQUEST_ATTRIBUTE_END_TAG,
-
-    /** The &lt;equalityMatch&gt; tag */
-    SEARCH_REQUEST_EQUALITYMATCH_START_TAG,
-
-    /** The &lt;subStrings&gt; tag */
-    SEARCH_REQUEST_SUBSTRINGS_START_TAG,
-
-    /** The &lt;/subStrings&gt; tag */
-    SEARCH_REQUEST_SUBSTRINGS_END_TAG,
-
-    /** The &lt;greaterOrEqual&gt; tag */
-    SEARCH_REQUEST_GREATEROREQUAL_START_TAG,
-
-    /** The &lt;lessOrEqual&gt; tag */
-    SEARCH_REQUEST_LESSOREQUAL_START_TAG,
-
-    /** The &lt;present&gt; tag */
-    SEARCH_REQUEST_PRESENT_START_TAG,
-
-    /** The &lt;approxMatch&gt; tag */
-    SEARCH_REQUEST_APPROXMATCH_START_TAG,
-
-    /** The &lt;extensibleMatch&gt; tag */
-    SEARCH_REQUEST_EXTENSIBLEMATCH_START_TAG,
-
-    /** The &lt;value&gt; tag */
-    SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_START_TAG,
-
-    /** The &lt;/value&gt; tag */
-    SEARCH_REQUEST_EXTENSIBLEMATCH_VALUE_END_TAG,
-
-    /** The &lt;initial&gt; tag */
-    SEARCH_REQUEST_INITIAL_START_TAG,
-
-    /** The &lt;/initial&gt; tag */
-    SEARCH_REQUEST_INITIAL_END_TAG,
-
-    /** The &lt;any&gt; tag */
-    SEARCH_REQUEST_ANY_START_TAG,
-
-    /** The &lt;/any&gt; tag */
-    SEARCH_REQUEST_ANY_END_TAG,
-
-    /** The &lt;final&gt; tag */
-    SEARCH_REQUEST_FINAL_START_TAG,
-
-    /** The &lt;/final&gt; tag */
-    SEARCH_REQUEST_FINAL_END_TAG,
-
-    /** The &lt;value&gt; tag */
-    SEARCH_REQUEST_VALUE_START_TAG,
-
-    /** The &lt;/value&gt; tag */
-    SEARCH_REQUEST_VALUE_END_TAG,
-
-    /** The Filter Loop state */
-    SEARCH_REQUEST_FILTER_LOOP,
-
-    //****************
-    // DSML Response 
-    //****************
-
-    /** The Batch Response Loop state */
-    BATCH_RESPONSE_LOOP,
-
-    /** The Error Response Loop state */
-    ERROR_RESPONSE,
-
-    /** The Message Start state */
-    MESSAGE_START,
-
-    /** The Message End state */
-    MESSAGE_END,
-
-    /** The Detail Start state */
-    DETAIL_START,
-
-    /** The Detail End state */
-    DETAIL_END,
-
-    /** The Extended Response state */
-    EXTENDED_RESPONSE,
-
-    /** The Extended Response Control Start state */
-    EXTENDED_RESPONSE_CONTROL_START,
-
-    /** The Extended Response Control End state */
-    EXTENDED_RESPONSE_CONTROL_END,
-
-    /** The Extended Response Control Value Start state */
-    EXTENDED_RESPONSE_CONTROL_VALUE_START,
-
-    /** The Extended Response Control Value End state */
-    EXTENDED_RESPONSE_CONTROL_VALUE_END,
-
-    /** The Extended Response Result Code Start state */
-    EXTENDED_RESPONSE_RESULT_CODE_START,
-
-    /** The Extended Response Result Code End state */
-    EXTENDED_RESPONSE_RESULT_CODE_END,
-
-    /** The Extended Response Error Message Start state */
-    EXTENDED_RESPONSE_ERROR_MESSAGE_START,
-
-    /** The Extended Response Error Message End state */
-    EXTENDED_RESPONSE_ERROR_MESSAGE_END,
-
-    /** The Extended Response Referral Start state */
-    EXTENDED_RESPONSE_REFERRAL_START,
-
-    /** The Extended Response Referral End state */
-    EXTENDED_RESPONSE_REFERRAL_END,
-
-    /** The Response Name Start state */
-    RESPONSE_NAME_START,
-
-    /** The Response Name End state */
-    RESPONSE_NAME_END,
-
-    /** The Response Start state */
-    RESPONSE_START,
-
-    /** The Response End state */
-    RESPONSE_END,
-
-    /** The LDAP Result state */
-    LDAP_RESULT,
-
-    /** The LDAP Result Control Start state */
-    LDAP_RESULT_CONTROL_START,
-
-    /** The LDAP Result Control End state */
-    LDAP_RESULT_CONTROL_END,
-
-    /** The LDAP Result Control Value Start state */
-    LDAP_RESULT_CONTROL_VALUE_START,
-
-    /** The LDAP Result Control Value End state */
-    LDAP_RESULT_CONTROL_VALUE_END,
-
-    /** The LDAP Result Result Code Start state */
-    LDAP_RESULT_RESULT_CODE_START,
-
-    /** The LDAP Result Result Code End state */
-    LDAP_RESULT_RESULT_CODE_END,
-
-    /** The LDAP Result Error Message Start state */
-    LDAP_RESULT_ERROR_MESSAGE_START,
-
-    /** The LDAP Result Error Message End state */
-    LDAP_RESULT_ERROR_MESSAGE_END,
-
-    /** The LDAP Result Referral Start state */
-    LDAP_RESULT_REFERRAL_START,
-
-    /** The LDAP Result Referral End state */
-    LDAP_RESULT_REFERRAL_END,
-
-    /** The LDAP Result End state */
-    LDAP_RESULT_END,
-
-    /** The Search Response state */
-    SEARCH_RESPONSE,
-
-    /** The Search Result Entry state */
-    SEARCH_RESULT_ENTRY,
-
-    /** The Search Result Entry Control Start state */
-    SEARCH_RESULT_ENTRY_CONTROL_START,
-
-    /** The Search Result Entry Control End state */
-    SEARCH_RESULT_ENTRY_CONTROL_END,
-
-    /** The Search Result Entry Control Value Start state */
-    SEARCH_RESULT_ENTRY_CONTROL_VALUE_START,
-
-    /** The Search Result Entry Control Value End state */
-    SEARCH_RESULT_ENTRY_CONTROL_VALUE_END,
-
-    /** The Search Result Entry Attr Start state */
-    SEARCH_RESULT_ENTRY_ATTR_START,
-
-    /** The Search Result Entry Attr End state */
-    SEARCH_RESULT_ENTRY_ATTR_END,
-
-    /** The Search Result Entry Value Start state */
-    SEARCH_RESULT_ENTRY_VALUE_START,
-
-    /** The Search Result Entry Value End state */
-    SEARCH_RESULT_ENTRY_VALUE_END,
-
-    /** The Search Result Entry Loop state */
-    SEARCH_RESULT_ENTRY_LOOP,
-
-    /** The Search Result Reference state */
-    SEARCH_RESULT_REFERENCE,
-
-    /** The Search Result Reference Control Start state */
-    SEARCH_RESULT_REFERENCE_CONTROL_START,
-
-    /** The Search Result Reference Control End state */
-    SEARCH_RESULT_REFERENCE_CONTROL_END,
-
-    /** The Search Result Reference Control Value Start state */
-    SEARCH_RESULT_REFERENCE_CONTROL_VALUE_START,
-
-    /** The Search Result Reference Control Value End state */
-    SEARCH_RESULT_REFERENCE_CONTROL_VALUE_END,
-
-    /** The Search Result Reference Ref Start state */
-    SEARCH_RESULT_REFERENCE_REF_START,
-
-    /** The Search Result Reference Ref End state */
-    SEARCH_RESULT_REFERENCE_REF_END,
-
-    /** The Search Result Reference Loop state */
-    SEARCH_RESULT_REFERENCE_LOOP,
-
-    /** The soap envelop start state */
-    SOAP_ENVELOPE_START_TAG,
-
-    /** The soap envelop end state */
-    SOAP_ENVELOPE_END_TAG,
-
-    /** The soap header start state */
-    SOAP_HEADER_START_TAG,
-
-    /** The soap header end state */
-    SOAP_HEADER_END_TAG,
-
-    /** The soap body start state */
-    SOAP_BODY_START_TAG,
-
-    /** The soap body end state */
-    SOAP_BODY_END_TAG,
-
-    /** The Search Result Done End state */
-    SEARCH_RESULT_DONE_END
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Grammar.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Grammar.java
deleted file mode 100644
index 6572eda..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Grammar.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import java.io.IOException;
-
-import org.xmlpull.v1.XmlPullParserException;
-
-
-/**
- * The interface which expose common behavior of a Grammar implementer.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public interface Grammar
-{
-    /**
-     * This method, when called, executes an action on the current data stored in
-     * the container.
-     * 
-     * @param container the DSML container
-     * @throws XmlPullParserException when an unrecoverable error occurs
-     * @throws IOException when an IO error occurs
-     */
-    void executeAction( Dsmlv2Container container ) throws XmlPullParserException, IOException;
-
-
-    /**
-     * Get the grammar name
-     * 
-     * @return Return the grammar's name
-     */
-    String getName();
-
-
-    /**
-     * Get the statesEnum for the current grammar
-     * 
-     * @return The specific States Enum for the current grammar
-     */
-    Enum<Dsmlv2StatesEnum>[] getStatesEnum();
-
-
-    /**
-     * Set the grammar's name
-     * 
-     * @param name The grammar name
-     */
-    void setName( String name );
-}
\ No newline at end of file
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/GrammarAction.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/GrammarAction.java
deleted file mode 100644
index ce76f7d..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/GrammarAction.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-/**
- * A top level grammar class that store meta informations about the actions.
- * Those informations are not mandatory, but they can be usefull for debugging.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class GrammarAction implements Action
-{
-    /** The action's name */
-    private String name;
-
-
-    /**
-     * Creates a new GrammarAction object.
-     * 
-     * @param name the name of the create daction
-     */
-    public GrammarAction( String name )
-    {
-        this.name = name;
-    }
-
-
-    /**
-     * Print the action's name
-     * 
-     * @return the action's name
-     */
-    public String toString()
-    {
-        return name;
-    }
-}
\ No newline at end of file
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/GrammarTransition.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/GrammarTransition.java
deleted file mode 100644
index d978a8f..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/GrammarTransition.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-/**
- * Define a transition between two states of a grammar. It stores the next
- * state, and the action to execute while transiting.
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class GrammarTransition
-{
-    /** The next state in the grammar */
-    private Enum<Dsmlv2StatesEnum> nextState;
-
-    /** The action associated to the transition */
-    private GrammarAction action;
-
-    /** The current state */
-    private Enum<Dsmlv2StatesEnum> currentState;
-
-
-    /**
-     * Creates a new GrammarTransition object.
-     * 
-     * @param currentState The current transition
-     * @param nextState The target state
-     * @param action The action to execute. It could be null.
-     */
-    public GrammarTransition( Enum<Dsmlv2StatesEnum> currentState, Enum<Dsmlv2StatesEnum> nextState,
-        GrammarAction action )
-    {
-        this.currentState = currentState;
-        this.nextState = nextState;
-        this.action = action;
-    }
-
-
-    /**
-     * Gets the target state
-     * 
-     * @return the target state.
-     */
-    public Enum<Dsmlv2StatesEnum> getNextState()
-    {
-        return nextState;
-    }
-
-
-    /**
-     * Tells if the transition has an associated action.
-     * 
-     * @return  <code>true</code> if an action has been associated to the transition
-     */
-    public boolean hasAction()
-    {
-        return action != null;
-    }
-
-
-    /**
-     * Gets the action associated with the transition
-     * 
-     * @return the action associated with the transition
-     */
-    public GrammarAction getAction()
-    {
-        return action;
-    }
-
-
-    /**
-     * Returns a representation of the transition as a string
-     * 
-     * @param grammar the grammar which state we want a String from
-     * @param statesEnum the states enum that contains the states' names
-     * @return  a representation of the transition as a string.
-     */
-    public String toString( int grammar, Enum<Dsmlv2StatesEnum> statesEnum )
-    {
-
-        StringBuffer sb = new StringBuffer();
-
-        sb.append( "Transition from <" ).append( currentState ).append( "> to <" ).append(
-            nextState ).append( ">, action : " ).append(
-            ( ( action == null ) ? "no action" : action.toString() ) ).append( ">" );
-
-        return sb.toString();
-    }
-}
\ No newline at end of file
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
deleted file mode 100644
index 4cdea7a..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/ParserUtils.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamSource;
-
-import org.apache.directory.api.dsmlv2.actions.ReadSoapHeader;
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml;
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.Processing;
-import org.apache.directory.api.dsmlv2.request.BatchRequestDsml.ResponseOrder;
-import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.api.ldap.codec.api.CodecControl;
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.entry.BinaryValue;
-import org.apache.directory.api.ldap.model.entry.StringValue;
-import org.apache.directory.api.ldap.model.ldif.LdifUtils;
-import org.apache.directory.api.ldap.model.message.Control;
-import org.apache.directory.api.util.Base64;
-import org.apache.directory.api.util.Strings;
-import org.dom4j.Document;
-import org.dom4j.Element;
-import org.dom4j.Namespace;
-import org.dom4j.QName;
-import org.dom4j.io.DocumentResult;
-import org.dom4j.io.DocumentSource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-
-/**
- * This class is a Helper class for the DSML Parser
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public final class ParserUtils
-{
-    /** W3C XML Schema URI. */
-    public static final String XML_SCHEMA_URI = "http://www.w3.org/2001/XMLSchema";
-
-    /** W3C XML Schema Instance URI. */
-    public static final String XML_SCHEMA_INSTANCE_URI = "http://www.w3.org/2001/XMLSchema-instance";
-
-    /** Base-64 identifier. */
-    public static final String BASE64BINARY = "base64Binary";
-
-    /** XSI namespace prefix. */
-    public static final String XSI = "xsi";
-
-    /** XSD namespace prefix. */
-    public static final String XSD = "xsd";
-
-    /** The DSML namespace */
-    public static final Namespace DSML_NAMESPACE = new Namespace( null, "urn:oasis:names:tc:DSML:2:0:core" );
-
-    /** The XSD namespace */
-    public static final Namespace XSD_NAMESPACE = new Namespace( XSD, XML_SCHEMA_URI );
-
-    /** The XSI namespace */
-    public static final Namespace XSI_NAMESPACE = new Namespace( XSI, XML_SCHEMA_INSTANCE_URI );
-
-    /** A logger for this class */
-    private static final Logger LOG = LoggerFactory.getLogger( ParserUtils.class );
-
-
-    private ParserUtils()
-    {
-    }
-
-
-    /**
-     * Returns the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
-     *
-     * @param xpp the XPP parser to use
-     * @return the value of the attribute 'type' of the "XMLSchema-instance' namespace if it exists
-     */
-    public static String getXsiTypeAttributeValue( XmlPullParser xpp )
-    {
-        String type = null;
-        int nbAttributes = xpp.getAttributeCount();
-
-        for ( int i = 0; i < nbAttributes; i++ )
-        {
-            // Checking if the attribute 'type' from XML Schema Instance namespace is used.
-            if ( xpp.getAttributeName( i ).equals( "type" )
-                && xpp.getNamespace( xpp.getAttributePrefix( i ) ).equals( XML_SCHEMA_INSTANCE_URI ) )
-            {
-                type = xpp.getAttributeValue( i );
-                break;
-            }
-        }
-
-        return type;
-    }
-
-
-    /**
-     * Tells is the given value is a Base64 binary value
-     * 
-     * @param parser the XPP parser to use
-     * @param attrValue the attribute value
-     * @return true if the value of the current tag is Base64BinaryEncoded, false if not
-     */
-    public static boolean isBase64BinaryValue( XmlPullParser parser, String attrValue )
-    {
-        if ( attrValue == null )
-        {
-            return false;
-        }
-
-        // We are looking for something that should look like that: "aNameSpace:base64Binary"
-        // We split the String. The first element should be the namespace prefix and the second "base64Binary"
-        String[] splitedString = attrValue.split( ":" );
-
-        return ( splitedString.length == 2 ) && ( XML_SCHEMA_URI.equals( parser.getNamespace( splitedString[0] ) ) )
-            && ( BASE64BINARY.equals( splitedString[1] ) );
-    }
-
-
-    /**
-     * Indicates if the value needs to be encoded as Base64
-     *
-     * @param value the value to check
-     * @return true if the value needs to be encoded as Base64
-     */
-    public static boolean needsBase64Encoding( Object value )
-    {
-        if ( value instanceof StringValue )
-        {
-            return false;
-        }
-        else if ( value instanceof BinaryValue )
-        {
-            return false;
-        }
-        else if ( value instanceof byte[] )
-        {
-            return true;
-        }
-        else if ( value instanceof String )
-        {
-            return !LdifUtils.isLDIFSafe( ( String ) value );
-        }
-
-        return true;
-    }
-
-
-    /**
-     * Encodes the value as a Base64 String
-     *
-     * @param value the value to encode
-     * @return the value encoded as a Base64 String
-     */
-    public static String base64Encode( Object value )
-    {
-        if ( value instanceof byte[] )
-        {
-            return new String( Base64.encode( ( byte[] ) value ) );
-        }
-        else if ( value instanceof String )
-        {
-            return new String( Base64.encode( Strings.getBytesUtf8( ( String ) value ) ) );
-        }
-
-        return "";
-    }
-
-
-    /**
-     * Parses and verify the parsed value of the requestID
-     * 
-     * @param attributeValue the value of the attribute
-     * @param xpp the XmlPullParser
-     * @return the int value of the resquestID
-     * @throws XmlPullParserException if RequestID isn't an Integer and if requestID is below 0
-     */
-    public static int parseAndVerifyRequestID( String attributeValue, XmlPullParser xpp ) throws XmlPullParserException
-    {
-        try
-        {
-            int requestID = Integer.parseInt( attributeValue );
-
-            if ( requestID < 0 )
-            {
-                throw new XmlPullParserException( I18n.err( I18n.ERR_03038, requestID ), xpp, null );
-            }
-
-            return requestID;
-        }
-        catch ( NumberFormatException nfe )
-        {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03039 ), xpp, nfe );
-        }
-    }
-
-
-    /**
-     * Adds Controls to the given Element.
-     *
-     * @param element the element to add the Controls to
-     * @param controls a List of Controls
-     */
-    public static void addControls( LdapApiService codec, Element element, Collection<Control> controls )
-    {
-        if ( controls != null )
-        {
-            for ( Control control : controls )
-            {
-                Element controlElement = element.addElement( "control" );
-
-                if ( control.getOid() != null )
-                {
-                    controlElement.addAttribute( "type", control.getOid() );
-                }
-
-                if ( control.isCritical() )
-                {
-                    controlElement.addAttribute( "criticality", "true" );
-                }
-
-                byte[] value;
-
-                if ( control instanceof CodecControl<?> )
-                {
-                    value = ( ( org.apache.directory.api.ldap.codec.api.CodecControl<?> ) control ).getValue();
-                }
-                else
-                {
-                    value = codec.newControl( control ).getValue();
-                }
-
-                if ( value != null )
-                {
-                    if ( ParserUtils.needsBase64Encoding( value ) )
-                    {
-                        element.getDocument().getRootElement().add( XSD_NAMESPACE );
-                        element.getDocument().getRootElement().add( XSI_NAMESPACE );
-
-                        Element valueElement = controlElement.addElement( "controlValue" ).addText(
-                            ParserUtils.base64Encode( value ) );
-                        valueElement.addAttribute( new QName( "type", XSI_NAMESPACE ), ParserUtils.XSD + ":"
-                            + ParserUtils.BASE64BINARY );
-                    }
-                    else
-                    {
-                        controlElement.addElement( "controlValue" ).setText( Arrays.toString( value ) );
-                    }
-                }
-            }
-        }
-    }
-
-
-    /**
-     * Indicates if a request ID is needed.
-     *
-     * @param container the associated container
-     * @return true if a request ID is needed (ie Processing=Parallel and ResponseOrder=Unordered)
-     * @throws XmlPullParserException if the batch request has not been parsed yet
-     */
-    public static boolean isRequestIdNeeded( Dsmlv2Container container ) throws XmlPullParserException
-    {
-        BatchRequestDsml batchRequest = container.getBatchRequest();
-
-        if ( batchRequest == null )
-        {
-            throw new XmlPullParserException( I18n.err( I18n.ERR_03040 ), container.getParser(), null );
-        }
-
-        return ( ( batchRequest.getProcessing() == Processing.PARALLEL ) && ( batchRequest.getResponseOrder() == ResponseOrder.UNORDERED ) );
-    }
-
-
-    /**
-     * XML Pretty Printer XSLT Transformation
-     * 
-     * @param document the Dom4j Document
-     * @return the transformed document
-     */
-    public static Document styleDocument( Document document )
-    {
-        // load the transformer using JAXP
-        TransformerFactory factory = TransformerFactory.newInstance();
-        Transformer transformer = null;
-
-        try
-        {
-            transformer = factory.newTransformer( new StreamSource( ParserUtils.class
-                .getResourceAsStream( "/org/apache/directory/shared/dsmlv2/DSMLv2.xslt" ) ) );
-        }
-        catch ( TransformerConfigurationException e1 )
-        {
-            LOG.warn( "Failed to create the XSLT transformer", e1 );
-            // return original document
-            return document;
-        }
-
-        // now lets style the given document
-        DocumentSource source = new DocumentSource( document );
-        DocumentResult result = new DocumentResult();
-
-        try
-        {
-            transformer.transform( source, result );
-        }
-        catch ( TransformerException e )
-        {
-            // return original document
-            return document;
-        }
-
-        // return the transformed document
-        Document transformedDoc = result.getDocument();
-        return transformedDoc;
-    }
-
-    /**
-     * GrammarAction that reads the SOAP header data
-     */
-    public static final GrammarAction READ_SOAP_HEADER = new ReadSoapHeader();
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Tag.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Tag.java
deleted file mode 100644
index cb2ea40..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/Tag.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- * 
- *    http://www.apache.org/licenses/LICENSE-2.0
- * 
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- * 
- */
-package org.apache.directory.api.dsmlv2;
-
-
-import org.apache.directory.api.util.Strings;
-
-
-/**
- * This class represents a XML tag.
- * <br/>
- * A XML tag is defined with :
- * <ul>
- *      <li>a name</li>
- *      <li>a type (START tag or END tag)</li>
- * </ul>
- * 
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class Tag
-{
-    /** The name of the tag */
-    private String name;
-
-    /** The type of the tag */
-    private int type;
-
-    /** This int represents a START tag */
-    public static final int START = 0;
-
-    /** This int represents a END tag */
-    public static final int END = 1;
-
-
-    /**
-     * Creates a new instance of Tag.
-     *
-     * @param name the name of the tag
-     * @param type the type of the tag
-     */
-    public Tag( String name, int type )
-    {
-        setName( name );
-        setType( type );
-    }
-
-
-    /**
-     * Gets the name of the tag
-     *
-     * @return the name of the tag
-     */
-    public String getName()
-    {
-        return name;
-    }
-
-
-    /**
-     * Sets the name of the tag
-     *
-     * @param name the name to set
-     */
-    public void setName( String name )
-    {
-        this.name = Strings.toLowerCase( name );
-    }
-
-
-    /**
-     * Gets the type of the tag
-     *
-     * @return the type of the tag
-     */
-    public int getType()
-    {
-        return type;
-    }
-
-
-    /**
-     * Sets the type of the tag
-     *
-     * @param type the type to set
-     */
-    public void setType( int type )
-    {
-        this.type = type;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean equals( Object obj )
-    {
-        if ( obj instanceof Tag )
-        {
-            Tag tag = ( Tag ) obj;
-            
-            return ( ( this.name.equals( tag.getName() ) ) && ( this.type == tag.getType() ) );
-
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int hashCode()
-    {
-        return name.hashCode() + type << 24;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public String toString()
-    {
-        if ( name != null )
-        {
-            return "<" + ( ( type == Tag.END ) ? "/" : "" ) + name + ">";
-        }
-        else
-        {
-            return "Unknown tag";
-        }
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/actions/ReadSoapHeader.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/actions/ReadSoapHeader.java
deleted file mode 100644
index 77701ed..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/actions/ReadSoapHeader.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- *
- */
-package org.apache.directory.api.dsmlv2.actions;
-
-
-import java.io.IOException;
-
-import org.apache.directory.api.dsmlv2.Dsmlv2Container;
-import org.apache.directory.api.dsmlv2.Dsmlv2StatesEnum;
-import org.apache.directory.api.dsmlv2.GrammarAction;
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
-
-/**
- * The action used to read the SOAP Header
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class ReadSoapHeader extends GrammarAction
-{
-    /**
-     * Instantiates the action.
-     */
-    public ReadSoapHeader()
-    {
-        super( "Reads SOAP header" );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void action( Dsmlv2Container container ) throws XmlPullParserException
-    {
-        try
-        {
-            XmlPullParser xpp = container.getParser();
-            StringBuilder sb = new StringBuilder();
-
-            String startTag = xpp.getText();
-            sb.append( startTag );
-
-            // string '<' and '>'
-            startTag = startTag.substring( 1, startTag.length() - 1 );
-
-            int tagType = -1;
-            String endTag = "";
-
-            // continue parsing till we get to the end tag of SOAP header
-            // and match the tag values including the namespace
-            while ( !startTag.equals( endTag ) )
-            {
-                tagType = xpp.next();
-                endTag = xpp.getText();
-                sb.append( endTag );
-
-                if ( tagType == XmlPullParser.END_TAG )
-                {
-                    // strip '<', '/' and '>'
-                    endTag = endTag.substring( 2, endTag.length() - 1 );
-                }
-            }
-
-            // change the state to header end
-            container.setState( Dsmlv2StatesEnum.SOAP_HEADER_END_TAG );
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();
-        }
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbandonRequestDsml.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbandonRequestDsml.java
deleted file mode 100644
index 7fc6bde..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbandonRequestDsml.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.dsmlv2.request;
-
-
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.message.AbandonRequest;
-import org.apache.directory.api.ldap.model.message.AbandonRequestImpl;
-import org.apache.directory.api.ldap.model.message.Control;
-import org.apache.directory.api.ldap.model.message.MessageTypeEnum;
-import org.dom4j.Element;
-
-
-/**
- * DSML Decorator for AbandonRequest
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public class AbandonRequestDsml extends AbstractRequestDsml<AbandonRequest>
-    implements AbandonRequest
-{
-    /**
-     * Creates a new instance of AbandonRequestDsml.
-     */
-    public AbandonRequestDsml( LdapApiService codec )
-    {
-        super( codec, new AbandonRequestImpl() );
-    }
-
-
-    /**
-     * Creates a new instance of AbandonRequestDsml.
-     *
-     * @param ldapMessage the message to decorate
-     */
-    public AbandonRequestDsml( LdapApiService codec, AbandonRequest ldapMessage )
-    {
-        super( codec, ldapMessage );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public MessageTypeEnum getType()
-    {
-        return getDecorated().getType();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public Element toDsml( Element root )
-    {
-        Element element = super.toDsml( root );
-
-        // AbandonID
-        if ( getDecorated().getAbandoned() != 0 )
-        {
-            element.addAttribute( "abandonID", "" + getDecorated().getAbandoned() );
-        }
-
-        return element;
-    }
-
-
-    /**
-     * Get the abandoned message ID
-     * 
-     * @return Returns the abandoned MessageId.
-     */
-    public int getAbandonedMessageId()
-    {
-        return getDecorated().getAbandoned();
-    }
-
-
-    /**
-     * Set the abandoned message ID
-     * 
-     * @param abandonedMessageId The abandoned messageID to set.
-     */
-    public AbandonRequest setAbandonedMessageId( int abandonedMessageId )
-    {
-        getDecorated().setAbandoned( abandonedMessageId );
-
-        return this;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public int getAbandoned()
-    {
-        return getDecorated().getAbandoned();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public AbandonRequest setAbandoned( int requestId )
-    {
-        getDecorated().setAbandoned( requestId );
-
-        return this;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public AbandonRequest setMessageId( int messageId )
-    {
-        super.setMessageId( messageId );
-
-        return this;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public AbandonRequest addControl( Control control )
-    {
-        return ( AbandonRequest ) super.addControl( control );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public AbandonRequest addAllControls( Control[] controls )
-    {
-        return ( AbandonRequest ) super.addAllControls( controls );
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public AbandonRequest removeControl( Control control )
-    {
-        return ( AbandonRequest ) super.removeControl( control );
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbstractRequestDsml.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbstractRequestDsml.java
deleted file mode 100644
index 155baa0..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbstractRequestDsml.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.dsmlv2.request;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.api.asn1.EncoderException;
-import org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator;
-import org.apache.directory.api.dsmlv2.ParserUtils;
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.message.Request;
-import org.dom4j.Element;
-
-
-/**
- * Abstract class for DSML requests.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractRequestDsml<E extends Request>
-    extends AbstractDsmlMessageDecorator<E>
-    implements Request
-{
-    /**
-     * Creates a new instance of AbstractRequestDsml.
-     *
-     * @param ldapMessage
-     *      the message to decorate
-     */
-    public AbstractRequestDsml( LdapApiService codec, E ldapMessage )
-    {
-        super( codec, ldapMessage );
-    }
-
-
-    /**
-     * Creates the Request Element and adds RequestID and Controls.
-     *
-     * @param root
-     *      the root element
-     * @return
-     *      the Request Element of the given name containing
-     */
-    public Element toDsml( Element root )
-    {
-        Element element = root.addElement( getRequestName() );
-
-        // Request ID
-        int requestID = getDecorated().getMessageId();
-        if ( requestID > 0 )
-        {
-            element.addAttribute( "requestID", "" + requestID );
-        }
-
-        // Controls
-        ParserUtils.addControls( getCodecService(), element, getDecorated().getControls().values() );
-
-        return element;
-    }
-
-
-    /**
-     * Gets the name of the request according to the type of the decorated element.
-     *
-     * @return
-     *      the name of the request according to the type of the decorated element.
-     */
-    private String getRequestName()
-    {
-        switch ( getDecorated().getType() )
-        {
-            case ABANDON_REQUEST:
-                return "abandonRequest";
-
-            case ADD_REQUEST:
-                return "addRequest";
-
-            case BIND_REQUEST:
-                return "authRequest";
-
-            case COMPARE_REQUEST:
-                return "compareRequest";
-
-            case DEL_REQUEST:
-                return "delRequest";
-
-            case EXTENDED_REQUEST:
-                return "extendedRequest";
-
-            case MODIFYDN_REQUEST:
-                return "modDNRequest";
-
-            case MODIFY_REQUEST:
-                return "modifyRequest";
-
-            case SEARCH_REQUEST:
-                return "searchRequest";
-
-            default:
-                return "error";
-        }
-    }
-
-
-    public int computeLength()
-    {
-        return 0;
-    }
-
-
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean hasResponse()
-    {
-        return getDecorated().hasResponse();
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbstractResultResponseRequestDsml.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbstractResultResponseRequestDsml.java
deleted file mode 100644
index 8aed59e..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AbstractResultResponseRequestDsml.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.directory.api.dsmlv2.request;
-
-
-import java.nio.ByteBuffer;
-
-import org.apache.directory.api.asn1.EncoderException;
-import org.apache.directory.api.dsmlv2.ParserUtils;
-import org.apache.directory.api.ldap.codec.api.LdapApiService;
-import org.apache.directory.api.ldap.model.message.AbandonListener;
-import org.apache.directory.api.ldap.model.message.AbandonableRequest;
-import org.apache.directory.api.ldap.model.message.ResultResponse;
-import org.apache.directory.api.ldap.model.message.ResultResponseRequest;
-import org.dom4j.Element;
-
-
-/**
- * Abstract class for DSML requests.
- *
- * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
- */
-public abstract class AbstractResultResponseRequestDsml<E extends ResultResponseRequest, F extends ResultResponse>
-    extends AbstractRequestDsml<E>
-    implements ResultResponseRequest, AbandonableRequest
-{
-    /**
-     * Creates a new instance of AbstractRequestDsml.
-     *
-     * @param ldapMessage
-     *      the message to decorate
-     */
-    public AbstractResultResponseRequestDsml( LdapApiService codec, E ldapMessage )
-    {
-        super( codec, ldapMessage );
-    }
-
-
-    /**
-     * Creates the Request Element and adds RequestID and Controls.
-     *
-     * @param root
-     *      the root element
-     * @return
-     *      the Request Element of the given name containing
-     */
-    public Element toDsml( Element root )
-    {
-        Element element = root.addElement( getRequestName() );
-
-        // Request ID
-        int requestID = getDecorated().getMessageId();
-        if ( requestID > 0 )
-        {
-            element.addAttribute( "requestID", "" + requestID );
-        }
-
-        // Controls
-        ParserUtils.addControls( getCodecService(), element, getDecorated().getControls().values() );
-
-        return element;
-    }
-
-
-    /**
-     * Gets the name of the request according to the type of the decorated element.
-     *
-     * @return
-     *      the name of the request according to the type of the decorated element.
-     */
-    private String getRequestName()
-    {
-        switch ( getDecorated().getType() )
-        {
-            case ABANDON_REQUEST:
-                return "abandonRequest";
-
-            case ADD_REQUEST:
-                return "addRequest";
-
-            case BIND_REQUEST:
-                return "authRequest";
-
-            case COMPARE_REQUEST:
-                return "compareRequest";
-
-            case DEL_REQUEST:
-                return "delRequest";
-
-            case EXTENDED_REQUEST:
-                return "extendedRequest";
-
-            case MODIFYDN_REQUEST:
-                return "modDNRequest";
-
-            case MODIFY_REQUEST:
-                return "modifyRequest";
-
-            case SEARCH_REQUEST:
-                return "searchRequest";
-
-            default:
-                return "error";
-        }
-    }
-
-
-    public int computeLength()
-    {
-        return 0;
-    }
-
-
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
-    {
-        return null;
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public ResultResponse getResultResponse()
-    {
-        return getDecorated().getResultResponse();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public void abandon()
-    {
-        ( ( AbandonableRequest ) getDecorated() ).abandon();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean isAbandoned()
-    {
-        return ( ( AbandonableRequest ) getDecorated() ).isAbandoned();
-    }
-
-
-    /**
-     * {@inheritDoc}
-     */
-    public AbandonableRequest addAbandonListener( AbandonListener listener )
-    {
-        ( ( AbandonableRequest ) getDecorated() ).addAbandonListener( listener );
-
-        return this;
-    }
-}
diff --git a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AddRequestDsml.java b/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AddRequestDsml.java
deleted file mode 100644
index 1b33764..0000000
--- a/trunk/dsml/parser/src/main/java/org/apache/directory/api/dsmlv2/request/AddRequestDsml.java
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the