+ XSQLBluePrint() {
+
+ }
+
+ public void save() {
+ ObjectOutputStream out = null;
+ try {
+ out = new ObjectOutputStream(new DataOutputStream(
+ new FileOutputStream(CACHE_FILE_NAME)));
+ out.writeObject(this);
+ } catch (Exception err) {
+ err.printStackTrace();
+ } finally {
+ try {
+ out.close();
+ } catch (Exception err) {
+ }
+ }
+ }
+
+ static XSQLBluePrint create(final SchemaContext context) {
+ final XSQLBluePrint ret = new XSQLBluePrint();
+ for (Module m : context.getModules()) {
+ XSQLODLUtils.createOpenDaylightCache(ret, m);
+ }
+
+ return ret;
+ }
+
+ public static XSQLBluePrint load(final InputStream ins) {
+ ObjectInputStream in = null;
+ try {
+ in = new ObjectInputStream(new DataInputStream(ins));
+ return (XSQLBluePrint) in.readObject();
+ } catch (Exception err) {
+ err.printStackTrace();
+ } finally {
+ try {
+ in.close();
+ } catch (Exception err) {
+ }
+ }
+ return null;