[utilities COMMIT] /java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/xml/SchemaBuilder.java
noreply at shibboleth.net
noreply at shibboleth.net
Wed Jan 15 16:56:16 EST 2014
Author: scantor
Date: Wed Jan 15 16:56:16 2014
New Revision: 511
URL: http://svn.shibboleth.net/view/utilities?rev=511&view=rev
Log:
Add a reset method to allow for reuse.
Modified:
java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/xml/SchemaBuilder.java
Modified: java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/xml/SchemaBuilder.java
URL: http://svn.shibboleth.net/view/utilities/java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/xml/SchemaBuilder.java?rev=511&r1=510&r2=511&view=diff
==============================================================================
--- java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/xml/SchemaBuilder.java (original)
+++ java-support/trunk/src/main/java/net/shibboleth/utilities/java/support/xml/SchemaBuilder.java Wed Jan 15 16:56:16 2014
@@ -180,7 +180,17 @@
}
/**
- * Adds schemas from the given schema pathnames.
+ * Clear the schemas to be included.
+ *
+ * @return this builder
+ */
+ @Nonnull public SchemaBuilder resetSchemas() {
+ sources.clear();
+ return this;
+ }
+
+ /**
+ * Add schemas from the given schema pathnames.
*
* @param schemaFilesOrDirectories files or directories which contains schema sources
*
@@ -199,11 +209,11 @@
}
/**
- * Adds schemas from the given schema sources.
+ * Add schemas from the given schema sources.
*
* @param schemaFilesOrDirectories files or directories which contains schema sources
*
- * @return the constructed schema
+ * @return this builder
*/
@Nonnull public SchemaBuilder addSchemas(@Nonnull @NullableElements final File... schemaFilesOrDirectories) {
Constraint.isNotNull(schemaFilesOrDirectories, "Schema source files cannot be null");
@@ -219,7 +229,7 @@
}
/**
- * Adds schemas from the given schema input streams.
+ * Add schemas from the given schema input streams.
*
* @param schemaSources schema input streams
*
@@ -238,7 +248,7 @@
}
/**
- * Adds schemas from the given schema sources.
+ * Add schemas from the given schema sources.
*
* @param schemaSources schema sources
*
@@ -257,7 +267,7 @@
}
/**
- * Builds a schema from the given schema sources.
+ * Build a schema from the given schema sources.
*
* @return the constructed schema
* @throws SAXException thrown if there is a problem converting the schema sources into a schema
@@ -288,7 +298,7 @@
}
/**
- * Gets all of the schema files in the given set of readable files, directories or subdirectories.
+ * Get all of the schema files in the given set of readable files, directories or subdirectories.
*
* @param schemaFilesOrDirectories the sources to pull from
*
More information about the commits
mailing list