@Test public void createWithAbsolutePath() throws URISyntaxException { URI schemaUri = getClass().getResource("/schema/address.json").toURI(); Schema schema = new SchemaStore().create(schemaUri, "#/."); assertThat(schema, is(notNullValue())); assertThat(schema.getId(), is(equalTo(schemaUri))); assertThat(schema.getContent().has("description"), is(true)); assertThat(schema.getContent().get("description").asText(), is(equalTo("An Address following the convention of http: }
public synchronized Schema create(URI id, String refFragmentPathDelimiters) { URI normalizedId = id.normalize(); if (!schemas.containsKey(normalizedId)) { URI baseId = removeFragment(id).normalize(); JsonNode baseContent = contentResolver.resolve(baseId); Schema baseSchema = new Schema(baseId, baseContent, null); if (normalizedId.toString().contains("#")) { JsonNode childContent = fragmentResolver.resolve(baseContent, '#' + id.getFragment(), refFragmentPathDelimiters); schemas.put(normalizedId, new Schema(normalizedId, childContent, baseSchema)); } else { schemas.put(normalizedId, baseSchema); } } return schemas.get(normalizedId); }
SchemaStore { public synchronized Schema create(URI id, String refFragmentPathDelimiters) { URI normalizedId = id.normalize(); if (!schemas.containsKey(normalizedId)) { URI baseId = removeFragment(id).normalize(); JsonNode baseContent = contentResolver.resolve(baseId); Schema baseSchema = new Schema(baseId, baseContent, null); if (normalizedId.toString().contains("#")) { JsonNode childContent = fragmentResolver.resolve(baseContent, '#' + id.getFragment(), refFragmentPathDelimiters); schemas.put(normalizedId, new Schema(normalizedId, childContent, baseSchema)); } else { schemas.put(normalizedId, baseSchema); } } return schemas.get(normalizedId); } }
SchemaStore { public synchronized Schema create(URI id, String refFragmentPathDelimiters) { URI normalizedId = id.normalize(); if (!schemas.containsKey(normalizedId)) { URI baseId = removeFragment(id).normalize(); JsonNode baseContent = contentResolver.resolve(baseId); Schema baseSchema = new Schema(baseId, baseContent, null); if (normalizedId.toString().contains("#")) { JsonNode childContent = fragmentResolver.resolve(baseContent, '#' + id.getFragment(), refFragmentPathDelimiters); schemas.put(normalizedId, new Schema(normalizedId, childContent, baseSchema)); } else { schemas.put(normalizedId, baseSchema); } } return schemas.get(normalizedId); } SchemaStore();  SchemaStore(ContentResolver contentResolver); }
SchemaStore { public synchronized Schema create(URI id, String refFragmentPathDelimiters) { URI normalizedId = id.normalize(); if (!schemas.containsKey(normalizedId)) { URI baseId = removeFragment(id).normalize(); JsonNode baseContent = contentResolver.resolve(baseId); Schema baseSchema = new Schema(baseId, baseContent, null); if (normalizedId.toString().contains("#")) { JsonNode childContent = fragmentResolver.resolve(baseContent, '#' + id.getFragment(), refFragmentPathDelimiters); schemas.put(normalizedId, new Schema(normalizedId, childContent, baseSchema)); } else { schemas.put(normalizedId, baseSchema); } } return schemas.get(normalizedId); } SchemaStore();  SchemaStore(ContentResolver contentResolver); synchronized Schema create(URI id, String refFragmentPathDelimiters); @SuppressWarnings("PMD.UselessParentheses") Schema create(Schema parent, String path, String refFragmentPathDelimiters); synchronized void clearCache(); }
SchemaStore { public synchronized Schema create(URI id, String refFragmentPathDelimiters) { URI normalizedId = id.normalize(); if (!schemas.containsKey(normalizedId)) { URI baseId = removeFragment(id).normalize(); JsonNode baseContent = contentResolver.resolve(baseId); Schema baseSchema = new Schema(baseId, baseContent, null); if (normalizedId.toString().contains("#")) { JsonNode childContent = fragmentResolver.resolve(baseContent, '#' + id.getFragment(), refFragmentPathDelimiters); schemas.put(normalizedId, new Schema(normalizedId, childContent, baseSchema)); } else { schemas.put(normalizedId, baseSchema); } } return schemas.get(normalizedId); } SchemaStore();  SchemaStore(ContentResolver contentResolver); synchronized Schema create(URI id, String refFragmentPathDelimiters); @SuppressWarnings("PMD.UselessParentheses") Schema create(Schema parent, String path, String refFragmentPathDelimiters); synchronized void clearCache();  }