protected void setupGraphMetadata(GraphMetadataEntry graphMetadataEntry) { Object v = graphMetadataEntry.getValue(); if (graphMetadataEntry.getKey().startsWith(METADATA_DEFINE_PROPERTY_PREFIX)) { if (v instanceof PropertyDefinition) { setupPropertyDefinition((PropertyDefinition) v); } else { throw new SecureGraphException("Invalid property definition metadata: " + graphMetadataEntry.getKey() + " expected " + PropertyDefinition.class.getName() + " found " + v.getClass().getName()); } } else if (graphMetadataEntry.getKey().equals(METADATA_ID_GENERATOR_CLASSNAME)) { if (v instanceof String) { String idGeneratorClassname = (String) graphMetadataEntry.getValue(); if (idGeneratorClassname.equals(idGenerator.getClass().getName())) { foundIdGeneratorClassnameInMetadata = true; } } else { throw new SecureGraphException("Invalid " + METADATA_ID_GENERATOR_CLASSNAME + " expected String found " + v.getClass().getName()); } } }
protected void setupGraphMetadata(GraphMetadataEntry graphMetadataEntry) { Object v = graphMetadataEntry.getValue(); if (graphMetadataEntry.getKey().startsWith(METADATA_DEFINE_PROPERTY_PREFIX)) { if (v instanceof PropertyDefinition) { setupPropertyDefinition((PropertyDefinition) v); } else { throw new SecureGraphException("Invalid property definition metadata: " + graphMetadataEntry.getKey() + " expected " + PropertyDefinition.class.getName() + " found " + v.getClass().getName()); } } else if (graphMetadataEntry.getKey().equals(METADATA_ID_GENERATOR_CLASSNAME)) { if (v instanceof String) { String idGeneratorClassname = (String) graphMetadataEntry.getValue(); if (idGeneratorClassname.equals(idGenerator.getClass().getName())) { foundIdGeneratorClassnameInMetadata = true; } } else { throw new SecureGraphException("Invalid " + METADATA_ID_GENERATOR_CLASSNAME + " expected String found " + v.getClass().getName()); } } }