static EntityIdValue fromId ( String id , String siteIri ) { switch ( guessEntityTypeFromId ( id ) ) { case EntityIdValueImpl . JSON_ENTITY_TYPE_ITEM : return new ItemIdValueImpl ( id , siteIri ) ; case EntityIdValueImpl . JSON_ENTITY_TYPE_PROPERTY : return new PropertyIdValueImpl ( id , siteIri ) ; case EntityIdValueImpl . JSON_ENTITY_TYPE_LEXEME : return new LexemeIdValueImpl ( id , siteIri ) ; case EntityIdValueImpl . JSON_ENTITY_TYPE_FORM : return new FormIdValueImpl ( id , siteIri ) ; case EntityIdValueImpl . JSON_ENTITY_TYPE_SENSE : return new SenseIdValueImpl ( id , siteIri ) ; default : throw new IllegalArgumentException ( "Entity id \"" + id + "\" is not supported." ) ; } }
Parses an item id