Skip to content

Package: PendingReference

PendingReference

Coverage

1: /**
2: * Copyright (C) 2022 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jsonld.deserialization.reference;
16:
17: /**
18: * Represents a pending reference.
19: * <p>
20: * A pending reference represents a situation when the JSON-LD contains just an object with and {@code @id}, while the
21: * mapped attribute expects a full-blown object. In this case, it is expected that somewhere in the JSON-LD, there is
22: * the object's full serialization and this is only a reference to it.
23: */
24: public interface PendingReference {
25:
26: /**
27: * Applies the specified referenced object to this pending reference, resolving it.
28: * <p>
29: * Resolving the reference basically means inserting the referenced object into the place represented by this
30: * instance (e.g., field value, collection).
31: *
32: * @param referencedObject The object referenced by this pending reference
33: */
34: void apply(Object referencedObject);
35: }