org.xiruss.repository.schema_aware
Class SchemaAwareRepositoryBase

java.lang.Object
  extended by org.xiruss.repository.server.RepositoryBase
      extended by org.xiruss.repository.schema_aware.SchemaAwareRepositoryBase
All Implemented Interfaces:
Repository, SchemaAwareRepository

public class SchemaAwareRepositoryBase
extends RepositoryBase
implements SchemaAwareRepository

Implements a multi-user, schema-aware repository.


Field Summary
(package private) static org.apache.log4j.Logger logger
           
protected  java.util.Map schemaRegistry
           
 
Fields inherited from class org.xiruss.repository.server.RepositoryBase
branchesById, branchesByName, defaultStorageManager, dependenciesById, id, interfaceToClassMap, mutableSnapshots, nullBranch, nullMutableSnapshot, nullRepositoryObject, nullResource, nullSnapshot, objectsById, properties, resourcesByAlias, resourcesById, snapshotIdCtr, snapshotsById, usersByAlias, usersById, verIdCtr, versionsByAlias, versionsById
 
Fields inherited from interface org.xiruss.repository.api.Repository
builtinContainerNames, nullDependencyLink, nullDependencyMap, nullRepository, nullResolutionPolicy, nullResourceMap, nullSnapshotMap, nullStorageManager, nullVersion, nullVersionByResourceMap, nullVersionMap
 
Constructor Summary
SchemaAwareRepositoryBase()
           
 
Method Summary
 Resource getSchemaResource(java.lang.String schemaUri)
          Returns the resource of the specified schema.
 boolean hasSchema(java.lang.String schemaUri)
          Returns true if the specified schema URI has been registered.
 void registerSchema(java.lang.String schemaUri, Resource schema)
          Registers a schema URI and its location.
 
Methods inherited from class org.xiruss.repository.server.RepositoryBase
accept, addStorageManager, createBranch, createDependency, createDependency, createDependency, createMutableSnapshot, createMutableSnapshot, createResolutionPolicy, createResource, createSnapshot, createUser, createVersion, getBranch, getBranchById, getBranchByName, getBranchCount, getBranches, getBranchIds, getBranchNames, getDefaultStorageManager, getDependencies, getDependencyById, getDependencyCount, getId, getImplementationClassForClass, getMutableSnapshotById, getMutableSnapshotCount, getMutableSnapshots, getName, getNullResource, getNullSnapshot, getObjectById, getPolicyById, getPolicyCount, getProperties, getRepositoryObjectType, getResolutionPolicies, getResourceById, getResourceByKey, getResourceCount, getResourceIds, getResources, getSnapshotById, getSnapshotCount, getSnapShots, getStorageManager, getURLforResource, getUrlStringForBranch, getUrlStringForResource, getUrlStringForSnapshot, getUrlStringForVersion, getVersionById, getVersionCount, getVersions, hasBranchNamed, hasResourceNamed, importCompoundDoc, listVersionIds, registerBranchName, registerResource, registerSnapshot, registerVersion, reportRepositoryContents, setDefaultStorageManager, setId, setName, setProperty, unRegisterBranchName, whereUsedByTypeOnSnapshot, whereUsedByTypeOnSnapshot, whereUsedOnSnapshot, whereUsedOnSnapshot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schemaRegistry

protected java.util.Map schemaRegistry

logger

static org.apache.log4j.Logger logger
Constructor Detail

SchemaAwareRepositoryBase

public SchemaAwareRepositoryBase()
                          throws RepositoryException
Throws:
RepositoryException
Method Detail

registerSchema

public void registerSchema(java.lang.String schemaUri,
                           Resource schema)
Registers a schema URI and its location.

Specified by:
registerSchema in interface SchemaAwareRepository
Parameters:
schemaUri - The URI (namespace name) of the schema, that is, the namespace that this schema governs.
schema - The repository resource for the schema as it exists within the repository.

hasSchema

public boolean hasSchema(java.lang.String schemaUri)
Returns true if the specified schema URI has been registered.

Specified by:
hasSchema in interface SchemaAwareRepository
Parameters:
schemaUri - The URI (namespace name) of the schema.
Returns:
Returns true if the schema URI has been registered with the repository.

getSchemaResource

public Resource getSchemaResource(java.lang.String schemaUri)
Returns the resource of the specified schema.

Specified by:
getSchemaResource in interface SchemaAwareRepository
Parameters:
schemaUri - The schema to get.
Returns:
Returns the resource of the schema or null if the schema is not registered.