Example #1
0
 def from_identifier(identifier):
     """Instantiates an Entity object, loads data from entity.json.
     
     @param identifier: Identifier
     @returns: Entity
     """
     return from_json(Entity, identifier.path_abs('json'), identifier)
Example #2
0
 def from_identifier(identifier):
     """Instantiates a Collection object using data from Identidier.
     
     @param identifier: Identifier
     @returns: Collection
     """
     return from_json(Collection, identifier.path_abs('json'), identifier)
Example #3
0
 def from_identifier(identifier):
     """Instantiates an Entity object, loads data from entity.json.
     
     @param identifier: Identifier
     @returns: Entity
     """
     return common.from_json(Entity, identifier.path_abs('json'), identifier)
Example #4
0
 def from_json(path_abs, identifier=None):
     """Instantiates an Entity object from specified entity.json.
     
     @param path_abs: Absolute path to .json file.
     @param identifier: [optional] Identifier
     @returns: Entity
     """
     return common.from_json(Entity, path_abs, identifier)
Example #5
0
 def from_json(path_abs, identifier=None, inherit=True):
     """Instantiates a File object from specified *.json.
     
     @param path_abs: Absolute path to .json file.
     @param inherit: boolean Whether to inherit values from ancestor(s)
     @returns: DDRFile
     """
     return from_json(DDRFile, path_abs, identifier, inherit=inherit)
Example #6
0
 def from_json(path_abs, identifier=None):
     """Instantiates an Entity object from specified entity.json.
     
     @param path_abs: Absolute path to .json file.
     @param identifier: [optional] Identifier
     @returns: Entity
     """
     return from_json(Entity, path_abs, identifier)
Example #7
0
 def from_json(path_abs, identifier=None):
     """Instantiates a Collection object from specified collection.json.
     
     @param path_abs: Absolute path to .json file.
     @param identifier: [optional] Identifier
     @returns: Collection
     """
     return from_json(Collection, path_abs, identifier)
Example #8
0
 def from_identifier(identifier):
     """Instantiates a Collection object using data from Identidier.
     
     @param identifier: Identifier
     @returns: Collection
     """
     return common.from_json(Collection, identifier.path_abs('json'),
                             identifier)
Example #9
0
 def from_json(path_abs, identifier=None):
     """Instantiates a Collection object from specified collection.json.
     
     @param path_abs: Absolute path to .json file.
     @param identifier: [optional] Identifier
     @returns: Collection
     """
     return common.from_json(Collection, path_abs, identifier)
Example #10
0
 def from_json(path_abs, identifier=None):
     """Instantiates a File object from specified *.json.
     
     @param path_abs: Absolute path to .json file.
     @param identifier: [optional] Identifier
     @returns: DDRFile
     """
     #file_ = File(path_abs=path_abs)
     #file_.load_json(fileio.read_text(file_.json_path))
     #return file_
     return common.from_json(File, path_abs, identifier)
Example #11
0
 def from_json(path_abs, identifier=None):
     """Instantiates a File object from specified *.json.
     
     @param path_abs: Absolute path to .json file.
     @param identifier: [optional] Identifier
     @returns: DDRFile
     """
     #file_ = File(path_abs=path_abs)
     #file_.load_json(fileio.read_text(file_.json_path))
     #return file_
     return common.from_json(File, path_abs, identifier)